MCPL compression error
gbrnfrdi opened this issue · 14 comments
The MCPL_out gives such an error while I run the simulation. MCSTAS 2.4.1 windows.
MCPL: Attempting to compress file D:\STFC\MCSTAS\LOKI_2018_09_19\loki_master_model_20180928_134925\Test_MCPL1.mcpl with zlib
MCPL ERROR: Problems encountered while compressing file D:\STFC\MCSTAS\LOKI_2018_09_19\loki_master_model_20180928_134925\Test_MCPL1.mcpl.
The output mcpl file will be huge (600MB) however it contains only about 20M particles.
And I think another problem is related to this: If I try to convert a larger mcpl file to ssw file. The mcpl2ssw converter gives an error:
"Opened MCPL file produced with "McStas 2.4.1 Loki" (contains 44097270 particles)
Opening reference SSW file:
ssw_open_file: Opened file "wssa":
ssw_open_file: File layout detected : MCNP6
ssw_open_file: Code ID fields : "mcnp" / "6"
ssw_open_file: Title field : "C ====================================================================== C"
ssw_open_file: Source statistics (histories): 100000
ssw_open_file: Particles in file : 42
ssw_open_file: Number of surfaces : 1
ssw_open_file: Histories at surfaces : 30
Creating (or overwriting) output SSW file.
Initiating particle conversion loop.
Ending particle conversion loop.
ERROR: Errors encountered while attempting to update number of particle info in output file."
The ssw file will be much larger, however is seems it doesn't contain any particles which can be used by MCNP afterwards.
I assume the problem is related to zlib.
So for the first of the two problems, I somehow recall that there were some issues gzipping on windows. Perhaps @ebknudsen or @willend can recall what was the outcome? I have a feeling it is related to the particular way MCPL is embedded in McStas and built on Windows, but I can't check that myself.
For the second issue, I don't think that can be related to zlib, but to be sure you can try if it is possible to reproduce the issue if neither the source mcpl file nor the reference ssw file are zipped? And if it works using an updated MCPL installation, rather than the one shipped with McStas which is a bit dated by now? And perhaps if the same command works on unix rather than on windows (it could be a generic issue with mcnp6.2 files after all).
Concerning:
The output mcpl file will be huge (600MB) however it contains only about 20M particles.
Well, that is just 30bytes/particle :-)
And just to double-check, can you post the second command you are invoking?
the command for conversion was: mcpl2ssw -s214 merged.mcpl wssa merged_ssw
"but to be sure you can try if it is possible to reproduce the issue if neither the source mcpl file nor the reference ssw file are zipped":
I assume my mcpl file is not compressed due to zlib error. For the SSW reference file I used a wssa file generated by MCNP6.2. I don't know whether is it compressed or not.
Do you have a way to put the problematic files in question somewhere for me to investigate? It would be good to confirm that it works at all on linux.
And did you ever work with such large files from MCNP6.0 on Windows in a similar setup? Just trying to narrow down the issue.
I made a dropbox folder and shared with you a large MCPL file, the wssa file which was used as reference and the output ssw file, surface 214 was used for conversion. https://www.dropbox.com/home/MCPL
Well I don't think so that I have faced such problem with MCNP6.0 but at least I think I can test it.
I have removed the MCPl file from the dropbox. Now it should be smaller than 2 GB, so probably you can download it.
I still get the "not enough space" error from dropbox unfortunately.
I have managed to make some tests at Linux. So I made an MCPL file under Linux with MCSTAS, zlib is worked well, the MCPL file was zipped. Then using a previously used (in windows, MCNP6.2 generated) wssa file I have successfully converted the MCPL file to a SSW file still under Linux. So for me it seems that the converter has some problem under windows. The MCPL file contained about 70M particles so larger then previously and it still worked well.
Ok, thanks for checking. I can easily believe that the issues are windows specific (or specific to the way MCPL is built in McStas), but unfortunately I can't easily debug that myself. I'll assign our to McStas experts and hope they can have a look, or at least let us know here if not.