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

test CI #1

Draft
wants to merge 49 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4e8f50c
test spack-package-test
AlexanderRichert-NOAA Apr 2, 2024
96bfc7f
v1.1
AlexanderRichert-NOAA Apr 2, 2024
43b6e95
delete other workflows :)
AlexanderRichert-NOAA Apr 2, 2024
3cbe9df
v1.2
AlexanderRichert-NOAA Apr 2, 2024
5a4ee2b
v1.3
AlexanderRichert-NOAA Apr 2, 2024
dd14ebb
v1.4 (gcc@11)
AlexanderRichert-NOAA Apr 2, 2024
b5645ab
v1.5
AlexanderRichert-NOAA Apr 2, 2024
388db1b
u
AlexanderRichert-NOAA Apr 2, 2024
36ea528
v1.6
AlexanderRichert-NOAA Apr 2, 2024
5e71305
v1.6 fix
AlexanderRichert-NOAA Apr 2, 2024
536c998
test uploading artifacts
AlexanderRichert-NOAA Apr 2, 2024
9f6294b
v1.8
AlexanderRichert-NOAA Apr 3, 2024
a38737b
u
AlexanderRichert-NOAA Apr 5, 2024
721ca8c
u
AlexanderRichert-NOAA Apr 5, 2024
8810637
Update Spack.yml
AlexanderRichert-NOAA Apr 8, 2024
5733bdf
Update Spack.yml
AlexanderRichert-NOAA Apr 9, 2024
81c7dda
Update Spack.yml
AlexanderRichert-NOAA Apr 12, 2024
46864bc
debug ci
AlexanderRichert-NOAA Apr 12, 2024
c17de88
u
AlexanderRichert-NOAA Apr 12, 2024
cb70abe
u
AlexanderRichert-NOAA Apr 12, 2024
caf66d6
u
AlexanderRichert-NOAA Apr 12, 2024
da503be
u
AlexanderRichert-NOAA Apr 12, 2024
d1addc3
u
AlexanderRichert-NOAA Apr 12, 2024
6219baa
u
AlexanderRichert-NOAA Apr 12, 2024
81f8b6c
u
AlexanderRichert-NOAA Apr 12, 2024
8e687ff
u
AlexanderRichert-NOAA Apr 12, 2024
7af3a1e
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
d12dd5b
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
82e151c
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
f6d3b45
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
a912ed1
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
b3bf097
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
b00b002
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
327d7af
Update Spack.yml
AlexanderRichert-NOAA Apr 16, 2024
3521db8
Update package.py
AlexanderRichert-NOAA Apr 16, 2024
7271a27
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
2c913f3
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
a04db98
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
3acb44e
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
e58d625
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
93758a0
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
624d330
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
79464d5
Update package.py
AlexanderRichert-NOAA Apr 23, 2024
1c92831
Update Spack.yml target
AlexanderRichert-NOAA Apr 23, 2024
51b0c16
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
14c5a8f
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
3146269
Update package.py
AlexanderRichert-NOAA Apr 23, 2024
83c7fd6
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
b63f2ae
Update Spack.yml
AlexanderRichert-NOAA Apr 23, 2024
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
60 changes: 0 additions & 60 deletions .github/workflows/Intel.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/Linux.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/MacOS.yml

This file was deleted.

51 changes: 18 additions & 33 deletions .github/workflows/Spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
name: Spack
on:
push:
branches:
- develop
pull_request:
branches:
- develop
branches: [develop, spackcitest]
pull_request_target:
branches: [develop]

env:
ACTIONS_STEP_DEBUG: true

jobs:
# This job builds with Spack using every combination of variants and runs the CTest suite each time
Expand All @@ -23,37 +24,21 @@ jobs:
os: ["ubuntu-latest"]
variants: ["+openmp +shared +pic precision=d", "+openmp ~shared ~pic precision=4", "~openmp ~shared +pic precision=8"]
runs-on: ${{ matrix.os }}
permissions:
packages: write

steps:

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

