S4L is unable to read and load my project

after saving my S4L project, when I try to open the file (always read and loaded), now S4L returns the reported error message and I am no more able to open and work with this project.

Warning: Unable to load module 'C:\Program Files\Sim4Life_v5.2.1.1375\MusaikInterface.xdll'
Error : Could not read document version of file 'D:\S4L\Models\120-150_32elems_d20.smash'.
Warning : Unable to load document D:\S4L\Models\120-150_32elems_d20.smash

Is there a way to recover my file?

Thanks in advance


Hi Annalisa, your message won't be enough to try to help. The Musaik warning should not be a problem, maybe somehow the file got corrupted? Would need to maybe look at the .smash file to try and help, or maybe you can say what happened before that issue?

Before that issue, I saved the file at the end of my working day. Then, the day after I saw that the pc automatically restarted. And after that, I am not able to open the file. Unfortunately, the smash file is too large for the uploading. Is there an alternative way to send it?



Smash file uploaded

What version of S4l are you using? Sim4Life -> Help -> About (Should be something like Sim4Life

Sim4Life V

Ok, best I could do was allow you to recover your simulations and post processing but not the models..

I suspect that somehow maybe S4L was saving when the computer crashed or somehow restarted and this corrupted the smash file.

A quick explanation:

Smash files are .h5 files (you can use an hdf viewer - I use HDF Viewer 2.13 - to sort through the data structure). I compared your smash file to another smash file and I noticed that the field "Data -> _Object -> _DocumentVersion" was missing so I recreated it and opened your project in S4L. This still didn't show your modeling objects but it did show your simulations and postpro.

I guess you could look further into the h5 file structure (comparing to a 'reference' one from another one of your simulations to check what else could be missing) or maybe you can mail the support team to ask for help recovering your data? Or hopefully you have some backup?

At the very least your results should still be safe and you can always drag and drop your results into sim4life to inspect them (they are the output.h5 files in the results folder ... not ideal I know).

Please find the version where I tried to fix your issue here (in maybe 15 minutes, when it finished uploading):

https://outbox.itis.swiss/montanaro/<your filename>

Ok, thank you very much. Recovering the simulation results and postpro is the most important thing. I can easily reconstruct the transducer model via Python, but running again all the simulation I made it's the time consuming thing.
So thanks a lot for your help.
I would like to ask another thing. Generally speaking, my software works in a strange manner in the last days. When I work with the analysis tools, it returns errors messages like this:
Error : Unable to read array voxels.
Analysis : [Error] Unable to load speed of sound
Analysis : [Error] Unable to load speed of sound
Analysis : [Error] Unable to update 'Overall Field'
Then, I have to close the file. Re-open it and the analysis restarts to work. I am working with 4 separated files, all open at this moment. Maybe this could generate some problems ?

Don't think the separate files should matter. I haven't encountered these issues before, maybe it has to do with some item in your post processing pipeline? Maybe you can do Reset Analysis in postpro (but careful, you'll need to re do your data extraction - not the simulations though). I find it a bit strange that you only get these issues the first time you open the project file..

I am also having a similar problem, but I couldn't retrieve the data by using the hdfview3.1.1.
When I open the smash file, the same error is displayed.
The result files are available. The model can also be retrieved when I import the same project file, i.e., the *.smash file.
But I can't reach to my simulation settings or voxelization results.
Could you also help me retrieve my simulation settings?

Hi Ali,

what do you mean with you couldn't retrieve the data with hdfview? Did you not find the settings or could you not open the file at all in hdfview?

Note: I use HDF Viewer 2.13 because I couldn't easily find my way around the newer version of the software and it's what I was used to.

Thanks for the quick reply Montanaro,
I wanted to attach a screenshot but didn't work. So, when I open my *.smash file, unlike the other *.smash files, I don't see the subfolders "_ClassInfor" and "_Object" under the "Data". Otherwise I would also follow the steps you mentioned in your reply dated 7 Sep 2020, 16:45.

I see. Is there anyway for you to get me the smash file if it's not too big so I can take a look? I don't have access anymore to my usual way of sending and receiving files.

Yes here it is: https://drive.google.com/file/d/1StsS8cBrq4ncHB5dKLuzLk_zysot8tgw/view?usp=sharing
Can I have your email to add to the sharing list?

Very strange. I get a 200 MB file. I try to inspect it in the HDF Viewer and I see nothing and then the file says changes to 2 KB. Seems like this is probably a dead end.

However, the results file (xxx_Input.h5 and xxx_Output.h5) should have the information you need to reproduce the simulation objects if you open them in the HDFViewer. Hope this helps?

Note: The Input File is what is sent to the solver software that simulates your problem. The output file is the input file + the simulation results, so they should both contain the data corresponding to the simulation.

Additional note: You can use Python + h5py (included in the sim4life python package) to open the h5 file and turn any data into a numpy array for you to manipute / inspect, in case that would be of use (for example, to extract the grid axes / mesh coordinates and the voxels).

THank you very much for the hints.