Matlab 2016b is the default version on Acropolis. Additional versions of Matlab can be loaded with the module command. Matlab 2016b is configured to work with the Distributed Computing Server. Matlab DCS is integrated with the job scheduler. This allows you to seamlessly distribute your work across the compute nodes with out the need of a job submit script.
You will need to import the torque profile in order to use Matlab DCS.
1. Start the graphical version of Matlab.
2. From the menu at the top select: Parallel
3. Select: Manage Cluster Profiles
4. Select: Import
5. Navigate to /share/qsub_examples/matlab
6. Select the file torque.settings.
The following example will open a pool of 80 workers and then close and exit Matlab. You will run this directly in Matlab on the head node of the Acropolis cluster.
poolobj = gcp(‘nocreate’);
There are a total of 500 Matlab Distributed Computing Server worker licenses available shared between all users on Acropolis. You may use up to 80 Matlab workers at a time when working with Matlab DCS. You may check the current status of the Matlab licenses by running the command “matlablicense” on the Linux command line.
You may submit Matlab batch jobs to the compute nodes using a submit script. You may use the Parallel Computing Toolbox to start smaller parallel jobs confined to a single node. Matlab PCT jobs do not count against the Matlab DCS licenses. Example submit scripts may be found on Acropolis in the /share/qsub_examples/matlab directory.
matlabparallelbatch.sh can be used to submit 1 instance of Matlab to a compute node which will open a pool of 12 worker processes.
matlabparallelbatcharray.sh will submit 10 instances of Matlab to compute nodes which will each open a pool of 12 workers.
By default Matlab is configured to open a pool of up to 12 workers using the PCT and the local profile. You may adjust the NumWorkers option to set this higher. Each compute node has 56 workers. You may submit a batch job requesting the full 56 cores on a node and then open a parpool of 56 workers. However your work is more likely to queue. This would require that a node be completely idle in order to fulfill this request. Please do not run parallel Matlab jobs on the Acropolis head node with the PCT