Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

preinstallcmds for easyconfigs #4694

Open
moravveji opened this issue Oct 31, 2024 · 2 comments
Open

preinstallcmds for easyconfigs #4694

moravveji opened this issue Oct 31, 2024 · 2 comments
Milestone

Comments

@moravveji
Copy link

Recently, a user asked me a custom LAMMPS installation. In this specific case, first the pair_allegro patch has to be applied to override the CMakeLists.txt, before LAMMPS is built. I eventually misused preconfigopts for the purpose:

preconfigopts = ' && '.join([
    'cd %(builddir)s',
    'git clone https://github.com/mir-group/pair_allegro',
    'cd pair_allegro',
    'export PYTORCH_JIT_USE_NNC_NOT_NVFUSER=1',
    './patch_lammps.sh %(start_dir)s',
    'cd %(builddir)s/easybuild_obj',
     'rm -f CMakeCache.txt',
    '',
])

The official description of preconfigopts is: "Extra options pre-passed to configure".

To alleviate that, I wonder if a new easyconfig attribute could be added to serve such purposes as mentioned above. If I imagine it, it can be called preinstallcmds (or anything else that suits). I would also couple nicely with postinstallcmds which is widely used.

Can you guys consider this for one of the next releases?

@ocaisa
Copy link
Member

ocaisa commented Oct 31, 2024

This would not be a preinstallcmds as the install step happens after the configure step.

The way you implemented this is not reproducible, you should really check out a specific commit of pair_allegro.

Is there a reason you did not just create a patch file for LAMMPS using patch_lammps.sh? That should have the same affect as your preconfigopts (apart from exporting the environment variable)?

@ocaisa
Copy link
Member

ocaisa commented Oct 31, 2024

I'd suspect you also want the PYTORCH_JIT_USE_NNC_NOT_NVFUSER in the final module file as well if it really is intended for JIT compilation.

@boegel boegel added this to the 4.x milestone Nov 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants