Skip to content

Commit

Permalink
Improve repository build script (#819)
Browse files Browse the repository at this point in the history
Update the build_all.sh script to do a "submodule update" if
necessary before building.

Update build instructions in README.md.

Update the rt.sh script to remove the recursive clone as submodules
are now handled by the build script.

Fixes #818.
  • Loading branch information
GeorgeGayno-NOAA authored May 1, 2023
1 parent b04c1a9 commit b4900c4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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. Example:

```
./build_all.sh
./link_fixdirs.sh emc hera
```

Otherwise, do:
2) Then, invoke the build script:

```
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/install ..
make -j2
make install
./build_all.sh
```

## Contents
Expand Down
7 changes: 7 additions & 0 deletions build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 9 additions & 1 deletion fix/link_fixdirs.sh
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
4 changes: 2 additions & 2 deletions reg_tests/rt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -l
#!/bin/bash

ulimit -s unlimited

Expand All @@ -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
Expand Down

0 comments on commit b4900c4

Please sign in to comment.