thouska / spotpy

A Statistical Parameter Optimization Tool
https://spotpy.readthedocs.io/en/latest/
MIT License
247 stars 149 forks source link

Spotpy's SCE-UA application frozen after some trys #283

Open lingchengli opened 2 years ago

lingchengli commented 2 years ago

Hi @thouska,

Thanks for developing Spotpy. I am applying spotpy to calibrate one model, using sceua method. The simple setting code is shown below. I prepared the spot_setup file to link spotpy with the model.

The code runs successfully at the beginning. I submit the mpi job using "mpirun -n 200 python xxx.py". It generates different parameter sets, does the simulations, calculates the objective functions, and continues to write results (e.g., like, simulations) to the fout file.

However, after several hundreds of trys, let's say 400 records. There are 400 lines in the fout files, recording the calibration results from the code. The 400 records are less than my rep setting of 1000. It won't generate any more trys and won't add more lines in the fout file. The code is just frozen at this point until reaching the submitted job's time limit.

I don't know why this happens. If the model setting (e.g., data, or parameters) is not right, it should not work at the very beginning. It only happens after some runs.

Do you have some suggestions and comments?

Many thanks,

    parallel = 'mpi' 
    spot_setup=spot_setup(spotpy.objectivefunctions.kge)
    rep=1000
    sampler=spotpy.algorithms.sceua(spot_setup, dbname=fout, dbformat='csv', parallel=parallel)
    sampler.sample(rep, ngs=40, kstop=5, pcento=0.01, peps=0.01)
junyinglucn commented 1 year ago

hi @lingchengli , have you solve it? I have same issue, do you have any suggestion?

junyinglucn commented 1 year ago

hi @lingchengli , have you solve it? I have same issue, do you have any suggestion?

I have figured my problem out, I use "nohup" for mpirun, the process would be killed after terminal closed. Alternative way is using "screen".

lingchengli commented 1 year ago

Not yet, i still have the same issue. For my case, I submitted the job, so it should not be related to the terminal closed ?

lingchengli commented 1 year ago

@junyinglucn could you show your solution code here, thanks?

lingchengli commented 1 year ago

Hi, @thouska, do you have some great suggestions, many thanks :D

suraj081 commented 4 months ago

Hi, @thouska, do you have some great suggestions, many thanks :D

Hi,@lingchengil did u solve the problem?

suraj081 commented 4 months ago

@lingchengli did u solve the problem related to freezing?