diff --git a/.github/workflows/build_from_source.yml b/.github/workflows/build_from_source.yml index ad372a0..eed4305 100755 --- a/.github/workflows/build_from_source.yml +++ b/.github/workflows/build_from_source.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: include: -# - { os: ubuntu-20.04, CC: gcc-10, CXX: g++-10, python: '3.8' } + - { os: ubuntu-20.04, CC: gcc-10, CXX: g++-10, python: '3.8' } - { os: ubuntu-22.04, CC: gcc, CXX: g++, python: '3.9' } - { os: ubuntu-22.04, CC: gcc, CXX: g++, python: '3.10' } - { os: ubuntu-22.04, CC: clang, CXX: clang++, python: '3.11' } diff --git a/patches/Findembree.cmake b/patches/Findembree.cmake index 1968442..2dee502 100755 --- a/patches/Findembree.cmake +++ b/patches/Findembree.cmake @@ -31,4 +31,6 @@ FIND_LIBRARY(EMBREE_LIBRARY_MIC NAMES embree3_xeonphi PATHS IF (EMBREE_INCLUDE_DIRS AND EMBREE_LIBRARY) SET(EMBREE_FOUND TRUE) + #set embree version to the lowest allowable number and hope for the best + SET(EMBREE_VERSION 3.6.1) ENDIF () diff --git a/patches/double_down_001_missingincludes.patch b/patches/double_down_001_missingincludes.patch index 95a5208..b6f474c 100755 --- a/patches/double_down_001_missingincludes.patch +++ b/patches/double_down_001_missingincludes.patch @@ -1,7 +1,7 @@ -diff --git a/include/double-down/MOABDirectAccess.h b/include/double-down/MOABDirectAccess.h +diff --git a/include/double_down/MOABDirectAccess.h b/include/double_down/MOABDirectAccess.h index dd3b245..ad31008 100644 ---- a/include/double-down/MOABDirectAccess.h -+++ b/include/double-down/MOABDirectAccess.h +--- a/include/double_down/MOABDirectAccess.h ++++ b/include/double_down/MOABDirectAccess.h @@ -2,6 +2,7 @@ #define _MBDIRECTACCESS_ @@ -10,10 +10,10 @@ index dd3b245..ad31008 100644 // MOAB #include "moab/Core.hpp" -diff --git a/include/double-down/primitives.hpp b/include/double-down/primitives.hpp +diff --git a/include/double_down/primitives.hpp b/include/double_down/primitives.hpp index 5eeb6a5..41b1f2a 100644 ---- a/include/double-down/primitives.hpp -+++ b/include/double-down/primitives.hpp +--- a/include/double_down/primitives.hpp ++++ b/include/double_down/primitives.hpp @@ -1,6 +1,7 @@ #ifndef DD_PRIMITIVES_H diff --git a/patches/double_down_002_embree_on_older.patch b/patches/double_down_002_embree_on_older.patch old mode 100755 new mode 100644 index db91aa8..68ee3ba --- a/patches/double_down_002_embree_on_older.patch +++ b/patches/double_down_002_embree_on_older.patch @@ -1,13 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1325ac1..36228e2 100644 +index a5a1619..747f14b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -33,7 +33,7 @@ MESSAGE ( STATUS "MOAB_INCLUDE_DIRS is " ${MOAB_INCLUDE_DIRS} ) - INCLUDE_DIRECTORIES( ${MOAB_INCLUDE_DIRS} ) - +@@ -35,7 +35,7 @@ INCLUDE_DIRECTORIES( ${MOAB_INCLUDE_DIRS} ) # Embree --FIND_PACKAGE (embree 3.6.1 REQUIRED HINTS ${EMBREE_DIR}) + # this series of calls is needed to support the way that Embree indicates + # compatible versions in 3 and 4 (version 4 does it correctly, but 3 does not) +-FIND_PACKAGE(embree 3.6.1 HINTS ${EMBREE_DIR} QUIET) +find_package(embree MODULE) - - if (NOT ${EMBREE_VERSION} VERSION_GREATER 3.6.0) - message(FATAL_ERROR "Double-down requires Embree v3.6.1 or higher.") + if (NOT ${embree_FOUND}) + FIND_PACKAGE (embree REQUIRED HINTS ${EMBREE_DIR}) + endif() diff --git a/ubuntu-20.04/dagmc-install.sh b/ubuntu-20.04/dagmc-install.sh index abe6b08..f5c2357 100755 --- a/ubuntu-20.04/dagmc-install.sh +++ b/ubuntu-20.04/dagmc-install.sh @@ -32,7 +32,7 @@ if [ ! -e ${name}.done ]; then sudo apt-get install --yes python3 #Should we run make in parallel? Default is to use all available cores - ccores=`cat /proc/cpuinfo |grep CPU|wc -l` + ccores=`cat /proc/cpuinfo |grep processor|wc -l` if [ "x$1" != "x" ]; then ccores=$1 fi diff --git a/ubuntu-20.04/double_down-install.sh b/ubuntu-20.04/double_down-install.sh index b9def77..e35a8da 100755 --- a/ubuntu-20.04/double_down-install.sh +++ b/ubuntu-20.04/double_down-install.sh @@ -40,7 +40,7 @@ if [ ! -e ${name}.done ]; then libembree3-3 libembree-dev #Should we run make in parallel? Default is to use all available cores - ccores=`cat /proc/cpuinfo |grep CPU|wc -l` + ccores=`cat /proc/cpuinfo |grep processor|wc -l` if [ "x$1" != "x" ]; then ccores=$1 fi @@ -48,14 +48,14 @@ if [ ! -e ${name}.done ]; then mkdir -p ${build_prefix}/openmc/double-down cd ${build_prefix}/openmc/double-down if [ ! -d double-down ]; then - git clone --single-branch --branch develop --depth 1 https://github.com/pshriwise/double-down.git + git clone --single-branch --branch v1.1.0 --depth 1 https://github.com/pshriwise/double-down.git fi # These bits are hacks to get things working on older ubuntu # needed because the binary packages dont include .cmake-configs. cd double-down - patches=`ls ${WD}/../patches/double_down_*.patch` + patches=`ls ${WD}/../patches/double_down_002*.patch` for pat in ${patches}; do echo applying $pat patch -p1 < $pat @@ -63,10 +63,10 @@ if [ ! -e ${name}.done ]; then mkdir -p cmake cp ${WD}/../patches/Findembree.cmake cmake + cd .. - - mkdir -p ../build - cd ../build + mkdir -p build + cd build cmake ../double-down -DMOAB_DIR=${install_prefix}\ -DCMAKE_BUILD_TYPE=${build_type}\ -DCMAKE_INSTALL_PREFIX=${install_prefix} diff --git a/ubuntu-20.04/openmc-install.sh b/ubuntu-20.04/openmc-install.sh index 7f8a0bc..e767429 100755 --- a/ubuntu-20.04/openmc-install.sh +++ b/ubuntu-20.04/openmc-install.sh @@ -47,12 +47,11 @@ if [ ! -e ${name}.done ]; then python3-scipy\ python3-pandas\ python3-h5py\ - python3-h5py-mpi\ python3-matplotlib\ python3-uncertainties #Should we run make in parallel? Default is to use all available cores - ccores=`cat /proc/cpuinfo |grep CPU|wc -l` + ccores=`cat /proc/cpuinfo |grep processor|wc -l` if [ "x$1" != "x" ]; then ccores=$1 fi