my purpose is to run an "outer" function which runs several times a specific function in a parfor loop
[ temp1, temp2, temp3] = myfunction (id) ;
where out1, out2, ... and temp1, temp2, ... are struct type data.
When the outer function runs in a HPC on a single node and opens a parpool in 'local' mode, it opens a parpool at the beginning and keeps it open for the whole running time, everything works okay.
But I cannot figure out a way to make it working on more nodes, i.e. by opening a parpool on 2 or more nodes... is it possible? Do you have any suggestion, please?
To specify the nature of the problem: I'm computing 'id' independent calculations of a physical quantity, then I collect the data and integrate them. Each 'id' calculation can run independently on a worker.