Problem 1983 - Floating point exception when using /grdm/setPhotoEvaporationFile
Summary: Floating point exception when using /grdm/setPhotoEvaporationFile
Status: REOPENED INVALID
Alias: None
Product: Examples/Extended
Classification: Unclassified
Component: radioactivedecay/rdecay01 (show other problems)
Version: 10.3
Hardware: All All
: P4 major
Assignee: michel.maire
URL:
Depends on:
Blocks:
 
Reported: 2017-06-22 21:02 CEST by Luis Sarmiento Pico
Modified: 2017-06-26 22:35 CEST (History)
2 users (show)

See Also:


Attachments
output for No252.mac (2.56 KB, text/plain)
2017-06-23 20:04 CEST, michel.maire
Details
valgrind with drd tool (411.65 KB, text/plain)
2017-06-26 22:27 CEST, Luis Sarmiento Pico
Details
valgrind and gdb [screen log] (419.83 KB, text/plain)
2017-06-26 22:35 CEST, Luis Sarmiento Pico
Details

Note You need to log in before you can comment on or make changes to this problem.
Description Luis Sarmiento Pico 2017-06-22 21:02:05 CEST
The rdeca01 comes with a macro file, No252.mac, exemplifying the usage of /grdm/setPhotoEvaporationFile

When the macro is run without using /grdm/setPhotoEvaporationFile it seems to run fine. However that is not the case when the /grdm/setPhotoEvaporationFile command is used.

I copied the same file from the database:
$G4LEVELGAMMADATA/z102.a252 as No252.dat in the build directory and then run the macro with the line:
/grdm/setPhotoEvaporationFile 102 252 No252.dat

This should run identically as before. However I end up with the following

### G4LevelReader: broken level 2 E(MeV)= 5.591e-06 < 1.196 for isotope Z= 102 A= 252 level energy increased
### G4LevelReader: broken level 3 E(MeV)= 7.749e-05 < 1.196 for isotope Z= 102 A= 252 level energy increased
### G4LevelReader: broken level 4 E(MeV)= 0 < 1.196 for isotope Z= 102 A= 252 level energy increased
### G4LevelReader: broken level 5 E(MeV)= 0.0004426 < 1.196 for isotope Z= 102 A= 252 level energy increased
### G4LevelReader: broken level 6 E(MeV)= 1.234e-06 < 1.196 for isotope Z= 102 A= 252 level energy increased
### G4LevelReader: broken transition 0 from level 6 to 166 for isotope Z= 102 A= 252 - use ground level
### G4LevelReader: broken transition 1 from level 6 to 544 for isotope Z= 102 A= 252 - use ground level
### G4LevelReader: broken transition 3 from level 6 to 10 for isotope Z= 102 A= 252 - use ground level
### G4LevelReader: broken transition 6 from level 6 to 33 for isotope Z= 102 A= 252 - use ground level
### G4LevelReader: broken transition 7 from level 6 to 453 for isotope Z= 102 A= 252 - use ground level
### G4LevelReader: broken transition 8 from level 6 to 2879 for isotope Z= 102 A= 252 - use ground level
Floating point exception

Note that for I did the same for 10.3.ref05 with the new PhotonEvaporation5.0 and I still get the Floating point exception
Comment 1 michel.maire 2017-06-23 20:04:28 CEST
Created attachment 462 [details]
output for No252.mac
Comment 2 michel.maire 2017-06-23 20:10:46 CEST
I cannot reproduce the problem.
rdecay01/UserData has been upgraded on 5 January (see History). UserEvapData_z102.a252 has the same format as in PhotonEvaporation4.3.2/correlatedgamma or PhotonEvaporation5.0 and gives same result. I attach an output for No252.mac

(the last tag for rdecay01 is rdecay01-V10-03-07)
Comment 3 Luis Sarmiento Pico 2017-06-26 11:58:09 CEST
I still get the same "Floating point exception". I am using the latest version of the example.

It could be that the problem is not on the example itself... it looks like using UserFiles might have a bug. 

Dear Michel, have you tried using a non existent file?

/grdm/setPhotoEvaporationFile 102 252 non_existing_file.lvl

This already should raise an error or a massive warning.

Also, could you please simply copy the proper file to the folder and run it locally?
For instance, copy as:

cp $G4LEVELGAMMADATA$z102.a252 No252.lvl

and then run it with:

/grdm/setPhotoEvaporationFile 102 252 No252.lvl

and tell me whether it works for you?

NOTE that I am using:
 Geant4 version Name: geant4-10-03-ref-05 [MT]   (31-May-2017)
  << in Multi-threaded mode >> 
and
31-01-16 mma (rdecay01-V10-01-07)
Comment 4 Luis Sarmiento Pico 2017-06-26 13:43:55 CEST
Dear Michel,

I have now tried with the same non-MT version as you did. And I report NO problems. It works just like it should.

I keep this bug open because the error DOES happen when using Multi-threaded mode. Perhaps this should be redirected to somebody else?
Comment 5 Andrea Dotti 2017-06-26 19:19:46 CEST
Hello FPE cannot be caused by MT by itself. The issue is thus probably a non-thread safe code in the physics process that manifest itself as a FPE.

You should try the following:
1) run valgrind with drd tool: valgrind --tool=drd --read-var-info=yes [ command line for example ]
I can help in interpreting the output, since it will be quite cryptic if never used this before.
Please note that with valgrind the application will take much longer to execute, up to 100 times! Unfortunately there is no way around that.
2) Running in gdb should be able to point to the exact location where the FPE happens. Please run the applications in gdb:
gdb -ex run --args [command line for example] 
When the program crashes, send me the output you see on screen plus the output of the following commands issued at gdb prompt:
$ info threads
$ bt
Do not exit the gdb session, I will need yo send you further instructions

Andrea
Comment 6 Luis Sarmiento Pico 2017-06-26 22:27:57 CEST
Created attachment 463 [details]
valgrind with drd tool

produced with the following command:

valgrind --tool=drd --read-var-info=yes  ./rdecay01 No252.mac &> valgrind_4_andrea.txt

G4:      10.3.ref05
gcc:     x86_64-slc6-gcc49-opt-MT
rdecay1: rdecay01-V10-03-07
Comment 7 Luis Sarmiento Pico 2017-06-26 22:35:15 CEST
Created attachment 464 [details]
valgrind and gdb [screen log]

As instructed, I created the current output. I have not close the session just yet. I am logging a screen session and I can add the output to anything is asked.

Cheers Andrea, I hope you can make sense out of this because I certainly cannot =P