Project

General

Profile

Bug #2021

mdrun -multidir should not have default

Added by Mark Abraham about 4 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
mdrun
Target version:
-
Affected version - extra info:
all of them
Affected version:
Difficulty:
simple
Close

Description

If a user accidentally tries to do gmx mdrun -multidir -s whatever then we give the message

Program gmx mdrun, VERSION 5.1.3
Source code file: ../src/gromacs/utility/futil.cpp, line: 755

Fatal error:
Cannot change directory to 'rundir'. Reason: No such file or directory
For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors

presumably because we have "rundir" as the default. A better behaviour would be to refuse to run and state that multidir must name valid directories. I'm not sure if the options module can express "a parameter is required iff the option is specified," but that might be part of the solution.

History

#1 Updated by Teemu Murtola about 4 years ago

The options module has this behavior as default, and should also support this for file name/directory options (if not directly, then with trivial changes). But to use this for -multidir, you'd first need to make mdrun use the options module directly instead of pargs/filenm (or add even more one-off hacks to that interface).

#2 Updated by Mark Abraham about 4 years ago

Teemu Murtola wrote:

The options module has this behavior as default, and should also support this for file name/directory options (if not directly, then with trivial changes). But to use this for -multidir, you'd first need to make mdrun use the options module directly instead of pargs/filenm (or add even more one-off hacks to that interface).

Good point, thanks. I'll put that on my mental "to consider doing" list after I catch up on review in master branch.

#3 Updated by Erik Lindahl almost 3 years ago

  • Status changed from New to Rejected

I'm rejecting this for now in the case of simplicity :-)

As Teemu writes, at some point we might naturally get this functionality from the options module. In the mean time, we should stop doing hacks or special solutions, because they tend to become a nightmare to maintain - we simply can't keep up with all possible combinations, so I'm against the idea of doing special code for this option.

So, for now the behaviour is that there is a default value. That is not unintentional, so I wouldn't call it a bug. A user might also end up with the wrong TPR file if they forget to use the -s option but happen to have topol.tpr in their current directory.

Also available in: Atom PDF