omuse icon indicating copy to clipboard operation
omuse copied to clipboard

The I-EMIC interface uses globals

Open Sbte opened this issue 4 years ago • 4 comments

In some applications, we want to have multiple instances of the same model running at the same time (in case we do sampling). The use of globals makes this impossible. It would be nice to get rid of this design flaw.

Note that for the Ocean class of I-EMIC running multiple instances at the same time is also impossible due to the Fortran backend, but we are hoping to fix that one day.

In any case, it is probably better and easier to fix this in OMUSE now than in a few years when the codebase has grown.

Sbte avatar Jun 19 '20 09:06 Sbte

it depends..you can start multiple instances of the i-emic workers since these are independent executables (ie this is possible now, w/o fortran fixes..this issue is one of the original reasons to run the models as seperate executables, instead of linking)..this is the way you would e.g. run an ensemble of models..questions are whether there could still be use cases where a single instance maintains different models...

ipelupessy avatar Jun 30 '20 08:06 ipelupessy

In our case it has to be because states are communicated between the different samples.

Sbte avatar Jun 30 '20 08:06 Sbte

how often/ what is communicated?

ipelupessy avatar Jun 30 '20 09:06 ipelupessy

It depends/states. But let's discuss this during a meeting instead. The point of this issue is just to point out that we should avoid globals if possible. Not to make this use case work right now.

Sbte avatar Jun 30 '20 10:06 Sbte