Skip to content
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

Jenkins physics tests #21

Merged
merged 24 commits into from
Nov 19, 2021
Merged

Jenkins physics tests #21

merged 24 commits into from
Nov 19, 2021

Conversation

elynnwu
Copy link
Collaborator

@elynnwu elynnwu commented Nov 17, 2021

  • On PR, Jenkins run a separate physics savepoint test
  • Add physics dependencies on fv3core for now since shared stencils and utils are still in fv3core
    This is a temporary change, physics should not depend on fv3core
  • Update physics API call per changes in fv3core

@elynnwu
Copy link
Collaborator Author

elynnwu commented Nov 17, 2021

launch jenkins

@elynnwu
Copy link
Collaborator Author

elynnwu commented Nov 17, 2021

launch jenkins

@elynnwu
Copy link
Collaborator Author

elynnwu commented Nov 18, 2021

launch jenkins

fi
# If the backend is a GTC backend we fetch the caches
if [[ $backend != *numpy* ]];then
. ${jenkins_dir}/actions/fetch_caches.sh $backend $experiment
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not currently have a cache plan for physics, but the jenkins test only run numpy backend. Will include this when we set up the caching plan.

Copy link
Collaborator

@mcgibbon mcgibbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging this review I forgot to submit yesterday, it looks like you've mostly fixed the issues raised so I'll re-review now.

docker/Makefile Outdated
cd ${GT4PY_DIR} && git checkout ${GT4PY_VERSION};\
fi

## build production container image
fv3gfs_image: get_gt4py
if [ $(PULL) == True ]; then \
if [ $(PULL) = True ]; then \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change correct? I'm not that familiar with bash, but google is saying to use == to check equality.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was super weird. It should be ==, and it works on my machine locally. It is also how fv3core has it, and it works on jenkins. However, I'm getting this on jenkins gce: [/bin/sh: 1: : True: unexpected operator. But somehow = worked fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is it is because PULL is unset on gce. You can fix this by setting the default to PULL ?= False instead of removing the definition of PULL above altogether.

@@ -2,7 +2,7 @@
Python implementation of FV3 GFS physics built using the GT4Py domain-specific language in Python.

## Description
fv3gfs-physics is still under development, more descriptions will be added.
fv3gfs-physics is under active development. Currently, pace level docker environment should be used for development.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you remember to update this when it is no logner the case.

Makefile Outdated
@@ -4,13 +4,39 @@ DOCKER_BUILDKIT=1
SHELL=/bin/bash
CWD=$(shell pwd)
PULL ?=True
DEV ?=n
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep this logic contained in the physics directory. We'll need to be able to develop and test it as a self-contained directory in the long term (not in this PR), and this is a lot of its low level logic to be putting at the top level for now.

@@ -0,0 +1,9 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this lint action block any tests? If not, we can remove it and rely on CircleCI for linting, since it gets answers in about 10 seconds. I had thought lint checks occur as part of other actions before the tests are run.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script runs before installing virtual env on daint, so it will block any test runs.

CONTAINER_CMD="srun" make tests physics_savepoint_tests
else
export TEST_ARGS="${TEST_ARGS} --junitxml=/.jenkins/${XML_REPORT}"
VOLUMES="-v ${pwd}/.jenkins:/.jenkins" make tests physics_savepoint_tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This volume shouldn't need to be mounted to run these make targets, should it? The physics Makefile shouldn't be accessing ../.jenkins (and doesn't appear to be), and the tests inside the container shouldn't be reading .jenkins either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I'm guessing it was mounted to grab xml report from gce, but it does not actually work. In the current plan, the xml report is always from daint. Removing this.

.jenkins/install_virtualenv.sh Outdated Show resolved Hide resolved
-->
<!-- Pages: 1 -->
<svg width="287pt" height="260pt"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting how you can actually read svgs (sort of).

@@ -0,0 +1,72 @@
include ../docker/Makefile.image_names

DOCKER_BUILDKIT=1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not about this PR, but I'm hoping I can refactor the tests so that this logic (duplicated in each subproject with savepoint tests) can be greatly reduced.

@elynnwu elynnwu enabled auto-merge (squash) November 19, 2021 21:49
@elynnwu
Copy link
Collaborator Author

elynnwu commented Nov 19, 2021

launch jenkins

@elynnwu
Copy link
Collaborator Author

elynnwu commented Nov 19, 2021

launch jenkins

Copy link
Collaborator

@mcgibbon mcgibbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One name to fix but then it should be good to merge! Thanks!

@@ -185,7 +185,7 @@ if [ ${python_env} == "virtualenv" ]; then
if grep -q "parallel" <<< "${script}"; then
export MPIRUN_CALL="srun"
fi
export pace_PATH="${envloc}/../"
export pace_PATH="${envloc}/../fv3gfs-physics/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer the path of PACE, can you either revert the path and append fv3gfs-physics later or rename the variable?

Also, if PATH is allcaps then PACE should be allcaps in this name, as much as I don't like allcaps PACE...

@@ -1,3 +1,4 @@
SHELL := /bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad this worked!

@elynnwu elynnwu merged commit ba5380b into main Nov 19, 2021
@elynnwu elynnwu deleted the jenkins-physics-tests branch November 19, 2021 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants