Skip to content

Commit

Permalink
Merge pull request #454 from Goddard-Fortran-Ecosystem/feature/mathom…
Browse files Browse the repository at this point in the history
…p4/add-fujitsu

Add support for Fujitsu compiler
  • Loading branch information
tclune authored Mar 5, 2024
2 parents c5f76a8 + 95a173f commit f164724
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Setup Intel oneAPI repository
run: |
Expand Down Expand Up @@ -163,3 +169,51 @@ jobs:
name: logfiles
path: |
build/**/*.log
Nvidia:
runs-on: ubuntu-20.04
container: nvcr.io/nvidia/nvhpc:24.1-devel-cuda12.3-ubuntu22.04
env:
FC: nvfortran

name: Nvidia HPC
steps:
- name: Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Add python-is-python3 package
run: |
apt-get update
apt-get install -y python-is-python3
- name: Configure pFUnit
run: cmake -B build

- name: Build pfUnit
run: cmake --build build --parallel

- name: Build Tests
run: cmake --build build --parallel -t build-tests

- name: Run Tests
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 --schedule-random

- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]


### Added

- Fujitsu compiler support

### Fixed

This fixes a small CMake bug which can lead to posix_predefined.x being built in the wrong build subdirectory when CMAKE_RUNTIME_OUTPUT_DIRECTORY is set*.
Expand Down
14 changes: 14 additions & 0 deletions cmake/Fujitsu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
if (CMAKE_Fortran_COMPILER_ID MATCHES Fujitsu)
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.10.0)
message(FATAL_ERROR "${CMAKE_Fortran_COMPILER_ID} version must be at least 4.10.0!")
endif ()
endif ()

# Compiler specific flags for Fujitsu Fortran compiler

set(check_all "-Nquickdbg")
set(cpp "-Cfpp")

set(CMAKE_Fortran_FLAGS_DEBUG "-O0 ${check_all}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS "-g ${cpp} -Nalloc_assign -Free")

0 comments on commit f164724

Please sign in to comment.