-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use srun by default in CP2K #90
Conversation
While you're at it, could you add an If the for command in ('srun', 'mpirun'):
try:
ret = ...
except OSError:
break
else: # In case the previous `break` statement is never reached
ret = 'sopt' |
@BvB93 you are write :) I have clean a bit the code and allow the user to invoke her/his own call to MPI using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good.
I do feel that, at this point, it might be a good idea to update the method docstring:
"""Run CP2K.
The exact CP2K executable, and whether or not one wants to use ``srun`` or ``mpirun``, can be specified under :code:`self.settings.executable`.
Currently supported executables are:
* ``"sdbg"``: Serial single core testing and debugging
* ``"sopt"``: Serial general single core usage
* ``"ssmp"``: Parallel (only OpenMP), single node, multi core
* ``"pdbg"``: Parallel (only MPI) multi-node testing and debugging
* ``"popt"`` (default): Parallel (only MPI) general usage, no threads
* ``"psmp"``: parallel (MPI + OpenMP) general usage, threading might improve scalability and memory usage
For example:
.. code-block:: python
>>> from scm.plams import Cp2kJob
>>> job = Cp2kJob(...)
>>> job.settings.executable = "popt"
>>> job.settings.executable = "ssmp"
>>> job.settings.executable = "mpirun psmp"
"""
fix #86