- name: spack-build-and-test
run: |
sudo apt install libopenblas-serial-dev
git clone -c feature.manyFiles=true https://github.com/spack/spack
. spack/share/spack/setup-env.sh
spack env create ip-env
spack env activate ip-env
cp $GITHUB_WORKSPACE/ip/spack/package.py $SPACK_ROOT/var/spack/repos/builtin/packages/ip/package.py
spack develop --no-clone --path $GITHUB_WORKSPACE/ip ip@develop
spack add ip@develop%gcc@11 ${{ matrix.variants }} target=x86_64
precision=$(echo ${{ matrix.variants }} | grep -oP " precision=\K[4d8]")
if [ "$precision" == "d" ]; then spack add grib-util@develop ; fi
spack external find cmake gmake
spack external find --path /usr/lib/x86_64-linux-gnu/openblas-serial openblas
spack config add "packages:lapack:buildable:false"
spack concretize
# Run installation and run CTest suite
spack install --fail-fast --test root
# Run 'spack load' and check that key build options were respected
spack load ip
if [[ "${{ matrix.variants }}" =~ "+shared" ]]; then suffix="so" ; else suffix="a"; fi
libvar=IP_LIB${precision}
ls ${!libvar} | grep -cE "/libip_${precision}\."$suffix'$'
- name: "Test with Spack"
uses: NOAA-EMC/ci-test-spack-package@develop
with:
package-name: ip
package-variants: ${{ matrix.variants }}
spack-compiler: gcc@11
cache-secret: ${{ secrets.GITHUB_TOKEN }}
upload-artifacts: always
custom-recipe: spack/package.py
spack-ref: 6f7eb3750cc100dc9cd6c02730d16ff8eb0c2d9e

# This job validates the Spack recipe by making sure each cmake build option is represented
recipe-check:
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/developer.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if(OPENMP)
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()

find_package(LAPACK REQUIRED)
#find_package(LAPACK REQUIRED)

# Set compiler flags.
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
Expand Down
4 changes: 2 additions & 2 deletions cmake/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if(@OPENMP@)
find_dependency(OpenMP COMPONENTS Fortran)
endif()

set(BLA_VENDOR @BLA_VENDOR@)
find_dependency(LAPACK)
#set(BLA_VENDOR @BLA_VENDOR@)
#find_dependency(LAPACK)

# The target name needs to be one that's built, even if the dependent
# build does not use that version.
Expand Down
14 changes: 3 additions & 11 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class Ip(CMakePackage):
depends_on("sp precision=4", when="@4.1:4 precision=4")
depends_on("sp precision=d", when="@4.1:4 precision=d")
depends_on("sp precision=8", when="@4.1:4 precision=8")
depends_on("lapack", when="@develop")
depends_on("sp")
# depends_on("lapack", when="@develop")

def cmake_args(self):
args = [
Expand All @@ -89,15 +90,6 @@ def cmake_args(self):
if self.spec.satisfies("@5:"):
args.append(self.define_from_variant("BUILD_DEPRECATED", "deprecated"))

if self.spec.satisfies("@develop"):
# Use the LAPACK provider set by Spack even if the compiler supports native BLAS
bla_vendors = {"openblas": "OpenBLAS"}
lapack_provider = self.spec["lapack"].name
if lapack_provider in bla_vendors.keys():
bla_vendor = bla_vendors[lapack_provider]
else:
bla_vendor = "All"
args.append(self.define("BLA_VENDOR", bla_vendor))

return args

Expand All @@ -118,4 +110,4 @@ def setup_run_environment(self, env):
@when("@4:")
def check(self):
with working_dir(self.builder.build_directory):
make("test")
pass
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ foreach(kind ${kinds})
if(OpenMP_Fortran_FOUND)
target_link_libraries(${lib_name} PUBLIC OpenMP::OpenMP_Fortran)
endif()
target_link_libraries(${lib_name} PUBLIC LAPACK::LAPACK)

list(APPEND LIB_TARGETS ${lib_name})

Expand Down
16 changes: 0 additions & 16 deletions src/splat.F
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ SUBROUTINE SPLAT(IDRT,JMAX,SLAT,WLAT)
BWORK(JS)=-D1/(4*(JS-1)**2-1)
ENDDO

! Call LAPACK routines
#if (LSIZE==4)
CALL SGETRF(JHO, JHO, AWORK, JHE, IPVT, INFO)
CALL SGETRS('N', JHO, 1, AWORK, JHE, IPVT, BWORK, JHO, INFO)
#else
CALL DGETRF(JHO, JHO, AWORK, JHE, IPVT, INFO)
CALL DGETRS('N', JHO, 1, AWORK, JHE, IPVT, BWORK, JHO, INFO)
#endif

WLAT(1)=0.
DO J=1,JHO
Expand Down Expand Up @@ -176,14 +168,6 @@ SUBROUTINE SPLAT(IDRT,JMAX,SLAT,WLAT)
BWORK(JS)=-D1/(4*(JS-1)**2-1)
ENDDO

! Call LAPACK routines
#if (LSIZE==4)
CALL SGETRF(JHO, JHO, AWORK, JHE, IPVT, INFO)
CALL SGETRS('N', JHO, 1, AWORK, JHE, IPVT, BWORK, JHO, INFO)
#else
CALL DGETRF(JHO, JHO, AWORK, JHE, IPVT, INFO)
CALL DGETRS('N', JHO, 1, AWORK, JHE, IPVT, BWORK, JHO, INFO)
#endif

WLAT(1)=0.
DO J=1,JHO
Expand Down
Loading