Hi Kenneth,

Thanks for the info - that was quick and a fair bit of stuff to digest.  I’ll 
try the easy thing - having a modified config after finishing this email.

I want to get back directly on the single double simultaneous build.  In 
particular to start the required discussion here (I assume you know the people 
behind the gromacs stuff, perhaps it is an idea to prompt them for a comment).

My understanding is that is (was?) standard for Gromacs install.  The double 
executables get an additional “_d” to avoid name space conflict.  Actually the 
user requesting said: there is no gmx_mpi_d in your installation.  For info 
gmx_mpi is the relevant single precision gromacs call.  So the gromacs users 
who care for double sort of know that and expect it this way.

Once we are at it, the easybuild set up build everything with MPI, which 
creates a lot of queries here.  (Our?) users only expect mpi builds of the 
mdrun but expect the rest of the gromacs suite to be serial (use gmx instead of 
gmx_mpi).  But using gmx_mpi and an mpi-joblauncher is is something my users 
and I can live with, the double I really need.

As I said, I like to initiate a discussion here.  I appreciate the work others 
have put into the existing EB Gromacs support and do not want to be perceived 
as complaining.

Best wishes
  Joachim



On 27 May 2016, at 11:32, Kenneth Hoste 
<[email protected]<mailto:[email protected]>> wrote:

Hi Joachim,

On 27/05/16 11:21, Joachim Hein wrote:
Hi everyone,

I have a user request for Gromacs in double precision.  The “vanilla” gromacs 
configs do not build this, so I have to do some massaging and would need help 
with the easy block.

Based on the Gromacs documentation: 
<http://manual.gromacs.org/documentation/5.1.2/install-guide/index.html#introduction-to-building-gromacs>
 
http://manual.gromacs.org/documentation/5.1.2/install-guide/index.html#introduction-to-building-gromacs
 I need to add a string

-DGMX_DOUBLE=on

to the cmake options.  Such things (e.g. OpenMP, MPI support) seem to be 
handled in the relevant easyblock and the easyconfig.  Hacking into the 
easyconfigs I am reasonably competent by now, but it seems the easyblock is 
lacking the support for that switch.

Looking how openmp is handled in that easyblock 
(EasyBuild/2.8.0/lib/python2.7/site-packages/easybuild_easyblocks-2.8.0-py2.7.egg/easybuild/easyblocks/g/gromacs.py)
  It seems one needs to add

            # enable double support if desired
            if self.toolchain.options.get(‘double', None):
                self.cfg.update('configopts', "-DGMX_DOUBLE=ON")
            else:
                self.cfg.update('configopts', "-DGMX_DOUBLE=OFF”)


after which one could activate double support from the easyconfig

This is only going to work if 'double' is a known toolchain option, but it's 
not.

Since this is specific to GROMACS, I would define a 'double_precision' custom 
easyconfig parameter for GROMACS instead.

This is done in the easyblock via 'extra_options', see for example 
https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/w/wrf.py#L62
 (and 
https://github.com/hpcugent/easybuild/wiki/Tutorial%3A-building-WRF-after-adding-support-for-it#class-definition-class-constructor-and-defining-extra-easyconfig-options).

However, you should be able to do this straight from the easyconfig, without 
any required modifications to the easyblock for GROMACS:

    configopts = "-DGMX_DOUBLE=ON"

Be careful you don't hard overwrite possible other 'configopts' specifications 
that may be already there...


Now comes the questions (apart from whether there is anything wrong in the 
above):


  *   If I don’t want to mess with the EB supplied easy blocks, where do I put 
homegrown ones?  I tried with the include-easyblocks in the configuration file 
and copied the gromacs.py into a gromacsdbl.py in there.  From the output of 
the eb --list-easyblocks it doesn’t seem to pick this up.  How do I do my own 
local easy blocks?  Is that documented?

--include-easyblocks is the goto way to let EB pick up custom easyblocks, see 
also 
http://easybuild.readthedocs.io/en/latest/Including_additional_Python_modules.html#including-additional-easyblocks-include-easyblocks

There were some bug fixes related to this in recent EasyBuild versions; which 
version are you using?

You should not rename gromacs.py for your custom copy, EasyBuild relies on the 
name of the module (and --include-easyblcoks doesn't rename them).

Also, make sure the specify the full path, that may help: --list-easyblocks 
$PWD/gromacs.py .



  *   Is adding the above switch to the gromacs easy block something that could 
be done for an upcoming EB release?  Perhaps have the gromacs easyconfig build 
both (single and double precision).  I used to install both (touching he cmake) 
before EasyBuild.

That may be an option, yes; enhancements to existing easyblocks are always 
welcome.

Note that there's already a pending update, I hope to get to that for EasyBuild 
v2.9.0 (planned for end of June-ish).

I'm not sure if building both single & double precision by default is a good 
option (I'm not familiar enough with GROMACS to know).


regards,

Kenneth

Any comments?

Thanks
  Joachim


Reply via email to