Skip to content

Commit

Permalink
CI: Switch intel build to ifx (#183)
Browse files Browse the repository at this point in the history
* Increase SHAKE NUM_THRE
* Remove deprecated actions/cache option
* One less optimized build
* comment out unused variable
  • Loading branch information
danielhollas authored Oct 26, 2024
1 parent 6d01fab commit 7ab1dd6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 39 deletions.
50 changes: 12 additions & 38 deletions .github/workflows/gfortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
# Reported by many people also at:
# https://github.com/codecov/codecov-action/issues/926
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
FORCE_COLOR: 1

jobs:

Expand Down Expand Up @@ -88,7 +89,6 @@ jobs:
path: ~/pfunit/build/installed
# To force a pFUnit rebuild (bust the cache), make a change to install_pfunit.sh
key: ${{ runner.os }}-ubuntu20.04-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
save-always: true

- name: Download and build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
Expand All @@ -108,10 +108,9 @@ jobs:
with:
name: ${{env.CODECOV_NAME}}
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: false

- name: Run End-to-End tests
if: always()
run: make e2etest

- name: Codecov upload
Expand All @@ -121,42 +120,24 @@ jobs:
fail_ci_if_error: true

intel_build:
name: Intel OneAPI build
runs-on: ubuntu-20.04
env:
FC: mpiifort
# Use GCC for C++ code to speed up the build
#CC: icc
#CXX: icpc
APT_PACKAGES: >-
intel-oneapi-compiler-fortran
intel-oneapi-mpi
intel-oneapi-mpi-devel
# intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
name: Intel build
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Add Intel repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
- name: Install Intel oneAPI compiler
run: |
sudo apt-get install ${{ env.APT_PACKAGES }}
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: intel # ifx
version: '2024.1'

- name: Build ABIN
run: ./configure --mpi "" && make
run: ./configure && make
env:
FFLAGS: -O0 -fopenmp -warn all,noextern
FFLAGS: -O0 -qopenmp -warn all,noextern

- name: Run End-to-End tests
run: make e2etest
Expand Down Expand Up @@ -206,14 +187,12 @@ jobs:

optimized_build:
name: Optimized build
# NOTE: We use a more recent Ubuntu version here
# so we can test more recent GCC versions.
runs-on: ubuntu-22.04
needs: basic_build
strategy:
fail-fast: false
matrix:
gcc_v: [9, 11, 12]
gcc_v: [9, 12]
env:
FC: gfortran
GCC_V: ${{ matrix.gcc_v}}
Expand All @@ -233,7 +212,6 @@ jobs:
with:
path: ~/pfunit/build/installed
key: ${{ runner.os }}-ubuntu22.04-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
save-always: true

- name: Download and build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -272,7 +250,6 @@ jobs:
with:
path: ~/pfunit/build/installed
key: ${{ runner.os }}-ubuntu22.04-pfunit-gfortran-default-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
save-always: true

- name: Download and build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -341,7 +318,6 @@ jobs:
with:
path: ~/mpich/${{ env.MPICH_V }}/install
key: ${{runner.os}}-ubuntu20.04-mpich${{ env.MPICH_V }}-gfortran${{ env.GCC_V }}-${{hashFiles('dev_scripts/install_mpich.sh')}}
save-always: true

- name: Build and Install MPICH
if: steps.mpich-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -395,7 +371,6 @@ jobs:
with:
path: ~/openmpi/${{ env.OPENMPI_V }}/install
key: ${{runner.os}}-ubuntu20.04-openmpi${{ env.OPENMPI_V }}-gfortran-default-${{hashFiles('dev_scripts/install_openmpi.sh')}}
save-always: true

- name: Build and Install OpenMPI
if: steps.openmpi-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -440,7 +415,6 @@ jobs:
with:
path: ~/plumed/${{ env.PLUMED_V }}/install
key: ${{runner.os}}-ubuntu20.04-plumed${{env.PLUMED_V}}-gcc-default-${{hashFiles('dev_scripts/install_plumed.sh')}}
save-always: true

- name: Build and Install PLUMED
if: steps.plumed-cache.outputs.cache-hit != 'true'
Expand Down
1 change: 1 addition & 0 deletions tests/SHAKE/NUM_THRE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12
2 changes: 1 addition & 1 deletion water_potentials/ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace {

// two body parameters
const double reoh = 0.958649;
const double thetae = 104.3475;
// const double thetae = 104.3475;
const double b1 = 2.0;
const double roh = 0.9519607159623009;
const double alphaoh = 2.587949757553683;
Expand Down

0 comments on commit 7ab1dd6

Please sign in to comment.