development:scripting_languages:matlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:scripting_languages:matlab [2019/10/12 07:55]
meesters created
development:scripting_languages:matlab [2020/02/27 15:12] (current)
jrutte02 [Matlab-Compiler]
Line 74: Line 74:
  
 <code bash> <code bash>
-matlab -nojvm -nosplash+matlab -nodisplay ​-nosplash
 </​code>​ </​code>​
  
Line 110: Line 110:
 Generally, Matlab detects the number of physical cores and opens the same amount of threads to make full use of the multithreading implemented in the built-in functions. So, if you call  Generally, Matlab detects the number of physical cores and opens the same amount of threads to make full use of the multithreading implemented in the built-in functions. So, if you call 
 <​code>​ mcc -m my_mfile.m </​code>​ you obtain multithread code. Often this might be wanted, but you have to make sure that you select the appropriate resources for this then - namely, the appropriate core-affinity. Since Matlab wants to use everything on a host you'll have to call ''​ bsub -n 1 -R '​affinity[cores(64)]'​ ''​ and an appropriate memory reservation. ​ <​code>​ mcc -m my_mfile.m </​code>​ you obtain multithread code. Often this might be wanted, but you have to make sure that you select the appropriate resources for this then - namely, the appropriate core-affinity. Since Matlab wants to use everything on a host you'll have to call ''​ bsub -n 1 -R '​affinity[cores(64)]'​ ''​ and an appropriate memory reservation. ​
-On the other hand, if your code doesn'​t need the full multithreading capability, which often is the case, you should compile your code with the flag '​singleCompThread'​ <​code>​ mcc -m -R -singleCompThread my_mfile.m </​code>​. This makes sure that your standalone code will run on a single computational thread, which not only doesn'​t frustrate the core scheduler and the other users less but improves performance of your code because less time is spent in scheduling all the threads on one core. +On the other hand, if your code doesn'​t need the full multithreading capability, which often is the case, you should compile your code with the flag '​singleCompThread'​ <​code>​ mcc -m -singleCompThread my_mfile.m </​code>​. This makes sure that your standalone code will run on a single computational thread, which not only doesn'​t frustrate the core scheduler and the other users less but improves performance of your code because less time is spent in scheduling all the threads on one core. 
  
 ====== Examples ====== ====== Examples ======
  • development/scripting_languages/matlab.1570859729.txt.gz
  • Last modified: 2019/10/12 07:55
  • by meesters