[CP2K:8310] Problems installing libgrid

Daniele Fontanari danielef... at gmail.com
Tue Nov 1 17:52:33 UTC 2016


Hi

sorry for my late reply.

I just tried the new version through the command

git clone https://github.com/cp2k/cp2k.git

what I see is that generate_makefile.sh is not executable and there is a 
problem, apparently it generates a Makefile without the compilation 
commands, for instance:
generate.x:
         -c options.f90 
         -c generate.f90  
         options.o generate.o -o generate.x

I suspect that the error might be in the line 151 (and maybe in others) of 
generate_makefile.sh

\t$FC_native -c options.f90 \n\t$FC_native -c generate.f90  \n\t$FC_native 
options.o generate.o -o 
generate.x                                                                                                                                


maybe it is necessary to escape the special character '$' ?

Il giorno giovedì 27 ottobre 2016 10:35:15 UTC+2, IBethune ha scritto:
>
> 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: ibe... at epcc.ed.ac.uk <javascript:> 
> Twitter: @IainBethune @PrimeGrid @CP2Kproject 
> Web: http://www2.epcc.ed.ac.uk/~ibethune 
> Tel/Fax <http://www2.epcc.ed.ac.uk/~ibethuneTel/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 <danie... at gmail.com 
> <javascript:>> 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+... at googlegroups.com <javascript:>. 
> > To post to this group, send email to cp... at googlegroups.com 
> <javascript:>. 
> > 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. 
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20161101/2f2de380/attachment.htm>


More information about the CP2K-user mailing list