Skip to content

Commit

Permalink
Merge pull request #4522 from jedwards4b/remove_cprnc
Browse files Browse the repository at this point in the history
remove cprnc to new repo
  • Loading branch information
jedwards4b authored Dec 4, 2023
2 parents f5fd575 + d6a3da2 commit 1c7eda6
Show file tree
Hide file tree
Showing 56 changed files with 122 additions and 2,879 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
init_cime
fi
# Get cprnc
# git clone https://github.com/ESMCI/cprnc $INSTALL_PATH/CIME/non_py/cprnc
source /opt/conda/etc/profile.d/conda.sh
conda activate base
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "CIME/non_py/cprnc"]
path = CIME/non_py/cprnc
url = git@github.com:ESMCI/cprnc
31 changes: 28 additions & 3 deletions CIME/build_scripts/buildlib.cprnc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sys.path.append(os.path.join(_CIMEROOT, "CIME", "Tools"))

from standard_script_setup import *
from CIME import utils
from CIME.utils import run_bld_cmd_ensure_logging
from CIME.utils import run_bld_cmd_ensure_logging, CIMEError
from CIME.case import Case
from CIME.build import get_standard_cmake_args

Expand Down Expand Up @@ -63,10 +63,35 @@ def buildlib(bldroot, installpath, case):
)

cmake_args = get_standard_cmake_args(case, "ignore_sharedpath")

os.environ["CIMEROOT"] = cimeroot
cmake_cmd = ". ./.env_mach_specific.sh && NETCDF=$(dirname $(dirname $(which nf-config))) cmake {cmake_args} -DMPILIB=mpi-serial -DDEBUG=FALSE -C Macros.cmake {cimeroot}/CIME/non_py/cprnc -DCMAKE_PREFIX_PATH={dest_path} -DBLDROOT={bldroot}".format(
cimeroot=cimeroot, dest_path=installpath, cmake_args=cmake_args, bldroot=bldroot

srcroot = case.get_value("SRCROOT")

cprnc_src_root = None
candidate_paths = (
os.path.join(cimeroot, "CIME/non_py/cprnc"),
os.path.join(srcroot, "externals/cprnc"),
)

for candidate in candidate_paths:
if os.path.exists(candidate):
cprnc_src_root = candidate

break
else:
logger.debug("{!r} is not a valid cprnc source path")

if cprnc_src_root is None:
raise CIMEError("Could not find a valid cprnc source directory")

cmake_cmd = ". ./.env_mach_specific.sh && NETCDF=$(dirname $(dirname $(which nf-config))) cmake {cmake_args} -DMPILIB=mpi-serial -DDEBUG=FALSE -C Macros.cmake {cprnc_src_root} -DCMAKE_PREFIX_PATH={dest_path} -DBLDROOT={bldroot}".format(
cprnc_src_root=cprnc_src_root,
dest_path=installpath,
cmake_args=cmake_args,
bldroot=bldroot,
)

run_bld_cmd_ensure_logging(cmake_cmd, logger, from_dir=bldroot)

gmake_cmd = case.get_value("GMAKE")
Expand Down
1 change: 1 addition & 0 deletions CIME/non_py/cprnc
Submodule cprnc added at d17494
88 changes: 0 additions & 88 deletions CIME/non_py/cprnc/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions CIME/non_py/cprnc/Depends

This file was deleted.

96 changes: 0 additions & 96 deletions CIME/non_py/cprnc/Makefile

This file was deleted.

Loading

0 comments on commit 1c7eda6

Please sign in to comment.