#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
import os.path
+# These are accessible later in the script, just like other
+# declared options, via e.g. context.opts.release.
extra_options = {
'mdrun-only': Option.simple,
'static': Option.simple,
'thread-mpi': Option.bool,
'gpu': Option.bool,
'opencl': Option.bool,
- 'openmp': Option.bool
+ 'openmp': Option.bool,
+ 'nranks': Option.string,
+ 'npme': Option.string,
+ 'gpu_id': Option.string
}
+
extra_projects = [Project.REGRESSIONTESTS]
def do_build(context):
# not explicitly set
cmd += ' -ntomp 2'
- if context.opts.gpu:
- if context.opts.mpi or use_tmpi:
- gpu_id = '01' # for (T)MPI use the two GT 640-s
- else:
- gpu_id = '0' # use GPU #0 by default
- cmd += ' -gpu_id ' + gpu_id
+ if context.opts.gpu_id:
+ cmd += ' -gpu_id ' + context.opts.gpu_id
+
+ if context.opts.nranks:
+ nranks = context.opts.nranks
+ else:
+ nranks = '2'
+
+ if context.opts.npme:
+ cmd += ' -npme ' + context.opts.npme
- # TODO: Add options to influence this (should be now local to the build
- # script).
if context.opts.mpi:
- cmd += ' -np 2'
+ cmd += ' -np ' + nranks
elif use_tmpi:
- cmd += ' -nt 2'
+ cmd += ' -nt ' + nranks
if context.opts.double:
cmd += ' -double'
if context.opts.asan: