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

pw2wannier90 fails if too many tasks #196

Open
nscolonna opened this issue Feb 22, 2023 · 3 comments
Open

pw2wannier90 fails if too many tasks #196

nscolonna opened this issue Feb 22, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@nscolonna
Copy link
Collaborator

In the periodic workflow we combine primitive cell (pwscf pw2wannier90 wannier90) and Super cell (kcp.x) calculations that might require very different parallelization strategies. Asking for the adequate number of tasks for the SC calculations might end up with a failure of pw2wannier because in the PC there are not enough plane-wave to parallelize over.
It would be great to have the possibility to setup different parallelization strategies in the two cases.
Maybe I'm too naive but shouldn't the definition of two distinct PARA_PREFIX enviromental variables easily fix this issue?
E.g. Suppose I ask for 100 tasks (that I know are needed for the SC calculations but makes pw2wannier fail) and I define PARA_PREFIX_PC="srun -n 10" and PARA_PREFIX_SC="srun".

@nscolonna nscolonna added the enhancement New feature or request label Feb 22, 2023
@elinscott
Copy link
Collaborator

Good spotting. I don't think we want to add more environmental variables unless it's absolutely necessary.

What about the following solution: koopmans checks the number of plane waves, compares against $PARA_PREFIX (and $SLURM_NTASKS if PARA_PREFIX="srun"), and then temporarily alters $PARA_PREFIX` if required.

Is this sufficiently flexible? Or might a user want to do more than simply decrease the number of tasks when going from PC to SC?

@nscolonna
Copy link
Collaborator Author

nscolonna commented Feb 22, 2023

Thanks Edward! I think what you suggested is perfect. Reducing the number of tasks is the only option for pw2wannier (it is not parallelized over k-points). For pw.x one can imagine to keep the same number of tasks and parallelize over k-points. But as far as I understood this is what pw.x automatically does (otherwise also pw.x should fail as pw2wannier). In any case we typically deal with small meshes so not a big deal :)
Does Koopmans already computes the number of PW or this is something we have to implement in python?

@nscolonna
Copy link
Collaborator Author

Possible alternative solution: exploit other parallelisation schemes e.g. pencil decomposition (-pd .true.) for pw2wannier90.x.

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

No branches or pull requests

3 participants