Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

parpool(pc, str2num(getenv('numWorkers')))

Download setPool.m

...


matlab_parallel_example.sh

...

matlab -nodisplay -nosplash -r "setPool;matlab_example(200,${slurmArrayID});exit;"

Expected Output

The output for each file will look very similar to the the output for matlab_parallel_example, except there will be 10 different .out and .err files, one for each index in the array.

Download parallel_array_example.sh

...

Single Program Multiple Data (spmd)

spmd gives more control over each of the workers. In the parfor loop, each worker received relatively equal amounts of one larger job. With spmd, each worker can get a unique, specific job assigned to them based on their rank. If you have ten different data sets to analyze you can have ten workers analyze each set individually, in parallel with spmd. Like the parfor loop, spmd cannot be nested within each other and you can break out of the spmd block.

%===========================================

...

%delete the pool and exit matlab
delete(gcp);
exit;

Expected Output

The batch script used for this example is very similar to the one used for Running in Parallel on One Node except ntasks was 4 instead of 20. When completed the out put file for the output file will contain the MATLAB version information, followed by information about the cluster and the pool. Next is the results of the jobs:

...

  1. Check the .err files for your job, they will help you the most. Often it will explicitly state the error that occurred in a specific file on a specific line. If you don't understand the error message try to look it up online. Always double check your spelling and capitalization.
  2. Run sacct. This command tells you the state of each of your jobs and the exit code. You might get a state of OUT_OF_ME+ and an exit code of 125. This means you need to increased the amount of memory you request in your .sh file. Remember #SBATCH --mem uses megabytes by default. Append M, G, or T to the end of the number to request megabytes, gigabytes, or terabytes.
  3. Your job might not be running because there are no resources available. Run squeue and look under the REASON column. If you see (Resources) that means you need to wait for other jobs to finish before yours can run. You can also see this by running sinfo. If you look in the rows for the tier you are trying to run your job in, you'll see none with the STATE idle or mix.

If there are any further questions, or there is an issue with the documentation, please contact rc-help@rit.edu for additional assistance.