Problems installing libgrid

Daniele Fontanari danielef... at
Thu Oct 27 07:00:01 UTC 2016

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 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 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, you 
can still achieve the same using the original 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"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-diff
Size: 1958 bytes
Desc: not available
URL: <>

More information about the CP2K-user mailing list