Skip to content

Commit

Permalink
Merge branch 'devel' into wangc/update_submodule_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcj05 committed May 15, 2023
2 parents 66421a1 + b605d47 commit 13bf9b3
Show file tree
Hide file tree
Showing 743 changed files with 95,563 additions and 28,068 deletions.
91 changes: 28 additions & 63 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,79 +1,40 @@
.failed_tests
.libs
.ravenrc
*-dbg
*-devel
*-oprof
*-opt
*.a
*.csv
*.ctf
*.d
*.dylib
*.e
*.la
*.lo
*.d
*.o
*.a
*-opt
*-dbg
*-oprof
*-devel
*.e
*.csv
*.ravencntr
*.ravenStatus
*.so
*~
*.ctf
tests/core_example/PWR_CoreChannel_controlled_var_restart_test_out_restart_0020.ravenaux
tests/core_example/PWR_CoreChannel_controlled_var_test_out_restart_0020.ravenaux
*.ravencntr
control_modules/distribution1D.py
control_modules/distribution1D_wrap.cxx
control_modules/raventools.py
control_modules/raventools_wrap.cxx
control_modules/libdistribution1D.so*
control_modules/libdistribution1D.so*
control_modules/libraventools.so*
control_modules/libraventools.so*
libRAVEN*.so*
RAVEN-devel
tests/framework/DataBaseStorage/
tests/framework/GridTestBison/CustomSampler/
tests/framework/GridTestRaven/FirstMRun/
tests/framework/LHStestBison/myLHS/
tests/framework/LHStestRaven/FirstMRun/
tests/framework/MCTestBison/CustomSampler/
tests/framework/MCTestBison/CustomSampler_noalias/
tests/framework/branch/DETrunTest/
tests/framework/SBO_DET/DET/
tests/framework/mode_test/FirstMRun/
tests/framework/output_check/*.png
tests/framework/output_check/FirstMRun/
tests/framework/revirD_tset/FirstMRun/
tests/framework/test_extract_data_s_from_hdf5/MonteCarlo/
tests/framework/test_rom_trainer/MC_for_rom_trainer/
tests/framework/mpi_driver_test/FirstMRun/
tests/framework/CodeInterfaceTests/MelcorInterface/testMelcor/*
tests/framework/CodeInterfaceTests/RELAP5interfaceTestSingleRun/*
work_in_progress/remote_tools/remote_tools
work_in_progress/remote_tools/remote_tools.py
work_in_progress/remote_tools/remote_tools_wrap.cxx
work_in_progress/remote_tools/time
framework/DatabaseStorage/
tests/framework/LHStestFerret/myLHS/
tests/framework/PreconditionedDynamicEventTree/PreconditionedDETrunTest/
tests/framework/CUBIT_MOOSE_test/grid_run/
tests/framework/BISON_and_MESH_test/grid_run/
tests/framework/RedundantInputs/sim_py_MC/
tests/framework/RedundantInputs/sim_py_grid/
tests/plugins
plugins/ExamplePlugin/doc/version.tex
build_out*
build/
.failed_tests
.ravenrc
*.ravenStatus
install/
src/crow_modules/distribution1D.py
libRAVEN*.so*
plugins/ExamplePlugin/doc/version.tex
raven_cxx.egg-info/
raven_framework.egg-info/
raven_framework*.whl
src/contrib/amsc.egg-info/
src/crow_modules/distribution1D_wrap.cpp
src/crow_modules/interpolationND.py
src/crow_modules/distribution1D.py
src/crow_modules/interpolationND_wrap.cpp
src/crow_modules/randomENG.py
src/crow_modules/interpolationND.py
src/crow_modules/randomENG_wrap.cpp
build_out*
src/crow_modules/randomENG.py
test_out*
framework/contrib/PythonFMU/pythonfmu.egg-info/
raven_framework.egg-info/
raven_framework*.whl
dist/

# eclipse
.project
Expand Down Expand Up @@ -106,3 +67,7 @@ framework/states.txt

# plugin installation paths
plugins/plugin_directory.xml

# vscode
.vscode
*.code-workspace
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include crow/include/distributions/*.h
include crow/include/utilities/*.h
recursive-include crow/contrib/include/Eigen *
recursive-include crow/contrib/include/boost *
include include/contrib/AMSC/*.h
include include/contrib/ngl/*.h*
23 changes: 15 additions & 8 deletions build_raven
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ echo Making RAVEN ...
# defaults
MAKE_ARGS=" "
LIBS_MODE=0 # 0 is "create", 1 is "load"
EDITABLE=0 # 0 is install regular, 1 is install editable
#### FUTURE WORK:
#### combine "make" and "establish_conda_env.sh" into one installation command
ECE_ARGS=" "
Expand All @@ -39,7 +40,9 @@ do
;;
--jobs) MAKE_ARGS="-j $1 ${MAKE_ARGS}"; ;;
--skip-conda)
LIBS_MODE=2
LIBS_MODE=2 ;;
--editable)
EDITABLE=1
# --help) ECE_ARGS="${ECE_ARGS} --help"; ;;
# --optional) ECE_ARGS="${ECE_ARGS} --optional"; ;;
# --no-clean) ECE_ARGS="${ECE_ARGS} --no-clean"; ;;
Expand Down Expand Up @@ -104,14 +107,18 @@ if test `uname` = Darwin; then
export MACOSX_DEPLOYMENT_TARGET;
fi

PIP_COMMAND=pip3
(cd $RAVEN_BUILD_DIR && ${PIP_COMMAND} --verbose install . --upgrade --target ./install)

#pip install will add a duplicate ravenframework directory, so delete so there isn't
# confusion over which of the two copies to use.
(cd $RAVEN_BUILD_DIR && rm -Rf install/ravenframework)
(cd $PYTHON_FMU_DIR && ./build_pythonfmu || echo PythonFMU not built)

(cd $PYTHON_FMU_DIR && ./build_pythonfmu || echo PythonFMU build failed)
PIP_COMMAND=pip3
if [[ $EDITABLE == 0 ]]
then # Don't install editable
(cd $RAVEN_BUILD_DIR && ${PIP_COMMAND} --verbose install . --upgrade --target ./install)
#pip install will add a duplicate ravenframework directory, so delete so there isn't
# confusion over which of the two copies to use.
(cd $RAVEN_BUILD_DIR && rm -Rf install/ravenframework)
else #do install editable
$PIP_COMMAND --verbose install --editable . --upgrade --target ./install
fi

if [ ! -z "$RAVEN_SIGNATURE" ];
then
Expand Down
14 changes: 13 additions & 1 deletion clean_raven
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@ rm -f ${RAVEN_DIR}/ravenframework/contrib/AMSC/_amsc*.so \
${RAVEN_DIR}/src/contrib/amsc_wrap.cpp \
${RAVEN_DIR}/src/contrib/amsc.py \
${RAVEN_DIR}/src/contrib/amsc.pyc
rm -f ${RAVEN_DIR}/src/AMSC/_amsc*.so \
${RAVEN_DIR}/src/AMSC/amsc*egg-info \
${RAVEN_DIR}/src/AMSC/amsc.py \
${RAVEN_DIR}/src/AMSC/amsc.pyc \
${RAVEN_DIR}/src/AMSC/amsc_wrap.cxx \
${RAVEN_DIR}/src/AMSC/amsc_wrap.cpp
rm -Rf ${RAVEN_DIR}/build \
${RAVEN_DIR}/crow/install/ \
${RAVEN_DIR}/install/
${RAVEN_DIR}/install/ \
${RAVEN_DIR}/setup.cfg
rm -f ${RAVEN_DIR}/src/crow_modules/*.so \
${RAVEN_DIR}/src/crow_modules/[dir]*.py \
${RAVEN_DIR}/src/crow_modules/*.cpp
find ${RAVEN_DIR}/ravenframework -name '*.pyc' -exec rm '{}' \;
find ${RAVEN_DIR}/scripts -name '*.pyc' -exec rm '{}' \;
find ${RAVEN_DIR}/rook -name '*.pyc' -exec rm '{}' \;
Expand All @@ -29,6 +39,7 @@ find ${RAVEN_DIR}/scripts -name '__pycache__' -exec rm -Rf '{}' \;
find ${RAVEN_DIR}/rook -name '__pycache__' -exec rm -Rf '{}' \;
find ${RAVEN_DIR}/tests -name '__pycache__' -exec rm -Rf '{}' \;
find ${RAVEN_DIR}/plugins -name '__pycache__' -exec rm -Rf '{}' \;
find ${RAVEN_DIR}/src -name '__pycache__' -exec rm -Rf '{}' \;

rm -f ${CROW_DIR}/control_modules/_distribution1D.so \
${CROW_DIR}/control_modules/_crowtools.so \
Expand Down Expand Up @@ -59,4 +70,5 @@ rm -Rf ${CROW_DIR}/src/distributions/*.lo \
rm -Rf ${CROW_DIR}/src/distributions/*.d \
${CROW_DIR}/src/tools/*.d \
${CROW_DIR}/src/utilities/*.d
rm -Rf raven_framework.egg-info/

49 changes: 35 additions & 14 deletions dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,22 @@ Note all install methods after "main" take
-->
<dependencies>
<main>
<h5py>2.10</h5py>
<numpy>1.18</numpy>
<scipy>1.2</scipy>
<scikit-learn>0.21</scikit-learn>
<pandas>1.1</pandas>
<xarray>0.16</xarray>
<h5py/>
<numpy>1.22</numpy>
<scipy>1.7</scipy>
<scikit-learn>1.0</scikit-learn>
<pandas>1.3</pandas>
<!-- Note most versions of xarray work, but some (such as 0.20) don't -->
<xarray>2023</xarray>
<netcdf4>1.5</netcdf4>
<matplotlib>3.2</matplotlib>
<statsmodels/>
<cloudpickle>1.6</cloudpickle>
<tensorflow>2.0</tensorflow>
<python skip_check='True'>3</python>
<matplotlib>3.5</matplotlib>
<statsmodels>0.13</statsmodels>
<cloudpickle>2.2</cloudpickle>
<tensorflow os='mac,linux'>2.10</tensorflow>
<tensorflow source="pip" os='windows'>2.10</tensorflow>
<!-- conda is really slow on windows if the version is not specified.-->
<python skip_check='True' os='windows'>3.8</python>
<python skip_check='True' os='mac,linux'>3</python>
<hdf5 skip_check='True'/>
<swig skip_check='True'/>
<pylint/>
Expand All @@ -55,17 +59,26 @@ Note all install methods after "main" take
<psutil/>
<pip/>
<importlib_metadata/>
<pyside2/>
<pyside2 optional='True'/>
<nomkl os='linux' skip_check='True'/>
<numexpr os='linux'/>
<cmake skip_check='True' optional='True'/>
<ray os="mac,linux" source="pip" pip_extra="[default]">1.9</ray>
<imageio>2.9</imageio>
<ray source="pip" pip_extra="[default]" os='mac,linux'>2.2</ray>
<ray source="pip" pip_extra="[default]" os='windows'>1.13</ray>
<!-- redis is needed by ray, but on windows, this seems to need to be explicitly stated -->
<redis source="pip" os='windows'/>
<imageio>2.22</imageio>
<line_profiler optional='True'/>
<!-- <ete3 optional='True'/> -->
<pywavelets optional='True'>1.1</pywavelets>
<numdifftools source="pip">0.9</numdifftools>
<fmpy optional='True'/>
<xmlschema source="pip"/>
<pyomo optional='True'>6.4</pyomo>
<glpk skip_check='True' optional='True'/>
<ipopt skip_check='True' optional='True'/>
<cyipopt optional='True'/>
<pyomo-extensions source="pyomo" skip_check='True' optional='True'/>
<setuptools/>
</main>
<alternate name="pip">
Expand All @@ -76,4 +89,12 @@ Note all install methods after "main" take
<nomkl>remove</nomkl>
<numexpr>remove</numexpr>
</alternate>
<alternate name="none">
<hdf5>remove</hdf5>
<swig>remove</swig>
<pip>remove</pip>
<python>remove</python>
<nomkl>remove</nomkl>
<numexpr>remove</numexpr>
</alternate>
</dependencies>
11 changes: 10 additions & 1 deletion developer_tools/XSDSchemas/Optimizers.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@
<xsd:element name="persistence" type="xsd:integer" minOccurs="0"/>
<xsd:element name="objective" type="xsd:float" minOccurs="0"/>
<xsd:element name="temperature" type="xsd:float" minOccurs="0"/>
</xsd:all>
</xsd:complexType>

<xsd:complexType name="GAConvergenceType">
<xsd:all>
<xsd:element name="persistence" type="xsd:integer" minOccurs="0"/>
<xsd:element name="objective" type="xsd:float" minOccurs="0"/>
<xsd:element name="AHDp" type="xsd:float" minOccurs="0"/>
<xsd:element name="AHD" type="xsd:float" minOccurs="0"/>
<xsd:element name="HDSM" type="xsd:float" minOccurs="0"/>
</xsd:all>
</xsd:complexType>

Expand Down Expand Up @@ -184,7 +193,7 @@
<xsd:sequence>
<xsd:element name="samplerInit" type="optInitType" minOccurs="0"/>
<xsd:element name="GAparams" type="GAoptInitType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="convergence" type="SAConvergenceType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="convergence" type="GAConvergenceType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="coolingSchedule" type="OptCoolingScheduleType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="variable" type="optVarType" minOccurs="1" maxOccurs='unbounded'/>
<xsd:element name="objective" type="xsd:string" minOccurs="1" maxOccurs="1"/>
Expand Down
43 changes: 43 additions & 0 deletions developer_tools/check_pip_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# This script tests that the 3.9 and 3.8 wheels built in directory dist
# are installable. It will not work if there is more than one
# version of the wheel for a python version (including for other os's)
# It is designed to be run after (or similar):
# rm -Rf dist; ./developer_tools/make_pip_packages.sh
# It will install raven_framework in the python37_pip and python38_pip
# conda environments
# It requires that .ravenrc has a working CONDA_DEFS statement.
# To run from the raven directory:
# ./developer_tools/check_pip_packages.sh

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
RAVEN_DIR=`dirname $SCRIPT_DIR`

source $RAVEN_DIR/scripts/read_ravenrc.sh
CONDA_DEFS=$(read_ravenrc "CONDA_DEFS")
source ${CONDA_DEFS}

cd $RAVEN_DIR

ls -l dist

#The following works to install from the dist directory, but also can install
# from pypi so doesn't fail if wheels not created in dist, so can't be used
# for automated testing
#python -m pip install -f file://${RAVEN_DIR}/dist raven_framework || exit -1

echo
echo Checking Python 3.8

conda activate python38_pip
python -m pip uninstall -y raven_framework || echo not installed
python -m pip install dist/raven_framework*cp38*.whl || exit -1


echo
echo Checking Python 3.9

conda activate python39_pip
python -m pip uninstall -y raven_framework || echo not installed
python -m pip install dist/raven_framework*cp39*.whl || exit -1
25 changes: 12 additions & 13 deletions developer_tools/createRegressionTestDocumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,18 @@ def noDescriptionTestsAndInformationOnTheOther(self):
for testInfoFile in __testInfoList:
if 'moose' in testInfoFile.split(os.sep) or not os.path.isfile(testInfoFile):
continue
fileObject = open(testInfoFile,"r+")
fileLines = fileObject.readlines()
dirName = os.path.dirname(testInfoFile)
# I do not want to use getpot!
for line in fileLines:
if line.strip().startswith("input"):
fileName = line.split("=")[-1].replace("'", "").replace('"', '').rstrip().strip()
fileName = os.path.join(dirName,fileName)
if os.path.split(fileName)[-1].lower().endswith('xml'):
__testList.append(os.path.abspath(fileName))
if os.path.split(fileName)[-1].lower().endswith('py'):
__testList.append(os.path.abspath(fileName))
fileObject.close()
with open(testInfoFile,"r+") as fileObject:
fileLines = fileObject.readlines()
dirName = os.path.dirname(testInfoFile)
# I do not want to use getpot!
for line in fileLines:
if line.strip().startswith("input"):
fileName = line.split("=")[-1].replace("'", "").replace('"', '').rstrip().strip()
fileName = os.path.join(dirName,fileName)
if os.path.split(fileName)[-1].lower().endswith('xml'):
__testList.append(os.path.abspath(fileName))
if os.path.split(fileName)[-1].lower().endswith('py'):
__testList.append(os.path.abspath(fileName))
for testFile in __testList:
if testFile.endswith('xml'):
try: root = ET.parse(testFile).getroot()
Expand Down
4 changes: 2 additions & 2 deletions developer_tools/createSQAtracebilityMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def createLatexFile(reqDictionary,reqDocument,outputLatex):
# create table here
fileObject.write("\\begin{tabularx}{\\textwidth}{|s|s|b|} \n")
fileObject.write("\\hline \n")
fileObject.write("\\textbf{Requirment ID} & \\textbf{Requirment Description} & \\textbf{Test(s)} \\\ \hline \n")
fileObject.write("\\textbf{Requirement ID} & \\textbf{Requirement Description} & \\textbf{Test(s)} \\\ \hline \n")
fileObject.write("\\hline \n")
ravenPath = os.path.realpath(os.path.join(os.path.realpath(__file__) ,"..","..",".."))
for reqName,req in reqSet.items():
Expand All @@ -74,7 +74,7 @@ def createLatexFile(reqDictionary,reqDocument,outputLatex):
requirementTests = source
requirementTests = [] if requirementTests is None else requirementTests
for i in range(len(requirementTests)):
requirementTests[i] = str(i+1) + ")" + requirementTests[i].replace(ravenPath,"").replace("_","\_").strip()
requirementTests[i] = str(i+1) + ")" + requirementTests[i].replace(ravenPath,"").replace("\\","/").replace("_","\_").strip()
fileObject.write(" \\hspace{0pt}"+reqName.strip()+" & \\hspace{0pt}"+req['description']+" & \\hspace{0pt}"+ ' '.join(requirementTests)+" \\\ \hline \n")
fileObject.write("\\hline \n")
fileObject.write("\\caption*{"+reqSetName.strip()+"}\n")
Expand Down
Loading

0 comments on commit 13bf9b3

Please sign in to comment.