Today at lunch Prof. Valaee asked if there are any Matlab toolboxes or packages for modeling computer network activity, comparable to the ns-2 and OPNET packages.
Here are a few links I found that offer various approaches to this in Matlab. There seem to be several for wireless but not so many for wired. I have no info on the quality or usefulness of these, but I've linked them here for ease of reference if anyone wants to explore this. (When searching, a lot more matches come up talking about "neural network" simulation - for this purpose, those are false positives. You could try adding "-neural" to the query to exclude these.)
The Mathworks, Inc. has a series of instructional videos covering Matlab features and their applications. Here's a brief one on using SimEvents and StateFlow (both included in our R2011 and newer) to model ethernet traffic in an event-based format. This may be the closest to what Prof. Valaee had in mind.
Wireless Matlab is an open-source project from 2006 hosted at sourceforge. The blurb specifically compares this effort to ns-2 and OPNET.
10Base-T Ethernet is a user-contributed model of four NICs using CSMA/CD on a segment.
LTE Simulators (for non-commercial academic use) simulates an LTE wireless network in Matlab.
Prowler attempts to simulate distributed embedded systems and sensors, and the impact of wireless channel congestion on their performance. Probably more specialised than what we'd use in ECE.
This paper covers simulating network congestion and its impact on real-time systems control, using an additional toolbox called TrueTime.
This 2004 IEEE paper covers linking together multiple simulators, using ModelSim, Matlab, and ns-2 together Using ModelSim, Matlab/Simulink and NS for Simulation of Distributed Systems
Wednesday, February 22, 2012
Thursday, February 16, 2012
GPU computing in Matlab
February, 2012
We're in the process of putting together a group order for many more licenses for Matlab's Parallel Computing Toolbox (so far we have just two.) This is useful to get Matlab making much more effective use of multi-core CPUs, including systems with dual CPUs as well as CPUs with 2, 4 or more cores. One Matlab session using one PCT license can initiate up to twelve parallel "worker" processes to handle concurrent tasks. We're seeing more and more multi-core systems in mainstream PC configurations.
One particular feature of PCT is its support for direct access to CUDA-capable GPUs. Many nVidia display adapters (video cards) include CUDA capability to one degree or other. This page explains what this enables:
Matlab GPU computing via PCT
The GPU must meet a minimum requirement of Compute Capability v.1.3 or higher. Most current nVidia cards that are CUDA-capable now offer CC v.2.1. Note that not every nVidia card is CUDA-capable even today; the lowest-priced cards omit this, and lower-mid price range cards may include some CUDA support, but with fewer GPU multiprocessors (and thus fewer total GPU cores - there are 8 cores per MP).
I gathered info on the GPUs in any nVidia cards in our Tier 1 linux workstations. Unfortunately the great majority of these are a bit older and most only offer CC v. 1.1, so they can't be accessed by PCT at least via the easiest route. It looks to me like there are other things you can do with building CUDA kernels (e.g. in C, compiling with the 'nvcc' compiler) and then calling those kernels from Matlab. I haven't gone into the details of those methods to see whether / how Matlab would support that. I also have surveyed only a small proportion of Tier 1 Windows PCs so far, and I have no way to check what GPUs may be in any Tier 2 and Tier 3 PCs. That's up to you; here's how to check.
Testing if your system has a CUDA-enabled GPU
You can get the make and model of your video card without opening the case as follows:
- In Windows, open Device Manager (right-click on "My Computer", choose "manage") then look at the Display Adapters section. It will list make and model.
- In Linux, at a shell prompt, type: lspci | grep VGA
You can also ask Matlab to tell you if it has detected a CUDA-capable GPU in your PC. For this to work, you need up-to-date nVidia video drivers installed. The commands are:
gpuDeviceCount
{should return 0, 1 or 2 if you have a dual-GPU setup!}
gpuDevice
This displays a block of info about your GPU, including what ComputeCapability ver.# it has.
Here is Matlab's page on Identifying and Selecting a GPU in Matlab
If your system doesn't have a GPU
... or yours GPU's CC version is too old for Matlab PCT
If you want to take advantage of CUDA from Matlab, the best route (once our big order of more PCT licenses arrives) would likely be to buy a newer nVidia card, taking care to select one with enough GPU cores for what you want it to do.
Overall 'you get what you pay for'; card prices tend to work out to about $0.40 to $0.85 per GPU core. While there are a very few under-$80 cards with CC 2.1 (and at 50-65W, no PCI-power cable needed, see below), these have only 6 or 12 GPU MPs (48 or 96 cores). You need to spend at least $90-100 to get a mid-range CUDA GPU unit with 24 or 30 GPU MPs (192 or 240 cores; e.g. GeForce GTX 260, 275, 280, 285) and you'll need PCI-power cabling to supply their power draws of 200+W.
POWER DRAW
One thing to watch out for is that the more powerful CUDA-enabled cards are both larger and have much higher power draw than a typical video card. So you need to ensure first that there is room in your PC case for the card, positioned in the correct type of PCI slot (typically PCI-express x16). Next, you need to see if your PC's power supply has enough spare power to drive such a large card, and whether it has the required PCI-power connectors. These are either 6- or 8-pin plugs with yellow and black wires (for 12v and ground). Different GPU cards require either one or two 6-pin PCI-power connectors, or on the largest cards, a 6-pin plus an 8-pin or two 8-pin ones. The spec calls for 6-pin plugs to deliver 75W, and 8-pin plugs 150W. Only very specialized and high-output power supplies have any 8-pin connectors, and small to mid-size power supplies often don't even offer any 6-pin ones.
You also need to consider cooling and airflow for these. Perhaps plan to include a good GPU card in your next new system purchase, and have your PC supplier ensure the case and power supply are up to the heat and power loads.
Which boards?
Here is a link to a list of all of nVidia's CUDA-capable GTX video cards. (I haven't listed the Quadro or Telsa boards.) Each name links to the info page for that model, where you can find the specs including # of cores, Compute Capability level, power draw and power connector requirements.
I've compiled a summary of that info for several models currently for sale plus a few of the ones we have in place. I don't think this blog software does tables, so here is a table of nVidia GPU cards with CCC >= v.1.3, showing number of cores, power draw and PCI-power connector counts, and links back to nVidia's product page for each item.
Friday, November 11, 2011
Matlab for Mac
There are changes to Matlab under Mac OS X. In particular, OS X "Lion" requires Matlab R2011A or later. Our group license servers will not be able to upgrade to a license key for R2011A, due to licensing changes from Mathworks.
Instead, users needing R2011A or later will need to point their Matlab to our new license server. We currently have this running on a temporary machine for testing and early deployment, but we need to defer rolling out R2011 to all of ECE until we've had time to build and test our new department-wide server (which will be virtualized, so we need to license and configure VMWare server, etc. as well.)
Current Mac users who want to upgrade to OS X "Lion" will need to contact us about getting R2011A or newer, set up to use the temporary license server.
We're distributing the Mac edition via USB key, as this is much simpler for users than running the installer.
(Editions of Mac OS earlier than "Lion" can still use Matlab R2010B or possibly even earlier, using the existing group license servers.)
Instead, users needing R2011A or later will need to point their Matlab to our new license server. We currently have this running on a temporary machine for testing and early deployment, but we need to defer rolling out R2011 to all of ECE until we've had time to build and test our new department-wide server (which will be virtualized, so we need to license and configure VMWare server, etc. as well.)
Current Mac users who want to upgrade to OS X "Lion" will need to contact us about getting R2011A or newer, set up to use the temporary license server.
We're distributing the Mac edition via USB key, as this is much simpler for users than running the installer.
(Editions of Mac OS earlier than "Lion" can still use Matlab R2010B or possibly even earlier, using the existing group license servers.)
Wednesday, November 9, 2011
Scientific graphing
Further to my earlier post on advanced graphing, here are a few more options.
Now and then students ask about getting SigmaPlot, Origin or similar high-end data analysis, plotting and graphing software. Unfortunately the main commercial products in this field are quite pricey. An academic license for SigmaPlot lists at US $549. Origin for one UofT PC costs $550. OriginLab does have much lower prices for Student Personal Use licenses, ($50/yr.), but you must pay with personal funds and the license can only be used on a student-owned computer (your own laptop or home PC, not an ECE PC.) OriginPro Student Personal Use license
Fortunately, for any task as broadly required as this, we usually find a range of good, low- to no-cost software as well. Many may be less polished or have fewer features than the top commercial entries, but are well worth checking out first. Here are a few I've dug up so far:
The Licensed Software Office carries IBM SPSS, popular in the social sciences, for Windows, Mac and Linux at $80 for a one-year license (Aug.1-Jul.31) for Faculty and staff, or $60 per year (Oct.-Oct.) for students.
SciDAVis is free, open source software for 2D and 3D plots, available for Windows, Mac and Linux: SciDAVis feature summary.
The free statistical programming language called 'R' has powerful graphing and plotting features, as I mentioned in my earlier post on advanced graphing. It is available for Windows, Mac and Linux.
QTiPlot is a lower-priced alternative to Origin, SigmaPlot, SPSS etc. It has a variety of licensing options and pricing.
DPlot for Windows costs $195 and offers a time-limited free trial (output images contain a watermark).
Now and then students ask about getting SigmaPlot, Origin or similar high-end data analysis, plotting and graphing software. Unfortunately the main commercial products in this field are quite pricey. An academic license for SigmaPlot lists at US $549. Origin for one UofT PC costs $550. OriginLab does have much lower prices for Student Personal Use licenses, ($50/yr.), but you must pay with personal funds and the license can only be used on a student-owned computer (your own laptop or home PC, not an ECE PC.) OriginPro Student Personal Use license
Fortunately, for any task as broadly required as this, we usually find a range of good, low- to no-cost software as well. Many may be less polished or have fewer features than the top commercial entries, but are well worth checking out first. Here are a few I've dug up so far:
The Licensed Software Office carries IBM SPSS, popular in the social sciences, for Windows, Mac and Linux at $80 for a one-year license (Aug.1-Jul.31) for Faculty and staff, or $60 per year (Oct.-Oct.) for students.
SciDAVis is free, open source software for 2D and 3D plots, available for Windows, Mac and Linux: SciDAVis feature summary.
The free statistical programming language called 'R' has powerful graphing and plotting features, as I mentioned in my earlier post on advanced graphing. It is available for Windows, Mac and Linux.
QTiPlot is a lower-priced alternative to Origin, SigmaPlot, SPSS etc. It has a variety of licensing options and pricing.
DPlot for Windows costs $195 and offers a time-limited free trial (output images contain a watermark).
Monday, August 29, 2011
Matlab "clones"
Our department has a Matlab license with quite a comprehensive lineup of specialty toolboxes and Simulink blocksets. Students and staff are allowed to use this license remotely from anywhere within Canada, the USA and Mexico (why these? something to do with NAFTA, apparently.) So please don't use our ECE network license to run Matlab on a computer located outside this region (remote login from anywhere to run the code on one of our computers here is permitted.)
But what about after graduation, or for friends and family who may need powerful simulation, matrix arithmetic and m-code functions? Well, aside from the Student Edition of Matlab, there are a number of free products available that provide some similar functionality, including an effort at m-code compatibility. This page offers a write-up on three such packages: FreeMat, Octave and Scilab.
I've heard good things about Scilab in the past, though I haven't tested out any of these three. Prof. Mann has made extensive use of Octave, I understand.
But what about after graduation, or for friends and family who may need powerful simulation, matrix arithmetic and m-code functions? Well, aside from the Student Edition of Matlab, there are a number of free products available that provide some similar functionality, including an effort at m-code compatibility. This page offers a write-up on three such packages: FreeMat, Octave and Scilab.
I've heard good things about Scilab in the past, though I haven't tested out any of these three. Prof. Mann has made extensive use of Octave, I understand.
Thursday, June 30, 2011
Base windows config
The set of things we recommend for any Windows PC, and which we aim to keep installed and updated on PCs we manage, covers a range of free add ons. Here's a start at a current list, as of June 2011:
- Windows Update or Microsoft Update - all updates, patches and service packs
- A current commercial antivirus subscription
- Symantec Endpoint Protection is free to all UofT users at antivirus.utoronto.ca
- MS Security Essentials
- Mozilla Thunderbird email client - currently at v.3.0 from mozilla.com
- Web browsers (MSIE required; user choice of Firefox, Chrome or both)
- MS Internet Explorer browser - currently at v.8, with v.9 forthcoming
- Mozilla Firefox - currently at v.5.0, download from mozillamessaging.com/thunderbird/
- Google Chrome - currently at v.12.0 download from google.com/chrome/
- Spybot S&D anti-spyware - free from www.safer-networking.org - protects browsers
- uncheck "Use TeaTimer" during install
- update, then immunize (takes some time) after that it will auto-update periodically
- Browser plug-ins:
- Adobe Flash player from get.adobe.com/flashplayer - visit in each browser
- Web of Trust search security tool - visit www.mywot.com in each browser and click the button to add the corresponding plug-in for that browser - repeat for MSIE, FF, Chrome
- Adobe Reader X download from get.adobe.com/reader/
- Putty 0.6 - download from sgtatham - copy to All Users--Desktop
- WinSCP standalone - download from winscp.net - copy to All Users--Desktop
- 7-Zip free archive reader/writer from www.7-zip.org - reads WinRAR format
- Mendeley citation manager application and browser plug-ins from www.mendeley.org
- optional addition: Zotero plug-in for Firefox from www.zotero.org
- Browser setup (in all chosen browsers)
- bookmarks/favorites for commonly used UofT sites (library, IEEE, ECE, group, etc.)
- Google Scholar preferences: add UofT as a library for "GetIt(TM)" links in results
Friday, May 27, 2011
GetIt(TM) at Utoronto in Google scholar search
There is a preference setting in the Google Scholar website to let you tell it what libraries you belong to, including the UofT library system.
Go in advanced settings, fill in university of Toronto as a library, and save settings. From now on, your search results in Google Scholar will be annotated with links to access full text of articles and books that our library has. The link says "GetIt(TM) at Utoronto"
Using this on campus gets automatic access to content held by our libraries. To use this from off campus, you need to use the library portal, myaccess.library.utoronto.ca and log in with your UTORid.
Go in advanced settings, fill in university of Toronto as a library, and save settings. From now on, your search results in Google Scholar will be annotated with links to access full text of articles and books that our library has. The link says "GetIt(TM) at Utoronto"
Using this on campus gets automatic access to content held by our libraries. To use this from off campus, you need to use the library portal, myaccess.library.utoronto.ca and log in with your UTORid.
Subscribe to:
Posts (Atom)