ai2cm / fv3config

Manipulate FV3GFS run directories
Apache License 2.0
1 stars 0 forks source link

Options passed to mpirun are hardcoded #109

Closed ofuhrer closed 4 years ago

ofuhrer commented 4 years ago

We use different MPI libraries which use different default options passed to the mpirun command. While OpenMP (default) requires --allow-run-as-root --use-hwthread-cpus --mca btl_vader_single_copy_mechanism none" MPICH actually does not require any arguments and does not understand the aforementioned arguments. These are currently hardcoded infv3config._native.pyand it would be nice to be able to override them from thefv3config.run_XXX()` command.

nbren12 commented 4 years ago

For this reason and others, @mcgibbon and I pretty much think fv3config.run_... should be deprecated

Overall the problem with the run_ stack is that we are trying to wrap underlying APIs (docker, k8s, shell) that are already parsimonious. If we break the assumptions of the wrapping API and add too many options, ultimately you end up with a system that can execute arbitrary linux commands---at which point the code is basically a crappy front-end to the linux shell/k8s API/docker run.

ofuhrer commented 4 years ago

Sounds good. I was basically just following the example in fv3gfs-wrapper/examples and tried to get it running with our current base images. I think the example in fv3gfs-fortran/examples is already using the strategy you are outlining, so I guess it's mostly a question of updating the example and documentation.

nbren12 commented 4 years ago

Yah, I think it's an easy change, but run_native is used pretty widely across the test suite. So it will take some effort. Maybe when we shut down free access to the fv3config data cache we can address this on the fv3net side.

ofuhrer commented 4 years ago

Closing this issue.