[CP2K:361] Re: forpar failure on newer linux machines with latest cvs

Teodoro Laino teodor... at gmail.com
Tue Oct 23 23:39:59 UTC 2007


Thanks Axel!

it's in CVS now ;-)
Teo
On 24 Oct 2007, at 00:33, Axel wrote:

>
> hi all,
>
> ok. i think i found a workaround. the problem is the
> length of the array and forpar needing a larger temporary
> storage. if i change tools/forpar.h as indicated below, it
> works for me again.
>
> Index: tools/forpar.h
> ===================================================================
> RCS file: /cvsroot/cp2k/cp2k/tools/forpar.h,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 forpar.h
> --- tools/forpar.h      26 Jun 2001 16:46:46 -0000      1.1.1.1
> +++ tools/forpar.h      23 Oct 2007 22:31:55 -0000
> @@ -24,8 +24,8 @@
>  int indent=0, dind=2, nargbuf=-1, nfunname=-1;
>  slist *pub_l=NULL, *pri_l=NULL, *pl;
>  slist *use_l=NULL;
> -char stack[16 KB], *sp=stack, *spmax=stack;
> -char heap[64 KB], *hp=heap, *hpmax=heap;
> +char stack[32 KB], *sp=stack, *spmax=stack;
> +char heap[128 KB], *hp=heap, *hpmax=heap;
>  char line[4 KB], inpline[16 KB], argbuf[3][4 KB], *args;
>  char modname[64], typename[64], intername[64]; /*module, type,
> interface name*/
>  char proname[64], buffunname[3][64], *funname; /* program, funct-
> subroutine */
>
>
> On Oct 23, 6:13 pm, Teodoro Laino <teodor... at gmail.com> wrote:
>> Ciao Axel,
>>
>> can you try defining:
>>
>> 2*maxfac+1
>>
>> as a new parameter (exactly as maxfac)... let us know if it works (in
>> case we can fix it in the CVS)..
>>
>> te
>>
>> On 23 Oct 2007, at 19:06, Axel wrote:
>>
>>
>>
>>> hi all,
>>
>>> when updating my cvs checkouts on different machines, i get
>>> compilation
>>> failures on newer machines (fedora 6 and 8) due to a parse error in
>>> forpar.x.
>>> but it works on older machines (RHEL 4). when compiling forpar.x  
>>> from
>>> the original lex/yacc sources it looks to me like the whole  
>>> parser in
>>> forpar
>>> is having some troubles (there is plent of conflicts) which take
>>> effect on
>>> newer, more strict compilers (gcc4, intel).
>>
>>> does anybody have an idea for a workaround?
>>
>>> axel.
>>
>>> here's the error message:
>>
>>> /home/akohlmey/compile/cp2k/makefiles/../obj/Linux-x86-64-intel/ 
>>> tools/
>>> forpar.x -chkint mathconstants.for
>>> forpar.x: parse error
>>>    encountered error while reading line 90:
>>>    "REAL (KIND=dp), PARAMETER, DIMENSION (-1:2*maxfac+1) :: dfac=(/
>>> 0.10000000000000000000E+01_dp, 0.10000000000000000000E+01_dp,
>>> 0.10000000000000000000E+01_dp,0.20000000000000000000E+01_dp,
>>> 0.30000000000000000000E+01_dp, 0.80000000000000000000E+01_dp,
>>> 0.15000000000000000000E+02_dp, 0.48000000000000000000E+02_dp,
>>> 0.10500000000000000000E+03_dp,0.38400000000000000000E+03_dp,
>>> 0.94500000000000000000E+03_dp, 0.38400000000000000000E+04_dp,
>>> 0.10395000000000000000E+05_dp, 0.46080000000000000000E+05_dp,
>>> 0.13513500000000000000E+06_dp,0.64512000000000000000E+06_dp,
>>> 0.20270250000000000000E+07_dp, 0.10321920000000000000E+08_dp,
>>> 0.34459425000000000000E+08_dp, 0.18579456000000000000E+09_dp,
>>> 0.65472907500000000000E+09_dp,0.37158912000000000000E+10_dp,
>>> 0.13749310575000000000E+11_dp, 0.81749606400000000000E+11_dp,
>>> 0.31623414322500000000E+12_dp, 0.19619905536000000000E+13_dp,
>>> 0.79058535806250000000E+13_dp,0.51011754393600000000E+14_dp,
>>> 0.21345804667687500000E+15_dp, 0.14283291230208000000E+16_dp,
>>> 0.61902833536293750000E+16_dp, 0.42849873690624000000E+17_dp,
>>> 0.19189878396251062500E+18_dp,0.13711959580999680000E+19_dp,
>>> 0.63326598707628506250E+19_dp, 0.46620662575398912000E+20_dp,
>>> 0.22164309547669977187E+21_dp, 0.16783438527143608320E+22_dp,
>>> 0.82007945326378915594E+22_dp,0.63777066403145711616E+23_dp,
>>> 0.31983098677287777082E+24_dp, 0.25510826561258284646E+25_dp,
>>> 0.13113070457687988603E+26_dp, 0.10714547155728479551E+27_dp,
>>> 0.56386202968058350995E+27_dp,0.47144007485205310027E+28_dp,
>>> 0.25373791335626257948E+29_dp, 0.21686243443194442612E+30_dp,
>>> 0.11925681927744341235E+31_dp, 0.10409396852733332454E+32_dp,
>>> 0.58435841445947272053E+32_dp,0.52046984263666662269E+33_dp,
>>> 0.29802279137433108747E+34_dp, 0.27064431817106664380E+35_dp,
>>> 0.15795207942839547636E+36_dp, 0.14614793181237598765E+37_dp,
>>> 0.86873643685617511998E+37_dp,0.81842841814930553085E+38_dp,
>>> 0.49517976900801981839E+39_dp, 0.47468848252659720789E+40_dp,
>>> 0.29215606371473169285E+41_dp, 0.28481308951595832474E+42_dp,
>>> 0.17821519886598633264E+43_dp/)"
>>> forpar.x: parsing of file mathconstants.for FAILED
>
>
> >




More information about the CP2K-user mailing list