![]() ![]() NOTE: MATLAB discontinues the use of matlabpool and replaces this with parpool in release R2013b and later. % start the parallel pool with 12 workers Pc.JobStorageLocation = strcat('/scratch/YourUsername/', getenv('SLURM_JOB_ID')) % explicitly set the JobStorageLocation to the temp directory that was The following is an example batch job submission script to do this: #!/bin/bashĪlso, the corresponding MATLAB script needs to include these lines: % create a local cluster object To do this, a temporary directory must be created before launching MATLAB in your submission script and then the matlabpool must be created to explicitly use this unique temporary directory. The solution is to have each of your jobs that will use the PCT set a unique location for storing job information. When submitting multiple jobs to SLURM that will all use the PCT, all of the jobs will attempt to use this default location for storing job information, thereby creating a race condition where one job modifies the files that were put in place by another. By default, this information is stored in /home/YourUsername/.matlab/ (the default JobStorageLocation). ![]() This is simply a directory on the filesystem that MATLAB writes various files to in order to coordinate the parallelization of the matlabpool. The MATLAB PCT requires a temporary Job Storage Location where it stores information about the MATLAB pool that is in use. ![]() When a person submit multiple jobs that are all using PCT for parallelization, the multiple matlabpools that get created have the ability to interfere with one another and this can lead to errors and early termination of scripts. The usual scenario is that the first job would run, but the subsequent jobs would hang or crash as MATLAB won’t allow for a second matlabpool to open. Sometimes multiple parallel MATLAB jobs using the Parallel Computing Toolbox (PCT) would crash. If you are unsure if this affects your workflow, please contact RCHelp. This problem only affects users submitting multiple jobs simultaneously to SLURM on the cluster using the Parallel Computing Toolbox or the Distributed Computing Server. If you are not familiar with the PCT, please read our companion document first. This document describes a potential problem that occurs when using the Parallel Computing Toolbox (PCT) on the FASRC cluster. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |