Hi Andy,

On 01/06/16 11:29, Andy Turner wrote:
Hi Kenneth,

On 31/05/2016 17:58, Kenneth Hoste wrote:
Hi Andy,

On 31/05/16 18:18, Andy Turner wrote:
Kenneth, Jens,

On 31/05/2016 16:52, Jens Timmerman wrote:
Hi Andy,

On 05/31/2016 05:38 PM, Andy Turner wrote:


This could be achieved by putting it online, and this is what we
already do:

http://www.archer.ac.uk/documentation/software/vasp/compiling_5-4-1-phase2.php


However, if I can encode it in the VASP easyconfig/block then other
Cray sites will be able to build optimised VASP (using easybuild)
without having to download additional files from somewhere.


you can add http://www.archer.ac.uk/documentation/software/vasp/ to
your sources_urls and add makefile.include.crayxc_intel to your list
of sources,
then easybuild will download it (if there is internet access) during
the build. So all you need to do is send people your easyconfig (or
create a pull request for your special version of the easyconfig to
have it included in EasyBuild by default)

see
http://easybuild.readthedocs.io/en/latest/Writing_easyconfig_files.html#source-files-and-patches


Sorry if I am not getting my intentions across properly!

Cheers
Andy


Regards,
Jens Timmerman


Thanks for all the help. One final question: I can get the tool to
pull the custom file from the ARCHER website but then it tries to
unpack it and fails as it is not an archive file:

== 2016-05-31 17:15:13,908 easyblock.py:1498 INFO Unpacking source
makefile.include.crayxc_intel
== 2016-05-31 17:15:13,966 build_log.py:152 ERROR Unknown file type
for file makefile.include.crayxc_intel (at
easybuild/software/EasyBuild/2.8.0/lib64/python2.6/site-packages/easybuild_fram

ework-2.8.0-py2.6.egg/easybuild/tools/filetools.py:587 in extract_cmd)

How do I configure the tool to not try to unpack this file?
Two options:

* by specifying a custom unpack command (some kind of no-op like 'echo'
for example), but I guess this is kind of a hack

    sources = [('makefile.include.crayxc_intel', "echo %s")]

* by listing it as a patch file as I suggested before; EasyBuild will
try to download patch files too via the source_urls listed if it can't
find them...

    patches = [('makefile.include.crayxc_intel', 'makefile.include')]


K.


I did try the patch solution but go a different error:

---
== 2016-06-01 10:27:09,654 build_log.py:227 INFO patching...
== 2016-06-01 10:27:09,654 easyblock.py:2130 INFO Starting patch step
== 2016-06-01 10:27:09,660 easyblock.py:2133 INFO Running method patch_step part of step patch == 2016-06-01 10:27:09,660 easyblock.py:1510 INFO Applying patch makefile.include.crayxc_intel == 2016-06-01 10:27:09,769 build_log.py:152 ERROR Can't patch directory /home1/z01/z01/aturner/.local/easybuild/build/VASP/5.4.1/CrayIntel-2015.11/vasp.5.4.1/makefile.include: no such directory (at easybuild/software/EasyBuild/2.8.0/lib64/python2 .6/site-packages/easybuild_framework-2.8.0-py2.6.egg/easybuild/tools/filetools.py:676 in apply_patch) == 2016-06-01 10:27:09,769 easyblock.py:2362 WARNING build failed (first 300 chars): Can't patch directory /home1/z01/z01/aturner/.local/easybuild/build/VASP/5.4.1/CrayIntel-2015.11/vasp.5.4.1/makefile.include: no such directory

OK, sorry, I have to admit I didn't actually try my suggestion myself...

The problem is that the target you're specifying must be an existing directory currently, i.e. the file being copied can't be renamed on copy. I need to think about whether we can alleviate that limitation (cfr. https://github.com/hpcugent/easybuild-framework/issues/1790).

You can get around this with:

    patches = [('makefile.include.crayxc_intel', 'makefile.include')]

    prebuildopts = "cp makefile.include.crayxc_intel makefile.include && "


Note that you will need to clean up the 'prebuildopts' lines related to 'makefile.include' that we have in the current easyconfig file for VASP anyway, to avoid copying 'a rch/makefile.include.linux_intel' and patching 'makefile.include' with 'sed'...


regards,

Kenneth

Reply via email to