[CP2K:8310] Problems installing libgrid

Iain Bethune ibet... at epcc.ed.ac.uk
Thu Oct 27 08:35:13 UTC 2016


Hi Daniele,

These issues are now fixed in the latest SVN.  For machines where you are cross-compiling you need to be able to specify flags for a native build for the helper progam generate.x.  This is now done by FCFLAGS_NATIVE in config.in, and for gfortran the correct option is ‘-march=native’, for the Cray ‘ftn’ compiler script ‘-target=native’ is correct.

Re: echo -e, this is something that depends on the shell you are using.  I replaced all of them with use of the builtin printf, which should work portably irrespective of whether ‘echo’ understands -e or not.

Please give it a go and let me know if any further modifications are needed.

Cheers

- Iain

--

Iain Bethune
Project Manager, EPCC

Email: ibet... at epcc.ed.ac.uk
Twitter: @IainBethune @PrimeGrid @CP2Kproject
Web: http://www2.epcc.ed.ac.uk/~ibethune
Tel/Fax: +44 (0)131 650 5201/6555
Mob: +44 (0)7598317015
Addr: 2404 JCMB, The King's Buildings, Peter Guthrie Tait Road, Edinburgh, EH9 3FD

> On 27 Oct 2016, at 08:00, Daniele Fontanari <danielef... at gmail.com> wrote:
> 
> Hello everyone,
> 
> I'm trying to install cp2k (downloaded from git) and optimizing through the installation of libgrid tools/autoune.
> I've encountered two problems in the build process (through the script generate_makefile.sh which create the Makefile).
> The first one is that inside the Makefile (in the section generate.x) it uses the flag "-target=native" which is not recognized by my gfortran, I guessed that maybe it was meant to be "-march=native"?
> The second one is that the test are done (to my understanding) by feeding to generate.x some files generate_${l}_${iopt}.in (through generate.x < generate_${l}_${iopt}.in) and the generate_${l}_${iopt}.in itself are created by echoing inside some strings. Problem is (for me) that the command
> echo -e "something" is used and this make the string "-e something" appears inside the file instead of "something"
> 
> I understand that being generate_makefile.sh 7 month old this is probably related to some misconfiguration of my system, and I'd like to know your opinion about this, but I solved my problem by replacing "echo -e" and "echo  -e" inside Makefile with "echo" and "target=native" with "march=native" and everything seems to work fine. This should be achieved by applying the patch  attached.
> This is not really well tested, it modifies the generate_makefile.sh, you can still achieve the same using the original generate_makefile.sh and then invoking the command
> 
> "sed -i -e 's/echo -e/echo/g' -e 's/echo  -e/echo/g' -e 's/target=native/march=native/g' Makefile"
> 
> Thanks
> Daniele
> 
> -- 
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com.
> To post to this group, send email to cp... at googlegroups.com.
> Visit this group at https://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/d/optout.
> <generate_makefile.sh.patch>


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




More information about the CP2K-user mailing list