Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Switch intel build to ifx #183

Merged
merged 9 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option is deprecated (and is likely not working as intented anyway)


- 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I haven't switched the gfortran builds to this GH action since it does not support gfortran v7.

@JanosJiri Are some Prague clusters still on gcc-7?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prague cluster status:
Krypton: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
Neon: gcc version 4.7.2 (Debian 4.7.2-5)
Argon: gcc version 4.4.5 (Debian 4.4.5-8)

Argon is almost dead, Neon is still used but Polách...

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]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have one less build. The optimized builds never caught any issues. At some point I'll switch to just having a one of these.

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
Copy link
Contributor Author

@danielhollas danielhollas Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some numerical differences in the ifx build in the restart files for this test, so we decrease required numerical accuracy to 1e-12. The NUM_THRE file is read in the tests/numdiff.py script.

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a compiler warning that this param is not used.

const double b1 = 2.0;
const double roh = 0.9519607159623009;
const double alphaoh = 2.587949757553683;
Expand Down