Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5a7d1fd
changes to build 5.3 with gfortran 11
jdhughes-dev Jan 31, 2022
89f276d
Add allocated(Irr_type) check before setting
jdhughes-dev Feb 1, 2022
45621d9
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
bd46108
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
2aafa14
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
93696dc
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
6714788
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
88c30d3
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
c18e752
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
ad68bdb
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
fed1ede
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
4e3fdb7
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
4017fff
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 1, 2022
de8cd84
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 2, 2022
9080dc7
ci: add gfortran and intel build GitHub Actions workflows
jdhughes-dev Feb 2, 2022
d5ea48b
Modify encoding of snowcomp.f90 and soltab.f90 to ansi to fix OneAPI
jdhughes-dev Feb 2, 2022
0f39860
Update windows-2019 to windows-2022 VM
jdhughes-dev Feb 2, 2022
27240fb
OneAPI for Windows does not support Visual Studio 2022 yet
jdhughes-dev Feb 2, 2022
4870bd5
Update meson.build with version number
jdhughes-dev Feb 2, 2022
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
4 changes: 4 additions & 0 deletions .github/common/install-python-std.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

pip install wheel
pip install meson ninja
12 changes: 12 additions & 0 deletions .github/common/prms_build_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os
import sys

exe_name = "prms"
if sys.platform == "win32":
exe_name += ".exe"
fpth = os.path.join("..", "..", "bin", exe_name)

assert os.path.isfile(fpth), f"{fpth} does not exist"
assert os.access(fpth, os.X_OK), f"{fpth} is not executable"

print(f"\nprms executable has been build.\n\tand is located at...'{fpth}'\n")
17 changes: 17 additions & 0 deletions .github/intel-scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
These scripts install the ifort compiler on the CI machines.

The content has been directly copied from the Intel OneAPI-CI examples, found
here:

https://github.com/oneapi-src/oneapi-ci

Note that on Linux and macOS, shell scripts must be marked as executable: not
doing so for these scripts will result in a permission error during the GitHub
Action. Windows does not have such a permission system, but you can mark a
script nonetheless with git:

```
git update-index --chmod=+x {name_of_script}
```

Then commit and push.
13 changes: 13 additions & 0 deletions .github/intel-scripts/cache_exclude_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

#shellcheck disable=SC2010
LATEST_VERSION=$(ls -1 /opt/intel/oneapi/compiler/ | grep -v latest | sort | tail -1)

sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/compiler/lib/ia32_lin
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/bin/ia32
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/lib/emu
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/lib/oclfpga
15 changes: 15 additions & 0 deletions .github/intel-scripts/cache_exclude_windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

#shellcheck disable=SC2010
LATEST_VERSION=$(ls -1 "C:\Program Files (x86)\Intel\oneAPI\compiler" | grep -v latest | sort | tail -1)

rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\compiler\lib\ia32_win"
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\bin\intel64_ia32"
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\emu"
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\oclfpga"
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\ocloc"
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\x86"
17 changes: 17 additions & 0 deletions .github/intel-scripts/ifortvars_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
REM SPDX-FileCopyrightText: 2020 Intel Corporation
REM
REM SPDX-License-Identifier: MIT

set LANGUAGE=%1
set VS_VER=%2

IF "%VS_VER%"=="2017_build_tools" (
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
)

IF "%VS_VER%"=="2019_build_tools" (
@call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
)

for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"
23 changes: 23 additions & 0 deletions .github/intel-scripts/install_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

URL=$1
COMPONENTS=$2

curl --output webimage.sh --url "$URL" --retry 5 --retry-delay 5
chmod +x webimage.sh
./webimage.sh -x -f webimage_extracted --log extract.log
rm -rf webimage.sh
WEBIMAGE_NAME=$(ls -1 webimage_extracted/)
if [ -z "$COMPONENTS" ]; then
sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --eula=accept --log-dir=.
installer_exit_code=$?
else
sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --log-dir=.
installer_exit_code=$?
fi
rm -rf webimage_extracted
exit $installer_exit_code
20 changes: 20 additions & 0 deletions .github/intel-scripts/install_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

URL=$1
COMPONENTS=$2

curl --output webimage.dmg --url "$URL" --retry 5 --retry-delay 5
hdiutil attach webimage.dmg
if [ -z "$COMPONENTS" ]; then
sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --eula=accept --continue-with-optional-error=yes --log-dir=.
installer_exit_code=$?
else
sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --log-dir=.
installer_exit_code=$?
fi
hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet
exit $installer_exit_code
15 changes: 15 additions & 0 deletions .github/intel-scripts/install_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
REM SPDX-FileCopyrightText: 2020 Intel Corporation
REM
REM SPDX-License-Identifier: MIT

set URL=%1
set COMPONENTS=%2

