From ca0f415de48b8b45888280307f8caec590ead949 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 07:06:02 -0500 Subject: [PATCH 01/15] Update recognized thermal scattering names with Lib80x names --- openmc/data/thermal.py | 60 ++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/openmc/data/thermal.py b/openmc/data/thermal.py index a036a2680c..18ba56bc56 100644 --- a/openmc/data/thermal.py +++ b/openmc/data/thermal.py @@ -24,40 +24,44 @@ from openmc.stats import Discrete, Tabular _THERMAL_NAMES = { - 'c_Al27': ('al', 'al27'), - 'c_Be': ('be', 'be-metal'), - 'c_BeO': ('beo'), - 'c_Be_in_BeO': ('bebeo', 'be-o', 'be/o'), + 'c_Al27': ('al', 'al27', 'al-27'), + 'c_Be': ('be', 'be-metal', 'be-met'), + 'c_BeO': ('beo',), + 'c_Be_in_BeO': ('bebeo', 'be-beo', 'be-o', 'be/o'), 'c_C6H6': ('benz', 'c6h6'), - 'c_C_in_SiC': ('csic',), - 'c_Ca_in_CaH2': ('cah'), - 'c_D_in_D2O': ('dd2o', 'hwtr', 'hw'), - 'c_Fe56': ('fe', 'fe56'), + 'c_C_in_SiC': ('csic', 'c-sic'), + 'c_Ca_in_CaH2': ('cah',), + 'c_D_in_D2O': ('dd2o', 'd-d2o', 'hwtr', 'hw'), + 'c_Fe56': ('fe', 'fe56', 'fe-56'), 'c_Graphite': ('graph', 'grph', 'gr'), - 'c_H_in_CaH2': ('hcah2'), - 'c_H_in_CH2': ('hch2', 'poly', 'pol'), + 'c_Graphite_10p': ('grph10',), + 'c_Graphite_30p': ('grph30',), + 'c_H_in_CaH2': ('hcah2',), + 'c_H_in_CH2': ('hch2', 'poly', 'pol', 'h-poly'), 'c_H_in_CH4_liquid': ('lch4', 'lmeth'), 'c_H_in_CH4_solid': ('sch4', 'smeth'), - 'c_H_in_H2O': ('hh2o', 'lwtr', 'lw'), - 'c_H_in_H2O_solid': ('hice',), - 'c_H_in_C5O2H8': ('lucite', 'c5o2h8'), - 'c_H_in_YH2': ('hyh2'), - 'c_H_in_ZrH': ('hzrh', 'h-zr', 'h/zr', 'hzr'), + 'c_H_in_H2O': ('hh2o', 'h-h2o', 'lwtr', 'lw'), + 'c_H_in_H2O_solid': ('hice', 'h-ice'), + 'c_H_in_C5O2H8': ('lucite', 'c5o2h8', 'h-luci'), + 'c_H_in_YH2': ('hyh2', 'h-yh2'), + 'c_H_in_ZrH': ('hzrh', 'h-zrh', 'h-zr', 'h/zr', 'hzr'), 'c_Mg24': ('mg', 'mg24'), - 'c_O_in_BeO': ('obeo', 'o-be', 'o/be'), - 'c_O_in_D2O': ('od2o'), - 'c_O_in_H2O_ice': ('oice'), - 'c_O_in_UO2': ('ouo2', 'o2-u', 'o2/u'), - 'c_ortho_D': ('orthod', 'dortho'), - 'c_ortho_H': ('orthoh', 'hortho'), - 'c_Si_in_SiC': ('sisic'), + 'c_O_in_BeO': ('obeo', 'o-beo', 'o-be', 'o/be'), + 'c_O_in_D2O': ('od2o', 'o-d2o'), + 'c_O_in_H2O_ice': ('oice', 'o-ice'), + 'c_O_in_UO2': ('ouo2', 'o-uo2', 'o2-u', 'o2/u'), + 'c_N_in_UN': ('n-un',), + 'c_ortho_D': ('orthod', 'orthoD', 'dortho'), + 'c_ortho_H': ('orthoh', 'orthoH', 'hortho'), + 'c_Si_in_SiC': ('sisic', 'si-sic'), 'c_SiO2_alpha': ('sio2', 'sio2a'), - 'c_SiO2_beta': ('sio2b'), - 'c_para_D': ('parad', 'dpara'), - 'c_para_H': ('parah', 'hpara'), - 'c_U_in_UO2': ('uuo2', 'u-o2', 'u/o2'), - 'c_Y_in_YH2': ('yyh2'), - 'c_Zr_in_ZrH': ('zrzrh', 'zr-h', 'zr/h') + 'c_SiO2_beta': ('sio2b',), + 'c_para_D': ('parad', 'paraD', 'dpara'), + 'c_para_H': ('parah', 'paraH', 'hpara'), + 'c_U_in_UN': ('u-un',), + 'c_U_in_UO2': ('uuo2', 'u-uo2', 'u-o2', 'u/o2'), + 'c_Y_in_YH2': ('yyh2', 'y-yh2'), + 'c_Zr_in_ZrH': ('zrzrh', 'zr-zrh', 'zr-h', 'zr/h') } From 514d8350a2a6e33351f8bec5e0a5d5e85959e656 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 07:27:59 -0500 Subject: [PATCH 02/15] Move Faddeeva source into vendor/ directory --- CMakeLists.txt | 4 ++-- {src => vendor}/faddeeva/Faddeeva.c | 0 {src => vendor}/faddeeva/Faddeeva.cc | 0 {src => vendor}/faddeeva/Faddeeva.h | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename {src => vendor}/faddeeva/Faddeeva.c (100%) rename {src => vendor}/faddeeva/Faddeeva.cc (100%) rename {src => vendor}/faddeeva/Faddeeva.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec77fa0e33..d154b1cf34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -320,7 +320,8 @@ endif() # Build faddeeva library #=============================================================================== -add_library(faddeeva STATIC src/faddeeva/Faddeeva.c) +add_library(faddeeva STATIC vendor/faddeeva/Faddeeva.c) +target_compile_options(faddeeva PRIVATE ${cflags}) #=============================================================================== # List source files. Define the libopenmc and the OpenMC executable @@ -469,7 +470,6 @@ target_include_directories(libopenmc PUBLIC include ${HDF5_INCLUDE_DIRS}) # The executable and the faddeeva package use only one language. They can be # set via target_compile_options which accepts a list. target_compile_options(${program} PUBLIC ${cxxflags}) -target_compile_options(faddeeva PRIVATE ${cflags}) # The libopenmc library has both F90 and C++ so the compile flags must be set # file-by-file via set_source_file_properties. The compile flags must first be diff --git a/src/faddeeva/Faddeeva.c b/vendor/faddeeva/Faddeeva.c similarity index 100% rename from src/faddeeva/Faddeeva.c rename to vendor/faddeeva/Faddeeva.c diff --git a/src/faddeeva/Faddeeva.cc b/vendor/faddeeva/Faddeeva.cc similarity index 100% rename from src/faddeeva/Faddeeva.cc rename to vendor/faddeeva/Faddeeva.cc diff --git a/src/faddeeva/Faddeeva.h b/vendor/faddeeva/Faddeeva.h similarity index 100% rename from src/faddeeva/Faddeeva.h rename to vendor/faddeeva/Faddeeva.h From 2a936aa3820c92a0a4b97af048c1d87ca72d38b9 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 10:56:28 -0500 Subject: [PATCH 03/15] Move pugixml to vendor/ directory --- CMakeLists.txt | 14 +++++++------- src/cell.h | 4 ++-- src/lattice.h | 2 +- src/surface.h | 2 +- src/xml_interface.h | 2 +- {src => vendor}/pugixml/pugiconfig.hpp | 0 {src => vendor}/pugixml/pugixml.cpp | 0 {src => vendor}/pugixml/pugixml.hpp | 0 8 files changed, 12 insertions(+), 12 deletions(-) rename {src => vendor}/pugixml/pugiconfig.hpp (100%) rename {src => vendor}/pugixml/pugixml.cpp (100%) rename {src => vendor}/pugixml/pugixml.hpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d154b1cf34..047cb875b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,9 +284,8 @@ endif() # pugixml library #=============================================================================== -add_library(pugixml src/pugixml/pugixml_c.cpp src/pugixml/pugixml.cpp) -add_library(pugixml_fortran src/pugixml/pugixml_f.F90) -target_link_libraries(pugixml_fortran pugixml) +add_library(pugixml vendor/pugixml/pugixml.cpp) +target_include_directories(pugixml PUBLIC vendor/pugixml/) #=============================================================================== # RPATH information @@ -377,6 +376,7 @@ set(LIBOPENMC_FORTRAN_SRC src/plot_header.F90 src/product_header.F90 src/progress_header.F90 + src/pugixml/pugixml_f.F90 src/random_lcg.F90 src/reaction_header.F90 src/relaxng @@ -443,6 +443,7 @@ set(LIBOPENMC_CXX_SRC src/mgxs.cpp src/mgxs_interface.cpp src/plot.cpp + src/pugixml/pugixml_c.cpp src/random_lcg.cpp src/scattdata.cpp src/simulation.cpp @@ -450,8 +451,7 @@ set(LIBOPENMC_CXX_SRC src/string_functions.cpp src/surface.cpp src/xml_interface.cpp - src/xsdata.cpp - src/pugixml/pugixml.cpp) + src/xsdata.cpp) add_library(libopenmc SHARED ${LIBOPENMC_FORTRAN_SRC} ${LIBOPENMC_CXX_SRC}) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc @@ -462,7 +462,7 @@ add_executable(${program} src/main.cpp) # Add compiler/linker flags #=============================================================================== -set_property(TARGET ${program} libopenmc pugixml_fortran +set_property(TARGET ${program} libopenmc PROPERTY LINKER_LANGUAGE Fortran) target_include_directories(libopenmc PUBLIC include ${HDF5_INCLUDE_DIRS}) @@ -488,7 +488,7 @@ endforeach() # target_link_libraries treats any arguments starting with - but not -l as # linker flags. Thus, we can pass both linker flags and libraries together. -target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml_fortran +target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml faddeeva) target_link_libraries(${program} ${ldflags} libopenmc) diff --git a/src/cell.h b/src/cell.h index a2f72c8337..24413b4fd4 100644 --- a/src/cell.h +++ b/src/cell.h @@ -7,7 +7,7 @@ #include #include "hdf5.h" -#include "pugixml/pugixml.hpp" +#include "pugixml.hpp" namespace openmc { @@ -50,7 +50,7 @@ public: //! A geometry primitive that links surfaces, universes, and materials //============================================================================== -class Cell +class Cell { public: int32_t id; //!< Unique ID diff --git a/src/lattice.h b/src/lattice.h index 19749ce4f0..bc706a5a3f 100644 --- a/src/lattice.h +++ b/src/lattice.h @@ -9,7 +9,7 @@ #include "constants.h" #include "hdf5.h" -#include "pugixml/pugixml.hpp" +#include "pugixml.hpp" namespace openmc { diff --git a/src/surface.h b/src/surface.h index 1d8cc6ac7b..666fc0dbae 100644 --- a/src/surface.h +++ b/src/surface.h @@ -6,7 +6,7 @@ #include #include "hdf5.h" -#include "pugixml/pugixml.hpp" +#include "pugixml.hpp" #include "constants.h" diff --git a/src/xml_interface.h b/src/xml_interface.h index b6f9e3246d..de89018efe 100644 --- a/src/xml_interface.h +++ b/src/xml_interface.h @@ -4,7 +4,7 @@ #include #include -#include "pugixml/pugixml.hpp" +#include "pugixml.hpp" namespace openmc { diff --git a/src/pugixml/pugiconfig.hpp b/vendor/pugixml/pugiconfig.hpp similarity index 100% rename from src/pugixml/pugiconfig.hpp rename to vendor/pugixml/pugiconfig.hpp diff --git a/src/pugixml/pugixml.cpp b/vendor/pugixml/pugixml.cpp similarity index 100% rename from src/pugixml/pugixml.cpp rename to vendor/pugixml/pugixml.cpp diff --git a/src/pugixml/pugixml.hpp b/vendor/pugixml/pugixml.hpp similarity index 100% rename from src/pugixml/pugixml.hpp rename to vendor/pugixml/pugixml.hpp From bd85855f122305c08f22a70d37c892b1a5f59d51 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 12:01:51 -0500 Subject: [PATCH 04/15] Get rid of program variable in CMakeLists.txt --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 047cb875b1..23728e3a76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -326,7 +326,6 @@ target_compile_options(faddeeva PRIVATE ${cflags}) # List source files. Define the libopenmc and the OpenMC executable #=============================================================================== -set(program "openmc") set(LIBOPENMC_FORTRAN_SRC src/algorithm.F90 src/angle_distribution.F90 @@ -456,20 +455,20 @@ add_library(libopenmc SHARED ${LIBOPENMC_FORTRAN_SRC} ${LIBOPENMC_CXX_SRC}) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc PUBLIC_HEADER include/openmc.h) -add_executable(${program} src/main.cpp) +add_executable(openmc src/main.cpp) #=============================================================================== # Add compiler/linker flags #=============================================================================== -set_property(TARGET ${program} libopenmc +set_property(TARGET openmc libopenmc PROPERTY LINKER_LANGUAGE Fortran) target_include_directories(libopenmc PUBLIC include ${HDF5_INCLUDE_DIRS}) # The executable and the faddeeva package use only one language. They can be # set via target_compile_options which accepts a list. -target_compile_options(${program} PUBLIC ${cxxflags}) +target_compile_options(openmc PUBLIC ${cxxflags}) # The libopenmc library has both F90 and C++ so the compile flags must be set # file-by-file via set_source_file_properties. The compile flags must first be @@ -490,7 +489,7 @@ endforeach() # linker flags. Thus, we can pass both linker flags and libraries together. target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml faddeeva) -target_link_libraries(${program} ${ldflags} libopenmc) +target_link_libraries(openmc ${ldflags} libopenmc) #=============================================================================== # Python package @@ -506,7 +505,7 @@ add_custom_command(TARGET libopenmc POST_BUILD # Install executable, scripts, manpage, license #=============================================================================== -install(TARGETS ${program} libopenmc +install(TARGETS openmc libopenmc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib @@ -514,4 +513,4 @@ install(TARGETS ${program} libopenmc ) install(DIRECTORY src/relaxng DESTINATION share/openmc) install(FILES man/man1/openmc.1 DESTINATION share/man/man1) -install(FILES LICENSE DESTINATION "share/doc/${program}" RENAME copyright) +install(FILES LICENSE DESTINATION "share/doc/openmc" RENAME copyright) From 3b806c8e4415d235e216c97c05b0eb0ad0d4d135 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 12:22:48 -0500 Subject: [PATCH 05/15] Separate out setting properties for openmc executable --- CMakeLists.txt | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23728e3a76..f0dac2c370 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -454,31 +454,23 @@ set(LIBOPENMC_CXX_SRC add_library(libopenmc SHARED ${LIBOPENMC_FORTRAN_SRC} ${LIBOPENMC_CXX_SRC}) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc - PUBLIC_HEADER include/openmc.h) -add_executable(openmc src/main.cpp) + PUBLIC_HEADER include/openmc.h + LINKER_LANGUAGE Fortran) #=============================================================================== # Add compiler/linker flags #=============================================================================== -set_property(TARGET openmc libopenmc - PROPERTY LINKER_LANGUAGE Fortran) - target_include_directories(libopenmc PUBLIC include ${HDF5_INCLUDE_DIRS}) -# The executable and the faddeeva package use only one language. They can be -# set via target_compile_options which accepts a list. -target_compile_options(openmc PUBLIC ${cxxflags}) - # The libopenmc library has both F90 and C++ so the compile flags must be set -# file-by-file via set_source_file_properties. The compile flags must first be -# converted from lists to strings. -string(REPLACE ";" " " f90flags "${f90flags}") -string(REPLACE ";" " " cxxflags "${cxxflags}") -set_source_files_properties(${LIBOPENMC_FORTRAN_SRC} PROPERTIES COMPILE_FLAGS - ${f90flags}) -set_source_files_properties(${LIBOPENMC_CXX_SRC} PROPERTIES COMPILE_FLAGS - ${cxxflags}) +# file-by-file via set_source_file_properties. +set_property( + SOURCE ${LIBOPENMC_FORTRAN_SRC} + PROPERTY COMPILE_OPTIONS ${f90flags}) +set_property( + SOURCE ${LIBOPENMC_CXX_SRC} + PROPERTY COMPILE_OPTIONS ${cxxflags}) # Add HDF5 library directories to link line with -L foreach(LIBDIR ${HDF5_LIBRARY_DIRS}) @@ -489,7 +481,16 @@ endforeach() # linker flags. Thus, we can pass both linker flags and libraries together. target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml faddeeva) -target_link_libraries(openmc ${ldflags} libopenmc) + +#=============================================================================== +# openmc executable +#=============================================================================== + +add_executable(openmc src/main.cpp) +target_compile_options(openmc PUBLIC ${cxxflags}) +target_link_libraries(openmc libopenmc) +set_property(TARGET libopenmc + PROPERTY LINKER_LANGUAGE Fortran) #=============================================================================== # Python package From 18838b13edf83a49f1af745f3d0f4bbe53478252 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 12:36:33 -0500 Subject: [PATCH 06/15] Make MPI, UNIX, MAX_COORD, and PHDF5 definitions specific to libopenmc --- CMakeLists.txt | 49 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0dac2c370..ca8658c5e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # Set module path set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) -#=============================================================================== -# Architecture specific definitions -#=============================================================================== - -if (${UNIX}) - add_definitions(-DUNIX) -endif() - #=============================================================================== # Command line options #=============================================================================== @@ -27,10 +19,7 @@ option(debug "Compile with debug flags" OFF) option(optimize "Turn on all compiler optimization flags" OFF) option(coverage "Compile with coverage analysis flags" OFF) option(mpif08 "Use Fortran 2008 MPI interface" OFF) - -# Maximum number of nested coordinates levels set(maxcoord 10 CACHE STRING "Maximum number of nested coordinate levels") -add_definitions(-DMAX_COORD=${maxcoord}) #=============================================================================== # MPI for distributed-memory parallelism @@ -39,17 +28,12 @@ add_definitions(-DMAX_COORD=${maxcoord}) set(MPI_ENABLED FALSE) if($ENV{FC} MATCHES "(mpi[^/]*|ftn)$") message("-- Detected MPI wrapper: $ENV{FC}") - add_definitions(-DOPENMC_MPI) set(MPI_ENABLED TRUE) - - # Get directory containing MPI wrapper - get_filename_component(MPI_DIR $ENV{FC} DIRECTORY) endif() # Check for Fortran 2008 MPI interface if(MPI_ENABLED AND mpif08) message("-- Using Fortran 2008 MPI bindings") - add_definitions(-DOPENMC_MPIF08) endif() #=============================================================================== @@ -77,7 +61,6 @@ if(HDF5_IS_PARALLEL) if(NOT MPI_ENABLED) message(FATAL_ERROR "Parallel HDF5 must be used with MPI.") endif() - add_definitions(-DPHDF5) message("-- Using parallel HDF5") endif() @@ -316,14 +299,14 @@ if("${isSystemDir}" STREQUAL "-1") endif() #=============================================================================== -# Build faddeeva library +# faddeeva library #=============================================================================== add_library(faddeeva STATIC vendor/faddeeva/Faddeeva.c) target_compile_options(faddeeva PRIVATE ${cflags}) #=============================================================================== -# List source files. Define the libopenmc and the OpenMC executable +# libopenmc #=============================================================================== set(LIBOPENMC_FORTRAN_SRC @@ -457,11 +440,9 @@ set_target_properties(libopenmc PROPERTIES PUBLIC_HEADER include/openmc.h LINKER_LANGUAGE Fortran) -#=============================================================================== -# Add compiler/linker flags -#=============================================================================== - -target_include_directories(libopenmc PUBLIC include ${HDF5_INCLUDE_DIRS}) +target_include_directories(libopenmc + PUBLIC include + PRIVATE ${HDF5_INCLUDE_DIRS}) # The libopenmc library has both F90 and C++ so the compile flags must be set # file-by-file via set_source_file_properties. @@ -472,10 +453,20 @@ set_property( SOURCE ${LIBOPENMC_CXX_SRC} PROPERTY COMPILE_OPTIONS ${cxxflags}) -# Add HDF5 library directories to link line with -L -foreach(LIBDIR ${HDF5_LIBRARY_DIRS}) - list(APPEND ldflags "-L${LIBDIR}") -endforeach() +target_compile_definitions(libopenmc PRIVATE -DMAX_COORD=${maxcoord}) +if (UNIX) + # Used in progress_header.F90 for calling check_isatty + target_compile_definitions(libopenmc PRIVATE -DUNIX) +endif() +if (HDF5_IS_PARALLEL) + target_compile_definitions(libopenmc PRIVATE -DPHDF5) +endif() +if (MPI_ENABLED) + target_compile_definitions(libopenmc PUBLIC -DOPENMC_MPI) + if (mpif08) + target_compile_definitions(libopenmc PRIVATE -DOPENMC_MPIF08) + endif() +endif() # target_link_libraries treats any arguments starting with - but not -l as # linker flags. Thus, we can pass both linker flags and libraries together. @@ -487,7 +478,7 @@ target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml #=============================================================================== add_executable(openmc src/main.cpp) -target_compile_options(openmc PUBLIC ${cxxflags}) +target_compile_options(openmc PRIVATE ${cxxflags}) target_link_libraries(openmc libopenmc) set_property(TARGET libopenmc PROPERTY LINKER_LANGUAGE Fortran) From 695716de801176f7e43458a6e1df4b6f9e7e49dc Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 13:08:05 -0500 Subject: [PATCH 07/15] Make GIT_SHA1 definition specific to libopenmc --- CMakeLists.txt | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca8658c5e7..8aa2c6d915 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,19 +250,6 @@ message(STATUS "C flags: ${cflags}") message(STATUS "C++ flags: ${cxxflags}") message(STATUS "Linker flags: ${ldflags}") -#=============================================================================== -# git SHA1 hash -#=============================================================================== - -execute_process(COMMAND git rev-parse HEAD - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE GIT_SHA1_SUCCESS - OUTPUT_VARIABLE GIT_SHA1 - ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -if(GIT_SHA1_SUCCESS EQUAL 0) - add_definitions(-DGIT_SHA1="${GIT_SHA1}") -endif() - #=============================================================================== # pugixml library #=============================================================================== @@ -468,6 +455,16 @@ if (MPI_ENABLED) endif() endif() +# Set git SHA1 hash as a compile definition +execute_process(COMMAND git rev-parse HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SHA1_SUCCESS + OUTPUT_VARIABLE GIT_SHA1 + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) +if(GIT_SHA1_SUCCESS EQUAL 0) + target_compile_definitions(libopenmc PRIVATE -DGIT_SHA1="${GIT_SHA1}") +endif() + # target_link_libraries treats any arguments starting with - but not -l as # linker flags. Thus, we can pass both linker flags and libraries together. target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml From 08899b45d4e25fb7f7ee45a96c2a8242935d0205 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 13:14:21 -0500 Subject: [PATCH 08/15] Use FindOpenMP to set flags. Bump required CMake version to 3.1 --- CMakeLists.txt | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8aa2c6d915..6b5806f26d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) project(openmc Fortran C CXX) # Setup output directories @@ -72,15 +72,14 @@ endif() # versions, we manually add the flags. However, at some point in time, the # manual logic can be removed in favor of the block below -#if(NOT (CMAKE_VERSION VERSION_LESS 3.1)) -# if(openmp) -# find_package(OpenMP) -# if(OPENMP_FOUND) -# list(APPEND f90flags ${OpenMP_Fortran_FLAGS}) -# list(APPEND ldflags ${OpenMP_Fortran_FLAGS}) -# endif() -# endif() -#endif() +if(openmp) + find_package(OpenMP) + if(OPENMP_FOUND) + list(APPEND f90flags ${OpenMP_Fortran_FLAGS}) + list(APPEND cxxflags ${OpenMP_CXX_FLAGS}) + list(APPEND ldflags ${OpenMP_Fortran_FLAGS}) + endif() +endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -108,10 +107,6 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) list(REMOVE_ITEM f90flags -O2) list(APPEND f90flags -O3) endif() - if(openmp) - list(APPEND f90flags -fopenmp) - list(APPEND ldflags -fopenmp) - endif() if(coverage) list(APPEND f90flags -coverage) list(APPEND ldflags -coverage) @@ -132,10 +127,6 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) if(optimize) list(APPEND f90flags -O3) endif() - if(openmp) - list(APPEND f90flags -qopenmp) - list(APPEND ldflags -qopenmp) - endif() elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI) # PGI Fortran compiler options @@ -170,10 +161,6 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL XL) list(REMOVE_ITEM f90flags -O2) list(APPEND f90flags -O3) endif() - if(openmp) - list(APPEND f90flags -qsmp=omp) - list(APPEND ldflags -qsmp=omp) - endif() elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Cray) # Cray Fortran compiler options @@ -240,9 +227,6 @@ if(optimize) list(REMOVE_ITEM cxxflags -O2) list(APPEND cxxflags -O3) endif() -if(openmp) - list(APPEND cxxflags -fopenmp) -endif() # Show flags being used message(STATUS "Fortran flags: ${f90flags}") From a4a87ee97d2f4ef80c3f2e8c7588efad22004117 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 13:15:56 -0500 Subject: [PATCH 09/15] Two doc fixes --- docs/source/usersguide/tallies.rst | 2 +- openmc/filter_expansion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/usersguide/tallies.rst b/docs/source/usersguide/tallies.rst index bbec016423..1210bc2820 100644 --- a/docs/source/usersguide/tallies.rst +++ b/docs/source/usersguide/tallies.rst @@ -213,7 +213,7 @@ The following tables show all valid scores: +----------------------+---------------------------------------------------+ |nu-fission |Total production of neutrons due to fission. | +----------------------+---------------------------------------------------+ - |nu-scatter, |This score is similar in functionality to the | + |nu-scatter |This score is similar in functionality to the | | |``scatter`` score except the total production of | | |neutrons due to scattering is scored vice simply | | |the scattering rate. This accounts for | diff --git a/openmc/filter_expansion.py b/openmc/filter_expansion.py index 5159cfd473..1970c07710 100644 --- a/openmc/filter_expansion.py +++ b/openmc/filter_expansion.py @@ -54,7 +54,7 @@ class LegendreFilter(ExpansionFilter): r"""Score Legendre expansion moments up to specified order. This filter allows scores to be multiplied by Legendre polynomials of the - change in particle angle ($\mu$) up to a user-specified order. + change in particle angle (:math:`\mu`) up to a user-specified order. Parameters ---------- From 573f612afe108ff607c056b315224e7c592e5d97 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 15:48:14 -0500 Subject: [PATCH 10/15] Remove defunct from_ace routines --- src/endf_header.F90 | 56 --------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/endf_header.F90 b/src/endf_header.F90 index 9443efe2be..d45fbe68f3 100644 --- a/src/endf_header.F90 +++ b/src/endf_header.F90 @@ -37,7 +37,6 @@ module endf_header contains procedure :: from_hdf5 => polynomial_from_hdf5 procedure :: evaluate => polynomial_evaluate - procedure :: from_ace => polynomial_from_ace end type Polynomial !=============================================================================== @@ -52,7 +51,6 @@ module endf_header real(8), allocatable :: x(:) ! values of abscissa real(8), allocatable :: y(:) ! values of ordinate contains - procedure :: from_ace => tabulated1d_from_ace procedure :: from_hdf5 => tabulated1d_from_hdf5 procedure :: evaluate => tabulated1d_evaluate end type Tabulated1D @@ -63,24 +61,6 @@ contains ! Polynomial implementation !=============================================================================== - subroutine polynomial_from_ace(this, xss, idx) - class(Polynomial), intent(inout) :: this - real(8), intent(in) :: xss(:) - integer, intent(in) :: idx - - integer :: nc ! number of coefficients (order - 1) - - ! Clear space - if (allocated(this % coef)) deallocate(this % coef) - - ! Determine number of coefficients - nc = nint(xss(idx)) - - ! Allocate space for and read coefficients - allocate(this % coef(nc)) - this % coef(:) = xss(idx + 1 : idx + nc) - end subroutine polynomial_from_ace - subroutine polynomial_from_hdf5(this, dset_id) class(Polynomial), intent(inout) :: this integer(HID_T), intent(in) :: dset_id @@ -111,42 +91,6 @@ contains ! Tabulated1D implementation !=============================================================================== - subroutine tabulated1d_from_ace(this, xss, idx) - class(Tabulated1D), intent(inout) :: this - real(8), intent(in) :: xss(:) - integer, intent(in) :: idx - - integer :: nr, ne - - ! Clear space - if (allocated(this % nbt)) deallocate(this % nbt) - if (allocated(this % int)) deallocate(this % int) - if (allocated(this % x)) deallocate(this % x) - if (allocated(this % y)) deallocate(this % y) - - ! Determine number of regions - nr = nint(xss(idx)) - this % n_regions = nr - - ! Read interpolation region data - if (nr > 0) then - allocate(this % nbt(nr)) - allocate(this % int(nr)) - this % nbt(:) = nint(xss(idx + 1 : idx + nr)) - this % int(:) = nint(xss(idx + nr + 1 : idx + 2*nr)) - end if - - ! Determine number of pairs - ne = int(XSS(idx + 2*nr + 1)) - this % n_pairs = ne - - ! Read (x,y) pairs - allocate(this % x(ne)) - allocate(this % y(ne)) - this % x(:) = xss(idx + 2*nr + 2 : idx + 2*nr + 1 + ne) - this % y(:) = xss(idx + 2*nr + 2 + ne : idx + 2*nr + 1 + 2*ne) - end subroutine tabulated1d_from_ace - subroutine tabulated1d_from_hdf5(this, dset_id) class(Tabulated1D), intent(inout) :: this integer(HID_T), intent(in) :: dset_id From 384982fa3667013bb79d0573c16b59ec3359dc19 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 16:01:44 -0500 Subject: [PATCH 11/15] Get rid of SIGMA1 implementation that is not used/tested --- CMakeLists.txt | 1 - src/doppler.F90 | 216 ------------------------------------------------ 2 files changed, 217 deletions(-) delete mode 100644 src/doppler.F90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b5806f26d..61df522230 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,7 +297,6 @@ set(LIBOPENMC_FORTRAN_SRC src/dict_header.F90 src/distribution_multivariate.F90 src/distribution_univariate.F90 - src/doppler.F90 src/eigenvalue.F90 src/endf.F90 src/endf_header.F90 diff --git a/src/doppler.F90 b/src/doppler.F90 deleted file mode 100644 index 56c07c50eb..0000000000 --- a/src/doppler.F90 +++ /dev/null @@ -1,216 +0,0 @@ -module doppler - - use constants, only: ZERO, ONE, PI, K_BOLTZMANN - - implicit none - - real(8), parameter :: sqrt_pi_inv = ONE / sqrt(PI) - -contains - -!=============================================================================== -! BROADEN takes a microscopic cross section at a temperature T_1 and Doppler -! broadens it to a higher temperature T_2 based on a method originally developed -! by Cullen and Weisbin (see "Exact Doppler Broadening of Tabulated Cross -! Sections," Nucl. Sci. Eng. 60, 199-229 (1976)). The only difference here is -! the F functions are evaluated based on complementary error functions rather -! than error functions as is done in the BROADR module of NJOY. -!=============================================================================== - - subroutine broaden(energy, xs, A_target, T, sigmaNew) - - real(8), intent(in) :: energy(:) ! energy grid - real(8), intent(in) :: xs(:) ! unbroadened cross section - integer, intent(in) :: A_target ! mass number of target - real(8), intent(in) :: T ! temperature (difference) - real(8), intent(out) :: sigmaNew(:) ! broadened cross section - - integer :: i, k ! loop indices - integer :: n ! number of energy points - real(8) :: F_a(0:4) ! F(a) functions as per C&W - real(8) :: F_b(0:4) ! F(b) functions as per C&W - real(8) :: H(0:4) ! H functions as per C&W - real(8), allocatable :: x(:) ! proportional to relative velocity - real(8) :: y ! proportional to neutron velocity - real(8) :: y_sq ! y**2 - real(8) :: y_inv ! 1/y - real(8) :: y_inv_sq ! 1/y**2 - real(8) :: alpha ! constant equal to A/kT - real(8) :: slope ! slope of xs between adjacent points - real(8) :: Ak, Bk ! coefficients at each point - real(8) :: a, b ! values of x(k)-y and x(k+1)-y - real(8) :: sigma ! broadened cross section at one point - - ! Determine alpha parameter -- have to convert k to eV/K - alpha = A_target/(K_BOLTZMANN * T) - - ! Allocate memory for x and assign values - n = size(energy) - allocate(x(n)) - x = sqrt(alpha * energy) - - ! Loop over incoming neutron energies - ENERGY_NEUTRON: do i = 1, n - - sigma = ZERO - y = x(i) - y_sq = y*y - y_inv = ONE / y - y_inv_sq = y_inv / y - - ! ======================================================================= - ! EVALUATE FIRST TERM FROM x(k) - y = 0 to -4 - - k = i - a = ZERO - call calculate_F(F_a, a) - - do while (a >= -4.0 .and. k > 1) - ! Move to next point - F_b = F_a - k = k - 1 - a = x(k) - y - - ! Calculate F and H functions - call calculate_F(F_a, a) - H = F_a - F_b - - ! Calculate A(k), B(k), and slope terms - Ak = y_inv_sq*H(2) + 2.0*y_inv*H(1) + H(0) - Bk = y_inv_sq*H(4) + 4.0*y_inv*H(3) + 6.0*H(2) + 4.0*y*H(1) + y_sq*H(0) - slope = (xs(k+1) - xs(k)) / (x(k+1)**2 - x(k)**2) - - ! Add contribution to broadened cross section - sigma = sigma + Ak*(xs(k) - slope*x(k)**2) + slope*Bk - end do - - ! ======================================================================= - ! EXTEND CROSS SECTION TO 0 ASSUMING 1/V SHAPE - - if (k == 1 .and. a >= -4.0) then - ! Since x = 0, this implies that a = -y - F_b = F_a - a = -y - - ! Calculate F and H functions - call calculate_F(F_a, a) - H = F_a - F_b - - ! Add contribution to broadened cross section - sigma = sigma + xs(k)*x(k)*(y_inv_sq*H(1) + y_inv*H(0)) - end if - - ! ======================================================================= - ! EVALUATE FIRST TERM FROM x(k) - y = 0 to 4 - - k = i - b = ZERO - call calculate_F(F_b, b) - - do while (b <= 4.0 .and. k < n) - ! Move to next point - F_a = F_b - k = k + 1 - b = x(k) - y - - ! Calculate F and H functions - call calculate_F(F_b, b) - H = F_a - F_b - - ! Calculate A(k), B(k), and slope terms - Ak = y_inv_sq*H(2) + 2.0*y_inv*H(1) + H(0) - Bk = y_inv_sq*H(4) + 4.0*y_inv*H(3) + 6.0*H(2) + 4.0*y*H(1) + y_sq*H(0) - slope = (xs(k) - xs(k-1)) / (x(k)**2 - x(k-1)**2) - - ! Add contribution to broadened cross section - sigma = sigma + Ak*(xs(k) - slope*x(k)**2) + slope*Bk - end do - - ! ======================================================================= - ! EXTEND CROSS SECTION TO INFINITY ASSUMING CONSTANT SHAPE - - if (k == n .and. b <= 4.0) then - ! Calculate F function at last energy point - a = x(k) - y - call calculate_F(F_a, a) - - ! Add contribution to broadened cross section - sigma = sigma + xs(k) * (y_inv_sq*F_a(2) + 2.0*y_inv*F_a(1) + F_a(0)) - end if - - ! ======================================================================= - ! EVALUATE SECOND TERM FROM x(k) + y = 0 to +4 - - if (y <= 4.0) then - ! Swap signs on y - y = -y - y_inv = -y_inv - k = 1 - - ! Calculate a and b based on 0 and x(1) - a = -y - b = x(k) - y - - ! Calculate F and H functions - call calculate_F(F_a, a) - call calculate_F(F_b, b) - H = F_a - F_b - - ! Add contribution to broadened cross section - sigma = sigma - xs(k) * x(k) * (y_inv_sq*H(1) + y_inv*H(0)) - - ! Now progress forward doing the remainder of the second term - do while (b <= 4.0) - ! Move to next point - F_a = F_b - k = k + 1 - b = x(k) - y - - ! Calculate F and H functions - call calculate_F(F_b, b) - H = F_a - F_b - - ! Calculate A(k), B(k), and slope terms - Ak = y_inv_sq*H(2) + 2.0*y_inv*H(1) + H(0) - Bk = y_inv_sq*H(4) + 4.0*y_inv*H(3) + 6.0*H(2) + 4.0*y*H(1) & - + y_sq*H(0) - slope = (xs(k) - xs(k-1)) / (x(k)**2 - x(k-1)**2) - - ! Add contribution to broadened cross section - sigma = sigma - Ak*(xs(k) - slope*x(k)**2) - slope*Bk - end do - end if - - ! Set broadened cross section - sigmaNew(i) = sigma - - end do ENERGY_NEUTRON - - end subroutine broaden - -!=============================================================================== -! CALCULATE_F evaluates the function: -! -! F(n,a) = 1/sqrt(pi)*int(z^n*exp(-z^2), z = a to infinity) -! -! The five values returned in a vector correspond to the integral for n = 0 -! through 4. These functions are called over and over during the Doppler -! broadening routine. -!=============================================================================== - - subroutine calculate_F(F, a) - - real(8), intent(inout) :: F(0:4) - real(8), intent(in) :: a - -#ifndef NO_F2008 - F(0) = 0.5*erfc(a) -#endif - F(1) = 0.5*sqrt_pi_inv*exp(-a*a) - F(2) = 0.5*F(0) + a*F(1) - F(3) = F(1)*(1.0 + a*a) - F(4) = 0.75*F(0) + F(1)*a*(1.5 + a*a) - - end subroutine calculate_F - -end module doppler From 610fc5c9188405c6edacb30ef4b4c965cd3a1595 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 16:09:24 -0500 Subject: [PATCH 12/15] Use generator expression to handle compile options for Fortran/C++ separately --- CMakeLists.txt | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61df522230..adf2126826 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(openmc Fortran C CXX) # Setup output directories @@ -68,11 +68,8 @@ endif() # Set compile/link flags based on which compiler is being used #=============================================================================== -# Support for Fortran in FindOpenMP was added in CMake 3.1. To support lower -# versions, we manually add the flags. However, at some point in time, the -# manual logic can be removed in favor of the block below - if(openmp) + # Requires CMake 3.1+ find_package(OpenMP) if(OPENMP_FOUND) list(APPEND f90flags ${OpenMP_Fortran_FLAGS}) @@ -248,7 +245,7 @@ target_include_directories(pugixml PUBLIC vendor/pugixml/) # This block of code ensures that dynamic libraries can be found via the RPATH # whether the executable is the original one from the build directory or the # installed one in CMAKE_INSTALL_PREFIX. Ref: -# https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH +# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling # use, i.e. don't skip the full RPATH for the build tree set(CMAKE_SKIP_BUILD_RPATH FALSE) @@ -280,7 +277,7 @@ target_compile_options(faddeeva PRIVATE ${cflags}) # libopenmc #=============================================================================== -set(LIBOPENMC_FORTRAN_SRC +add_library(libopenmc SHARED src/algorithm.F90 src/angle_distribution.F90 src/angleenergy_header.F90 @@ -382,8 +379,6 @@ set(LIBOPENMC_FORTRAN_SRC src/tallies/tally_header.F90 src/tallies/trigger.F90 src/tallies/trigger_header.F90 -) -set(LIBOPENMC_CXX_SRC src/cell.cpp src/initialize.cpp src/finalize.cpp @@ -404,7 +399,6 @@ set(LIBOPENMC_CXX_SRC src/surface.cpp src/xml_interface.cpp src/xsdata.cpp) -add_library(libopenmc SHARED ${LIBOPENMC_FORTRAN_SRC} ${LIBOPENMC_CXX_SRC}) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc PUBLIC_HEADER include/openmc.h @@ -415,13 +409,11 @@ target_include_directories(libopenmc PRIVATE ${HDF5_INCLUDE_DIRS}) # The libopenmc library has both F90 and C++ so the compile flags must be set -# file-by-file via set_source_file_properties. -set_property( - SOURCE ${LIBOPENMC_FORTRAN_SRC} - PROPERTY COMPILE_OPTIONS ${f90flags}) -set_property( - SOURCE ${LIBOPENMC_CXX_SRC} - PROPERTY COMPILE_OPTIONS ${cxxflags}) +# differently depending on the language. The $ generator +# expression was added in CMake 3.3 +target_compile_options(libopenmc PRIVATE + $<$:${f90flags}> + $<$:${cxxflags}>) target_compile_definitions(libopenmc PRIVATE -DMAX_COORD=${maxcoord}) if (UNIX) From 36db02bad3e354ffa6c61e8ed3ecb7bfe74d93b3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jun 2018 16:25:45 -0500 Subject: [PATCH 13/15] Use C_STANDARD property on faddeeva library --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index adf2126826..1fd03c37b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,7 +171,7 @@ endif() if(CMAKE_C_COMPILER_ID STREQUAL GNU) # GCC compiler options - list(APPEND cflags -std=c99 -O2) + list(APPEND cflags -O2) if(debug) list(REMOVE_ITEM cflags -O2) list(APPEND cflags -g -Wall -pedantic -fbounds-check) @@ -189,7 +189,6 @@ if(CMAKE_C_COMPILER_ID STREQUAL GNU) elseif(CMAKE_C_COMPILER_ID STREQUAL Intel) # Intel compiler options - list(APPEND cflags -std=c99) if(debug) list(APPEND cflags -g -w3 -ftrapuv -fp-stack-check -O0) endif() @@ -202,7 +201,6 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL Intel) elseif(CMAKE_C_COMPILER_ID MATCHES Clang) # Clang options - list(APPEND cflags -std=c99) if(debug) list(APPEND cflags -g -O0 -ftrapv) endif() @@ -272,6 +270,9 @@ endif() add_library(faddeeva STATIC vendor/faddeeva/Faddeeva.c) target_compile_options(faddeeva PRIVATE ${cflags}) +set_target_properties(faddeeva PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON) #=============================================================================== # libopenmc From 459fc8e12c1aa40d596c64c51bcce5fa52dc2143 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 21 Jun 2018 15:30:29 -0500 Subject: [PATCH 14/15] Dont modify linker_language for executable --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fd03c37b8..15c89142e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -453,8 +453,6 @@ target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml add_executable(openmc src/main.cpp) target_compile_options(openmc PRIVATE ${cxxflags}) target_link_libraries(openmc libopenmc) -set_property(TARGET libopenmc - PROPERTY LINKER_LANGUAGE Fortran) #=============================================================================== # Python package From 1145c918056d09fe6f71385242f77f9464ae06a5 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 28 Jun 2018 17:11:52 -0500 Subject: [PATCH 15/15] Add n_nuclides in openmc.h --- include/openmc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/openmc.h b/include/openmc.h index 2c0f10eae0..03597e5a10 100644 --- a/include/openmc.h +++ b/include/openmc.h @@ -134,6 +134,7 @@ extern "C" { extern int32_t n_lattices; extern int32_t n_materials; extern int32_t n_meshes; + extern int n_nuclides; extern int64_t n_particles; extern int32_t n_plots; extern int32_t n_realizations;