Skip to content

Commit

Permalink
Merge pull request #782 from sourceryinstitute/favpro-hotfix
Browse files Browse the repository at this point in the history
Favpro hotfix
  • Loading branch information
rouson authored Jan 12, 2024
2 parents d8f4657 + 717ebef commit df27aa6
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:

env:
FC: gfortran
GCC_V: 10
GCC_V: 11

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Dependencies
run: |
Expand All @@ -24,9 +24,9 @@ jobs:
- name: Build and Test
run: |
mkdir build
cmake -S . -B build -Wdev -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE:STRING="Debug" ..
cmake --build build -j $(nproc)
cmake --build build -t install -j $(nproc) || echo "installation failed"
ctest --test-dir build --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
cd build
cmake -Wdev -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE:STRING="Debug" ..
make -j $(nproc)
ctest --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
make install
make uninstall
67 changes: 67 additions & 0 deletions .github/workflows/win-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Windows CI

on: [push, pull_request]

jobs:
Build:
runs-on: windows-latest
strategy:
fail-fast: true
defaults:
run:
shell: msys2 {0}

env:
FC: gfortran
CC: gcc

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Dependencies
uses: msys2/setup-msys2@v2
with:
update: true
path-type: inherit
install: >-
mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gcc
- name: setup-mpi
id: setup-mpi
uses: mpi4py/setup-mpi@v1
with:
mpi: intelmpi

- name: MPI info
run: |
echo "${{ steps.setup-mpi.outputs.mpi }}"
set -o verbose
# mpiexec -help
type mpiexec
ls "${I_MPI_ROOT}/bin"
ls "${I_MPI_ROOT}"
ls "${I_MPI_ROOT}/lib"
mpifc.bat -show
mpicc.bat -show
mpifc.bat -version || echo "ifort not installed"
mpicc.bat -version || echo "icc not installed"
set +o verbose
- name: Build and Test
run: |
mkdir build
cmake -Wdev -G "Unix Makefiles" -S . -B build -DCMAKE_INSTALL_PREFIX="${HOME}/apps/OpenCoarrays" -DCMAKE_BUILD_TYPE:STRING="Debug"
cmake --build build -j
cmake --build build -t install -j || echo "installation failed"
ctest --test-dir build --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
echo "${HOME}/apps/OpenCoarrays/bin" >> $GITHUB_PATH
export PATH="${HOME}/apps/OpenCoarrays/bin:${PATH}"
which caf || true
which cafrun || true
cafrun --show || true
caf --show || true
cafrun --version || true
caf --version || true
cd build
make uninstall
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,23 @@ if(WIN32) # Only support building with GCC & GFortran using Intel MPI (OneAPI)
set( MPI_ASSUME_NO_BUILTIN_MPI TRUE )
set( MPI_CXX_SKIP_MPICXX TRUE )
cmake_path(SET MPI_ROOT NORMALIZE "$ENV{I_MPI_ROOT}")
set (IMPI_LIB_DIR "${MPI_ROOT}/lib/${IMPI_BUILD}")
set (IMPI_DLL_DIR "${MPI_ROOT}/bin/${IMPI_BUILD}")
set (IMPI_LIB_DIR "${MPI_ROOT}/lib")
set (IMPI_DLL_DIR "${MPI_ROOT}/bin")

message(STATUS "Looking in IMPI_LIB_DIR=${IMPI_LIB_DIR}")
message(STATUS "Looking in IMPI_DLL_DIR=${IMPI_DLL_DIR}")
find_library(IMPI_LIB
"impi.lib"
HINTS "${IMPI_LIB_DIR}"
PATH_SUFFIXES "${IMPI_BUILD}"
DOC "Location of the Intel MPI impi.lib file"
REQUIRED
NO_DEFAULT_PATH)

find_file(IMPI_DLL
"impi.dll"
HINTS "${IMPI_DLL_DIR}"
PATH_SUFFIXES "${IMPI_BUILD}"
DOC "Location of the Intel MPI impi.dll file"
REQUIRED
NO_DEFAULT_PATH)
Expand Down
5 changes: 3 additions & 2 deletions src/script-templates/caf.in
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,12 @@ cd "${current_dir}" || exit 5

# Error tracing
# requires `set -o errtrace`
# shellcheck disable=SC2317
__caf_err_report() {
local error_code
error_code=${?}
error_code="${?}"
echo "Error in ${__file} in function ${1} on line ${2}. Please report this error at http://bit.ly/OpenCoarrays-new-issue" >&2
exit ${error_code}
exit "${error_code}"
}
# Always provide an error backtrace
trap '__caf_err_report "${FUNCNAME:-.}" ${LINENO}' ERR
Expand Down

0 comments on commit df27aa6

Please sign in to comment.