diff --git a/.github/workflows/c-cpp-build.yml b/.github/workflows/c-cpp-build.yml index 4881468..218d3b4 100644 --- a/.github/workflows/c-cpp-build.yml +++ b/.github/workflows/c-cpp-build.yml @@ -17,5 +17,5 @@ jobs: - uses: actions/checkout@v3 - name: Ubuntu based build run: ./scripts/install_ubuntu.sh - - name: Source MOOSE profile and run tests - run: source $HOME/.moose_profile; ./run_tests + - name: Source Proteus profile and run tests + run: source $HOME/.proteus_profile; ./run_tests diff --git a/README.md b/README.md index 58b326a..36a15b8 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ and are comfortable with what it is doing. Once Proteus is built using this script, you can use Proteus to run an input file as follows: ``` -source ~/.moose_profile +source ~/.proteus_profile proteus-opt -i .i ``` @@ -81,7 +81,7 @@ Contributors Aleksander J. Dubas, UK Atomic Energy Authority -Rupert W. Eardley, +Rupert W. Eardley-Brunt, UK Atomic Energy Authority Luke Humphrey, diff --git a/scripts/install_csd3.sh b/scripts/install_csd3.sh index dfafd0a..c3adc8b 100755 --- a/scripts/install_csd3.sh +++ b/scripts/install_csd3.sh @@ -3,29 +3,29 @@ # This script installs Proteus on CSD3, # including a MOOSE framework build in the $HOME directory. # Optimised to the native system architecture on the cclake partition. -# A .moose_profile script is added to the $HOME directory. +# A .proteus_profile script is added to the $HOME directory. # This script is intended to be used from the proteus directory # ./scripts/install_csd3.sh # Use the installation by typing: -# source $HOME/.moose_profile +# source $HOME/.proteus_profile export PROTEUS_DIR=`pwd` -# Make MOOSE profile - -echo "module purge" > $HOME/.moose_profile -echo "module load dot slurm rhel7/global" >> $HOME/.moose_profile -echo "module load git-2.31.0-gcc-5.4.0-ec3ji34 python/3.8 gcc/9 openmpi/gcc/9.3/4.0.4" >> $HOME/.moose_profile -echo "export CC=mpicc" >> $HOME/.moose_profile -echo "export CXX=mpicxx" >> $HOME/.moose_profile -echo "export F90=mpif90" >> $HOME/.moose_profile -echo "export F77=mpif77" >> $HOME/.moose_profile -echo "export FC=mpif90" >> $HOME/.moose_profile -echo "export MOOSE_DIR="$HOME"/moose" >> $HOME/.moose_profile -echo "export PATH=\$PATH:"$PROTEUS_DIR >> $HOME/.moose_profile -echo "export PATH=\$MOOSE_DIR/petsc/arch-moose/bin/:\$PATH" >> $HOME/.moose_profile -echo "export OMPI_MCA_mca_base_component_show_load_errors=0" >> $HOME/.moose_profile -source $HOME/.moose_profile +# Make Proteus profile + +echo "module purge" > $HOME/.proteus_profile +echo "module load dot slurm rhel7/global" >> $HOME/.proteus_profile +echo "module load git-2.31.0-gcc-5.4.0-ec3ji34 python/3.8 gcc/9 openmpi/gcc/9.3/4.0.4" >> $HOME/.proteus_profile +echo "export CC=mpicc" >> $HOME/.proteus_profile +echo "export CXX=mpicxx" >> $HOME/.proteus_profile +echo "export F90=mpif90" >> $HOME/.proteus_profile +echo "export F77=mpif77" >> $HOME/.proteus_profile +echo "export FC=mpif90" >> $HOME/.proteus_profile +echo "export MOOSE_DIR="$HOME"/moose" >> $HOME/.proteus_profile +echo "export PATH=\$PATH:"$PROTEUS_DIR >> $HOME/.proteus_profile +echo "export PATH=\$MOOSE_DIR/petsc/arch-moose/bin/:\$PATH" >> $HOME/.proteus_profile +echo "export OMPI_MCA_mca_base_component_show_load_errors=0" >> $HOME/.proteus_profile +source $HOME/.proteus_profile # Clone MOOSE from git diff --git a/scripts/install_fedora.sh b/scripts/install_fedora.sh index 92f5bb2..aebeb9d 100755 --- a/scripts/install_fedora.sh +++ b/scripts/install_fedora.sh @@ -3,14 +3,19 @@ # This script installs Proteus on Fedora, # including a MOOSE framework build in the $HOME directory. # Optimised to the native system architecture. -# A .moose_profile script is added to the $HOME directory. +# A .proteus_profile script is added to the $HOME directory. # This script is intended to be used from the proteus directory # ./scripts/install_fedora.sh # Use the installation by typing: -# source $HOME/.moose_profile +# source $HOME/.proteus_profile export PROTEUS_DIR=`pwd` +# If MOOSE_JOBS is unset, set to 1 +if [ -z $MOOSE_JOBS ]; then + export MOOSE_JOBS=1 +fi + # Install pre-requisites sudo dnf install gcc gcc-c++ gcc-fortran cmake bison flex git @@ -19,17 +24,17 @@ sudo dnf install openmpi openmpi-devel sudo dnf install libtirpc-devel zlib-devel sudo dnf install perl-File-Compare -# Make MOOSE profile +# Make Proteus profile -echo "export CC=mpicc" > $HOME/.moose_profile -echo "export CXX=mpicxx" >> $HOME/.moose_profile -echo "export F90=mpif90" >> $HOME/.moose_profile -echo "export F77=mpif77" >> $HOME/.moose_profile -echo "export FC=mpif90" >> $HOME/.moose_profile -echo "export MOOSE_DIR="$HOME"/moose" >> $HOME/.moose_profile -echo "export PATH=\$PATH:"$PROTEUS_DIR >> $HOME/.moose_profile -echo "module load mpi/openmpi" >> $HOME/.moose_profile -source $HOME/.moose_profile +echo "export CC=mpicc" > $HOME/.proteus_profile +echo "export CXX=mpicxx" >> $HOME/.proteus_profile +echo "export F90=mpif90" >> $HOME/.proteus_profile +echo "export F77=mpif77" >> $HOME/.proteus_profile +echo "export FC=mpif90" >> $HOME/.proteus_profile +echo "export MOOSE_DIR="$HOME"/moose" >> $HOME/.proteus_profile +echo "export PATH=\$PATH:"$PROTEUS_DIR >> $HOME/.proteus_profile +echo "module load mpi/openmpi" >> $HOME/.proteus_profile +source $HOME/.proteus_profile # Clone MOOSE from git @@ -63,6 +68,6 @@ METHODS="opt" ./scripts/update_and_rebuild_libmesh.sh --with-mpi ./configure --with-derivative-size=81 cd $PROTEUS_DIR -make +make -j $MOOSE_JOBS echo "Installation complete." diff --git a/scripts/install_ubuntu.sh b/scripts/install_ubuntu.sh index a353952..baeabf0 100755 --- a/scripts/install_ubuntu.sh +++ b/scripts/install_ubuntu.sh @@ -3,30 +3,35 @@ # This script installs Proteus on Ubuntu, # including a MOOSE framework build in the $HOME directory. # Optimised to the native system architecture. -# A .moose_profile script is added to the $HOME directory. +# A .proteus_profile script is added to the $HOME directory. # This script is intended to be used from the proteus directory # ./scripts/install_ubuntu.sh # Use the installation by typing: -# source $HOME/.moose_profile +# source $HOME/.proteus_profile export PROTEUS_DIR=`pwd` +# If MOOSE_JOBS is unset, set to 1 +if [ -z $MOOSE_JOBS ]; then + export MOOSE_JOBS=1 +fi + # Install pre-requisites sudo apt install -y gcc g++ gfortran cmake bison flex git sudo apt install -y python3 python3-dev python-is-python3 python3-packaging sudo apt install -y openmpi-bin libopenmpi-dev libboost-all-dev -# Make MOOSE profile +# Make Proteus profile -echo "export CC=mpicc" > $HOME/.moose_profile -echo "export CXX=mpicxx" >> $HOME/.moose_profile -echo "export F90=mpif90" >> $HOME/.moose_profile -echo "export F77=mpif77" >> $HOME/.moose_profile -echo "export FC=mpif90" >> $HOME/.moose_profile -echo "export MOOSE_DIR="$HOME"/moose" >> $HOME/.moose_profile -echo "export PATH=\$PATH:"$PROTEUS_DIR >> $HOME/.moose_profile -source $HOME/.moose_profile +echo "export CC=mpicc" > $HOME/.proteus_profile +echo "export CXX=mpicxx" >> $HOME/.proteus_profile +echo "export F90=mpif90" >> $HOME/.proteus_profile +echo "export F77=mpif77" >> $HOME/.proteus_profile +echo "export FC=mpif90" >> $HOME/.proteus_profile +echo "export MOOSE_DIR="$HOME"/moose" >> $HOME/.proteus_profile +echo "export PATH=\$PATH:"$PROTEUS_DIR >> $HOME/.proteus_profile +source $HOME/.proteus_profile # Clone MOOSE from git @@ -60,6 +65,6 @@ METHODS="opt" ./scripts/update_and_rebuild_libmesh.sh --with-mpi ./configure --with-derivative-size=81 cd $PROTEUS_DIR -make +make -j $MOOSE_JOBS echo "Installation complete."