ustsuw crashes on second file with "gmstor" error, cannot merge fort.21 files from multiple cycles

Versions

FLUKA: 4-5.1
Flair: 3.4-5.2
Operating system: Windows 10
Compiler: GFortran 11.4.0

Description

Hi everyone,

I’m running FLUKA 4-5.1 with Flair 3.4-5.2 on Ubuntu 22.04 (WSL2, Windows 10). I have a simple simulation: photon beam (100 keV) on a lead sphere, with a USRTRACK scorer on unit 21.

After running 5 cycles, I get 5 identical fort.21 files (same size, 1285 bytes each). When I try to merge them with ustsuw, it reads the first file correctly but crashes on the second with:

At line 248 of file ustsuw.f
Fortran runtime error: Attempting to allocate already allocated variable 'gmstor'

The simulation itself runs fine with all 10000 primaries complete without errors in each cycle. The RANDOMIZE card is present with Seed left empty (auto). The .err file shows different NEXT SEEDS between particles within a single cycle, but all 5 fort.21 files have identical content.

I can merge a single file successfully and get a .trk file, but when I open it in Flair’s Plot → USR-1D, the Det dropdown is empty and nothing appears.

I have already tried to delete all output files and rerunning, running ustsuw manually from the terminal, and using Flair’s Run → Data ->Process.

I’ll link the .inp file, the .flair one and the 5 .err files below.

Thanks

Input files

second_simulation.inp (1.1 KB)

second_simulation.flair (1.5 KB)

second_simulation005.err (22.4 KB)

second_simulation004.err (22.4 KB)

second_simulation003.err (22.4 KB)

second_simulation002.err (22.4 KB)

second_simulation001.err (22.4 KB)

Dear Lorenzo,

you need to select the Unit as binary (e.g. 21 BIN) to be able to merge the different cycles.

I wasn’t able to reproduce the problem having the same result for each cycle tough. Even without changing you input file, I get different outputs.

Cheers,
David

1 Like

Hi Dávid,

Chaning to Unit to Binary (21 BIN) made it possible to Process and Merge the different cycles.

Thank you very much,

Lorenzo