From 5d51afca16a058f0069e14b96a8af7c33870e90e Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 26 Oct 2023 07:57:50 -0400 Subject: [PATCH 1/2] Fix issue with passing in build and installdirs --- CHANGELOG.md | 6 ++++++ build.csh | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa1c789..d4b2f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### Added +## [4.20.5] - 2023-10-26 + +### Fixed + +- Fix issue with passing in build and install dirs + ## [4.20.4] - 2023-10-25 ### Fixed diff --git a/build.csh b/build.csh index a1068aa..0fa30c3 100755 --- a/build.csh +++ b/build.csh @@ -85,6 +85,8 @@ if (! $?slurm_constraint) setenv slurm_constraint "" if (! $?cmake_build_type) setenv cmake_build_type "Release" if (! $?EXTRA_CMAKE_FLAGS) setenv EXTRA_CMAKE_FLAGS "" if (! $?FORTRAN_COMPILER) setenv FORTRAN_COMPILER "" +if (! $?BUILDDIR_PASSED) setenv BUILDDIR_PASSED "NO" +if (! $?INSTALLDIR_PASSED) setenv INSTALLDIR_PASSED "NO" # Detect if on compute node already # --------------------------------- @@ -150,6 +152,7 @@ while ($#argv) if ("$1" == "-builddir") then shift; if (! $#argv) goto usage setenv BUILDDIR $1 + setenv BUILDDIR_PASSED "YES" endif # set INSTALLDIR @@ -157,6 +160,7 @@ while ($#argv) if ("$1" == "-installdir") then shift; if (! $#argv) goto usage setenv INSTALLDIR $1 + setenv INSTALLDIR_PASSED "YES" endif # set GMI_MECHANISM @@ -430,12 +434,12 @@ if ($SITE == NCCS) then endif endif # We also check if we already appended SLES - if (! $?BUILDDIR) then + if (! $?BUILDDIR && "$BUILDDIR_PASSED" == "NO") then if ($Pbuild_build_directory !~ "*-SLES${OS_VERSION}") then setenv Pbuild_build_directory ${Pbuild_build_directory}-SLES${OS_VERSION} endif endif - if (! $?INSTALLDIR) then + if (! $?INSTALLDIR && "$INSTALLDIR_PASSED" == "NO") then if ($Pbuild_install_directory !~ "*-SLES${OS_VERSION}") then setenv Pbuild_install_directory ${Pbuild_install_directory}-SLES${OS_VERSION} endif @@ -502,6 +506,8 @@ if ($ddb) then echo "FORTRAN_COMPILER = $FORTRAN_COMPILER" echo "INSTALL_SOURCE_TARFILE = $INSTALL_SOURCE_TARFILE" echo "GMI_MECHANISM_FLAG = $GMI_MECHANISM_FLAG" + echo "BUILDDIR_PASSED = $BUILDDIR_PASSED" + echo "INSTALLDIR_PASSED = $INSTALLDIR_PASSED" exit endif @@ -769,7 +775,7 @@ else if ( $SITE == NCCS ) then --nodes=1 \ --ntasks=${numjobs} \ --time=$walltime \ - --export ESMADIR=${ESMADIR},cmake_build_type=${cmake_build_type},EXTRA_CMAKE_FLAGS=${EXTRA_CMAKE_FLAGS},FORTRAN_COMPILER=${FORTRAN_COMPILER},INSTALL_SOURCE_TARFILE=${INSTALL_SOURCE_TARFILE},verbose=${verbose},GMI_MECHANISM_FLAG=${GMI_MECHANISM_FLAG},Pbuild_build_directory=${Pbuild_build_directory},Pbuild_install_directory=${Pbuild_install_directory},usegnu=${usegnu},notar=${notar},tmpdir=${tmpdir},docmake=${docmake},debug=${debug},aggressive=${aggressive} \ + --export ESMADIR=${ESMADIR},cmake_build_type=${cmake_build_type},EXTRA_CMAKE_FLAGS=${EXTRA_CMAKE_FLAGS},FORTRAN_COMPILER=${FORTRAN_COMPILER},INSTALL_SOURCE_TARFILE=${INSTALL_SOURCE_TARFILE},verbose=${verbose},GMI_MECHANISM_FLAG=${GMI_MECHANISM_FLAG},Pbuild_build_directory=${Pbuild_build_directory},Pbuild_install_directory=${Pbuild_install_directory},usegnu=${usegnu},notar=${notar},tmpdir=${tmpdir},docmake=${docmake},debug=${debug},aggressive=${aggressive},BUILDDIR_PASSED=${BUILDDIR_PASSED},INSTALLDIR_PASSED=${INSTALLDIR_PASSED} \ $waitflag \ $0 unset echo @@ -869,6 +875,8 @@ if ("$queue" != "") then endif if ("$account" != "") then echo1 "account: $account" +echo1 "Pbuild_build_directory: $Pbuild_build_directory" +echo1 "Pbuild_install_directory: $Pbuild_install_directory" endif echo1 "======================================" From 6a659daf48920080df8fda220f9d1db8c1fff5de Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 26 Oct 2023 08:02:03 -0400 Subject: [PATCH 2/2] Add queue and partition to export --- build.csh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.csh b/build.csh index 0fa30c3..477fddb 100755 --- a/build.csh +++ b/build.csh @@ -775,7 +775,7 @@ else if ( $SITE == NCCS ) then --nodes=1 \ --ntasks=${numjobs} \ --time=$walltime \ - --export ESMADIR=${ESMADIR},cmake_build_type=${cmake_build_type},EXTRA_CMAKE_FLAGS=${EXTRA_CMAKE_FLAGS},FORTRAN_COMPILER=${FORTRAN_COMPILER},INSTALL_SOURCE_TARFILE=${INSTALL_SOURCE_TARFILE},verbose=${verbose},GMI_MECHANISM_FLAG=${GMI_MECHANISM_FLAG},Pbuild_build_directory=${Pbuild_build_directory},Pbuild_install_directory=${Pbuild_install_directory},usegnu=${usegnu},notar=${notar},tmpdir=${tmpdir},docmake=${docmake},debug=${debug},aggressive=${aggressive},BUILDDIR_PASSED=${BUILDDIR_PASSED},INSTALLDIR_PASSED=${INSTALLDIR_PASSED} \ + --export ESMADIR=${ESMADIR},cmake_build_type=${cmake_build_type},EXTRA_CMAKE_FLAGS=${EXTRA_CMAKE_FLAGS},FORTRAN_COMPILER=${FORTRAN_COMPILER},INSTALL_SOURCE_TARFILE=${INSTALL_SOURCE_TARFILE},verbose=${verbose},GMI_MECHANISM_FLAG=${GMI_MECHANISM_FLAG},Pbuild_build_directory=${Pbuild_build_directory},Pbuild_install_directory=${Pbuild_install_directory},usegnu=${usegnu},notar=${notar},tmpdir=${tmpdir},docmake=${docmake},debug=${debug},aggressive=${aggressive},BUILDDIR_PASSED=${BUILDDIR_PASSED},INSTALLDIR_PASSED=${INSTALLDIR_PASSED},queue=${queue},partition=${partition} \ $waitflag \ $0 unset echo @@ -873,6 +873,9 @@ endif if ("$queue" != "") then echo1 "queue: $queue" endif +if ("$partition" != "") then + echo1 "partition: $partition" +endif if ("$account" != "") then echo1 "account: $account" echo1 "Pbuild_build_directory: $Pbuild_build_directory"