diff --git a/.github/workflows/gfortran.yml b/.github/workflows/gfortran.yml index cf72037c..f3dfa3f5 100644 --- a/.github/workflows/gfortran.yml +++ b/.github/workflows/gfortran.yml @@ -16,7 +16,7 @@ jobs: gcc_v: [7, 8, 9] env: FC: gfortran - FFLAGS: -O0 -fopenmp -Wall --coverage + FFLAGS: -O0 -fopenmp -Wall --coverage -ffpe-trap=invalid,zero,overflow,denormal GCC_V: ${{ matrix.gcc_v}} steps: @@ -33,13 +33,13 @@ jobs: with: path: ~/pfunit/build/installed # To force a pFUnit rebuild (bust the cache), make a change to install_pfunit.sh - key: ${{ runner.os }}-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('scripts/install_pfunit.sh') }} + key: ${{ runner.os }}-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('dev_scripts/install_pfunit.sh') }} # TODO: We should specify a specific commit in install_pfunit.sh # so that we're not dependent on changes in pFUnit - name: Download and build pFUnit if: steps.pfunit-cache.outputs.cache-hit != 'true' - run: ./scripts/install_pfunit.sh ${HOME}/pfunit + run: ./dev_scripts/install_pfunit.sh ${HOME}/pfunit - name: build ABIN run: ./configure --pfunit ${HOME}/pfunit/build/installed/ && make @@ -75,11 +75,11 @@ jobs: uses: actions/cache@v2 with: path: ~/pfunit/build/installed - key: ${{ runner.os }}-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('scripts/install_pfunit.sh') }} + key: ${{ runner.os }}-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('dev_scripts/install_pfunit.sh') }} - name: Download and build pFUnit if: steps.pfunit-cache.outputs.cache-hit != 'true' - run: ./scripts/install_pfunit.sh ${HOME}/pfunit + run: ./dev_scripts/install_pfunit.sh ${HOME}/pfunit - name: build ABIN run: ./configure --pfunit ${HOME}/pfunit/build/installed/ && make @@ -105,7 +105,7 @@ jobs: matrix: gcc_v: [7, 8, 9] env: - FFLAGS: -O2 -fopenmp + FFLAGS: -O2 -fopenmp -ffpe-trap=invalid,zero,overflow,denormal steps: - uses: actions/checkout@v2 - name: Install FFTW libraries @@ -124,7 +124,7 @@ jobs: gcc_v: [7, 8, 9] mpich_v: ["3.1.3", "3.3.2"] env: - ABIN_FFLAGS: -O2 -fopenmp --coverage + ABIN_FFLAGS: -O2 -fopenmp --coverage -ffpe-trap=invalid,zero,overflow,denormal # To speed-up MPICH build CFLAGS: -O0 GCC_V: ${{ matrix.gcc_v}} @@ -141,11 +141,11 @@ jobs: uses: actions/cache@v2 with: path: ~/mpich/${{ env.MPICH_V }}/install - key: ${{runner.os}}-mpich${{ env.MPICH_V }}-gfortran${{ env.GCC_V }}-${{hashFiles('scripts/install_mpich.sh')}} + key: ${{runner.os}}-mpich${{ env.MPICH_V }}-gfortran${{ env.GCC_V }}-${{hashFiles('dev_scripts/install_mpich.sh')}} - name: Build and Install MPICH if: steps.mpich-cache.outputs.cache-hit != 'true' - run: ./scripts/install_mpich.sh ${HOME}/mpich ${MPICH_V} + run: ./dev_scripts/install_mpich.sh ${HOME}/mpich ${MPICH_V} - name: build ABIN run: | @@ -168,7 +168,7 @@ jobs: # versions with MPICH gcc_v: [7] env: - ABIN_FFLAGS: -O0 -fopenmp + ABIN_FFLAGS: -O0 -fopenmp -ffpe-trap=invalid,zero,overflow,denormal # To speed-up OpenMPI build CFLAGS: -O0 GCC_V: ${{ matrix.gcc_v}} @@ -186,11 +186,11 @@ jobs: uses: actions/cache@v2 with: path: ~/openmpi/${{ env.OPENMPI_V }}/install - key: ${{runner.os}}-openmpi${{ env.OPENMPI_V }}-gfortran${{ env.GCC_V }}-${{hashFiles('scripts/install_openmpi.sh')}} + key: ${{runner.os}}-openmpi${{ env.OPENMPI_V }}-gfortran${{ env.GCC_V }}-${{hashFiles('dev_scripts/install_openmpi.sh')}} - name: Build and Install OpenMPI if: steps.openmpi-cache.outputs.cache-hit != 'true' - run: ./scripts/install_openmpi.sh ${HOME}/openmpi ${OPENMPI_V} ${OPENMPI_PATCH} + run: ./dev_scripts/install_openmpi.sh ${HOME}/openmpi ${OPENMPI_V} ${OPENMPI_PATCH} - name: build ABIN run: | @@ -211,7 +211,7 @@ jobs: env: PLUMED_V: ${{ matrix.plumed_v}} - ABIN_FFLAGS: -O0 -fopenmp --coverage + ABIN_FFLAGS: -O0 -fopenmp --coverage -ffpe-trap=invalid,zero,overflow,denormal # Speeding up the Plumed build CFLAGS: -O0 CXXLAGS: -O0 @@ -223,11 +223,11 @@ jobs: uses: actions/cache@v2 with: path: ~/plumed/${{ env.PLUMED_V }}/install - key: ${{runner.os}}-plumed${{env.PLUMED_V}}-${{hashFiles('scripts/install_plumed.sh')}} + key: ${{runner.os}}-plumed${{env.PLUMED_V}}-${{hashFiles('dev_scripts/install_plumed.sh')}} - name: Build and Install PLUMED if: steps.plumed-cache.outputs.cache-hit != 'true' - run: ./scripts/install_plumed.sh ${HOME}/plumed ${PLUMED_V} + run: ./dev_scripts/install_plumed.sh ${HOME}/plumed ${PLUMED_V} - name: build ABIN run: | diff --git a/.gitignore b/.gitignore index 93f82d40..d5a31de0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ docs/*out # Default binary name src/abin src/abin.* +# Include mini.dat, needed for tests +!mini.dat diff --git a/scripts/fortran.vim b/dev_scripts/fortran.vim similarity index 100% rename from scripts/fortran.vim rename to dev_scripts/fortran.vim diff --git a/scripts/install_mpich.sh b/dev_scripts/install_mpich.sh similarity index 100% rename from scripts/install_mpich.sh rename to dev_scripts/install_mpich.sh diff --git a/scripts/install_openmpi.sh b/dev_scripts/install_openmpi.sh similarity index 100% rename from scripts/install_openmpi.sh rename to dev_scripts/install_openmpi.sh diff --git a/scripts/install_pfunit.sh b/dev_scripts/install_pfunit.sh similarity index 100% rename from scripts/install_pfunit.sh rename to dev_scripts/install_pfunit.sh diff --git a/scripts/install_plumed.sh b/dev_scripts/install_plumed.sh similarity index 100% rename from scripts/install_plumed.sh rename to dev_scripts/install_plumed.sh diff --git a/scripts/pre-push.hook b/dev_scripts/pre-push.hook similarity index 100% rename from scripts/pre-push.hook rename to dev_scripts/pre-push.hook diff --git a/scripts/setup_dev_environment.sh b/dev_scripts/setup_dev_environment.sh similarity index 100% rename from scripts/setup_dev_environment.sh rename to dev_scripts/setup_dev_environment.sh diff --git a/scripts/vimrc b/dev_scripts/vimrc similarity index 100% rename from scripts/vimrc rename to dev_scripts/vimrc diff --git a/src/surfacehop.F90 b/src/surfacehop.F90 index 7d5d1b3c..e1df9e10 100644 --- a/src/surfacehop.F90 +++ b/src/surfacehop.F90 @@ -301,7 +301,7 @@ subroutine read_nacmrest() INQUIRE(FILE=chin, EXIST=file_exists) if(.not.file_exists)then write(*,*)'ERROR: Surface Hopping restart file does not exist! '//trim(chin) - call abinerror('read_wfn') + call abinerror('read_nacmrest') end if open(iunit1,file=chin,action="read", status="old", access="sequential", form="unformatted") diff --git a/tests/test.sh b/tests/test.sh index 502398a4..996b1c84 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -18,13 +18,11 @@ FFTW="$4" PLUMED="$5" CP2K="$6" ACTION="$7" + # NOTE: For MPI tests, we rely on the fact that -# MPI_PATH is exported in Makefile! -if [[ $MPI = "TRUE" && -z ${MPI_PATH:-} ]];then - echo "ERROR: \$MPI_PATH not set" - echo "Make sure to set MPI_PATH in make.vars" - exit 1 -fi +# MPI_PATH is defined in make.vars and exported in Makefile. +# It's not needed if you use system-wide MPI installation +# or if mpirun is in your PATH. if [[ $ACTION = "makeref" ]];then echo "ERROR: You should not call makeref on all tests at once."