diff --git a/recipes/rte-rrtmgp/bld.bat b/recipes/rte-rrtmgp/bld.bat index 14400009eec5b..de5f849914bc8 100644 --- a/recipes/rte-rrtmgp/bld.bat +++ b/recipes/rte-rrtmgp/bld.bat @@ -3,19 +3,16 @@ setlocal ENABLEEXTENSIONS set BUILD_DIR=build - -set BUILD_TYPE=Debug -set RRTMGP_DATA_VERSION=v1.8.2 -set FP_MODEL=DP -set RTE_CBOOL=ON -set ENABLE_TESTS=ON -set RTE_KERNELS=default -set FAILURE_THRESHOLD=7.e-4 - -set FCFLAGS="-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -fbacktrace" +set BUILD_TYPE=Release set "HOST=x86_64-w64-mingw32" set "FC=%HOST%-gfortran.exe" +set FCFLAGS="-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -fbacktrace" + +set BUILD_TESTING=ON +set RTE_ENABLE_SP=OFF +set KERNEL_MODE=default +set FAILURE_THRESHOLD='7.e-4' :: Ensure the directories exist if not exist %BUILD_DIR% mkdir %BUILD_DIR% @@ -26,15 +23,13 @@ if not exist %PREFIX%/include mkdir %PREFIX%/include :: It sets default paths and platform-independent CMake arguments. cmake -S . -B %BUILD_DIR% ^ %CMAKE_ARGS% ^ - -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^ -DCMAKE_Fortran_COMPILER=%FC% ^ -DCMAKE_Fortran_FLAGS=%FCFLAGS% ^ - -DRRTMGP_DATA_VERSION=%RRTMGP_DATA_VERSION% ^ - -DPRECISION=%FP_MODEL% ^ - -DUSE_C_BOOL=%RTE_CBOOL% ^ - -DKERNEL_MODE=%RTE_KERNELS% ^ - -DENABLE_TESTS=%ENABLE_TESTS% ^ + -DRTE_ENABLE_SP=%RTE_ENABLE_SP% ^ + -DKERNEL_MODE=%KERNEL_MODE% ^ + -DBUILD_TESTING=%BUILD_TESTING% ^ -DFAILURE_THRESHOLD=%FAILURE_THRESHOLD% ^ + -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^ -G Ninja :: Compile diff --git a/recipes/rte-rrtmgp/build.sh b/recipes/rte-rrtmgp/build.sh index ab40eda1bf5d3..6766f1b41bae7 100644 --- a/recipes/rte-rrtmgp/build.sh +++ b/recipes/rte-rrtmgp/build.sh @@ -3,16 +3,14 @@ set -e BUILD_DIR=build +BUILD_TYPE=Release -BUILD_TYPE=Debug -RRTMGP_DATA_VERSION=v1.8.2 -FP_MODEL=DP -RTE_CBOOL=ON -ENABLE_TESTS=ON -RTE_KERNELS=default -FAILURE_THRESHOLD=7.e-4 +FFLAGS='-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan' -FCFLAGS="-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -fbacktrace" +BUILD_TESTING=ON +RTE_ENABLE_SP=OFF +KERNEL_MODE=default +FAILURE_THRESHOLD='7.e-4' # Ensure the directories exist mkdir -p "${BUILD_DIR}" @@ -21,24 +19,22 @@ mkdir -p $PREFIX/include # Note: $CMAKE_ARGS is automatically provided by conda-forge. # It sets default paths and platform-independent CMake arguments. -cmake -S . -B "${BUILD_DIR}" \ +cmake -S . -B ${BUILD_DIR} \ ${CMAKE_ARGS} \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DCMAKE_Fortran_COMPILER=${FC} \ - -DCMAKE_Fortran_FLAGS="${FCFLAGS}" \ - -DRRTMGP_DATA_VERSION=${RRTMGP_DATA_VERSION} \ - -DPRECISION=${FP_MODEL} \ - -DUSE_C_BOOL=${RTE_CBOOL} \ - -DKERNEL_MODE=${RTE_KERNELS} \ - -DENABLE_TESTS=${ENABLE_TESTS} \ - -DFAILURE_THRESHOLD=${FAILURE_THRESHOLD} \ + -DCMAKE_Fortran_COMPILER=$FC \ + -DCMAKE_Fortran_FLAGS="$FFLAGS" \ + -DRTE_ENABLE_SP=$RTE_ENABLE_SP \ + -DKERNEL_MODE=$KERNEL_MODE \ + -DBUILD_TESTING=$BUILD_TESTING \ + -DFAILURE_THRESHOLD=$FAILURE_THRESHOLD \ + -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -G Ninja # Compile -cmake --build "${BUILD_DIR}" --parallel +cmake --build ${BUILD_DIR} --parallel # Install the necessery files into the package -cmake --install "${BUILD_DIR}" --prefix "${PREFIX}" +cmake --install ${BUILD_DIR} --prefix "${PREFIX}" # Run tests -ctest --output-on-failure --test-dir "${BUILD_DIR}" -V +ctest --output-on-failure --test-dir ${BUILD_DIR} -V diff --git a/recipes/rte-rrtmgp/meta.yaml b/recipes/rte-rrtmgp/meta.yaml index bfc1fdb236ded..d006782af3748 100644 --- a/recipes/rte-rrtmgp/meta.yaml +++ b/recipes/rte-rrtmgp/meta.yaml @@ -7,8 +7,8 @@ package: source: # TODO: Set `makepath-cmake` to {{ version }} when we have real version - url: https://github.com/makepath-alex/rte-rrtmgp/archive/refs/heads/conda-rec.zip - sha256: efc20fa0310ff337bf862414dd706a558186d236059b98ae2eac82f522a4efb6 + url: https://github.com/makepath-alex/rte-rrtmgp/archive/refs/heads/conda-recipe-dev.zip + sha256: 2d45e38b17dc676546066f6885a1af0f8c7f9bfe075673ddcae1e70dce7cc4bc build: number: 0 @@ -53,9 +53,7 @@ test: - test -f $PREFIX/include/rte_kernels.h - test -f $PREFIX/include/rte_types.h - test -f $PREFIX/lib/librrtmgp.a - - test -f $PREFIX/lib/librrtmgpkernels.a - test -f $PREFIX/lib/librte.a - - test -f $PREFIX/lib/librtekernels.a outputs: - name: rte_rrtmgp @@ -65,9 +63,7 @@ outputs: - include/rte_kernels.h - include/rte_types.h - lib/librrtmgp.a - - lib/librrtmgpkernels.a - lib/librte.a - - lib/librtekernels.a about: home: https://github.com/earth-system-radiation/rte-rrtmgp