-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container2step #300
Container2step #300
Changes from all commits
41b393d
69a490e
7e511b3
5fcc5be
c47471d
a1655ff
9dddc17
cb69264
c5a6de8
709207c
3f788ab
86d4aa3
321e368
245080c
e68f49d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,14 @@ platforms: | |
compiler: gnu | ||
mkTemplate: /__w/fre-cli/fre-cli/mkmf/templates/linux-ubuntu-xenial-gnu.mk | ||
modelRoot: ${TEST_BUILD_DIR}/fremake_canopy/test | ||
- name: con.twostep | ||
compiler: intel | ||
RUNenv: [". /spack/share/spack/setup-env.sh", "spack load libyaml", "spack load [email protected]", "spack load [email protected]"] | ||
modelRoot: /apps | ||
container: True | ||
containerBuild: "podman" | ||
containerRun: "apptainer" | ||
containerBase: "ecpe4s/noaa-intel-prototype:2023.09.25" | ||
mkTemplate: "/apps/mkmf/templates/hpcme-intel21.mk" | ||
container2step: True | ||
container2base: "ecpe4s/noaa-intel-prototype:2023.09.25" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
YAMLPATH = f"{YAMLDIR}/{YAMLFILE}" | ||
PLATFORM = [ "ci.gnu" ] | ||
CONTAINER_PLATFORM = ["hpcme.2023"] | ||
CONTAINER_PLAT2 = ["con.twostep"] | ||
TARGET = ["debug"] | ||
BADOPT = ["foo"] | ||
EXPERIMENT = "null_model_full" | ||
|
@@ -125,6 +126,31 @@ def test_run_fremake_run_script_creation_container(): | |
''' checks (internal) container run script creation from previous test ''' | ||
assert Path(f"tmp/{CONTAINER_PLATFORM[0]}/execrunscript.sh").exists() | ||
|
||
# tests container 2 stage build script/makefile/dockerfile creation | ||
def test_run_fremake_container(): | ||
'''run run-fremake with options for containerized build''' | ||
run_fremake_script.fremake_run(YAMLPATH, CONTAINER_PLAT2, TARGET, False, 1, True, False, VERBOSE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are there any return-codes to check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a copy/paste of the single stage tests. |
||
|
||
def test_run_fremake_build_script_creation_container(): | ||
''' checks container build script creation from previous test ''' | ||
assert Path("createContainer.sh").exists() | ||
|
||
def test_run_fremake_dockerfile_creation_container(): | ||
''' checks dockerfile creation from previous test ''' | ||
assert Path("Dockerfile").exists() | ||
|
||
def test_run_fremake_checkout_script_creation_container(): | ||
''' checks checkout script creation from previous test ''' | ||
assert Path(f"tmp/{CONTAINER_PLAT2[0]}/checkout.sh").exists() | ||
|
||
def test_run_fremake_makefile_creation_container(): | ||
''' checks makefile creation from previous test ''' | ||
assert Path(f"tmp/{CONTAINER_PLAT2[0]}/Makefile").exists() | ||
|
||
def test_run_fremake_run_script_creation_container(): | ||
''' checks (internal) container run script creation from previous test ''' | ||
assert Path(f"tmp/{CONTAINER_PLAT2[0]}/execrunscript.sh").exists() | ||
|
||
Comment on lines
+134
to
+153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these shouldn't be separate- lets do something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's done here is consistent with the rest of the testing done in this file. |
||
# tests for builds with multiple targets | ||
|
||
def test_run_fremake_bad_target(): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,24 +3,18 @@ platforms: | |
compiler: intel | ||
modulesInit: [" module use -a /ncrc/home2/fms/local/modulefiles \n","source $MODULESHOME/init/sh \n"] | ||
modules: [ !join [*INTEL, "/2022.2.1"],"fre/bronx-20",cray-hdf5/1.12.2.3, cray-netcdf/4.9.0.3] | ||
fc: ftn | ||
cc: cc | ||
mkTemplate: "/ncrc/home2/fms/local/opt/fre-commands/bronx-20/site/ncrc5/$(INTEL).mk" | ||
modelRoot: ${HOME}/fremake_canopy/test | ||
- name: ncrc5.intel23 | ||
compiler: intel | ||
modulesInit: [" module use -a /ncrc/home2/fms/local/modulefiles \n","source $MODULESHOME/init/sh \n"] | ||
modules: [!join [*INTEL, "/2023.1.0"],"fre/bronx-20",cray-hdf5/1.12.2.3, cray-netcdf/4.9.0.3] | ||
fc: ftn | ||
cc: cc | ||
mkTemplate: "/ncrc/home2/fms/local/opt/fre-commands/bronx-20/site/ncrc5/$(INTEL).mk" | ||
modelRoot: ${HOME}/fremake_canopy/test | ||
- name: hpcme.2023 | ||
compiler: intel | ||
RUNenv: [". /spack/share/spack/setup-env.sh", "spack load libyaml", "spack load [email protected]", "spack load [email protected]"] | ||
modelRoot: /apps | ||
fc: mpiifort | ||
cc: mpiicc | ||
container: True | ||
containerBuild: "podman" | ||
containerRun: "apptainer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this
try
/except
clause just checking to see if a dictionary's attribute is defined at all? or is it about the boolean value assigned elsewhere?if it's about being defined- how about using
p.get("key")
, then checking forNone
? or catching theKeyError
explicitly?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of both I think? With some platforms, the
container
key doesn't even need to be defined. So the try/except checks for if it's even there under a certain platform's information (and not just that it's not defined, beingNone
. If it doesn't exist, it'll set things as empty or False for the nextif
statement it goes throughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe this could be done a different way that's slightly easier to follow but my brain keeps going back and forth on logic and is confusing itself. Not sure what's the best way