Skip to content

Commit

Permalink
Merge branch 'develop' into ejh_more_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett authored Jun 7, 2024
2 parents 846942a + a432bfb commit 46eb630
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
CC: gcc-11
strategy:
matrix:
options: ['-DBUILD_D=OFF -DBUILD_WITH_BUFR=ON', '-DBUILD_4=OFF -DBUILD_WITH_BUFR=ON', '-DBUILD_SHARED_LIBS=ON']
options: ['-DBUILD_D=OFF', '-DBUILD_4=OFF -DBUILD_DEPRECATED=ON -DBUILD_WITH_BUFR=ON', '-DBUILD_SHARED_LIBS=ON']

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
variants: ["+pic +shared +bufr precision=d", "~pic ~shared ~bufr precision=4", "+pic ~shared ~bufr precision=8"]
variants: ["+pic +shared precision=d", "~pic ~shared precision=4", "+pic ~shared precision=8"]

runs-on: ${{ matrix.os }}

Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(BUILD_4 "Build the 4-byte real version of the library, libw3emc_4.a" ON)
option(BUILD_D "Build the 8-byte real version of the library, libw3emc_d.a" ON)
option(BUILD_8 "Build the 8-byte integer version of the library, libsp_8.a" OFF)
option(BUILD_WITH_BUFR "Build w3emc with subprograms which call NCEPLIBS-bufr" OFF)
option(BUILD_DEPRECATED "Build deprecated routines" OFF)
option(BUILD_WITH_BUFR "Build deprecated routines that call NCEPLIBS-bufr" OFF)

# Figure whether user wants _4, _d, _8 kinds of library.
if(BUILD_4)
Expand Down
7 changes: 7 additions & 0 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class W3emc(CMakePackage):
description="Build w3emc with subprograms which call unknown dependencies",
when="@2.10:2.11",
)
variant(
"build_deprecated",
default=False,
description="Build deprecated subroutines",
when="@develop",
)

conflicts("+shared +extradeps", msg="Shared library cannot be built with unknown dependencies")
conflicts("+shared ~pic", msg="Shared library requires PIC")
Expand Down Expand Up @@ -80,6 +86,7 @@ def cmake_args(self):
self.define("BUILD_8", self.spec.satisfies("precision=8")),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("BUILD_WITH_EXTRA_DEPS", "extradeps"),
self.define_from_variant("BUILD_DEPRECATED", "build_deprecated"),
]

return args
Expand Down
84 changes: 53 additions & 31 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,61 @@
# This is the CMake build file for the src directory of the
# NCEPLIBS-w3emc project.
#
# Kyle Gerheiser, Ed Hartnett
# Alex Richert, Kyle Gerheiser, Ed Hartnett

# This is the Fortran source code.
set(fortran_src getgbens.f isrchne.f iw3mat.f mersenne_twister.f mova2i.f
orders.f putgbens.f w3ai40.f w3ai41.f w3ctzdat.f w3fa01.f w3fa03.f w3fa03v.f
w3fa04.f w3fa06.f w3fa09.f w3fa11.f w3fa12.f w3fa13.f w3fb00.f w3fb01.f w3fb02.f
w3fb03.f w3fb04.f w3fb05.f w3fb06.f w3fb07.f w3fb08.f w3fb09.f w3fb10.f w3fb11.f
w3fb12.f w3fc02.f w3fc05.f w3fc06.f w3fc07.f w3fc08.f w3fi02.f w3fi03.f w3fi18.f
w3fi19.f w3fi20.f w3fi32.f w3fi47.f w3fi48.f w3fi61.f w3fi65.f
w3fi66.f w3fi67.f w3fi70.f w3fi78.f w3fi85.f w3fm07.f w3fm08.f w3fp04.f w3fp05.f
w3fp06.f w3fp10.f w3ft00.f w3ft01.f w3ft02.f w3ft03.f w3ft05.f w3ft05v.f
w3ft06.f w3ft06v.f w3ft07.f w3ft08.f w3ft09.f w3ft10.f w3ft11.f w3ft12.f
w3ft16.f w3ft17.f w3ft201.f w3ft202.f w3ft203.f w3ft204.f w3ft205.f w3ft206.f
w3ft207.f w3ft208.f w3ft209.f w3ft210.f w3ft211.f w3ft212.f w3ft213.f w3ft214.f
w3ft21.f w3ft26.f w3ft33.f w3ft38.f w3ft39.f w3ft40.f w3ft41.f w3ft43v.f w3log.f
xdopen.f aea.f errexit.f errmsg.f fparsei.f fparser.f gbytec.f gbyte.f gbytesc.f
gbytes.f getbit.f getgb1.f getgb1re.f getgb1r.f getgb1s.f getgbe.f getgbeh.f
getgbem.f getgbemh.f getgbemn.f getgbemp.f getgbep.f getgbex.f getgbexm.f
getgb.f getgbh.f getgbm.f getgbmh.f getgbmp.f getgbp.f getgi.f getgir.f gtbits.f
idsdef.f instrument.f iw3jdn.f iw3pds.f ixgb.f lengds.f makwmo.f mkfldsep.f
pdsens.f pdseup.f putgbe.f putgben.f putgbex.f putgb.f putgbn.f q9ie32.f
r63w72.f sbytec.f sbyte.f sbytesc.f sbytes.f skgb.f w3ai00.f w3ai01.f w3ai08.f
w3ai15.f w3ai18.f w3ai19.f w3ai24.f w3ai38.f w3ai39.f w3aq15.f w3as00.f
w3difdat.f w3doxdat.f w3fi01.f w3fi04.f w3fi58.f w3fi59.f w3fi62.f w3fi63.f
w3fi64.f w3fi68.f w3fi69.f w3fi71.f w3fi72.f w3fi73.f w3fi74.f w3fi75.f w3fi76.f
w3fi82.f w3fi83.f w3fi88.f w3fi92.f w3fp11.f w3fp12.f w3fp13.f w3fs13.f w3fs15.f
w3fs21.f w3fs26.f w3ft32.f w3kind.f w3locdat.f w3movdat.f w3nogds.f w3pradat.f
w3reddat.f w3trnarg.f w3utcdat.f w3valdat.f w3ymdh4.f xmovex.f xstore.f w3tagb.f
makgds.f90)

