From: Mr. CFD on
Hi,

I have set out my PBS script within "pbsNonSharedParallelSubmitFcn" such that I can split 'n' nodes per index within the parfor loop.

For simplicity, I want to run 2 simulations in parallel by an 'external' program, which is to be distributed on 2 nodes. Therefore, I would request 4 nodes in total (2 for each simulation).

When submitting the job through the scheduler for analysis on an cluster, the process runs smoothly with no errors. However, as soon as the PBS process has been initiated the job terminates (prior to running the actual MATLAB simulations). I suspect, this is becuase, the scheduler within MATLAB maybe getting confused on which node to use for the MATLAB part.

Here is my PBS:
==========================
setEnv = sprintf([ ...
'#!/bin/bash\n', ...
'#PBS -W x=GRES:ansys+5,MATLAB_Distrib_Comp_Engine+5', '\n',...
'#PBS -l walltime=', timeLimit, '\n', ...
'#PBS -N MATLAB_', jobLocation, '\n', ...
'#PBS -j oe', '\n', ...
'#PBS -o ', logFileLocation, '\n', ...
'#PBS -d ', resdir, '\n', ...
'#PBS -l nodes=4', ...
':ppn=1', '\n', ...
'split -l 2 -d $PBS_NODEFILE PBSNODES', '\n', ...
'#PBS -v MDCE_DECODE_FUNCTION=', decodeFunction, ',', ...
'MDCE_STORAGE_LOCATION=', remoteDataLocation, ',', ...
'MDCE_STORAGE_CONSTRUCTOR=', storageConstructor, ',', ...
'MDCE_CMR=', clusterMatlabRoot, ',', ...
'MDCE_MATLAB_EXE=', matlabExecutable, ',', ...
'MDCE_MATLAB_ARGS=', matlabArguments, ',', ...
'MDCE_JOB_LOCATION=', jobLocation, ',', ...
'MDCE_TOTAL_TASKS=', num2str(numberOfTasks), ',', ...
'MDCE_DEBUG=', 'true', ...
'\n', ...
]);
==========================
The job on the scheduler terminates here (i.e. there are no errors). Can you please suggest why MATLAB is terminating prematurely?

Thanks