[gmx-users] make gives error in futil.c with mpi and ccc-6.5.6.002-1

David van der Spoel spoel at xray.bmc.uu.se
Thu Nov 15 07:55:36 CET 2007


chris.neale at utoronto.ca wrote:
> I have had some success reproducing the event with a simple c program 
> and the issue appears to be with the in-house mpicc wrapper script. The 
> difference between gcc and mpicc appears limited to strings 
> (-D=\"string\") and does not show up in numerical form (e.g. -D=4)
> 
> I'll post another update when the issue is resolved.
> 
> Chris.
> 
> In the following examples cc is the same as mpicc (they both point to a 
> script called 'compile') but mpicc invokes slightly different linking 
> options than cc
> 
> $ cat prog.c
> #include <stdlib.h>
> #include <stdio.h>
> 
> int main(int argn,char *args[]){
> printf("The value of MYDEF is %s\n",MYDEF);
> }
> 
> $ gcc prog.c -DMYDEF=\"aaa\" -o prog
> $ prog
> The value of MYDEF is aaa
> $ cc prog.c -DMYDEF=\"aaa\" -o prog
> cc: Error: prog.c, line 5: In this statement, "aaa" is not declared. 
> (undeclared)
> printf("The value of MYDEF is %s\n",MYDEF);
> --------------------------------------^

How about
cc prog.c '-DMYDEF="aaa"' -o prog


> 
> ###
> However, when the defined value is a number, the problem dissapears:
> 
> $ cat prog_num.c
> #include <stdlib.h>
> #include <stdio.h>
> 
> int main(int argn,char *args[]){
> printf("The value of MYDEF is %d\n",MYDEF);
> }
> 
> $ gcc prog_num.c -DMYDEF=4 -o prog_num
> $ prog_num
> The value of MYDEF is 4
> $ cc prog_num.c -DMYDEF=4 -o prog_num
> $ prog_num
> The value of MYDEF is 4
> 
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/search before posting!
> Please don't post (un)subscribe requests to the list. Use thewww 
> interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php


-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the gromacs.org_gmx-users mailing list