SALOME 9.8.0 on Ubuntu 20.04: Geometry computation finished, HDF file not saving

Hi all,

I’m using SALOME 9.8 to create a partitioned and grouped geometry (no meshing involved). The partitioning takes up too much RAM (~80G) and too much time (~24H) so I had to launch my Python script on an AWS machine with Ubuntu 20.04 using the command:

salome -t &

My geometry contains a fleet of cars, I’ve tested my Python script with 48 cars, the whole computation finished successfully and the HDF file was saved without any issue. Then I relaunched the script with 192 cars, the partition and grouping finished in about 24 hours, but then I’ve waited for another 10+ hours, the HDF file is just NOT saving! You can see from my htop sceenshot that SALOME processes are still taking up RAM space but they are just idling without returning any kind of error message.

The HDF file with 48 cars has a size of 230M, so the 192-car version shouldn’t take up more than 1G, I think I have enough space on my disk, so I don’t understand why the HDF won’t save.

SALOME is still idling on my AWS server as I type this post and it’s costing me money, so any suggestions will be much appreciated.


Do you have by chance a big boolean including all objects? I faced a similar issue where I was creating several hundred of bodies and fuse them together and when this was increased I had a similar issue if I was fusing all together in one operation. What solved my issue was to fuse by sections and then fuse again maybe it helps.

Thanks for the reply!

No, I don’t have a big boolean fusing everything together, but I used a technique similar to yours to partitioned all my 192 cars one by one to reduce my RAM usage. Did your problem happen during geometry creation or during HDF saving?

In my case, to find out where exactly went wrong, I’ve added some output messages in my Python script for debugging, and spent another day to rerun the script. The last few lines in my scripts are the following:

602 """
603 Saving Study as HDF
604 """
605 with open(log_file, 'a') as flog:
606     flog.write("Start saving Study as HDF ...\n")
607 t0 = time.time()
609 salome.myStudy.SaveAs(os.path.join(wdir, f"cars_between_blocks_v6_{num_streets}streets_{num_cars_street}cars.hdf"), False, False)
611 t1 = time.time()
612 with open(log_file, 'a') as flog:
613     flog.write("Study saved as HDF\n")
614     flog.write(f"Took {t1-t0} seconds\n")
615     flog.write("===============================================\n")
616     flog.write("Geometry module finished with success!!!\n")
617     flog.write(f"Geometry module took {t1-t0_geom} seconds in total.\n")

When I check my log_file, here are the output of the lines above:

Start saving Study as HDF …
Study saved as HDF
Took 157.07030487060547 seconds
Geometry module finished with success!!!
Geometry module took 93948.70610165596 seconds in total.

I can see that my script ran perfectly from beginning to end without any error, and I even found out that the salome.myStudy.SaveAs() function (line 609) took 157.07 seconds to finish. But the HDF file is just NOT generated in my working directory (the HDF file is successfully generated when I run the script with fewer cars).

Do you know if SALOME has problem saving HDF with too many bodies in a partition? And why there isn’t any error message if SALOME can’t save the file?


the hdf file parts are stored in a folder in /tmp during save. Maybe /tmp has not enough space for your study. Try to set SALOME_TMP_DIR environment variable to another folder.

There is also a 2 GB limitation on hdf file save. In this case the hdf is still created (but shorter), so it may not be your issue here. You can try to use the multi file save options in the preferences that behaves better with big data. Or in python, set True as 2nd argument of SaveAs.

Or export the result of your partition to a CAD file format, like brep.

Best regards,