-
Notifications
You must be signed in to change notification settings - Fork 23
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
CI system runs examples with CTest if tests are defined in examples CMakeList.txt. #57
Conversation
@manavbhatia I could use some advice on what solver options to setup for our examples with different physics. Note since the workers only have 2 processors and we are limited to 50 minute job times, we might not want to run the ones that take longer to run. In this first cut of an implementation, all that is required to have examples run on Travis-CI is to add One issue I'm seeing now is that my Linux Travis-CI worker is pretty fragile it seems due to older versions of PETSc/SLEPc (3.6) compared to the macOS worker (3.12). Serial runs seem to work fine, but on parallel runs the Linux worker with 3.6 has various problems:
Same jobs go through just fine on macOS worker with 3.12. Depending on what solvers we want to check things with, I may end up needing to upgrade the Linux ones. Anyways, I'll take whatever suggestions you have for settings for each example/physics. I figure these serve as good documentation as well. |
Are you looking to run examples from fluid/thermal/structural? Out of the three the structural examples require the most aggressive solver options and I recommend using Since we are limited to 2 cpus and 50 minutes, I am not sure if have the bandwidth to run all cases.
cool! Seems straightforward.
What do we do about this then? Do we make the code backwards compatible or upgrade to more recent versions?
I would not recommend this preconditioner for structural problems. Instead, just stick to mumps.
|
- Example 2 & 4 currently tagged as "SHORT". - Example 3 takes too long to run on CI currently. - Example 3 currently failing.
b8fdca5
to
2e233eb
Compare
I'm finally getting back around to this to close improvement in the CI out.
On Travis-CI I would like to make sure that at least ALL of the examples we create will build and execute. For the ones that are really fast, let them run to completion and eventually maybe check against some reference output. The examples that take a long time, I think maybe we can come up with a strategy to start them, and then kill the execution after they run for a little bit. We could then take the full runs of the long examples offline, or onto a different system (there is something like this being slowly put together on our end for MAST and other tools).
John and I figured out to do labels on CTests. So I've went through and tagged the examples I have implemented so far that can run to completion on Travis-CI as
I figured this issue out. PETSc 3.6 doesn't automatically pick something external like mumps if you request a direct solver in an MPI run. Also, at PETSc 3.9, they changed from
I have everything structural running with direct solver on the structural side now. |
@manavbhatia Are there some options I need to set for structural example 2? It looks to be failing after computing a residual of 0.0 in the first evaluation, which would imply to me that it's not getting any load. I was wondering if that was something that needed specified via command line in this example? You can see this by scrolling through the debug build (first one) in: https://travis-ci.com/MASTmultiphysics/mast-multiphysics/jobs/287647766#L859 Note there may be another error where the MPI run is hanging on the same example on the release build (second build) at the end, not sure if these are related. |
- Also added 1 minute timeout on example runs in CI.
The basic functionality that I was trying to accomplish in this PR is completed. The Travis-CI system will now pickup and automatically execute all example programs that are defined with CMake/CTest I'm going to go ahead and merge this PR into |
Some of the examples may not run with the default options. I have been running them at my end with a specific set of options. Certainly, it will be possible to modify the default options so that the examples can run without issues. I will take a look at these. I think a version each example can be run. For example, the continuation solver can be run with a relatively benign nonlinear case and we can compare results with a gold-standard file. It will be good to make sure that the test cover all the relevant functionality in the library. |
Previously, the Travis-CI system only checked that all of the separate example executables successfully compile, but did not execute them. Here we implement a solution that lets the Travis-CI system automatically test the execution of the examples if appropriate CTest "tests" are defined for them and they are identified to be quick executing.
We use CTest to handle the execution of examples on Travis-CI. As a result, running an example requires
add_test()
statements for its CMake target. In addition, since many of the examples have long runtime and we currently only want to test execution of fast ones on Travis-CI, we need to apply a"SHORT"
label to the test target. The following code shows what to add to an example'sCMakeLists.txt
to enable both a serial and parallel MPI execution on Travis-CI. Currently, structural examples 1, 4, and 7 provide good references for "short" examples. Structural example 3 defines tests that are NOT labeled as"SHORT"
. They can be executed by CTest locally, but will not run on Travis-CI since it this example currently has longer runtime.Note that Travis CI workers only have 2 processors so we should only use -np 2 when running there and I have currently hard-coded this in.
Future enhancements in new pull requests will:
"SHORT"
labeled examples against known verification data.