siesta as subroutine: fix issue of world_comm and reading the cmd_args
Details
Fixing the issues #408 (closed) and #409 (closed) related to siesta-as-subroutine:
- Introduce an optional logical argument
skip_cmdargsinto subroutinessiesta_initand subroutinereinit. Whenskip_cmdargs=.true., it avoids reading any command line arguments. When Siesta is launched as subroutine (throughsiesta_launch), all info is passed through the filename argument (sname); there are no command line arguments to be read, thus the flagskip_cmdargs=.true.is passed to avoid reading the command line. When the argumentskip_cmdargsis not present insiesta_init, the default behaviour is preserved, which is to read the command line. - Improve the code for the case when an
mpi commis passed tosiesta_launch. - Refine examples of this MPI-based API
Why is it needed
- Ability to call siesta as subroutine, with mpi comm that can be smaller than comm_world.
- Prevent Siesta from looking at command-line arguments when running in subroutine mode.
Authors
Miha Gunde and Alberto Garcia
Fixes #408 (closed) Fixes #409 (closed)
Edited by Alberto Garcia