Skip to content

Commit

Permalink
Remove the .sh exention from gen_mksurfdata_build.sh as one of the pa…
Browse files Browse the repository at this point in the history
…rts of ESCOMP#2446
  • Loading branch information
ekluzek committed Apr 11, 2024
1 parent 705d0c7 commit 9b5ef22
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cime_config/SystemTests/mksurfdataesmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def build_phase(self, sharedlib_only=False, model_only=False):
# if the test stops and gets restarted.
if sharedlib_only:
# Paths and strings
build_script_path = os.path.join(self._tool_path, "gen_mksurfdata_build.sh")
build_script_path = os.path.join(self._tool_path, "gen_mksurfdata_build")
nml_script_path = os.path.join(self._tool_path, "gen_mksurfdata_namelist")
gen_jobscript_path = os.path.join(self._tool_path, "gen_mksurfdata_jobscript_single.sh")
gen_mksurfdata_namelist = f"{nml_script_path} --res {self._res} --start-year {self._model_yr} --end-year {self._model_yr}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_derecho_mpirun(self):
self.assertEqual(self._account, args.account)
# Create the env_mach_specific.xml file needed for get_mpirun
# This will catch problems with our usage of CIME objects
# Doing this here will also catch potential issues in the gen_mksurfdata_build.sh script
# Doing this here will also catch potential issues in the gen_mksurfdata_build script
configure_path = os.path.join(path_to_cime(), "CIME", "scripts", "configure")
self.assertTrue(os.path.exists(configure_path))
options = " --macros-format CMake --silent --compiler intel --machine " + machine
Expand Down
6 changes: 3 additions & 3 deletions tools/README
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ II. Notes on building/running for each of the above tools:

mksurfdata_esmf has a cime configure and CMake based build using the following files:

gen_mksurfdata_build.sh - Build mksurfdata_esmf
gen_mksurfdata_build ---- Build mksurfdata_esmf
src/CMakeLists.txt ------ Tells CMake how to build the source code
Makefile ---------------- GNU makefile to link the program together
cmake ------------------- CMake macros for finding libraries
Expand Down Expand Up @@ -200,7 +200,7 @@ III. Process sequence to create input datasets needed to run CTSM
5.) Create surface datasets with mksurfdata_esmf on Derecho
(See mksurfdata_esmf/README.md for more help on doing this)

- gen_mksurfdata_build.sh to build
- gen_mksurfdata_build to build
- gen_mksurfdata_namelist to build the namelist
- gen_mksurfdata_jobscript_single to build a batch script to run on Derecho
- Submit the batch script just created above
Expand All @@ -213,7 +213,7 @@ III. Process sequence to create input datasets needed to run CTSM
Example: for 0.9x1.25 resolution fro 1850

cd mksurfdata_esmf
./gen_mksurfdata_build.sh
./gen_mksurfdata_build
./gen_mksurfdata_namelist --res 0.9x1.25 --start-year 1850 --end-year 1850
./gen_mksurfdata_jobscript_single --number-of-nodes 24 --tasks-per-node 12 --namelist-file target.namelist
qsub mksurfdata_jobscript_single.sh
Expand Down
2 changes: 1 addition & 1 deletion tools/mksurfdata_esmf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This will bring in CIME and ccs_config which are required for building.

``` shell
# Assuming pwd is the tools/mksurfdata_esmf directory
./gen_mksurfdata_build.sh # For machines with a cime build
./gen_mksurfdata_build # For machines with a cime build
```

Note: The pio_iotype value gets set and written to a simple .txt file
Expand Down
8 changes: 4 additions & 4 deletions tools/mksurfdata_esmf/gen_mksurfdata_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ usage() {
echo ""
echo "***********************************************************************"
echo "usage:"
echo "./gen_mksurfdata_build.sh"
echo "./gen_mksurfdata_build"
echo ""
echo "valid arguments: "
echo "[-h|--help] "
echo " Displays this help message"
echo "[-v|--verbose] "
echo " Run in verbose mode"
echo "[-b|--blddir <blddir>] "
echo " Overrides default, which is /tool_bld in the same directory as ./gen_mksurfdata_build.sh"
echo " Overrides default, which is /tool_bld in the same directory as ./gen_mksurfdata_build"
echo "[-m|--machine <machine>] "
echo " Overrides default MACH"
echo "***********************************************************************"
}


# Current working directory: the location of ./gen_mksurfdata_build.sh
# Current working directory: the location of ./gen_mksurfdata_build
cwd=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Default settings
Expand Down Expand Up @@ -102,7 +102,7 @@ cd $blddir
# Write pio_iotype to file with name pio_iotype.txt
pio_iotype_filepath=../pio_iotype.txt # one up from /tool_bld
if [ ! -f "$pio_iotype_filepath" ]; then
echo 'VALUE OF pio_iotype WRITTEN BY gen_mksurfdata_build.sh AND USED BY mksurfdata (i.e. THE FORTRAN EXECUTABLE):' > $pio_iotype_filepath
echo 'VALUE OF pio_iotype WRITTEN BY gen_mksurfdata_build AND USED BY mksurfdata (i.e. THE FORTRAN EXECUTABLE):' > $pio_iotype_filepath
echo $pio_iotype >> $pio_iotype_filepath
else
echo "Use existing $pio_iotype_filepath file"
Expand Down

0 comments on commit 9b5ef22

Please sign in to comment.