Singularity - Cross Section Libraries and Environment Variables

Dear FLUKA experts,

I’ve constructed a Singularity container to run my simulations on a server following from this post but am wanting to deploy LOW-PWXS for neutron transport. While the simulation runs properly locally, running it using the container on the server yields an error: some cross section cannot be found. I’ve implemented the FLUKA cross sections into the container in the proper directory, ensured that read/execute permissions allow reading for any user yet, I can’t get rid of this error.

I understand there is no explicit support for the containerization of FLUKA. I would like to know if there are any environment variables I must set, or how I can point FLUKA to the proper cross section files.

I’ve attached the singularity definition file below.

Another curious issue, without having FLAIR installed in the container, I run into an issue compiling the user routines… I’ve dealt with this obviously by keeping the FLAIR installation but perhaps its worth mentioning.

Thank you!

Regan
definition_file.inp (1.9 KB)

Dear Regan,

The cross-section files only need to be located in (or symlinked) <path_to_fluka>/data/neutron/ directory, no additional setup is necessary. If you share your Docker/Singularity file we could take a look.

You can compile your custom FLUKA executable with user routines using the lfluka script. For the options run lfluka -h.

Cheers,
David

Dear Dávid,

The Singularity file ought to be in the post above (but with the .inp extension). Here it is anyway!
I use fff to compile the user routines (mgdraw.f, source_newgen.f) then ldpmqmd -m fluka to link them into the complete executable. This has not been giving me trouble- simply that the LOW-PWXS card can’t seem to find the cross section files despite their being in the right spot within the Singularity container. Perhaps it’s a container quirk I don’t yet understand.

definition_file.inp (1.9 KB)

Thank you for the prompt response!

Regan

Dear Regan,

the issue is a simple permission error. It looks like when the image is built and the neutron cross-sections are extracted from the tar file, the directory set to the permission 700. This prevents the access as a normal user.

The easiest solution is to install the cross sections using the .deb package, instead of the .tar file.

Cheers,
David

Dear Dávid,

Thank you. I have tried changing the permissions in the tar ball to 555, but this still doesn’t allow me to work with the cross section file via the container. I will try with the .deb file and report back!

Thank you,

Regan

Dear Dávid,

I rebuilt the singularity container with the .deb installation and while the files seemed to be in the right place and with the right permissions, the simulation still yielded an “Error loading cross section”. Might you have another suggestion?

Thank you,

Regan

Hi Regan,

I created a barebone singularity definition file: fluka-pw-endf-viii0.def
With this, I can run FLUKA from the command line using the point-wise cross sections.

If you have a problem running your simulation with this image, please upload your FLUKA input file, maybe there is an additional problem.

Cheers,
David

1 Like

Dear Dávid,

When using this singularity image, I am unable to compile the simulation. I am presented with this error.

/usr/bin/ld.bfd: cannot find -lstdc++: No such file or directory collect2: error: ld returned 1 exit status

I have no idea what this is. If you have any suggestions, I’d be grateful. I appreciate your help!

Regan

Dear Regan,

sorry, this error was caused by a missing package. I updated the definition file in my previous post.

Cheers,
David

Hi Dávid,

Unfortunately, I’m still getting the following errors:

.err file:

ERROR: could not load neutron cross section for isotope Z=1 A=1 m=0 Abort called from KHPNLOAD reason Error loading neutron cross section for isotope Run stopped! STOP Error loading neutron cross section for isotope

.log file:

STOP Error loading neutron cross section for isotope

I’ve made a few additions to the definition file so that my simulation scripts (python) may run in the container, but otherwise left the base form unchanged. Might this have an effect? I’ve attached the file.

Thank you so much for your help!

fluka-pw-endf-viii0_modified.def (1.3 KB)

Hi Regan,

it is quite unlikely that the python installation causes this issue.

Could you upload your input file(s), maybe there is a mistake in it as well.

Cheers,
David

Hello Dávid,

Here it is!

Thank you,

Regan
nEXO_OD.inp (7.7 KB)

Hi Regan,

you LOW-PWXS cards are missing the name of the cross-section data base to use. You need to select ENDF-VIII0 for the db option in Flair.

Alternatively you can install the JEFF-3.3 cross sections instead of the ENDF-VIII0 ones, and in this case you can leave the db option empty.

Cheers,
David

PS.: The LOW-MAT cards in your input won’t be used with the point-wise cross sections, so if you wan’t to have different temperatures for the materials, you need to use the LOW-PWXS cards to set them, using the option T.

1 Like