Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build_from_source_on_Ubuntu_jammy_22.04
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ jobs:
run: |
cd openmc_install_scripts/Ubuntu_22.04
./openmc-install.sh
- name: cad-to-openmc-install
run: |
cd openmc_install_scripts/Ubuntu_22.04
./cad-to-openmc-install.sh
- name: test-install
run: |
cd openmc_install_scripts/tests
./run-test.sh
48 changes: 48 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
workflow_dispatch:
schedule:
- cron: '44 4 * * 0'
jobs:
run-openmc-installer:
runs-on: ubuntu-22.04
steps:
- name: checkout_main_repo
uses: actions/checkout@v3
with:
repository: 'openmsr/openmc_install_scripts'
ref: '${{github.sha}}'
path: openmc_install_scripts
submodules: true
- name: bootstrap
run: sudo apt-get -y update
- name: moab-install
run: |
cd openmc_install_scripts/Ubuntu_22.04
./moab-install.sh
- name: double_down-install
run: |
cd openmc_install_scripts/Ubuntu_22.04
./double_down-install.sh
- name: dagmc-install
run: |
cd openmc_install_scripts/Ubuntu_22.04
./dagmc-install.sh
- name: openmc-install
run: |
cd openmc_install_scripts/Ubuntu_22.04
./openmc-install.sh
- name: cad-to-openmc-install
run: |
cd openmc_install_scripts/Ubuntu_22.04
./cad-to-openmc-install.sh
- name: test-install
run: |
sudo apt-get install libgl1-mesa-glx libglu1-mesa libxcursor1 libxinerama1
sudo pip install -U numpy
cd openmc_install_scripts/tests
./run-test.sh
9 changes: 0 additions & 9 deletions Arch/tests/step_to_h5m.py

This file was deleted.

32 changes: 32 additions & 0 deletions Ubuntu_22.04/cad-to-openmc-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
################################################################################
#CAD_to_openMC install
################################################################################
#!/bin/bash
set -ex

WD=`pwd`
name=`basename $0`
package_name='CAD_to_openMC'

#install_prefix="/opt"
#build_prefix="$HOME/openmc"

#if there is a .done-file then skip this step
if [ ! -e ${name}.done ]; then
mkdir -p $HOME/openmc
cd $HOME/openmc
if [ ! -e CAD_to_openMC ]; then
git clone https://github.com/openmsr/CAD_to_openMC.git
else
cd CAD_to_openMC
git fetch
git pull
cd ..
fi
cd ${WD}
touch ${name}.done
else
echo CAD_to_openMC appears already to be installed \(lock file ${name}.done exists\) - skipping.
fi

sudo pip install -r $HOME/openmc/CAD_to_openMC/requirements.txt
15 changes: 13 additions & 2 deletions Ubuntu_22.04/dagmc-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@ if [ ! -e ${name}.done ]; then

mkdir -p $HOME/openmc/DAGMC
cd $HOME/openmc/DAGMC
git clone --single-branch --branch develop --depth 1 https://github.com/svalinn/DAGMC.git
mkdir build
if [ ! -e DAGMC ]; then
git clone --single-branch --branch develop --depth 1 https://github.com/svalinn/DAGMC.git
else
cd DAGMC
git checkout develop
git fetch
git pull
cd ..
fi

if [ ! -e build ]; then
mkdir build
fi
cd build
cmake ../DAGMC -DBUILD_TALLY=ON \
-DMOAB_DIR=$HOME/openmc/MOAB \
Expand Down
31 changes: 24 additions & 7 deletions Ubuntu_22.04/double_down-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
#!/bin/bash
set -ex

#embree compile & install
#./embree-install.sh
#echo "Compiled & installed embree, proceeding..."
# uncomment to install embree or define as an environmental variable
# BUILD_EMBREE=1
# embree compile & install
if [ $BUILD_EMBREE ]; then
./embree-install.sh
echo "Compiled & installed embree, proceeding..."
fi

#moab compile & install
./moab-install.sh
Expand All @@ -29,11 +33,24 @@ if [ ! -e ${name}.done ]; then

mkdir -p $HOME/openmc/double-down
cd $HOME/openmc/double-down
git clone --single-branch --branch main --depth 1 https://github.com/pshriwise/double-down.git
mkdir build
if [ ! -e double-down ]; then
git clone --single-branch --branch main --depth 1 https://github.com/pshriwise/double-down.git
else
cd double-down;
git checkout main
git fetch
git pull
cd ..
fi
if [ ! -e build ]; then
mkdir build
fi

