From 5fe62947fb00ac6153d54b8a5e57a7f0c05c3e8c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Keck <Jean-Baptiste.Keck@imag.fr> Date: Thu, 10 Oct 2019 19:37:47 +0200 Subject: [PATCH] fix error on module --- hysop/tools/io_utils.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hysop/tools/io_utils.py b/hysop/tools/io_utils.py index 9f90d27df..6e78f17bc 100755 --- a/hysop/tools/io_utils.py +++ b/hysop/tools/io_utils.py @@ -312,12 +312,17 @@ class IOParams(namedtuple("IOParams", ['filename', 'filepath', dump_times_fp64 = tuple(map(np.float64, dump_times)) dump_times_fp32 = tuple(map(np.float32, dump_times)) - - ram_path = IO.ram_path() + if force_ram_fs: enable_ram_fs = True - if (ram_path is None): - raise RuntimeError('Could not find any memory based filesystem (ramfs, tmpfs).') + + try: + ram_path = IO.ram_path() + except RuntimeError: + if force_ram_fs: + raise + else: + ram_path = None disk_filepath = None if enable_ram_fs and (ram_path is not None): -- GitLab