Changes between Version 1 and Version 2 of WARPLab/MEX


Ignore:
Timestamp:
Aug 23, 2013, 6:09:22 PM (11 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPLab/MEX

    v1 v2  
    1212By default, WARPLab will use built-in java routines for performing network I/O.  However, this has some performance limitations as can be seen by our [http://warpproject.org/trac/wiki/WARPLab/Benchmarks Read IQ / Write IQ performance benchmarks].  Therefore, we have developed a custom WARPLab MEX UDP transport in order to provide a high performance transport for data transfer operations.  The WARPLab MEX UDP transport can provide dramatically faster performance while leaving the usage of WARPLab otherwise identical.
    1313
     14The source files for the WARPLab MEX UDP transport can be found at:
     15
     16 * MEX Code:
     17  * [source:/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex/wl_mex_udp_transport.c wl_mex_udp_transport.c]
     18  * [source:/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex/wl_mex_udp_transport.m wl_mex_udp_transport.m]
     19 * WARPLab MEX UDP Transport:
     20  * [source:/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_mex.m wl_transport_eth_udp_mex.m]
     21  * [source:/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_mex_bcast.m wl_transport_eth_udp_mex_bcast.m]
     22
     23
    1424To install the WARPLab MEX UDP Transport, please perform the following steps:
    1525
    1626NOTE: Make sure you are downloading the WARPLab 7.3.0 (or later) release, or your repository is updated to the WARPLab 7.3.0 (or later) release.  In order to use this transport on your system, you must compile the wl_mex_udp_transport mex function (see [wiki:/howto/MEX_Compile How-To Compile MEX] for more information).
    1727
    18   1. Locate the WARPLab MEX UDP Transport source in one of the following locations:
    19     1. {{{<Unpacked WARPLab Reference Design Directory>\M_Code_Reference\mex\}}}
    20     1. [source:/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex /ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex]
    21     1. {{{svn co http://warpproject.org/svn/WARP/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex}}}
    22   1. TBD -
    23   1. Verify wl_mex_udp_transport is recognized by running {{{wl_mex_udp_transport('version');}}} on the MATLAB command line. The output should print the version number.  For example:
     28  1. Within MATLAB, change your directory to the M_Code_Reference directory that you unpacked as part of the WARPLab release.
     29  1. Run {{{ wl_setup }}} in order to set up your MATLAB paths.  When running {{{ wl_setup }}}, you should only see the java transport available.  If not, please check your paths to make sure there are no issues.
     30    * Now your paths should be set up to proceed.  Run {{{ which wl_mex_udp_transport }}} to check that you can see the mex files.  You should see: {{{ <your WARPLab install dir>/M_Code_Reference/mex/wl_mex_udp_transport.m }}}
     31  1.  Run {{{ wl_mex_udp_transport }}} from the MATLAB command line:
     32{{{
     33>> wl_mex_udp_transport
     34WARPLab wl_mex_udp_transport Setup
     35    Would you like [1] Manual (default) or [2] Automatic compliation?
     36    Selection:
     37}}}
     38    * You have the ability to run either the manual or automatic compilation. 
     39
     40=== Manual Compilation ===
     41
     42If you run the manual compilation, MATLAB will print out the compilation steps:
     43
     44{{{
     45Manual Compliation Steps: 
     46    1) Please familiarize yourself with the process at:
     47         http://warpproject.org/trac/wiki/WARPLab/MEX
     48       to make sure your environment is set up properly.
     49    2) Set up mex to choose your compiler.  (mex -setup)
     50         1. Select "Yes" to have mex locate installed compilers
     51         2. Select "Microsoft Visual C++ 2010 Express"
     52         3. Select "Yes" to verify your selections
     53    3) Change directory to M_Code_Reference/mex (cd mex)
     54    4) Run the compile command:
     55         mex -g -O wl_mex_udp_transport.c -lwsock32 -lKernel32
     56    5) Re-run wl_setup and make sure that "WARPLab Mex UDP" is an available transport.
     57}}}
     58
     59=== Automatic Compilation ===
     60
     61If you run the automatic compilation, the code will attempt to compile the mex using the compiler you installed from the [wiki:../../howto/MEX_Compile How-To Compile MEX] guide. 
     62
     63{{{
     64>> wl_mex_udp_transport
     65WARPLab wl_mex_udp_transport Setup
     66    Would you like [1] Manual (default) or [2] Automatic compliation?
     67    Selection: 2
     68
     69Running Automatic Setup procedure: ...Done.
     70
     71***************************************************************
     72***************************************************************
     73Please re-run wl_setup to use your "WARPLab Mex UDP" transport.
     74***************************************************************
     75***************************************************************
     76}}}
     77
     78If there are any issues, please follow the prompts to set up the compiler (ie you will be running {{{ mex -setup }}}) and then re-run {{{ wl_udp_mex_transport }}} and the compilation should succeed.
     79
     80
     81=== Finalizing Your MEX install ===
     82
     83Please make sure to re-run {{{ wl_setup }}} so that you can choose the WARPLab MEX transport to use with WARPLab.  You can verify that the transport is recognized by running {{{wl_mex_udp_transport('version');}}} on the MATLAB command line. The output should print the version number.  For example:
    2484{{{
    2585>> wl_mex_udp_transport('version');
     
    2989Distributed under the WARP license:  http://warpproject.org/license 
    3090}}}
    31   1. Re-run the [wiki:../Reference/Utility#wl_setup 'wl_setup'] function in {{{M_Code_Reference}}}. One prompt will be to select which type of transport you want to use. If you have added a compatible, compiled wl_mex_udp_transport to your path, the script will list it as an option you can select. 
    3291
    33 NOTE: simply re-running 'wl_setup' and selecting java is sufficient for switching back to the built-in java routines. You do not need to explicitly remove wl_mex_udp_transport from your MATLAB path.
     92
     93NOTE: simply re-running {{{ wl_setup }}} and selecting java is sufficient for switching back to the built-in java routines. You do not need to explicitly remove wl_mex_udp_transport from your MATLAB path.
     94
     95NOTE: once you have correctly compiled your wl_mex_udp_transport, you will no longer be able to just run {{{ wl_udp_mex_transport }}}.  This will result in a usage error because now you need to use the functions within the transport.
     96
     97=== Transport Documentation ===
     98
     99While the source code is heavily commented, you can always run:
     100{{{
     101help wl_mex_udp_transport
     102}}}
     103on the MATLAB command line and it will print out the help information as well as the usage.
     104
     105If you have any additional questions, please let us know on [http://warpproject.org/forums/ the WARP forums].
     106
     107
     108
    34109
    35110[[br]]