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

shared library directory #414

Open
rs028 opened this issue Feb 8, 2020 · 4 comments
Open

shared library directory #414

rs028 opened this issue Feb 8, 2020 · 4 comments
Labels
Milestone

Comments

@rs028
Copy link
Collaborator

rs028 commented Feb 8, 2020

As it is now, the build script always creates mechanism.so in model/configuration. This makes the --shared-lib flag of the executable basically useless (although it still needs to be explicitly set if --model or --configuration are not set to the default values).

This is not a big issue, but it would make sense to

  1. reintroduce the argument for the shared library in build.sh

OR

  1. remove the --shared_lib flag (the easiest way would be to just hardcode it, like for reactionRates_dir)
@spco
Copy link
Collaborator

spco commented Jan 6, 2021

Unless I am misunderstanding, this is not quite right. build/build_atchem2.sh has a second optional argument which indicates the directory to place mechanism.f90 and mechanism.so in (as well as mechanism.species etc - this is also passed as the second argument to build/mech_converter.py. This defaults to model/configuration/, but can be anywhere. So I believe the first option above is already the case. --shared_lib then follows that case of defaulting to the same location.

@rs028
Copy link
Collaborator Author

rs028 commented Jan 6, 2021

Sorry, that was poorly phrased. What I meant is that there is no difference between the location of the shared library and that of the other mechanism.* files. The script takes 3 arguments. The second argument is the same for both the build/mech_converter.py and make sharedlib commands.

So, this is fine:

./atchem2 --configuration=project/config --shared_lib=project/config

but, this won't work:

./atchem2 --configuration=project/config --shared_lib=project/mech

Now the question is whether it makes sense to allow the shared library to be separated by the mechanism.* files or not. In the former case we might as well remove the --shared_lib switch from the executable, in the latter we need to add a separate argument in build.sh for the make sharedlib command.

PS: if we are reworking the build.sh script we might consider #416 as well.

@rs028 rs028 moved this to Model Interface and Output in Roadmap Sep 22, 2022
@rs028 rs028 added this to Roadmap Sep 22, 2022
@rs028 rs028 moved this from Model Interface and Output to Compilation and Execution Issues in Roadmap Oct 6, 2022
@rs028 rs028 modified the milestones: version 1.3, version 1.5 Mar 30, 2023
@mixtli-c
Copy link

mixtli-c commented Dec 6, 2023

FWIW, it can cause some confusion when building AtChem for different projects following Figure 4.1 in the manual. If the shared_lib flag is not set, it throws a fortran error that is hard to parse by an inexperienced user (e.g. me)

@rs028
Copy link
Collaborator Author

rs028 commented Dec 7, 2023

Hi @mixtli-c thanks for your feedback. I agree that both the use of the executable flags and the instruction in the manual could be better. Any suggestion on how to be improve this is welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Compilation and Execution Issues
Development

No branches or pull requests

3 participants