Dear Sebastian,

On 29/08/2018 10:25, Sebastian Potthoff wrote:
Dear all,

I am relatively new to EasyBuild

First things first: welcome to the wonderful world of EasyBuild! :)

and I am trying to get my head around how the EasyConfig files work in the following example:

The GROMACS molecular dynamics code can be patched with the so called PLUMED plugin. The standard GROMACS EasyConfig file for the foss-2018b tool-chain look like this:

https://github.com/easybuilders/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/g/GROMACS/GROMACS-2018.2-foss-2018b.eb

Now recently, in the development branch, a new EasyConfig for GROMACS has been added which includes the mentioned PLUMED patch:

https://github.com/easybuilders/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/g/GROMACS/GROMACS-2018.1-foss-2018b-PLUMED.eb

The only difference being here (besides being gromacs version 2018.1 instead of 2018.2) the addition of:

*    dependencies = [**
**        ('PLUMED', '2.4.2'),**
**    ]*

So my question is, how does EasyBuild know that it has to patch GROMACS using PLUMED? Is this written in the EasyConfig of PLUMED itself? Is it inside the EasyBlocks? When I do this by hand, I have to build PLUMED first, go to the source directory of GROMACS, run PLUMED in there to patch the source files and then compile GROMACS.

It's indeed handled by the GROMACS easyblock, see https://github.com/easybuilders/easybuild-easyblocks/blob/master/easybuild/easyblocks/g/gromacs.py#L130 + following lines.

The easyconfigs are meant to be free of logic, just specifying which dependencies to use and which versions (+ toolchain and maybe configure options, etc.)

As a followup, if I wanted to create an EasyConfig for GROMACS+PLUMED with GPU support enabled, would I then just have to modify the existing GROMACS EasyConfig for the fosscuda tool-chain in the same way?

Basically, yes, since the GROMACS easyblock checks whether CUDA is listed as (indirect, in the case of the fosscuda toolchain, but that doesn't matter) dependency, see https://github.com/easybuilders/easybuild-easyblocks/blob/master/easybuild/easyblocks/g/gromacs.py#L242 .


regards,

Kenneth

Reply via email to