Closed banesullivan closed 1 year ago
Ideally, we should set up these examples so that they can be run from within the notebooks and set up the Docker container so that it launches Jupyter notebook or lab and the user simply opens the notebook for the given example
Having this would likely require the development of a Python helper package in Amanzi that would enable users to set input files and Amanzi/ATS run flags via a class. E.g.:
class AmanziRun():
def __init__(self, input_file, **args, **kwargs):
# Set input file
# set flags via the kwargs
...
def run(self):
# make call to Amanzi with defined flags and input file
...
# Same for ATS
class ATSRun(AmanziRun):
...
The warning is easily removed by adding "-e which mpiexec
" to the options provided on
the command line.
Ideally, we should set up these examples so that they can be run from within the notebooks and set up the Docker container so that it launches Jupyter notebook or lab and the user simply opens the notebook for the given example
Having this would likely require the development of a Python helper package in Amanzi that would enable users to set input files and Amanzi/ATS run flags via a class. E.g.:
Haha, you're finding all of the ugly warts that need updating/revisiting. We have a particularly hacky version of this that has been used by a few people. The typical use of this is to run, for instance, parameter sensitivity studies, where they want to read a "template" input file, replace a few parameter values, and then spawn a run:
https://github.com/amanzi/ats/blob/master/tools/utils/atsxml/atsxml.py
The "example" in that directory isn't even a very good one (it doesn't spawn a run). I'll push a new one in a minute. Typically atsxml gets called from MATK: https://github.com/dharp/matk). The single function in that file would accept a set of parameters, write an xml file, and spawn the run in a subdirectory. It isn't exactly what you're looking for, but is similar.
@banesullivan @jd-moulton My guess is that the 08 demos fail because Amanzi's TPLs were not configured with geochemistry? They look for a Reactive Transport PK.
What is the ATS/Amanzi/TPLs build versions/bootstrap options in metsi/ats?
My guess is that the 08 demos fail because Amanzi's TPLs were not configured with geochemistry? They look for a Reactive Transport PK.
Looks like example 8 is failing due to:
terminate called after throwing an instance of 'Errors::Message'
what(): PK Factory: PK "Flow and Reactive Transport" requested type "flow reactive transport ATS" which is not a registered PK type.
Yes, the "flow reactive transport ATS" pk gets compiled only if there are TPLs that support the reactions. That requires Amanzi and its TPLs to be built with Alquimia enabled, and likely PFLOTRAN too. This sounds like the docker image for TPLs needs to be updated to add a broader suite of TPLs?
I'm happy to merge this now if you want or wait until the docker image is updated. But if you'd like to merge it now, please add some documentation explaining that it doesn't work for reactive transport (just because otherwise someone will use it and then think the example is broken).
I'm happy to merge this now if you want or wait until the docker image is updated. But if you'd like to merge it now, please add some documentation explaining that it doesn't work for reactive transport (just because otherwise someone will use it and then think the example is broken).
Let's hold off on merging this... there's no rush at the moment and it'd be better to merge when we have a solid Docker image that will work without caveats.
I may also make a few additional Docker images for our upcoming demo that would be good to include here as well. I am thinking it would be nice to have an image that can accept an archive of files (mesh, met data, and an ATS input file) then run the simulation without user interaction, and return the results as an archive of files (LOG, visdump files, observations, etc).
I had some trouble getting these demos up and running, so here is a Dockerfile that I created which will hopefully mitigate these issues for other users.
Some Notes
ATS_SRC_DIR
environment variable upstream in themetsi/ats
imageI get the following warning on every run, should this be addressed?: