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

How best to handle cpptraj vs. cpptraj.{MPI,OMP,cuda} #1123

Open
dacase opened this issue Dec 26, 2024 · 5 comments
Open

How best to handle cpptraj vs. cpptraj.{MPI,OMP,cuda} #1123

dacase opened this issue Dec 26, 2024 · 5 comments

Comments

@dacase
Copy link

dacase commented Dec 26, 2024

The Amber24 Reference Manual describes MPI and OMP parallelization, but is not very clear about which executables do what. For example, if I configure (using the Makefile) with the -openmp flag, the executable that is created is called cpptraj.OMP. As far as I can see, the Reference Manual doesn't indicate that one needs to call cpptraj.OMP to get this behavior. And the AmberTools installation doesn't build cpptraj.OMP by default.

One idea, based on limited info: asking for -openmp or -cuda would still create an executable called cpptraj, but that had those capabilities. (Openmp could be turned off by setting OMP_NUM_THREADS.) There is probably still a need for cpptraj.MPI, since it has to be initiated via mpirun.

@drroe
Copy link
Contributor

drroe commented Jan 2, 2025

As far as I can see, the Reference Manual doesn't indicate that one needs to call cpptraj.OMP to get this behavior.

This is definitely something that should be clarified in the manual.

One idea, based on limited info: asking for -openmp or -cuda would still create an executable called cpptraj, but that had those capabilities.

This can certainly be done. I originally used the .OMP etc suffixes to be consistent with how other programs in Amber differentiated their capabilities (e.g. pmemd for serial. pmemd.MPI for parallel, etc.).

If we did decide to just go with the "one executable to rule them all" route, I think the current CMAKE build process would need to be modified so that cpptraj isn't just constantly being written over.

@hainm
Copy link
Contributor

hainm commented Jan 2, 2025

if cpptraj is also distributed via conda, it's hard to tell if cpptraj is compiled with what, so explicit extension seems clearer to me.

@drroe
Copy link
Contributor

drroe commented Jan 2, 2025

it's hard to tell if cpptraj is compiled with what

cpptraj --defines can give you an inkling of what features cpptraj was compiled with; for example, if OpenMP support is present the -D_OPENMP flag will be present,. etc. The header at the beginning of execution also lets you know something about what executable you are running:

$ cpptraj.MPI.OMP

CPPTRAJ: Trajectory Analysis. V6.29.9 (GitHub) MPI OpenMP
    ___  ___  ___  ___
     | \/ | \/ | \/ | 
    _|_/\_|_/\_|_/\_|_

I wonder if the cpptraj distributed with conda should just be called cpptraj.conda? Maybe that's just compounding the original issue though.

@hainm
Copy link
Contributor

hainm commented Jan 2, 2025

I wonder if the cpptraj distributed with conda should just be called cpptraj.conda?

So user has to change their script to specify either cpptraj or cpptraj.conda depending on if install via ambertools or cpptraj conda :D

@hainm
Copy link
Contributor

hainm commented Jan 2, 2025

cpptraj --defines can give you an inkling of what features cpptraj was compiled with;

sounds good. I forgot about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants