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

Combine ip and ip2 libraries #54

Merged
merged 41 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
aa406bc
Combine ip and ip2 libraries
kgerheiser Jul 2, 2021
07fb03d
Save coeffecients separately for scalar and vector interp routines
kgerheiser Jul 2, 2021
5db0688
Update README.md
kgerheiser Jul 6, 2021
3ec00a2
Update README.md
kgerheiser Jul 6, 2021
96e0007
Update VERSION 4.0.0
kgerheiser Jul 6, 2021
5e0afec
Delete Release_Notes.ip2lib.v1.0.0.txt
kgerheiser Jul 6, 2021
524c904
Remove list_of_files.cmake and specify src in main CMakeLists
kgerheiser Jul 7, 2021
d511471
Update workflows
kgerheiser Jul 7, 2021
c69cb6c
Merge branch 'feature/combined-ip' of github.com:kgerheiser/NCEPLIBS-…
kgerheiser Jul 7, 2021
087068c
Add CMAKE_Fortran_FLAGS to testsg
kgerheiser Jul 7, 2021
bb67e3a
Update README.md
kgerheiser Jul 7, 2021
3926b13
Cleanup CMakeLists
kgerheiser Jul 7, 2021
b179d84
Merge branch 'feature/combined-ip' of github.com:kgerheiser/NCEPLIBS-…
kgerheiser Jul 7, 2021
a8eeefa
Fix docs
kgerheiser Jul 7, 2021
7d610ce
Update README
kgerheiser Jul 7, 2021
92b7e10
Add heap-arrays for tests
kgerheiser Jul 7, 2021
ec8ae43
Increase stack sizeg
kgerheiser Jul 7, 2021
ea9e3de
Add version for find_package(sp) and update Github workflow
kgerheiser Jul 15, 2021
aee44e5
Fix Github Action
kgerheiser Jul 15, 2021
0b875da
Fix workflow syntax
kgerheiser Jul 15, 2021
994251e
Fix sp version in find_package
kgerheiser Jul 15, 2021
fca7d54
Disable docs until fixed
kgerheiser Jul 15, 2021
5906c4c
Separate out debug compiler flags
kgerheiser Jul 20, 2021
01b9500
Use GCC-11
kgerheiser Jul 20, 2021
62fa22a
I mean GCC-10
kgerheiser Jul 20, 2021
f4cabb2
Setup Doxygen with CMake
kgerheiser Jul 20, 2021
bdc244e
Update Gitub Actions
kgerheiser Jul 20, 2021
0fa9ac8
Doxygen docs
kgerheiser Jul 20, 2021
585b6c2
More Doxygen
kgerheiser Jul 20, 2021
a15d899
Finish bicubic interpolation documentation
kgerheiser Jul 20, 2021
a137449
Remove duplicate file
kgerheiser Jul 20, 2021
f3a5c42
Ignore .DS_Store files
kgerheiser Jul 20, 2021
9f00ac4
Fix typo
kgerheiser Jul 20, 2021
60e2a92
Add Doxygen for ipolates
kgerheiser Jul 20, 2021
113bb4e
Cleanup docs for ipolates
kgerheiser Jul 20, 2021
b3b9415
Update user_guide.md
kgerheiser Jul 21, 2021
4317893
Add Doxygen docs to ip_interpolators_mod
kgerheiser Jul 21, 2021
9fc99f0
Make interpolation ids public
kgerheiser Jul 21, 2021
3ba5868
Fix Doxygen in ipolates
kgerheiser Jul 21, 2021
8619b97
Fix module syntax
kgerheiser Jul 21, 2021
3e6dcfc
Remove duplicate module use
kgerheiser Jul 21, 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
63 changes: 63 additions & 0 deletions .github/workflows/gcc-docs-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: GCC Docs Coverage Build
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
env:
FC: gfortran-10
CC: gcc-10

steps:

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install doxygen
python3 -m pip install gcovr

- name: checkout-sp
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sp
path: sp
ref: v2.3.3

- name: build-sp
run: |
cd sp
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/sp
make -j2
make install

- name: checkout
uses: actions/checkout@v2
with:
path: ip
submodules: true

- name: build
run: |
cd ip
mkdir build
cd build
cmake .. -DENABLE_DOCS=No -DCMAKE_PREFIX_PATH="~/" -DOPENMP=ON -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0"
make -j2

- name: test
run: |
cd $GITHUB_WORKSPACE/ip/build
ctest --output-on-failure

- name: run-gcovr
run: |
cd $GITHUB_WORKSPACE/ip/build
gcovr -r .. -v --html-details -o test-coverage.html

- name: upload-test-coverage
uses: actions/upload-artifact@v2
with:
name: test-coverage
path: ip/build/*.html
68 changes: 68 additions & 0 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Intel Build
on: [push, pull_request]

# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

jobs:
build:
runs-on: ubuntu-latest
env:
CC: icc
FC: ifort
CXX: icpc
strategy:
matrix:
os: [ubuntu-latest]

steps:

# See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html
- name: install-intel
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile

- name: checkout-sp
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sp
path: sp
ref: v2.3.3

- name: build-sp
run: |
cd sp
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/sp
make -j2
make install

- name: checkout
uses: actions/checkout@v2
with:
path: ip

- name: build
run: |
cd ip
mkdir build
cd build
cmake .. -DENABLE_TESTS=ON -DOPENMP=ON -DCMAKE_PREFIX_PATH="~/"
make -j2

- name: test
run: |
ulimit -s unlimited
cd $GITHUB_WORKSPACE/ip/build
ctest --output-on-failure
46 changes: 0 additions & 46 deletions .github/workflows/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ install/
*.so

*.swp
.DS_Store
36 changes: 15 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This is the main CMake file for NCEPLIBS-ip.
#
# Mark Potts, Kyle Gerheiser
cmake_minimum_required(VERSION 3.15)

# Get the version from the VERSION file.
Expand All @@ -11,42 +8,39 @@ project(
VERSION ${pVersion}
LANGUAGES C Fortran)


include(GNUInstallDirs)

option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF)
option(OPENMP "use OpenMP threading" OFF)

if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE
"Release"
CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU|Clang|AppleClang)$")
message(
WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}")
if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU)$")
message(WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}")
endif()

if(OPENMP)
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()

# The NCEPLIBS-sp library is required.
find_package(sp REQUIRED)
find_package(sp 2.3.0 REQUIRED)

# If doxygen documentation we enabled, build it. This must come before
# adding the source code directories; the main documentation build
# must happen before any of the utility document builds.
if(ENABLE_DOCS)
find_package(Doxygen REQUIRED)
set(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
add_subdirectory(docs)
endif()

add_subdirectory(src)

include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()

# Determine whether or not to generate documentation.
option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF)
if(ENABLE_DOCS)
find_package(Doxygen REQUIRED)
endif()
add_subdirectory(docs)
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright 2020 National Oceanic and Atmospheric Administration (by assignment from I. M. Systems Group)

The [NCEPLIBS-ip] code incorporated in the Unified Forecast System (UFS) was jointly developed by the National Oceanic and Atmospheric Administration and the I. M. Systems Group. The gold standard copy of the Code will be maintained by NOAA at [https://github.com/NOAA-EMC/NCEPLIBS-ip].
The [NCEPLIBS-ip2] code incorporated in the Unified Forecast System (UFS) was jointly developed by the National Oceanic and Atmospheric Administration and the I. M. Systems Group. The gold standard copy of the Code will be maintained by NOAA at [https://github.com/NOAA-EMC/NCEPLIBS-ip2].

The National Oceanic and Atmospheric Administration is releasing this code under the GNU Lesser General Public License v3.0 (the "License"); you may not use this code except in compliance with the License.

Expand Down
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,49 @@

# Interpolation Library

The NCEP general interpolation library (iplib) contains Fortran 90 subprograms
to be used for interpolating between nearly all (rectilinear) grids used at NCEP.
For more detailed documentation see https://noaa-emc.github.io/NCEPLIBS-ip/.
The NCEP general interpolation library contains Fortran 90
subprograms to be used for interpolating between nearly all grids used
at NCEP. The library is particularly efficient when interpolating many
fields at one time. The library has been extensively tested with AIX
and Intel Fortran compilers.

This is part of the [NCEPLIBS](https://github.com/NOAA-EMC/NCEPLIBS)
project.

There are currently six interpolation methods available in the
library:
- bilinear
- bicubic
- neighbor
- budget
- spectral
- neighbor-budget

### Authors

NCEP/EMC Developers
* NCEP/EMC Developers

Code Manager: George Gayno

### Prerequisites

This package requires the [NCEPLIBS-sp](https://github.com/NOAA-EMC/NCEPLIBS-sp) library.

### Building
### Installing

```
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
cmake -DCMAKE_INSTALL_PREFIX=/path/to/install /path/to/NCEPLIBS-ip2
make -j2
make test
make test (or ctest --verbose)
make install
```

### Usage

To use the ip library add `use ip_mod` to your Fortran code. It contains all the necessary public interfaces.

## Disclaimer

The United States Department of Commerce (DOC) GitHub project code is
Expand Down
54 changes: 0 additions & 54 deletions Release_Notes.iplib.v3.0.1.txt

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.3
4.0.0
5 changes: 4 additions & 1 deletion cmake/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
# * @PROJECT_NAME@::@PROJECT_NAME@_4 - real32 library target
# * @PROJECT_NAME@::@PROJECT_NAME@_8 - real64 library target
# * @PROJECT_NAME@::@PROJECT_NAME@_d - mixed precision library target
include(CMakeFindDependencyMacro)

# Include targets file. This will create IMPORTED target @PROJECT_NAME@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")

include(CMakeFindDependencyMacro)

# ON/OFF implies ip was compiled with/without OPENMP
if(@OPENMP@)
find_dependency(OpenMP COMPONENTS Fortran)
endif()

find_dependency(sp CONFIG)

get_target_property(@PROJECT_NAME@_BUILD_TYPES @PROJECT_NAME@::@PROJECT_NAME@_4 IMPORTED_CONFIGURATIONS)

check_required_components("@PROJECT_NAME@")
Expand Down
Loading