-
Notifications
You must be signed in to change notification settings - Fork 24
Build script flags and set MCM version #541
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
Conversation
|
The new build command is (using the default settings):
Provisionally, the model structure implemented in PR #535 is still in place, pending resolution of issue #539. Also note that the |
|
@AlfredMayhew @bsn502 @willdrysdale @spco : any thoughts on this, before I go ahead and change all the tests? It would be useful to have a user's prospective, as I don't want to change things just for the sake of it. Is this going to make the model more usable/effective/reliable? Any other suggestion? The names of the flags and default directories can ofc be changed if confusing. |
|
Looks good to me @rs028. I don't have any strong feelings about changing the mcm flag from a directory to a version number. I have had to adjust the photolysis files before to add new J values, but I've never felt the need to have multiple |
|
No, or rather not yet. at the moment if a flag is not specificed it falls to the default value. So in the case of: |
|
Oh, OK, interesting. I do think that if the include subdirectory is going to live inside the configuration directory by default, then it would make sense for the default behaviour to be as I described, provided that's not too difficult to implement. Also, just looking back at these flag names, I'm not sure using |
|
yes, this is the feedback I am looking for. I agree that "mechanism" makes one think of the Anyways, I can merge this as a temporary step, and we figure it out in the next PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #541 +/- ##
==========================================
- Coverage 52.05% 51.73% -0.32%
==========================================
Files 17 17
Lines 2096 2101 +5
Branches 166 167 +1
==========================================
- Hits 1091 1087 -4
- Misses 933 942 +9
Partials 72 72 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I have changed it so that the flags are now For the moment PS: we can ignore codecov here, it only complains because the number of lines in the fortran files has changed. |
|
@rs028, I had a go at running this and it seems to work OK. One thing I noticed, and it might be intentional, is that the keywords are required for the arguments. You used to be able to just type something like |
It does, although it makes scripts easier to manage and less error prone. It's the price we pay to use flags. Ofc, if people do not like it, we don't have to use the flag system! BTW, it should be |
|
Ok, I just wanted to make sure you were aware! Yes, I forgot the dashes in my GitHub comment, sorry about that! I used the dashes in my actual tests |
|
Okay. From a user prospective do you think it is an overall improvement or should we hold off? |
|
I think this allows for more flexibility in how models are run, since you could have different models with the same mechanism sharing the same I do feel like the default behaviour I mentioned before when not specifying the |
Yep, that is the idea.
I agree. I am thinking of this as an intermediate step in that direction. I have to work on this in batches because of other commitments. I will open another PR to resolve these outstanding issues.
So my idea was to introduce a fourth argument to the build script so that the |
With this PR the build script (
build/build_atchem2.sh) is modified to have 4 flags instead of 3 positional arguments:--chemfile=is the fac file (mandatory argument)--configuration=is the configuration directory--mechanism=is the mechanism directory--mcm=is the version of the MCMThis does three things:
.configfiles are) and of the mechanism (where the autogenerated fortran files and the shared library are) can be specified independentlymcmargument used in the previous version of the build script is redefined to indicate the version of the MCM and it is removed from the list of possible executable flagsphotolysis-ratesis created during the build process: it is a copy of one of themcm/photolysis-rates_*files, depending on the version of the MCM specificed by the flag argumentThis PR resolves issues #297 and #416, making it easier to use older versions of the MCM if needed. It is assumed that:
mcm/directorymechanism/directory, which the user is not supposed to touch (they are rewritten anyways everytime the build script is executed)customRateFuncs) inconfiguration/.fac) can be specified independently with whatever name and in whatever location the user wants.