mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge remote-tracking branch 'origin/develop' into hex_lattice
This commit is contained in:
commit
4a463bb8e3
5 changed files with 110 additions and 6 deletions
25
.travis.yml
Normal file
25
.travis.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq -y python-numpy
|
||||
- sudo apt-get install -qq -y python-scipy
|
||||
- sudo apt-get install -qq -y python-h5py
|
||||
- sudo apt-get install -qq -y gfortran
|
||||
- sudo apt-get install -qq -y g++
|
||||
- ./tests/travis_install.sh
|
||||
- export FC=gfortran
|
||||
- export MPI_DIR=$PWD/mpich_install
|
||||
- export PHDF5_DIR=$PWD/phdf5_install
|
||||
- export HDF5_DIR=$PWD/hdf5_install
|
||||
- export PETSC_DIR=$PWD/petsc_install
|
||||
|
||||
before_script:
|
||||
- cd data
|
||||
- ./get_nndc_data.py --batch
|
||||
- export CROSS_SECTIONS=$PWD/nndc/cross_sections.xml
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
- cd tests
|
||||
- export OMP_NUM_THREADS=3
|
||||
- ./travis.sh
|
||||
- cd ..
|
||||
|
|
@ -8,6 +8,12 @@ import sys
|
|||
import tarfile
|
||||
import glob
|
||||
import hashlib
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-b', '--batch', action = 'store_true',
|
||||
help = 'supresses standard in')
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
from urllib.request import urlopen
|
||||
|
|
@ -118,10 +124,13 @@ shutil.copyfile('cross_sections_nndc.xml', 'nndc/cross_sections.xml')
|
|||
# PROMPT USER TO DELETE .TAR.GZ FILES
|
||||
|
||||
# Ask user to delete
|
||||
if sys.version_info[0] < 3:
|
||||
response = raw_input('Delete *.tar.gz files? ([y]/n) ')
|
||||
if not args.batch:
|
||||
if sys.version_info[0] < 3:
|
||||
response = raw_input('Delete *.tar.gz files? ([y]/n) ')
|
||||
else:
|
||||
response = input('Delete *.tar.gz files? ([y]/n) ')
|
||||
else:
|
||||
response = input('Delete *.tar.gz files? ([y]/n) ')
|
||||
response = 'y'
|
||||
|
||||
# Delete files if requested
|
||||
if not response or response.lower().startswith('y'):
|
||||
|
|
@ -134,10 +143,13 @@ if not response or response.lower().startswith('y'):
|
|||
# PROMPT USER TO CONVERT ASCII TO BINARY
|
||||
|
||||
# Ask user to convert
|
||||
if sys.version_info[0] < 3:
|
||||
response = raw_input('Convert ACE files to binary? ([y]/n) ')
|
||||
if not args.batch:
|
||||
if sys.version_info[0] < 3:
|
||||
response = raw_input('Convert ACE files to binary? ([y]/n) ')
|
||||
else:
|
||||
response = input('Convert ACE files to binary? ([y]/n) ')
|
||||
else:
|
||||
response = input('Convert ACE files to binary? ([y]/n) ')
|
||||
response = 'y'
|
||||
|
||||
# Convert files if requested
|
||||
if not response or response.lower().startswith('y'):
|
||||
|
|
|
|||
|
|
@ -509,6 +509,8 @@ else:
|
|||
ENDC = ''
|
||||
BOLD = ''
|
||||
|
||||
return_code = 0
|
||||
|
||||
for test in tests:
|
||||
print(test + '.'*(50 - len(test)), end='')
|
||||
if tests[test].success:
|
||||
|
|
@ -516,3 +518,6 @@ for test in tests:
|
|||
else:
|
||||
print(BOLD + FAIL + '[FAILED]' + ENDC)
|
||||
print(' '*len(test)+tests[test].msg)
|
||||
return_code = 1
|
||||
|
||||
sys.exit(return_code)
|
||||
|
|
|
|||
10
tests/travis.sh
Executable file
10
tests/travis.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ev
|
||||
|
||||
# Run all debug tests
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
./run_tests.py -C "^basic-debug$|^hdf5-debug$|^mpi-omp-debug$|^phdf5-omp-debug$|^omp-phdf5-petsc-debug$" -j 4 -s
|
||||
else
|
||||
./run_tests.py -C "^basic-debug$" -j 4
|
||||
fi
|
||||
52
tests/travis_install.sh
Executable file
52
tests/travis_install.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ev
|
||||
|
||||
# Build HDF5 and PETSc for rest of debug tests
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
|
||||
# Build MPICH
|
||||
wget -q http://www.mpich.org/static/downloads/3.1.3/mpich-3.1.3.tar.gz
|
||||
tar -xzvf mpich-3.1.3.tar.gz >/dev/null 2>&1
|
||||
cd mpich-3.1.3
|
||||
./configure --prefix=$PWD/../mpich_install -q
|
||||
make -j >/dev/null 2>&1
|
||||
make install >/dev/null 2>&1
|
||||
cd ..
|
||||
|
||||
# Build PHDF5
|
||||
wget -q http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.14.tar.gz
|
||||
tar -xzvf hdf5-1.8.14.tar.gz >/dev/null 2>&1
|
||||
mv hdf5-1.8.14 phdf5-1.8.14; cd phdf5-1.8.14
|
||||
CC=$PWD/../mpich_install/bin/mpicc FC=$PWD/../mpich_install/bin/mpif90 \
|
||||
./configure \
|
||||
--prefix=$PWD/../phdf5_install -q --enable-fortran \
|
||||
--enable-fortran2003 --enable-parallel
|
||||
make -j >/dev/null 2>&1
|
||||
make install >/dev/null 2>&1
|
||||
cd ..
|
||||
|
||||
# Build HDF5
|
||||
tar -xzvf hdf5-1.8.14.tar.gz >/dev/null 2>&1
|
||||
cd hdf5-1.8.14
|
||||
CC=gcc FC=gfortran ./configure --prefix=$PWD/../hdf5_install -q \
|
||||
--enable-fortran --enable-fortran2003
|
||||
make -j >/dev/null 2>&1
|
||||
make install >/dev/null 2>&1
|
||||
cd ..
|
||||
|
||||
# Build PETSc
|
||||
wget -q http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.3.tar.gz
|
||||
tar -xzvf petsc-lite-3.5.3.tar.gz >/dev/null 2>&1
|
||||
cd petsc-3.5.3
|
||||
./configure --prefix=$PWD/../petsc_install -q --download-fblaslapack \
|
||||
--with-mpi-dir=$PWD/../mpich_install --with-share-libraries \
|
||||
--with-fortran-datatypes
|
||||
make PETSC_DIR=/home/travis/build/bhermanmit/openmc/petsc-3.5.3 \
|
||||
PETSC_ARCH=arch-linux2-c-debug all >/dev/null 2>&1
|
||||
make PETSC_DIR=/home/travis/build/bhermanmit/openmc/petsc-3.5.3 \
|
||||
PETSC_ARCH=arch-linux2-c-debug install >/dev/null 2>&1
|
||||
make install >/dev/null 2>&1
|
||||
cd ..
|
||||
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue