Difference between revisions of "How to MEX MSlice"

From Mslice
Jump to navigationJump to search
Line 12: Line 12:
 
To MEX the files yourself:
 
To MEX the files yourself:
  
* Download any Windows version 2 distribution of mslice and unzip to a folder of your choice.
+
* [[Download and setup MSlice|Download any Windows distribution]] of mslice and unzip to a folder of your choice.
* Follow the setup instructions below.
+
* [[Download and setup MSlice#Matlab Version|Follow the setup instructions]].
 
* Open Matlab
 
* Open Matlab
 
* Type >> mslice_mex('bit') where bit is either 32 for a 32 bit system or 64 for a 64 bit system (must be a string).
 
* Type >> mslice_mex('bit') where bit is either 32 for a 32 bit system or 64 for a 64 bit system (must be a string).

Revision as of 09:37, 5 September 2008

To create the right Fortran library files, one needs to MEX the Fortran files included with the mslice distribution. Each distribution will have the files MEXed in the correct format for that distribution. However, if you're a developer or if you want to use a system not currently supported, you can MEX the files yourself. These .f90 files are included with every distribution.


How To MEX

If using an operating system that does not currently have a release of mslice, then you can MEX mslice yourself (if possible). You need to have:

  • g95 Fortran compiler (or equivalent) OR Intel Fortran Compiler that is compatible with your version of Matlab.
  • Matlab 7.1 or above


To MEX the files yourself:

  • Download any Windows distribution of mslice and unzip to a folder of your choice.
  • Follow the setup instructions.
  • Open Matlab
  • Type >> mslice_mex('bit') where bit is either 32 for a 32 bit system or 64 for a 64 bit system (must be a string).
  • You will be asked once for your fortran compiler - when asked to show installed compilers, select 'y' and then select either the Intel Fortran compiler or G95 compiler. If neither of these is on the list then you can not MEX the files yourself. Consult your computing services about aquiring one of these compilers.
  • You will then be asked for your c compiler. Choose an appropriate compiler in the same way
  • A success or fail message will be displayed.