curl.exe --output webimage.exe --url %URL% --retry 5 --retry-delay 5
start /b /wait webimage.exe -s -x -f webimage_extracted --log extract.log
del webimage.exe
if "%COMPONENTS%"=="" (
webimage_extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 --log-dir=.
) else (
webimage_extracted\bootstrapper.exe -s --action install --components=%COMPONENTS% --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 --log-dir=.
)
72 changes: 72 additions & 0 deletions .github/workflows/ci-tests-gfortran-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: ci - gfortran - latest version

on:
push:
branches:
- '5.3*'
pull_request:
branches:
- '5.3*'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
shell: bash

steps:
- name: Checkout repo
uses: actions/checkout@v2.3.4

- name: Setup Python
uses: actions/setup-python@v2.3.1
with:
python-version: 3.9

- name: Setup symbolic links on Linux
if: runner.os == 'Linux'
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++

- name: Setup symbolic link to gfortran on macOS
if: runner.os == 'macOS'
shell: bash
run: |
sudo ln -fs /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/local/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/local/bin/g++-10 /usr/local/bin/g++

- name: Print GNU compiler versions
run: |
gfortran --version
gcc --version
g++ --version

- name: Install python packages
run: |
.github/common/install-python-std.sh

- name: Build and Install (Linux or macOS)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir

- name: Build and Install (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
meson setup builddir -Ddebug=false --prefix=%CD% --libdir=bin
meson install -C builddir

- name: Test for build success
working-directory: ./.github/common
run: |
python prms_build_check.py
124 changes: 124 additions & 0 deletions .github/workflows/ci-tests-ifort.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Parts of configuration file are based on the examples in this repository:
# https://github.com/oneapi-src/oneapi-ci
#
# Which have the following copyright:
# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

name: ci - ifort

on:
push:
branches:
- '5.3*'
pull_request:
branches:
- '5.3*'

env:
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18417/w_HPCKit_p_2022.1.0.93_offline.exe
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18438/l_HPCKit_p_2022.1.1.97_offline.sh
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18341/m_HPCKit_p_2022.1.0.86_offline.dmg
WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler
LINUX_FORTRAN_COMPONENTS_WEB: intel.oneapi.lin.ifort-compiler
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
FC: ifort

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
- os: windows-2019
defaults:
run:
shell: bash

steps:
- name: Checkout repo
uses: actions/checkout@v2.3.4

- name: Setup Python
uses: actions/setup-python@v2.3.1
with:
python-version: 3.9

- name: cache install ifort on linux
if: runner.os == 'Linux'
id: cache-install-linux
uses: actions/cache@v2
with:
path: |
/opt/intel/oneapi
key: install-${{ env.LINUX_HPCKIT_URL }}-${{ env.LINUX_FORTRAN_COMPONENTS_WEB }}-compiler-${{ hashFiles('**/.github/intel-scripts/cache_exclude_linux.sh') }}

- name: install ifort on linux
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_linux.sh $LINUX_HPCKIT_URL $LINUX_FORTRAN_COMPONENTS_WEB

- name: cache install ifort on macos
if: runner.os == 'macOS'
id: cache-install-macos
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_FORTRAN_COMPONENTS }}

- name: install ifort on macos
if: runner.os == 'macOS' && steps.cache-install-macos.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_macos.sh $MACOS_HPCKIT_URL $MACOS_FORTRAN_COMPONENTS

- name: cache install ifort on windows
if: runner.os == 'Windows'
id: cache-install-windows
uses: actions/cache@v2
with:
path: C:\Program Files (x86)\Intel\oneAPI
key: install-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_FORTRAN_COMPONENTS }}-compiler-${{ hashFiles('**/.github/intel-scripts/cache_exclude_windows.sh') }}

- name: install ifort on windows
if: runner.os == 'Windows' && steps.cache-install-windows.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS

- name: Install python packages
run: |
.github/common/install-python-std.sh

- name: Build prms (Linux or macOS)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
source /opt/intel/oneapi/setvars.sh
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir

- name: Build prms (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
call ".github/intel-scripts/ifortvars_windows.bat"
meson setup builddir -Ddebug=false --prefix=%CD% --libdir=bin
meson install -C builddir

- name: Test for build success
working-directory: ./.github/common
run: |
python prms_build_check.py

- name: exclude unused files from cache on linux
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/cache_exclude_linux.sh

- name: exclude unused files from cache on windows
if: runner.os == 'Windows' && steps.cache-install-windows.outputs.cache-hit != 'true'
shell: bash
run: |
.github/intel-scripts/cache_exclude_windows.sh
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
*.mod
*.a
prms/prms

# meson temporary files
builddir/

# built executables
bin/prms
bin/prms.exe

# pycharm
.idea/
2 changes: 2 additions & 0 deletions bin/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin directory for built prms executable

Loading