Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

egs_chamber crashes when reading in cross-section data #260

Closed
MartinMartinov opened this issue Mar 2, 2017 · 5 comments
Closed

egs_chamber crashes when reading in cross-section data #260

MartinMartinov opened this issue Mar 2, 2017 · 5 comments
Assignees
Labels

Comments

@MartinMartinov
Copy link
Contributor

MartinMartinov commented Mar 2, 2017

After pulling recent changes (February's commits) and recompiling my HEN_HOUSE and EGS_HOME areas, I'm finding my egs_chamber simulations crash when reading certain data files, namely spinms.data and the rayleigh data set (egslog doesn't name which file, but it happens when rayleigh scattering is turned on). It happens with many of the input files that have worked over the last year. I also tried running example1.egsinp on cavity and got the same error. This is the pre-crash output:

Reading spin data base from /home/martinov/HEN_HOUSE_github/EGSnrc/HEN_HOUSE/data/spinms.data
EGSnrc spin data, version 2.0
Data generated on a machine with 1234 endianess
The endianess of this CPU is 1234
Ranges:      1.00   100.00  0.30054  1.00000


  medium    1 ..................... Segmentation fault

I checked my previous log files from before the reinstall, and I find that the output should look like this:

Reading spin data base from /home/martinov/HEN_HOUSE_github/EGSnrc/HEN_HOUSE/data/spinms.data
EGSnrc spin data, version 2.0
Data generated on a machine with 1234 endianess
The endianess of this CPU is 1234
Ranges:      1.00   100.00  0.30054  1.00000


  medium    1 .....................  done
  medium    2 .....................  done
  medium    3 .....................  done
  medium    4 .....................  done
  medium    5 .....................  done

Any ideas on what my issue is?

Config flags that might be important:

F77 = gfortran
F77_LINK = gfortran
FCFLAGS = -fPIC
FOPT = -O2
FDEBUG = -g
FLIBS =
FOUT = -o
FOBJE = o

CC = gcc
C_FLAGS = -O2 -fPIC
COUT = -o

CXX = g++
opt = -O3 -ffast-math
DEF1 =  -fPIC

Compiler version:

gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
@rtownson
Copy link
Collaborator

rtownson commented Mar 2, 2017

This was introduced by the rest mass initialization fix yesterday. PR #261 is now pending.

@rtownson rtownson self-assigned this Mar 2, 2017
@rtownson rtownson added the bug label Mar 2, 2017
@ftessier ftessier changed the title Issue when reading in cross-section data in egs_chamber egs_chamber crashes when reading in cross-section data Mar 2, 2017
@ftessier
Copy link
Member

ftessier commented Mar 2, 2017

This is because we omitted to update the common block definition in the C interface as well to initialize the rest mass. Working on it:

egs_c_interface1.macros
egs_c_interface2.macros

ftessier added a commit that referenced this issue Mar 2, 2017
Fix the rest mass initialization for EGSnrc applications that depend on
the C interface. The bug fix in the parent commit moved the declaration
of the rest mass inside the COMIN/USEFUL/ macro. However this in turn
breaks C and C++ EGSnrc applications because the C interface relies on
its own declaration of the COMIN/USEFUL/ macro, which also has to be
updated with the rest mass data statement.
@ftessier
Copy link
Member

ftessier commented Mar 2, 2017

Checking with grep -iR "replace.*useful/" HEN_HOUSE/* indicates there are no other independent declaration of the COMIN/USEFUL macro in the repository:

HEN_HOUSE/interface/egs_c_interface1.macros:REPLACE {;COMIN/USEFUL/;} WITH {
HEN_HOUSE/interface/egs_c_interface2.macros:REPLACE {;COMIN/USEFUL/;} WITH {
HEN_HOUSE/src/egsnrc.macros:REPLACE {;COMIN/USEFUL/;} WITH

ftessier added a commit that referenced this issue Mar 2, 2017
Fix the rest mass initialization for EGSnrc applications that depend on
the C interface. The bug fix in the parent commit moved the declaration
of the rest mass inside the COMIN/USEFUL/ macro. However this in turn
breaks C and C++ EGSnrc applications because the C interface relies on
its own declaration of the COMIN/USEFUL/ macro, which also has to be
updated with the rest mass data statement.
ftessier added a commit that referenced this issue Mar 2, 2017
Fix the rest mass initialization for EGSnrc applications that depend on
the C interface. The bug fix in the parent commit moved the declaration
of the rest mass inside the COMIN/USEFUL/ macro. However this in turn
breaks C and C++ EGSnrc applications because the C interface relies on
its own declaration of the COMIN/USEFUL/ macro, which also has to be
updated with the rest mass data statement.
@ftessier
Copy link
Member

ftessier commented Mar 2, 2017

This was fixed in pull request #261 and cherry-picked to master via #262.

🥇 to @MartinMartinov for reporting the issue.

@MartinMartinov
Copy link
Contributor Author

Well done! Really good turn around time for this fix, I'll try it first thing in the morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants