cc_staff
176
edits
No edit summary |
(tighten up some of the phrasing and the matlab command lines.) |
||
Line 8: | Line 8: | ||
* Run MATLAB on Cedar or Béluga, both of which have a license available for any student, professor or academic researcher. </li> | * Run MATLAB on Cedar or Béluga, both of which have a license available for any student, professor or academic researcher. </li> | ||
* Use an external license, i.e. one owned by your institution, faculty, department, or lab. See ''Using an external license'' below.</li> | * Use an external license, i.e. one owned by your institution, faculty, department, or lab. See ''Using an external license'' below.</li> | ||
; | ; Compile your MATLAB and run the result | ||
Compile your code into an executable using the MATLAB Compiler, <tt>mcc</tt>. You can use this executable without license considerations. </li> | |||
More details about these approaches are provided below. | More details about these approaches are provided below. | ||
__TOC__ | __TOC__ | ||
Line 19: | Line 19: | ||
<pre> | <pre> | ||
[name@cluster ~]$ module load matlab/2018a | [name@cluster ~]$ module load matlab/2018a | ||
[name@cluster ~]$ matlab -nodisplay -nojvm - | [name@cluster ~]$ matlab -nodisplay -nojvm -batch "disp(license())" | ||
<!--T:30--> | <!--T:30--> | ||
Line 31: | Line 27: | ||
<!--T:22--> | <!--T:22--> | ||
If any license number is printed, you're okay. Be sure to run this test on each cluster on which you want to use MATLAB | If any license number is printed, you're okay. Be sure to run this test on each cluster on which you want to use MATLAB, since licenses may not be available everywhere. | ||
<!--T:39--> | <!--T:39--> | ||
Line 45: | Line 41: | ||
|lang="bash" | |lang="bash" | ||
|contents= | |contents= | ||
# MATLAB license | # MATLAB license server file | ||
SERVER <ip address> | SERVER <ip address> TCP <port> | ||
USE_SERVER | USE_SERVER | ||
}} | }} | ||
Line 72: | Line 68: | ||
<pre> | <pre> | ||
[name@cluster ~]$ module load matlab | [name@cluster ~]$ module load matlab | ||
[name@cluster ~]$ matlab -nodisplay -nojvm - | [name@cluster ~]$ matlab -nodisplay -nojvm -batch "ver" | ||
</pre> | </pre> | ||
= Running a MATLAB code = | = Running a MATLAB code = | ||
<!--T:4--> | <!--T:4--> | ||
'''Important:''' Any MATLAB calculation | '''Important:''' Any significant MATLAB calculation (takes more than about 5 minutes or a gigabyte of memory) must be submitted to the scheduler. For instructions on using the scheduler, please see the [[Running jobs]] page. | ||
<!--T:27--> | <!--T:27--> | ||
Line 190: | Line 186: | ||
<!--T:13--> | <!--T:13--> | ||
'''Important:''' Like any other intensive job, you must always run MCR code within a job | '''Important:''' Like any other intensive job, you must always run MCR code within a job submitted to the scheduler. For instructions on using the scheduler, please see the [[Running jobs]] page. | ||
<!--T:5--> | <!--T:5--> | ||
Line 200: | Line 196: | ||
<!--T:10--> | <!--T:10--> | ||
This will produce a binary named <tt>cosplot</tt>, as well as a wrapper script. To run the binary on Compute Canada servers, you will only | This will produce a binary named <tt>cosplot</tt>, as well as a wrapper script. To run the binary on Compute Canada servers, you will only need the binary. The wrapper script named <tt>run_cosplot.sh</tt> will not work as is on our servers because MATLAB assumes that some libraries can be found in specific locations. Instead, we provide a different wrapper script called <tt>run_mcr_binary.sh</tt> which sets the correct paths. | ||
<!--T:18--> | <!--T:18--> |