nrc-cnrc / EGSnrc

Toolkit for Monte Carlo simulation of ionizing radiation — Trousse d'outils logiciels pour la simulation Monte Carlo du rayonnement ionisant
http://nrc-cnrc.github.io/EGSnrc
GNU Affero General Public License v3.0
219 stars 146 forks source link

IAEA phase space files compiled after addphsp #49

Open ojalaj opened 8 years ago

ojalaj commented 8 years ago

With the develop branch of EGSnrc2016 from April 1st I get the following error message when using addphsp to concatenate the IAEA phase space files from my test simulations:

Sorry, this code has not been compiled with the IAEA phase space handling macros.

The distribution is installed on a Linux cluster (Scientific Linux 6.7) as per the GitHub Wiki instructions with gfortran/gcc/g++/make using the shell script with default options (I'm more than happy to send the configuration log files, if requested). The only modifications that have been made after the installation are in MAXFIELD and MAX_POINT parameter values of several CMs and increasing IMAX/JMAX/KMAX/CTKMAX/MXMED values for ctcreate and dosxyznrc user codes. Otherwise the code is unchanged. I have encountered the problem with every test simulation that I have run, even with EX16MVp example code. The simulations themselves run fine.

blakewalters commented 8 years ago

Try going into $OMEGA_HOME/progs/addphsp and re-make addphsp (you may have to remove the .f file to force the recompile). There's a bug in the installation script: the iaea phase space libraries are currently compiled AFTER addphsp.

ojalaj commented 8 years ago

Thanks @blakewalters - your suggestion worked. I've always thought that make clean prior to make would do the job, but obviously it is not enough.

AndrewWAlexander commented 8 years ago

I also ran into this issue. I had to re-make beamdp for use with IAEA phase space files too.

crcrewso commented 8 years ago

@ojalaj there are a few make scripts in the code base where I've noticed make clean is not defined. I should probably catalog and submit those as bugs. Statdose is definitely one and I think addphsp is one too.

ftessier commented 8 years ago

@blakewalters indeed please submit this lack of make clean as a new issue, and let's close this older one.

mchamberland commented 7 years ago

Was the order of compilation of the IAEA libraries and addphsp ever fixed? Because I recently installed the latest develop branch and it seems like I still had to make clean and re-compile addphsp to get IAEA support.

ojalaj commented 7 years ago

Noticed the same thing!

mchamberland commented 7 years ago

Looking at the configure script, it does look like the IAEA stuff comes after addphspis compiled. @ftessier I suggest re-opening this issue.

ftessier commented 7 years ago

The original issue has not been resolved: the IAEA phase space file library should be compiled before the addphsp application.

ftessier commented 3 years ago

The reason IAEA is compiled after addphsp and friends is that the configure script deals with Fortran and C compilation, and then calls the configure_c++ script to handles all the C++ configuration and compilation (IAEA library is c++). I have re-written a much cleaner version of the configure script where everything is integrated together, properly POSIX and documented, etc.; but left that hanging years ago. I will unearth to see if it fixes this issue...