Skip to content

Commit

Permalink
Merge pull request #20 from openmsr/develop
Browse files Browse the repository at this point in the history
latest updates before switching to new stable OpenMC
  • Loading branch information
ebknudsen authored Nov 16, 2023
2 parents ceb1a4c + b241bdb commit e392819
Show file tree
Hide file tree
Showing 21 changed files with 152 additions and 122 deletions.
15 changes: 9 additions & 6 deletions Arch/dagmc-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ if [ "x" != "x$LOCAL_INSTALL_PREFIX" ]; then
install_prefix=$LOCAL_INSTALL_PREFIX
fi
build_prefix="$HOME/openmc"
if [ "x" != "x$OPENMC_BUILD_PREFIX" ]; then
build_prefix=$OPENMC_BUILD_PREFIX
fi

#if there is a .done-file then skip this step
if [ ! -e ${name}.done ]; then
Expand All @@ -31,10 +34,10 @@ if [ ! -e ${name}.done ]; then
ccores=$1
fi

mkdir -p $HOME/openmc/DAGMC
cd $HOME/openmc/DAGMC
mkdir -p ${build_prefix}/openmc/DAGMC
cd ${build_prefix}/openmc/DAGMC
if [ ! -e DAGMC ]; then
git clone https://github.com/svalinn/DAGMC.git
git clone --branch develop https://github.com/svalinn/DAGMC.git
cd DAGMC
else
cd DAGMC; git pull
Expand All @@ -48,17 +51,17 @@ if [ ! -e ${name}.done ]; then
mkdir -p build
cd build
cmake ../DAGMC -DBUILD_TALLY=ON \
-DMOAB_DIR=${install_prefix}\
-DMOAB_DIR=${install_prefix} \
-DDOUBLE_DOWN=ON\
-DBUILD_STATIC_EXE=OFF\
-DBUILD_STATIC_LIBS=OFF\
-DCMAKE_INSTALL_PREFIX=${install_prefix}\
-DDOUBLE_DOWN_DIR=${install_prefix}
make -j $ccores
make -j ${ccores}
make install

cd ${WD}
touch ${name}.done
else
echo DAGMC appears already to be installed \(lock file ${name}.done exists\) - skipping.
echo ${package_name} appears already to be installed \(lock file ${name}.done exists\) - skipping.
fi
10 changes: 7 additions & 3 deletions Arch/double_down-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ if [ "x" != "x$LOCAL_INSTALL_PREFIX" ]; then
install_prefix=$LOCAL_INSTALL_PREFIX
fi
build_prefix="$HOME/openmc"
if [ "x" != "x$OPENMC_BUILD_PREFIX" ]; then
build_prefix=$OPENMC_BUILD_PREFIX
fi

#if there is a .done-file then skip this step
if [ ! -e ${name}.done ]; then
Expand All @@ -32,11 +35,12 @@ if [ ! -e ${name}.done ]; then
ccores=$1
fi

mkdir -p $HOME/openmc/double-down
cd $HOME/openmc/double-down
mkdir -p ${build_prefix}/openmc/double-down
cd ${build_prefix}/openmc/double-down
if [ ! -d double-down ]; then
git clone --single-branch --branch array_incl --depth 1 https://github.com/pshriwise/double-down.git
git clone --single-branch --branch develop --depth 1 https://github.com/pshriwise/double-down.git
fi

mkdir -p build
cd build
cmake ../double-down -DMOAB_DIR=${install_prefix} \
Expand Down
2 changes: 0 additions & 2 deletions Arch/install-all.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash
# set -ex

#echo 'Defaults timestamp_timeout=-1' | sudo EDITOR='tee -a' visudo

#default install location. may be overrridden by the option --prefix=<path>
LOCAL_INSTALL_PREFIX=/usr/local/lib

Expand Down
14 changes: 9 additions & 5 deletions Arch/moab-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ install_prefix="/opt"
if [ "x" != "x$LOCAL_INSTALL_PREFIX" ]; then
install_prefix=$LOCAL_INSTALL_PREFIX
fi
build_prefix="$HOME/openmc"
if [ "x" != "x$OPENMC_BUILD_PREFIX" ]; then
build_prefix=$OPENMC_BUILD_PREFIX
fi

echo will install to $LOCAL_INSTALL_PREFIX

Expand All @@ -21,7 +25,7 @@ if [ ! -e ${name}.done ]; then
sudo pacman -Sy --noconfirm \
eigen \
netcdf \
hdf5 \
hdf5-openmpi \
python-setuptools \
cython
fi
Expand All @@ -31,10 +35,10 @@ if [ ! -e ${name}.done ]; then
ccores=$1
fi

