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

Streamlined LW calculations, OpenMP GPU support, small efficiency changes, updates to continuous integration #110

Merged
merged 112 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
2fdc779
Update README.md
RobertPincus May 12, 2019
5a5fb86
Travis CI integration (#24)
clementval May 23, 2019
e216d17
Merging Travis CI onto GPU-Hackathon 2019 branch (#25)
RobertPincus May 23, 2019
ac044f5
End results from GPU Hackathon19 (#27)
RobertPincus May 25, 2019
23ef3c9
Merge branch 'master' into develop
RobertPincus May 25, 2019
37d1748
Removing unneeded USE statement (thanks to Cheil van Heerwarden).
RobertPincus Jun 3, 2019
0b1cffd
Remove nullify on declaration for thread safety (#29)
brhillman Jun 11, 2019
cf06dcf
Array size bug fix in compute_bc()
RobertPincus Jun 14, 2019
f279b8b
Merge branch 'master' into develop
RobertPincus Jun 14, 2019
5f3aeb4
Open coefficients files for read-only access (#32)
brhillman Jun 19, 2019
6e5a78a
Moved downloading of reference results for RFMIP from file staging sc…
RobertPincus Jul 17, 2019
de55554
Updating README with DOI for overview paper.
RobertPincus Jul 30, 2019
6964c5d
GPU refinement (#34)
RobertPincus Aug 5, 2019
08c6dee
Updating CSCS compiler and module information as suggesed by Phillipe…
RobertPincus Aug 6, 2019
be29508
Further updates to Daint modules, library paths from Philippe Marti.
RobertPincus Aug 7, 2019
9bcfbaf
GPU optimizations (#44)
alexeedm Sep 27, 2019
22cb493
Using OpenACC kernels to simplify array utilities.
RobertPincus Sep 27, 2019
44d9335
Fixed error reading RFMIP surface temperatures; updated upwelling lon…
RobertPincus Oct 8, 2019
9f56730
Merge branch 'master' into develop. Reverting to loops in zero_array,…
RobertPincus Oct 18, 2019
de24173
Revised cloud optics, all-sky example, more data and computation on G…
RobertPincus Oct 21, 2019
ce1bca3
Further documentation of examples, RFMIP comparison script gets some …
RobertPincus Oct 22, 2019
975bbf0
Comparision scripts for examples have non-zero exit if flux differenc…
RobertPincus Oct 22, 2019
51fb89d
Fixed misleading comment. Closes #52.
RobertPincus Oct 22, 2019
3326566
Use local directories for example run scripts
RobertPincus Oct 22, 2019
8b82489
Loosening failure tolerance for RFMIP clear-sky examples to 1.e-4 W/m2.
RobertPincus Oct 22, 2019
8a38ab8
Missed a variable default in comparison script.
RobertPincus Oct 22, 2019
fcddc0e
Right... teach me not to try commits at home.
RobertPincus Oct 22, 2019
584f40b
Merge branch 'master' into develop, since last merge in the other dir…
RobertPincus Oct 22, 2019
8737feb
Remove clouds from every third column in all-sky example, as a slighl…
RobertPincus Oct 22, 2019
006543b
Giving all _util modules local names to avoid conflicts with host mod…
RobertPincus Oct 22, 2019
5a9204e
Updating RFMIP comparison script to xarray 0.13
RobertPincus Oct 22, 2019
93ee85b
Namespace: renaming kernels for array reordering
RobertPincus Oct 22, 2019
568b912
Fixing bounds error in gas optics; making CI more strict to avoid fut…
RobertPincus Oct 25, 2019
bd9276f
Travis is failing because xarray isn't yet compatible with Python 3.8…
RobertPincus Oct 28, 2019
73713d3
Create azure-pipelines.yml
alexeedm Oct 30, 2019
7056b84
Make Azure CI run on master and develop
alexeedm Oct 30, 2019
e08648b
Merge pull request #56 from alexeedm/develop
RobertPincus Oct 31, 2019
bb48d89
Changing account for using CSCS to build and test GPU versions. Remov…
RobertPincus Oct 31, 2019
0fb41cb
Installed Python venv on Daint, invoking for CI.
RobertPincus Oct 31, 2019
4bb82ac
Without the virtual environment...
RobertPincus Oct 31, 2019
1e18535
Setting up for multiple GPU builds
RobertPincus Oct 31, 2019
660ab01
Missed modules inside Azure scripts. Trying with two compilers.
RobertPincus Oct 31, 2019
b28454e
Refined GPU CI.
RobertPincus Oct 31, 2019
9be136b
And again... (wrong .yaml indentation?)
RobertPincus Oct 31, 2019
5e619d7
... and again with the syntax.
RobertPincus Oct 31, 2019
286abea
Settled on Azure CI on daint, using two compiler versions and checkin…
RobertPincus Nov 1, 2019
fdb714e
CI now works on updated Piz Daint (#58)
alexeedm Nov 13, 2019
efbe62f
Rescaling for scattering in the LW (#60)
inpolonsky Jan 13, 2020
042650a
Merge branch 'master' into develop
RobertPincus Jan 14, 2020
8d0a5b6
Updated README
RobertPincus Jan 14, 2020
230c3b5
Use offical RFMIP results from the Earth System Grid instead of versi…
RobertPincus Feb 19, 2020
871a3b6
Better input sanitization for gas optics -> compute_gas_taus().
RobertPincus Feb 20, 2020
934a3ff
Reverting to default Travis Python version
RobertPincus Feb 20, 2020
ee99e03
Using scipy to have Python working with Travis; not updating versione…
RobertPincus Feb 21, 2020
da4a302
Variable solar source function (#64)
RobertPincus Feb 21, 2020
a4bcf11
Jacobian of long wave flux to surface temperature (#67)
inpolonsky Mar 2, 2020
9de56db
Removing unused function
RobertPincus Mar 4, 2020
f2c610f
Sj.v2 (#68)
inpolonsky Mar 17, 2020
04641ca
Adding regression testing (#69)
RobertPincus Mar 21, 2020
144e878
Add code for computing optimal single angle for no-scattering calcula…
jdelamere Apr 22, 2020
a1a1edc
Merge branch 'master' into develop
RobertPincus Apr 22, 2020
85cb697
Using a derived type to compute Jacobian of broadband fluxes
RobertPincus Apr 22, 2020
d90babd
Refining Jaocobians in rte_lw()
RobertPincus Apr 23, 2020
b08fb50
Updating Readme.
RobertPincus Apr 23, 2020
5ccb066
Error in rte_lw() returned as string, not function call
RobertPincus Apr 23, 2020
a7dabd2
Add missing 'public' statements.
skosukhin Apr 24, 2020
5290649
Use the same Python interpreter in a subprocess (per 4ec575); elimin…
RobertPincus Apr 27, 2020
9631481
Fix integer kind in 'all-sky' example.
skosukhin Apr 20, 2020
bdc8807
CI iteration (#73)
RobertPincus May 7, 2020
1287623
Input sanitizing optional (#71)
RobertPincus May 7, 2020
ab5af6f
Adding Intel compiler to CI
RobertPincus May 18, 2020
f57196e
Update Readme.
RobertPincus May 26, 2020
ea0b22b
Merge branch 'master' into develop - no changes
RobertPincus May 27, 2020
137d592
Merge branch 'master' into develop: typos and clarifications.
RobertPincus May 27, 2020
5b47640
Remove platform-specific build system files; upload validation plots …
RobertPincus Jun 1, 2020
972073a
Efficiency gain via @Chiil (closes #79)
RobertPincus Jun 9, 2020
e13ae78
fix to avoid occasional overflow in minor gas code when using single …
peterukk Jun 24, 2020
74e058f
Aesthetics.
RobertPincus Jun 25, 2020
af3620b
Updates to Intel CI
RobertPincus Aug 31, 2020
d2d33f6
YAML syntax error
RobertPincus Aug 31, 2020
8adf166
Errors in if-statement nesting in mo_cloud_optics.
RobertPincus Aug 31, 2020
8ded9a2
OpenACC data fix for cloud optics.
RobertPincus Aug 31, 2020
be10425
Looser restrictions on level pressure in RRTMGP gas optics.
RobertPincus Sep 2, 2020
1a67de4
Enhanced CI (#88)
RobertPincus Sep 5, 2020
5e2f8b8
Peter Ukkonen suggests an efficiency change
RobertPincus Sep 10, 2020
fef974d
Working CI into develop from feature-enchanced-ci
RobertPincus Sep 12, 2020
7ad6af7
Set env var GPTL_DIR to enable timing with GPTL in RFMIP examples; nu…
RobertPincus Sep 12, 2020
201e5f4
Removing ifort from CI - packages have changed and aren't working?
RobertPincus Sep 12, 2020
f5f4d7b
Update Python module for Azure CI
RobertPincus Sep 17, 2020
d2f6a46
Removing CPU builds from Azure CI; these are now tested with Github A…
RobertPincus Sep 17, 2020
5f7740d
CI updates (#90)
RobertPincus Sep 21, 2020
5cde584
Update CI (#91)
RobertPincus Oct 5, 2020
9fdc9e4
New finalize functions in ty_optical_props. (#92)
dustinswales Nov 17, 2020
d4bc936
Continuous integration: package name changes (#98)
rscohn2 Dec 15, 2020
0d01651
CI: update netcdf-c and netcdf-fortran; add gfortran-10 in tests
RobertPincus Dec 18, 2020
106756d
Feature: GPU support via OpenMP 4.5 (#100)
RobertPincus Jan 13, 2021
0366e6e
Updating validation plotting script to use DKRZ ESGF node
RobertPincus Mar 18, 2021
8a4598d
OpenMP GPU fixes for the Cray 11.x compiler (#102)
naromero77 Mar 23, 2021
74be3ed
Feature streamline LW (#101)
RobertPincus Mar 24, 2021
2923ad4
Fix a floating point literal (#104)
brhillman Mar 24, 2021
a0489dc
Switch to CCE 11.0.0 for continuous integration
RobertPincus Mar 24, 2021
fb84634
Improved error handling for optical properties
RobertPincus Mar 18, 2021
40a1a59
Fortran error stop in all examples run during continuous integration
RobertPincus Mar 26, 2021
5c2d274
Hotfix: missing values for Jacobians in CPU kernels
RobertPincus Mar 29, 2021
ae84999
Omiting ifort from CI since the compiler repo is failing
RobertPincus Mar 29, 2021
9f5930d
Tyring ifort as a container
RobertPincus Mar 30, 2021
edb3450
Nvidia containers?
RobertPincus Mar 30, 2021
0316e7a
No sudo for you
RobertPincus Mar 30, 2021
769da43
Reverting to full CI - container testing was supposed to be on its ow…
RobertPincus Mar 30, 2021
7bc5fa0
Continuous integration in Docker containers: ifort for now, nvfortran…
RobertPincus Mar 31, 2021
848d24a
Continuous integration with nvfortran in a container. CI containers h…
RobertPincus Apr 7, 2021
e076b2f
Make to build, run tests, check results (#106)
RobertPincus Apr 8, 2021
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
77 changes: 77 additions & 0 deletions .github/workflows/containerized-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Continuous integration in a box
on: [push, pull_request]

jobs:
Containerized-CI:
runs-on: ubuntu-20.04
strategy:
matrix:
rte-kernels: [default, openacc]
container: ["earthsystemradiation/rte-rrtmgp-ci:ifort","earthsystemradiation/rte-rrtmgp-ci:nvfortran"]
container:
image: ${{ matrix.container }}
env:
NCHOME: /home/runner/netcdf-c
NFHOME: /home/runner/netcdf-fortran
RFMIP_DIR: /home/runner/rfmip-files
steps:
############################################################################
# Checks out repository under $GITHUB_WORKSPACE
- name: Check out code
uses: actions/checkout@v2
- name: Environmental variables
# This might be able to be set in the ENV section above
run: echo "RRTMGP_ROOT=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
- name: Environmental variables - ifort
if: contains(matrix.container, 'ifort')
run: echo "FCFLAGS=-m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08" >> $GITHUB_ENV
- name: Environmental variables - nvfortran
if: contains(matrix.container, 'nvfortran')
run: echo "FCFLAGS=-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk" >> $GITHUB_ENV

- name: Make library, examples, tests
shell: bash
env:
RTE_KERNELS: ${{ matrix.rte-kernels }}
run: |
source /opt/intel/oneapi/setvars.sh || true
cd ${RRTMGP_ROOT}
${FC} --version
make libs
############################################################################
- name: Cache RFMIP files
id: cache-rfmip-files
uses: actions/cache@v2
with:
path: /home/runner/rfmip-files # Same as #{RFMIP_DIR}
key: rfmip-files

- name: Stage RFMIP files
if: steps.cache-rfmip-files.outputs.cache-hit != 'true'
run: |
mkdir -p ${RFMIP_DIR}
cd ${RFMIP_DIR}
python ${RRTMGP_ROOT}/examples/rfmip-clear-sky/stage_files.py
############################################################################
- name: Run examples, tests
shell: bash
env:
LD_LIBRARY_PATH: /home/runner/netcdf-c/lib
run: |
source /opt/intel/oneapi/setvars.sh || true
export LD_LIBRARY_PATH=${NFHOME}/lib:${LD_LIBRARY_PATH}
make tests
- name: Comparison
run: make check
############################################################################
- name: Validation plots
if: contains(matrix.container, 'ifort') && contains(matrix.rte-kernels, 'default')
run: |
cd ${RRTMGP_ROOT}/tests
python validation-plots.py
- name: Upload plots
if: contains(matrix.container, 'ifort') && contains(matrix.rte-kernels, 'default')
uses: actions/upload-artifact@v2
with:
name: valdiation-plot
path: tests/validation-figures.pdf
142 changes: 142 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Continuous Integration
on: [push, pull_request]

jobs:
CI:
runs-on: ubuntu-20.04
strategy:
matrix:
fortran-compiler: [gfortran-9, gfortran-10]
rte-kernels: [default, openacc]
env:
FC: ${{ matrix.fortran-compiler }}
FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -finit-real=nan -g -DUSE_CBOOL"
CC: gcc
NCHOME: /home/runner/netcdf-c
NFHOME: /home/runner/netcdf-fortran
RFMIP_DIR: /home/runner/rfmip-files
steps:
- name: Update system packages
run: sudo apt-get update
############################################################################
#
# Compilers....
#
# Gfortran 10 not available in Github CI stack, so install
#
- name: gfortran-10 setup compiler
if: contains(matrix.fortran-compiler, 'gfortran-10')
run: |
sudo apt-get install gfortran-10 gcc-10
echo "CC=gcc-10" >> $GITHUB_ENV

############################################################################
#
# Netcdf C and Fortran
#
- name: Install HDF5 library
run: |
sudo apt-get install libhdf5-dev libcurl4-gnutls-dev hdf5-helpers
dpkg -L libhdf5-dev

# Skipping this for now - netCDF configure doesn't see the HDF libararies
- name: cache-netcdf-c
id: cache-netcdf-c
uses: actions/cache@v2
with:
path: /home/runner/netcdf-c
key: netcdf-c-4.7.4a-${{ runner.os }}-${{ matrix.fortran-compiler }}

- name: Install netcdf C library from source
if: steps.cache-netcdf-c.outputs.cache-hit != 'true'
env:
CPPFLAGS: -I/usr/include/hdf5/serial
LDFLAGS: -L/usr/lib/x86_64-linux-gnu/hdf5/serial/
run: |
${CC} --version
git clone https://github.com/Unidata/netcdf-c.git --branch v4.7.4
cd netcdf-c
ls /usr/include
./configure --prefix=${NCHOME}
make -j
sudo make install

# Would be great to encode version info
- name: cache-netcdf-fortran
id: cache-netcdf-fortran
uses: actions/cache@v2
with:
path: /home/runner/netcdf-fortran
key: netcdf-fortran-4.5.3-${{ runner.os }}-${{ matrix.fortran-compiler }}

- name: Build NetCDF Fortran library
# Here too it would be nice to use the environment to specify netcdf-c location
env:
CPPFLAGS: -I/home/runner/netcdf-c/include
LDFLAGS: -L/home/runner/netcdf-c/lib
LD_LIBRARY_PATH: /home/runner/netcdf-c/lib
FCFLAGS: -fPIC
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
run: |
echo ${TEST}
${FC} --version
git clone https://github.com/Unidata/netcdf-fortran.git --branch v4.5.3
cd netcdf-fortran
echo ${CPPFLAGS}
./configure --prefix=${NFHOME}
make -j
sudo make install
############################################################################
# Checks out repository under $GITHUB_WORKSPACE
- name: Check out code
uses: actions/checkout@v2

- name: Environmental variables
run: echo "RRTMGP_ROOT=${GITHUB_WORKSPACE}" >> $GITHUB_ENV

- name: Make library, examples, tests
env:
RTE_KERNELS: ${{ matrix.rte-kernels }}
run: |
cd ${RRTMGP_ROOT}
${FC} --version
make libs

############################################################################
# Set up Python and packages
#
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.7
- name: Install python packages
run: conda install --yes urllib3 netcdf4 xarray dask scipy matplotlib seaborn colorcet
############################################################################
- name: Cache RFMIP files
id: cache-rfmip-files
uses: actions/cache@v2
with:
path: /home/runner/rfmip-files # Same as #{RFMIP_DIR}
key: rfmip-files

- name: Stage RFMIP files
if: steps.cache-rfmip-files.outputs.cache-hit != 'true'
run: |
mkdir -p ${RFMIP_DIR}
cd ${RFMIP_DIR}
python ${RRTMGP_ROOT}/examples/rfmip-clear-sky/stage_files.py
############################################################################
# Would be great to encode version info
- name: Run examples, tests
env:
LD_LIBRARY_PATH: /home/runner/netcdf-c/lib
run: |
export LD_LIBRARY_PATH=${NFHOME}/lib:${LD_LIBRARY_PATH}
make tests
- name: Comparison
run: |
make check
110 changes: 0 additions & 110 deletions .github/workflows/main.yml

This file was deleted.

30 changes: 30 additions & 0 deletions Compiler-flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Compiler flag Examples

Before using the Makefiles supplied with the `RTE+RRTMGP` repository, the environment variables `FC` and
`FCFLAGS`, identifying the Fortran compiler and flags passed to it, need to be set. Here are some examples
used during development and testing.

To build any of the executables in `examples/` or `tests` the locations of the C and Fortran netCDF libraries
need to be set via environment variables `NCHOME` and `NFHOME`, and the variable `RRTMGP_ROOT` must be set to the
root of the RTE+RRTMGP installation.

## Gnu Fortran
`FC: gfortran-8` or `gfortran-9` or `gfortran-10`
### Debugging flags
`FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -finit-real=nan -DUSE_CBOOL"`
### Even stricter debugging flags
`FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fbacktrace -finit-real=nan -DUSE_CBOOL -pedantic -g -Wall"`

## Intel Fortran
`FC: ifort`
### Debugging flags
`FCFLAGS: "-m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08"`
### Optimization flags:
`FCFLAGS:"-m64 -O3 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132"`

## PGI Fortran
`FC: pgfortran` or `FC: nvfortran` (if using the Nvidia HPC SDK)
### Debugging flags
`FCFLAGS: "-g -Minfo -Mbounds -Mchkptr -Mstandard -Kieee -Mchkstk -Mallocatable=03 -Mpreprocess"`
### Optimization flags:
`FCFLAGS: "-m64 -O3 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132"`
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Top-level Makefile
#
.PHONY: libs tests check
all: libs tests check

libs:
make -C build -j
make -C tests -j 1
make -C examples/all-sky -j
make -C examples/rfmip-clear-sky -j

tests:
make -C examples/rfmip-clear-sky tests
make -C examples/all-sky tests
make -C tests tests

check:
make -C examples/rfmip-clear-sky check
make -C examples/all-sky check
make -C tests check

clean:
make -C build clean
make -C examples/rfmip-clear-sky clean
make -C examples/all-sky clean
make -C tests clean
Loading