#!/bin/bash -l # Request 8 cores from omp queue (example needs multicores) #$ -pe omp 8 # Load a MATLAB module on the SCC module load matlab/2019a # Check if input exists to set number to compute # s=1+2+3+..+n=n(n+1)/2 with n = NUMBER_SUMS, # set to 100 if no input is supplied if [ -z $1 ] then NUMBER_SUMS=$1 else NUMBER_SUMS=100 fi # Call MATLAB to run hello_pct.m with 8 parpool workers matlab -nodisplay -r "hello_pct($NUMBER_SUMS, $NSLOTS); exit"