Re: [AMBER] Amber12 parallel installation error

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 10 Dec 2014 10:22:50 -0500

> On Dec 10, 2014, at 9:43 AM, Kanin Wichapong <kanin.wichapong.gmail.com> wrote:
>
> Dear Amber Users,
>
>
> I tried to install parrallel version of Amber12. However, I got some
> problems. First, I got the error;
>
>
> cifparse.c:180:7: error: format not a string literal and no format
> arguments [-Werror=format-security]
> fprintf(fp, null_char);
> ^
>
>
> I found the suggestion in the mailing list to change line 180 in
> cifparse.c to fputs(null_char, fp); and recomplie. I did so, but then I had
> a new error (exactly as in the mailing list);
>
>
> ChargeFit.c: In function ‘AssignGridTopologies’:
>
> ChargeFit.c:80:7: error: format not a string literal and no format
> arguments [-Werror=format-security]
>
> sprintf(myfit->tpname.map[i], tp->source);
>
> ^
>
> ChargeFit.c:82:2: error: format not a string literal and no format
> arguments [-Werror=format-security]
>
> sprintf(myfit->eprule.map[i], tp->eprulesource);
>
> ^
>
> ChargeFit.c: In function ‘ReadEPotGrid’:
>
> ChargeFit.c:328:10: warning: ignoring return value of ‘fgets’, declared
> with attribute warn_unused_result [-Wunused-result]
>
> fgets(line, 128, inp);
>
> ^
>
> ChargeFit.c:346:9: warning: ignoring return value of ‘fscanf’, declared
> with attribute warn_unused_result [-Wunused-result]
>
> fscanf(inp, "%d%lf%lf%lf", &i, &lvec[0], &lvec[1], &lvec[2]);
>
> ^
>
> ChargeFit.c:347:9: warning: ignoring return value of ‘fscanf’, declared
> with attribute warn_unused_result [-Wunused-result]
>
> fscanf(inp, "%d%lf%lf%lf", &j, &lvec[3], &lvec[4], &lvec[5]);
>
> ^
>
> ChargeFit.c:348:9: warning: ignoring return value of ‘fscanf’, declared
> with attribute warn_unused_result [-Wunused-result]
>
> fscanf(inp, "%d%lf%lf%lf", &k, &lvec[6], &lvec[7], &lvec[8]);
>
> ^
>
> ChargeFit.c:354:11: warning: ignoring return value of ‘fscanf’, declared
> with attribute warn_unused_result [-Wunused-result]
>
> fscanf(inp, "%d%lf%lf%lf%lf", &j, &nucchg[i], &crd->loc[3*i],
>
> ^
>
> ChargeFit.c:369:8: warning: ignoring return value of ‘fscanf’, declared
> with attribute warn_unused_result [-Wunused-result]
>
> fscanf(inp, "%f", &ftmp[k]);
>
>
> I followed the advise in the mailing list by using command mpicc -show and
> here is the output
>
>
> cc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4
> -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro
> -I/usr/include/mpich -L/usr/lib/x86_64-linux-gnu -lmpich -lopa -lmpl -lrt
> -lcr -lpthread
>
> you give the suggestion to *remove the "-Werror=format-security". *However,
> where (in which file) or how I can remove the "-Werror=format-security”?

This is actually built into the MPI C compiler wrapper, so you can’t. However, you can usually turn *off* particular flags. I think you can turn them off, though: maybe add “-Wformat=0” to the CFLAGS variable of your config.h file -- does that work?

Another thing you can do if mdgx is having a hard time compiling is to re-run configure with the “-nofftw3” flag, which will prevent mdgx from being built. This will also prevent RISM from being built, though. If you need RISM, but not MDGX, you need to modify $AMBERHOME/AmberTools/src/configure2 and change the line

mdgx=“yes”

to

mdgx=“no”

Hopefully someone can be persuaded to fix mdgx at some point so this doesn’t happen :).

HTH,
Jason

--
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Dec 10 2014 - 07:30:02 PST
Custom Search