[EMAIL PROTECTED] 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@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 [EMAIL PROTECTED]
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
[EMAIL PROTECTED]       [EMAIL PROTECTED]   http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_______________________________________________
gmx-users mailing list    gmx-users@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 the www interface or send it to [EMAIL PROTECTED]
Can't post? Read http://www.gromacs.org/mailing_lists/users.php

Reply via email to