# These functions call NCEPLIBS-bufr.
if(BUILD_WITH_BUFR)
set(fortran_src ${fortran_src} w3miscan.f iw3unp29.f w3unpk77.f)
set(fortran_src
errexit.f errmsg.f fparsei.f fparser.f
gbyte.f gbytec.f gbytes.f gbytesc.f
getbit.f getgb.f getgb1.f getgb1r.f getgb1re.f getgb1s.f getgbe.f getgbeh.f
getgbem.f getgbemh.f getgbemn.f getgbemp.f getgbens.f getgbep.f getgbex.f
getgbexm.f getgbh.f getgbm.f getgbmh.f getgbmp.f getgbp.f getgi.f getgir.f
gtbits.f idsdef.f instrument.f isrchne.f iw3jdn.f iw3mat.f iw3pds.f ixgb.f
lengds.f makgds.f90 makwmo.f mersenne_twister.f mkfldsep.f mova2i.f orders.f
pdsens.f pdseup.f
putgb.f putgbe.f putgben.f putgbens.f putgbex.f putgbn.f
r63w72.f
sbyte.f sbytec.f sbytes.f sbytesc.f
skgb.f
w3ai15.f w3ai19.f w3ai24.f w3ai39.f
w3as00.f w3difdat.f w3doxdat.f
w3fa03.f w3fa09.f
w3fb05.f w3fb06.f w3fb07.f w3fb08.f w3fb09.f w3fb10.f w3fb11.f w3fb12.f
w3fc05.f w3fc06.f w3fc07.f
w3fi01.f w3fi04.f w3fi58.f w3fi59.f w3fi62.f w3fi63.f w3fi68.f w3fi69.f
w3fi71.f w3fi72.f w3fi73.f w3fi74.f w3fi75.f w3fi76.f w3fi82.f w3fi83.f
w3fp11.f
w3fs13.f w3fs15.f w3fs21.f w3fs26.f
w3ft01.f w3ft16.f w3ft17.f w3ft26.f
w3kind.f w3locdat.f w3movdat.f w3pradat.f w3reddat.f w3tagb.f w3trnarg.f
w3utcdat.f w3valdat.f
xmovex.f xstore.f
)

if(BUILD_DEPRECATED)
set(fortran_src ${fortran_src}
aea.f q9ie32.f
w3ai00.f w3ai01.f w3ai08.f w3ai18.f w3ai38.f w3ai40.f w3ai41.f
w3aq15.f w3ctzdat.f
w3fa01.f w3fa03v.f w3fa04.f w3fa06.f w3fa11.f w3fa12.f w3fa13.f
w3fb00.f w3fb01.f w3fb02.f w3fb03.f w3fb04.f
w3fc02.f w3fc08.f
w3fi02.f w3fi03.f w3fi18.f w3fi19.f w3fi20.f w3fi32.f w3fi47.f w3fi48.f
w3fi61.f w3fi64.f w3fi65.f w3fi66.f w3fi67.f w3fi70.f w3fi78.f
w3fi85.f w3fi88.f w3fi92.f
w3fm07.f w3fm08.f
w3fp04.f w3fp05.f w3fp06.f w3fp10.f w3fp12.f w3fp13.f
w3ft00.f w3ft02.f w3ft03.f w3ft05.f w3ft05v.f w3ft06.f w3ft06v.f
w3ft07.f w3ft08.f w3ft09.f w3ft10.f w3ft11.f w3ft12.f w3ft201.f
w3ft202.f w3ft203.f w3ft204.f w3ft205.f w3ft206.f w3ft207.f w3ft208.f
w3ft209.f w3ft210.f w3ft211.f w3ft212.f w3ft213.f w3ft214.f w3ft21.f
w3ft32.f w3ft33.f w3ft38.f w3ft39.f w3ft40.f w3ft41.f w3ft43v.f
w3log.f w3nogds.f w3ymdh4.f xdopen.f
)
# These functions call NCEPLIBS-bufr.
if(BUILD_WITH_BUFR)
set(fortran_src ${fortran_src} iw3unp29.f w3miscan.f w3unpk77.f)
endif()
endif()

# This is the C source code.
Expand Down
34 changes: 0 additions & 34 deletions src/args_mod.f

This file was deleted.

1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ foreach(kind ${kinds})
# create_test(test_w3fi72 ${kind})
create_test(test_w3fi73 ${kind})
create_test(test_w3fi74 ${kind})
create_test(test_aea ${kind})
create_test(test_fparsei ${kind})
create_test(test_fparser ${kind})
create_test(test_gbyte ${kind})
Expand Down
22 changes: 0 additions & 22 deletions tests/test_aea.F90

This file was deleted.

0 comments on commit 46eb630

Please sign in to comment.