Error when reading energy-dependent isotropic source using source_newgen.f

Hello,

I’m using the source_newgen.f user routine to define an energy-dependent isotropic alpha source. I have created the source_newgen.f file and also have a separate file which gives the energy spectrum. When I run the file I get errors.

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0 0x1107000b8
#1 0x1106ff6e9
#2 0x7fff55d70f59
#3 0x104f6a558
#4 0x104f6ebe9
#5 0x104ff6973
#6 0x1053aefaf
#7 0x1056cf520

My guess is that the spectrum file isn’t be read correctly?

alphasource_iso_newgen.f (19.0 KB)
snre_fuel_v5.out (953 Bytes)
snre_fuel_v5.inp (2.2 KB)
alpha_source_iso.txt (273 Bytes)
snre_fuel_v5001.log (250 Bytes)
snre_fuel_v5001.out (54.8 KB)

Thanks in advance,

Emma

Dear Emma,

the problem is with the spectrum file. It uses the old Mac line ending (CR) instead of the typical unix one (LF). You can try to use a text editor and save the text with the expected line ending, or convert it using the following command:

cat file.txt | tr '\r' '\n' | tr -s '\n' > file.translated.txt

Cheers,
David