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

DAGMC Compilation #11

Closed
makeclean opened this issue Apr 17, 2013 · 10 comments
Closed

DAGMC Compilation #11

makeclean opened this issue Apr 17, 2013 · 10 comments

Comments

@makeclean
Copy link
Contributor

Not possible on CHTC submit node due to version of gfortran (<< 4.2) that Mendeleev used to compile the periodic table.

Compile on own machine using standard compilation, i.e.

make clean build CONFIG='dagmc gfortran' FC=gfortran CC=gcc MOAB_DIR=moabdir

Linked against moab that was linked against hdf5 only. When this builds objects but fails to link, use the following link statement

gfortran *.o ../dagmc/*.o -o mcnp5 -static -lstdc++ -L/opt/condor_mcnp/moab/lib/
-static -lMOAB -static -ldagmc -L/opt/dagmc/hdf5/lib -static -lhdf5 -lstdc++

Should eventually find more elegant method.

@makeclean
Copy link
Contributor Author

However, due to very old kernel version on CHTC, can't use executable compiled on my systems. When we try to to run this on CHTC get the error,

FATAL: Kernel too old
Segmentation Fault

Will report to CHTC

@makeclean
Copy link
Contributor Author

Currently buillding gcc-4.4 and its dependent libraries on CHTC in order to bypass problem created by age of linux distro.

@makeclean
Copy link
Contributor Author

GCC-4.4 did not work. Installed GCC-4.5.1 instead. After wrestling for a while, realised that the DAGMC routines are built with whichever c++ compiler that MOAB was build against. I had not updated MOAB build since I installed the newer GCC toolkit and was thus linking using older version of g++, which could not understand the fortran module name mangling of functions.

Modifying the toolchain such that all were build against gcc-4.5.1, we get a successfully static build of DAGMC,

 /home/davisa/compilation/gcc-4.5.1/bin/gfortran dagmc/*.o src/*.o -o mcnp5 -static -lstdc++ 
-L/home/davisa/dagmc/moab/lib -static -lMOAB -L/home/davisa/dagmc/hdf5/lib -static -lhdf5 -static -lz 
-L/home/davisa/compilation/gcc-4.5.1/lib64/ -static -lstdc++ -L/home/davisa/dagmc/moab/lib -static -ldagmc

To avoid future problems like this, would it be possible for @zwelchWI to investigate the possibility of modifying Linux.gcf and makefiles appropriately such that we set CXX at compile time rather than the MOAB default.

@zwelchWI
Copy link
Contributor

I will look into it asap and let you know

@makeclean
Copy link
Contributor Author

There is no rush, just something to think about.

@makeclean
Copy link
Contributor Author

DAG-MCNP5 is compiled successfully to a static executable and has run as expected. Had several surface and cell tallies along with a tet mesh score. Using a submit script as below

 #############################################
 ## submit description file for a parallel program
 #############################################

universe = vanilla
executable = /home/davisa/dagmc/mcnp5src/bin/mcnp5
arguments = c i=divertor_sim_cont g=divertor_simgeom.h5m r=runtpe o=divertor_sim.o 
output = std.out
error = std.err
log = std.log
copy_to_spool           = false
should_transfer_files   = yes
when_to_transfer_output = on_exit
transfer_input_files = runtpe,divertor_sim_cont,divertor_simgeom.h5m,divertor_simmesh.h5m
+AccountingGroup = "EngrPhysics_Wilson"
queue

Screenshot from 2013-04-18 14:53:59

Model used was a model of ITER divertor being used for lost particle studies, faceted to 10^-3 tolerance on my local machine and then transferred files that were needed to run.

@makeclean
Copy link
Contributor Author

Im going to mark this as closed unless there are any comments?

@makeclean
Copy link
Contributor Author

More converged flux data
Screenshot from 2013-04-18 17:28:54

@gonuke
Copy link
Member

gonuke commented Apr 19, 2013

Can we put all the input files and submission scripts necessary to recreate this into the file repo?

@makeclean
Copy link
Contributor Author

Certainly can, put in as part of commit 91eab9c

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

No branches or pull requests

3 participants