mkdir -p $HOME/openmc/MOAB
cd $HOME/openmc/MOAB
mkdir -p ${build_prefix}/openmc/MOAB
cd ${build_prefix}/openmc/MOAB
if [ ! -e moab ]; then
git clone --single-branch --branch 5.4.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
git clone --single-branch --branch 5.3.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
else
cd moab
git pull
Expand All @@ -59,5 +63,5 @@ if [ ! -e ${name}.done ]; then
cd ${WD}
touch ${name}.done
else
echo ${package_name} appears to be already installed \(lock file ${name}.done exists\) - skipping.
echo ${package_name} appears already to be installed \(lock file ${name}.done exists\) - skipping.
fi
41 changes: 25 additions & 16 deletions Arch/nuclear_data-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,33 @@
#!/bin/bash
set -ex

echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/endfb80_hdf5/cross_sections.xml" >> $HOME/.bashrc
source $HOME/.bashrc
if [ ! -e $0.done ]; then
if [ "x${OPENMC_CROSS_SECTIONS}"=="x" ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
fi

sudo pacman -Sy --noconfirm wget
#default libraries
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"

#defaul libraries
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"
mkdir -p $HOME/openmc/nuclear_data
cd $HOME/openmc/nuclear_data

cd /opt
sudo mkdir -p nuclear_data
cd nuclear_data
toget=$endfb_VIII

#see other default options above
sudo wget $endfb_VIII
if [ ! -e `basename $toget` ]; then
#see other default options above
wget $toget

for entry in "$PWD"/*.xz
do
tar -xvf $entry
done
fi
touch ${0}.done
else
name=`basename $0`
echo nuclear data appears to already be installed \(lock file ${name}.done exists\) - skipping.
fi

for entry in "$PWD"/*
do
sudo tar -xvf $entry
done
16 changes: 8 additions & 8 deletions Arch/openmc-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -ex
#./nuclear_data-install.sh
#echo "Downloaded & extracted nuclear data, proceeding..."

openmc_version="v0.13.2"
openmc_version="v0.13.4"
if [ "x" != "x$OPENMC_VERSION" ]; then
openmc_version=$OPENMC_VERSION
fi
Expand Down Expand Up @@ -57,12 +57,12 @@ if [ ! -e ${name}.done ]; then
fi

#Should --openmc_build be passed as argument, it assumes a git version is already checked-out
if [ -e $build_prefix/openmc ]; then
cd $build_prefix/openmc
if [ -e $build_prefix/openmc/openmc ]; then
cd $build_prefix/openmc/openmc
else
#source install
mkdir -p $HOME/openmc
cd $HOME/openmc
#source install
mkdir -p $build_prefix/openmc
cd $build_prefix/openmc
if [ -e openmc ]; then
#repo exists checkout the given version and get new updates
#(updates are of course only relevant for development branches.)
Expand All @@ -77,7 +77,7 @@ if [ ! -e ${name}.done ]; then
git clone --recurse-submodules https://github.com/openmc-dev/openmc.git
cd openmc
git checkout $openmc_version
fi
fi
fi

if [ -e build ]; then
Expand All @@ -97,7 +97,7 @@ if [ ! -e ${name}.done ]; then
make install

#install the python layer
pip install ..
pip install .. --prefix=${install_prefix}

cd ${WD}

Expand Down
2 changes: 1 addition & 1 deletion Debian10/double_down-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ ! -e $0.done ]; then
cd $HOME/openmc
mkdir double-down
cd double-down
git clone --single-branch --branch main --depth 1 https://github.com/pshriwise/double-down.git
git clone --single-branch --branch develop --depth 1 https://github.com/pshriwise/double-down.git
mkdir build
cd build
cmake ../double-down -DMOAB_DIR=$HOME/openmc/MOAB \
Expand Down
2 changes: 1 addition & 1 deletion Debian10/moab-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ ! -e $0.done ]; then
cd openmc
mkdir -p MOAB
cd MOAB
git clone --single-branch --branch 5.3.0 --depth 1 https://bitbucket.org/fathomteam/moab.git
git clone --single-branch --branch 5.3.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
mkdir -p build
cd build
cmake ../moab -DENABLE_HDF5=ON \
Expand Down
20 changes: 12 additions & 8 deletions Debian10/nuclear_data-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@
set -ex

if [ ! -e $0.done ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
source $HOME/.bashrc
if [ "x${OPENMC_CROSS_SECTIONS}"=="x" ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
fi


#default libraries
endfb_VII="https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz"
endfb_VIII="https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz"
jeff="https://anl.box.com/shared/static/ddetxzp0gv1buk1ev67b8ynik7f268hw.xz"
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"

mkdir -p $HOME/openmc/nuclear_data
cd $HOME/openmc/nuclear_data

if [ ! -e `basename $endfb_VII` ]; then
toget=$endfb_VIII

if [ ! -e `basename $toget` ]; then
#see other default options above
wget $endfb_VII
wget $toget

for entry in "$PWD"/*
for entry in "$PWD"/*.xz
do
tar -xvf $entry
done
Expand Down
5 changes: 5 additions & 0 deletions Debian11/double_down-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ if [ "x" != "x$LOCAL_INSTALL_PREFIX" ]; then
fi
build_prefix="$HOME/openmc"


sudo apt-get install --yes doxygen\
libembree3-3 libembree-dev


#if there is a .done-file then skip this step
if [ ! -e ${name}.done ]; then
sudo apt-get install --yes doxygen\
Expand Down
6 changes: 0 additions & 6 deletions Debian11/install-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,3 @@ export LOCAL_INSTALL_PREFIX
#openmc-install.sh will call install scripts of its dependencies & nuclear data
./openmc-install.sh
echo "Compiled & installed openmc, done."

echo "Running test script..."
python test_openmc.py
rm *.xml
rm *.h5

2 changes: 1 addition & 1 deletion Debian11/moab-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ ! -e ${name}.done ]; then
mkdir -p $HOME/openmc/MOAB
cd $HOME/openmc/MOAB
if [ ! -e moab ]; then
git clone --single-branch --branch 5.4.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
git clone --single-branch --branch 5.3.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
else
cd moab
git pull
Expand Down
15 changes: 9 additions & 6 deletions Debian11/nuclear_data-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ if [ ! -e $0.done ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
fi


#default libraries
endfb_VII="https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz"
endfb_VIII="https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz"
jeff="https://anl.box.com/shared/static/ddetxzp0gv1buk1ev67b8ynik7f268hw.xz"
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"

mkdir -p $HOME/openmc/nuclear_data
cd $HOME/openmc/nuclear_data

if [ ! -e `basename $endfb_VII` ]; then
toget=$endfb_VIII

if [ ! -e `basename $toget` ]; then
#see other default options above
wget $endfb_VII
wget $toget

for entry in "$PWD"/*
for entry in "$PWD"/*.xz
do
tar -xvf $entry
done
Expand Down
6 changes: 3 additions & 3 deletions Debian11/openmc-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -ex
#./nuclear_data-install.sh
#echo "Downloaded & extracted nuclear data, proceeding..."

openmc_version="v0.13.2"
openmc_version="v0.13.3"
if [ "x" != "x$OPENMC_VERSION" ]; then
openmc_version=$OPENMC_VERSION
fi
Expand Down Expand Up @@ -83,15 +83,15 @@ if [ ! -e ${name}.done ]; then
cd build
cmake -DOPENMC_USE_DAGMC=ON\
-DOPENMC_USE_OPENMP=ON\
-DOPENMC_USE_MPI=OFF\
-DOPENMC_USE_MPI=ON\
-DDAGMC_ROOT=${install_prefix}\
-DHDF5_PREFER_PARALLEL=off\
-DCMAKE_INSTALL_PREFIX=${install_prefix} ..
make -j $ccores
make install

#install the python layer
pip install ..
pip install .. --prefix=${install_prefix}

cd ${WD}

Expand Down
15 changes: 6 additions & 9 deletions Ubuntu_20.04/double_down-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
set -ex

#embree compile & install
#./embree-install.sh
#echo "Compiled & installed embree, proceeding..."
./embree-install.sh
echo "Compiled & installed embree, proceeding..."

#moab compile & install
./moab-install.sh
Expand All @@ -30,7 +30,7 @@ if [ ! -e ${name}.done ]; then
mkdir -p $HOME/openmc/double-down
cd $HOME/openmc/double-down
if [ ! -d double-down ]; then
git clone --single-branch --branch array_incl --depth 1 https://github.com/pshriwise/double-down.git
git clone --single-branch --branch develop --depth 1 https://github.com/pshriwise/double-down.git
fi
#trick to help cmake find embree for older Ubuntus
cd double-down
Expand All @@ -39,13 +39,10 @@ if [ ! -e ${name}.done ]; then
cd ..
mkdir -p build
cd build

cmake ../double-down -DMOAB_DIR=$HOME/openmc/MOAB \
-DCMAKE_INSTALL_PREFIX=$HOME/openmc/double-down

cmake ../double-down -DMOAB_DIR=${install_prefix} \
-DCMAKE_INSTALL_PREFIX=${install_prefix} \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_BUILD_TYPE=Debug
make -j ${ccores}
make -j $ccores
make install

cd ${WD}
Expand Down
Loading

0 comments on commit e392819

Please sign in to comment.