diff --git a/hysop/tools/io_utils.py b/hysop/tools/io_utils.py index 9f90d27df7a6a5f95def4bd9dbfa7c6469cc5046..6e78f17bc3555e1e16070ad858cf9c6868211773 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):