Hello,
I am trying to couple two matlab instances with precice in a single slurm run on a server.
I was able to launch both instances and they both successfully setup their primary communication, but fail on the secondary communication.
The error message in both instances is
`Caught signal 11 (Segmentation fault: address not mapped to object at address 0xffffffff00000009)`
I try to set up the slurm session with one node and two tasks, such that each instance has one tasks to run on. I do the following:
several Sbatch commands...
#allocation of nodes and tasks
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2
...
cd $basedir && srun --quiet -n1 -c1 ./PDEPE_ser.sh &
cd $basedir && srun --quiet -n1 -c1 ./ODE_ser.sh &
wait
The files PDEPE_ser.sh and ODE_ser.sh are helper scripts to launch the individual matlab sessions by launching ODE.m and PDEPE.m.
Both matlab sessions (ODE.m and PDEPE.m) contain the following line to setup their participation
% in file PDEPE.m
interface = precice.Participant("PDEPE", "precice-config.xml", 0, 1);
meshName ="PDEPE-Mesh";
dims = interface.getMeshDimensions(meshName);
vertexIDs = interface.setMeshVertices(meshName, repmat(1:numVertices,2,1));
% Data IDs
dataNameU = "Head";
dataNameW = "Leakage";
dataNameL = "LowerHead";
interface.initialize();
% in file ODE.m
interface = precice.Participant("ODE", "precice-config.xml", 0, 1);
meshName ="ODE-Mesh";
... % see above
interface.initialize();
I am not quite sure if the error message Caught signal 11 (Segmentation fault:
means that both precice runs cannot find each other, or if it has to do with the matlab-bindings not being able to run in parallel (Support parallel runs (intra-solver parallelism) · Issue #3 · precice/matlab-bindings · GitHub).
function obj = Participant(ParticipantName,configFileName,ProcessIndex,ProcessSize)
%PARTICIPANT Construct an instance of this class
if (ProcessIndex > 0 || ProcessSize > 1)
error('Parallel runs are currently not supported with the MATLAB bindings.')
end
I attached my precice-config.xml
for reference.
Best wishes and thank you for your answer,
Jeremie
precice-config.xml (1.8 KB)