Skip to content

Instantly share code, notes, and snippets.

@mwoodbri

mwoodbri/README Secret

Last active May 22, 2023 06:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwoodbri/8758b549d531c66aaf502a3bd39d314c to your computer and use it in GitHub Desktop.
Save mwoodbri/8758b549d531c66aaf502a3bd39d314c to your computer and use it in GitHub Desktop.
Parallel MATLAB
qsub parallel.pbs.sh
parpool(str2num(getenv('NCPUS')));
n = 200;
a = zeros(1,n);
parfor i = 1:n
a(i) = max(abs(eig(rand(500))));
end
#!/bin/bash
#PBS -l walltime=00:30:00,select=1:ncpus=8:ompthreads=8:mem=8g
module load matlab/R2020a
cd $PBS_O_WORKDIR
matlab -batch parallel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment