Error with plotting during simulation
Simulations sometimes crash when trying to plot the results from outputs while the simulation is still running. I get the following error:
Traceback (most recent call last):
File "simul_idempotent_w6.py", line 182, in <module>
sim.time_stepping.start()
File "/.fsnet/data/legi/calcul9/home/reneuve3ja/Dev/fluidsim/fluidsim/base/time_stepping/base.py", line 161, in start
self.one_time_step()
File "/.fsnet/data/legi/calcul9/home/reneuve3ja/Dev/fluidsim/fluidsim/base/time_stepping/base.py", line 194, in one_time_step
self.sim.output.one_time_step()
File "/.fsnet/data/legi/calcul9/home/reneuve3ja/Dev/fluidsim/fluidsim/base/output/base.py", line 440, in one_time_step
self.__dict__[k]._online_save()
File "/.fsnet/data/legi/calcul9/home/reneuve3ja/Dev/fluidsim/fluidsim/base/output/base.py", line 625, in _online_save
self._add_dict_arrays_to_file(self.path_file, dict_results)
File "/.fsnet/data/legi/calcul9/home/reneuve3ja/Dev/fluidsim/fluidsim/base/output/base.py", line 671, in _add_dict_arrays_to_file
with h5py.File(path_file, "r+") as file:
File "/home/users/reneuve3ja/miniconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 408, in __init__
swmr=swmr)
File "/home/users/reneuve3ja/miniconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 175, in make_fid
fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 0.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
Times at which this occurs corresponds times when I tried to simultaneously use output functions that load results from the output files, such as:
output.spatial_means.plot()
output.spectra.plot1d()
output.spectra.plot_kzkh()
The output works fine, but it seems to make the simulation crash when it takes too long (a lot of data to load from files).