EGSnrc icon indicating copy to clipboard operation
EGSnrc copied to clipboard

pbs /egs_brachy

Open mehran1234 opened this issue 2 years ago • 1 comments

Hello,

when I execute this command : exb egs_brachy COMS16mm.egsinp pegsless batch=pbs p=2

the jobs are added to the queue, starts to execute but terminates immediately. It outputs this file COMS16mm.egsinp_w1.eo with the following text:

/var/spool/torque/mom_priv/jobs/502.localhost.SC: line 1: 27758 Segmentation fault (core dumped) /home/mehran/EGSnrc_with_egs_brachy/egs_home//bin/linux/egs_brachy -b -i COMS16mm.egsinp -e /home/mehran/EGSnrc_with_egs_brachy/egs_home/ -H /home/mehran/EGSnrc_with_egs_brachy/HEN_HOUSE/ -P 2 -j 1 -f 1

what does this means and how can I resolve it ?

Thank you

mehran1234 avatar May 22 '22 23:05 mehran1234

Hello @mehran1234,

This sort of error can arise from either problems in the input file or bugs in the code. More information is likely required to resolve it. Does the error also occur when running the input file as a interactive job (egs_brachy -i COMS16mm.egsinp)? Are you able to provide the input file? Given that egs_brachy isn't distributed as part of EGSnrc, maybe it's better to submit this issue over at the egs_brachy issue tracker: https://github.com/clrp-code/egs_brachy/issues

If you are comfortable recompiling the code, I have found building EGSnrc with Address Sanitizer to be very helpful for debugging these sorts of issues on your own.

To build EGSnrc with Address Sanitizer support

(Assuming your EGSnrc configuration is called linux)

  • In HEN_HOUSE/specs/linux.conf change FOPT and C_FLAGS to:
FOPT = -O2 -mtune=native -g -fsanitize=address -static-libasan
...
C_FLAGS = -O2 -fPIC -g -fsanitize=address -static-libasan
  • In HEN_HOUSE/specs/egspp_linux.conf change opt to:
opt = -O2 -mtune=native -g -fsanitize=address -static-libasan

Then recompile egs++ and egs_brachy:

cd HEN_HOUSE/egs++ && make realclean && make
cd HEN_HOUSE/user_codes/egs_brachy && make clean && make # or wherever egs_brachy is

I find AddressSanitizer causes EGSnrc to run at least 2x slower and use around 3x the memory, but since your issue appears right away this shouldn't be a problem.

mxxo avatar May 24 '22 15:05 mxxo