UZH-PEG / diversity_envresp1

https://UZH-PEG.github.io/diversity_envresp1/
MIT License
0 stars 0 forks source link

multicore issue #18

Open opetchey opened 2 years ago

opetchey commented 2 years ago

Dear Rainer

I have added to the diversity_envresp1 repo and the microxanox package the method for finding stable states that André recommended. It is all working apart from one thing. Here is the file of code used to run some simulations:

https://github.com/UZH-PEG/diversity_envresp1/blob/main/experiments/0_ss_finding/run_experiment.R

If I run line 20-23 with 1 core, then line 31-53 work fine. But if I run 20-23 with multiple cores, line 31-35 give an error.

Please could you take a look at this. I'm at a bit of a loss.

Thanks! Owen

rkrug commented 2 years ago

Have you checked, if the saved RDS files saved in line 24 are identical between the single and multicore version?

opetchey commented 2 years ago

They not quite the same, but the difference shouldn't matter as far as I see. The difference is caused by this code, which is used to create the two version, depending on the number of cores (1, or more than 1):

https://github.com/UZH-PEG/microxanox/blob/main/R/run_temporal_ssfind_experiment.R

rkrug commented 2 years ago

Can you post these two somewhere, or are they fast to create?

opetchey commented 2 years ago

they're fast. I keep things small while testing.

rkrug commented 2 years ago

OK - will run them.

rkrug commented 2 years ago

In the function run_temporal_ssfind_experiment() the result is in one case a data.frame (single core) and in the multi-core, a list of length 1.

I am looking into how this can be fixed.

opetchey commented 2 years ago

thanks