-
-
Save mwoodbri/8758b549d531c66aaf502a3bd39d314c to your computer and use it in GitHub Desktop.
Parallel MATLAB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qsub parallel.pbs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parpool(str2num(getenv('NCPUS'))); | |
n = 200; | |
a = zeros(1,n); | |
parfor i = 1:n | |
a(i) = max(abs(eig(rand(500)))); | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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