cd build
cmake ../double-down -DMOAB_DIR=$HOME/openmc/MOAB \
-DCMAKE_INSTALL_PREFIX=$HOME/openmc/double-down
cmake ../double-down \
-DMOAB_DIR=$HOME/openmc/MOAB \
$(if [ $BUILD_EMBREE ]; then echo "-DEMBREE_DIR=$HOME/openmc/embree"; fi) \
-DCMAKE_INSTALL_PREFIX=$HOME/openmc/double-down

make -j $ccores
make install
Expand Down
17 changes: 12 additions & 5 deletions Ubuntu_22.04/embree-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,22 @@ if [ ! -e $0.done ]; then
cd openmc
mkdir -p embree
cd embree
git clone --single-branch --branch v3.13.3 --depth 1 https://github.com/embree/embree.git
mkdir build
if [ ! -e embree ]; then
git clone --single-branch --branch v3.13.3 --depth 1 https://github.com/embree/embree.git
else
cd embree
git checkout v3.13.3
git fetch
git pull
cd ..
fi
mkdir -p build
cd build
cmake ../embree -DCMAKE_INSTALL_PREFIX=$HOME/openmc/embree \
-DEMBREE_ISPC_SUPPORT=OFF \
-DEMBREE_TUTORIALS=OFF
-DEMBREE_TUTORIALS=OFF
make -j $ccores
sudo make install
rm -rf embree/build embree/embree
make install

cd ${WD}
touch ${0}.done
Expand Down
7 changes: 2 additions & 5 deletions Ubuntu_22.04/install-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ echo 'Defaults timestamp_timeout=-1' | sudo EDITOR='tee -a' visudo
./openmc-install.sh
echo "Compiled & installed openmc, done."

echo "Running test script..."
python test_openmc.py

#remove timestamp update
sudo sed -i '/Defaults timestamp_timeout=-1/d' /etc/sudoers
./cad-to-openmc-install.sh
echo "Compiled & installed CAD_to_openMC, done."
19 changes: 16 additions & 3 deletions Ubuntu_22.04/moab-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,28 @@ if [ ! -e ${name}.done ]; then

mkdir -p $HOME/openmc/MOAB
cd $HOME/openmc/MOAB
git clone --single-branch --branch 5.3.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
mkdir -p build

if [ ! -e moab ]; then
git clone --single-branch --branch 5.3.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
else
cd moab && \
git checkout 5.3.1 && \
git fetch && \
git pull && \
cd ..
fi

if [ ! -e build ]; then
mkdir -p build
fi

cd build
cmake ../moab -DENABLE_HDF5=ON \
-DENABLE_NETCDF=ON \
-DENABLE_FORTRAN=OFF \
-DENABLE_BLASLAPACK=OFF \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_PYMOAB=OFF \
-DENABLE_PYMOAB=ON \
-DCMAKE_INSTALL_PREFIX=$HOME/openmc/MOAB
make -j $ccores
make install
Expand Down
13 changes: 6 additions & 7 deletions Ubuntu_22.04/openmc-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
set -ex

#nuclear_data_download
#./nuclear_data-install.sh
#echo "Downloaded & extracted nuclear data, proceeding..."
./nuclear_data-install.sh
echo "Downloaded & extracted nuclear data, proceeding..."

#dagmc compile & install
./dagmc-install.sh
Expand Down Expand Up @@ -50,12 +50,11 @@ if [ ! -e ${name}.done ]; then
cd build
cmake -DOPENMC_USE_DAGMC=ON \
-DDAGMC_ROOT=$HOME/openmc/DAGMC \
-DHDF5_PREFER_PARALLEL=off ..
-DHDF5_PREFER_PARALLEL=off \
-DCMAKE_INSTALL_PREFIX=$HOME/openmc \
..
make -j $ccores
sudo make install

cd ..
sudo pip3 install .
make install

cd ${WD}

Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions tests/run-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/bash

echo "Running test script..."
# set the path to the nuclear database
export OPENMC_CROSS_SECTIONS=$HOME"/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml"
# set custom version of pyMOAB
export PYTHONPATH=$PYTHONPATH:$HOME"/openmc/MOAB/build/pymoab/"
# set custom version of CAD_to_openMC
export PYTHONPATH=$PYTHONPATH:$HOME"/openmc/CAD_to_openMC/src/"
# set custom version of OpenMC
export PYTHONPATH=$PYTHONPATH:$HOME"/openmc/openmc/"
export PATH=$PATH:$HOME"/openmc/openmc/build/bin/"

if [ ! -e dagmc.h5m ]; then
python step_to_h5m.py fuel_pins.step
fi
python test_openmc.py
8 changes: 8 additions & 0 deletions tests/step_to_h5m.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import sys
import os
import CAD_to_OpenMC.assembly as ab

a=ab.Assembly()
a.stp_files=[sys.argv[1]]
a.import_stp_files()
a.solids_to_h5m()
File renamed without changes.