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

chris.neale at utoronto.ca chris.neale at utoronto.ca
Thu Nov 15 03:12:35 CET 2007


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);
--------------------------------------^

###
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




More information about the gromacs.org_gmx-users mailing list