From 2544b92192483a4d4dff38f888d3be48ddc00a76 Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 13:18:05 +0000 Subject: [PATCH 1/7] Update the build script to do a submodule update if necessary before building. Update build instructions in README.md. Fixes #818. --- README.md | 17 +++++++++-------- build_all.sh | 7 +++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 65661d60a..059becde5 100644 --- a/README.md +++ b/README.md @@ -59,20 +59,21 @@ It also uses the following repositories: ## Installing -On Orion, Jet, Hera and WCOSS2, invoke the build script: +On Orion, Jet, Hera and WCOSS2, set the 'fixed' directories +using the 'link_fixdirs.sh' script in ./fix. See the script's +prolog for details. + +This repository uses submodules, so do: ``` -./build_all.sh +git submodule init +git submodule update ``` -Otherwise, do: +Then, invoke the build script: ``` -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX=/path/to/install .. -make -j2 -make install +./build_all.sh ``` ## Contents diff --git a/build_all.sh b/build_all.sh index 41d380f14..a42cfe7f8 100755 --- a/build_all.sh +++ b/build_all.sh @@ -26,6 +26,13 @@ else set -x fi +# Ensure the submodules have been initialized. + +if [[ ! -d ./ccpp-physics/physics ]];then + git submodule init + git submodule update +fi + # The unit test data download is part of the build system. Not all machines can # access the EMC ftp site, so turn off the build (-DBUILD_TESTING=OFF) of the units tests accordingly. # Those with access to the EMC ftp site are: Orion and Hera. From 329ccb9d7e96082a2a3435c01bb6cf2cb278d99f Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 13:27:43 +0000 Subject: [PATCH 2/7] Clarify README file. Fixes #818. --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 059becde5..097c9111d 100644 --- a/README.md +++ b/README.md @@ -59,18 +59,19 @@ It also uses the following repositories: ## Installing -On Orion, Jet, Hera and WCOSS2, set the 'fixed' directories -using the 'link_fixdirs.sh' script in ./fix. See the script's -prolog for details. +On Orion, Jet, Hera and WCOSS2 do the following: -This repository uses submodules, so do: +1) Set the 'fixed' directories using the 'link_fixdirs.sh' +script in ./fix. See the script's prolog for details. + +2) This repository uses submodules, so do: ``` git submodule init git submodule update ``` -Then, invoke the build script: +3) Then, invoke the build script: ``` ./build_all.sh From 4694b225fcccf11e9c3acb685ec0b95936726c48 Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 15:20:43 +0000 Subject: [PATCH 3/7] Update rt.sh script to remove recursive clone which can hang. Submodules are now handled by the build script. Fixes #818. --- reg_tests/rt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reg_tests/rt.sh b/reg_tests/rt.sh index 5a2750fd0..1bf12f987 100755 --- a/reg_tests/rt.sh +++ b/reg_tests/rt.sh @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash ulimit -s unlimited @@ -16,7 +16,7 @@ cd ${WORK_DIR} rm -f reg_test_results.txt rm -rf UFS_UTILS -git clone --recursive https://github.com/ufs-community/UFS_UTILS.git +git clone https://github.com/ufs-community/UFS_UTILS.git rc=$? # Check to see if the clone was successful. Previously, it has From 7279b731dec97d369f2886917ddc62d56491a933 Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 18:58:36 +0000 Subject: [PATCH 4/7] Improve documentation per Kate's recommendation. Fixes #818. --- README.md | 8 ++++++-- fix/link_fixdirs.sh | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 097c9111d..d4518238a 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,12 @@ It also uses the following repositories: On Orion, Jet, Hera and WCOSS2 do the following: -1) Set the 'fixed' directories using the 'link_fixdirs.sh' -script in ./fix. See the script's prolog for details. +1) Set the 'fixed' directories using the `link_fixdirs.sh` +script in `./fix`. Usage: `./link_fixdirs.sh $RUN_ENVIR $machine`, +where `$RUN_ENVIR` is "emc" or "nco" (most developers +should choose "emc") and `$machine` is the platform. + +Example: `./link_fixdirs.sh emc hera` 2) This repository uses submodules, so do: diff --git a/fix/link_fixdirs.sh b/fix/link_fixdirs.sh index 3533a78d1..7fcc370c6 100755 --- a/fix/link_fixdirs.sh +++ b/fix/link_fixdirs.sh @@ -1,7 +1,15 @@ #!/bin/bash set -ex -#--Make symbolic links to 'fixed' directories. +# Set up the 'fixed' directories. +# +# This script takes two arguments: +# +# $RUN_ENVIR - Either 'emc' (creates links) or +# 'nco' (copies data). +# +# $machine - is the machine. Choices are: +# 'wcoss2', 'hera', 'jet', 'orion', 's4' RUN_ENVIR=${1} machine=${2} From 6943c3b9a2c1e117515703e75f7cf4f591c210cf Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 19:03:52 +0000 Subject: [PATCH 5/7] Minor format change to README. Fixes #818. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d4518238a..3cc5a1854 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,11 @@ On Orion, Jet, Hera and WCOSS2 do the following: 1) Set the 'fixed' directories using the `link_fixdirs.sh` script in `./fix`. Usage: `./link_fixdirs.sh $RUN_ENVIR $machine`, where `$RUN_ENVIR` is "emc" or "nco" (most developers -should choose "emc") and `$machine` is the platform. +should choose "emc") and `$machine` is the platform. Example: -Example: `./link_fixdirs.sh emc hera` +``` +./link_fixdirs.sh emc hera +``` 2) This repository uses submodules, so do: From 072f7329fb183cecc0d88bc065f37b03b3bed41b Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 19:10:19 +0000 Subject: [PATCH 6/7] Remove redundant step from README. Fixes #818. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index 3cc5a1854..9ca48f03e 100644 --- a/README.md +++ b/README.md @@ -70,14 +70,7 @@ should choose "emc") and `$machine` is the platform. Example: ./link_fixdirs.sh emc hera ``` -2) This repository uses submodules, so do: - -``` -git submodule init -git submodule update -``` - -3) Then, invoke the build script: +2) Then, invoke the build script: ``` ./build_all.sh From e09a22071adb9803de45f1316da4c34ef9ea103c Mon Sep 17 00:00:00 2001 From: "George.Gayno" Date: Wed, 26 Apr 2023 19:31:32 +0000 Subject: [PATCH 7/7] Minor format change to build script. Fixes #818. --- build_all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_all.sh b/build_all.sh index a42cfe7f8..75f830326 100755 --- a/build_all.sh +++ b/build_all.sh @@ -28,7 +28,7 @@ fi # Ensure the submodules have been initialized. -if [[ ! -d ./ccpp-physics/physics ]];then +if [[ ! -d ./ccpp-physics/physics ]]; then git submodule init git submodule update fi