On Jul 30, 2012, at 12:48 PM, Pawe³ Jaromin wrote:
> make all
> Building file: ../src/snd_0.1.c
> Invoking: GCC C Compiler
> mpicc -I/usr/include/mpi -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
> -MF"src/snd_0.1.d" -MT"src/snd_0.1.d" -o "src/snd_0.1.o"
> "../src/snd_0.1.c"
> ../src/snd_0.1.c:24: warning: return type defaults to 'int'
> ../src/snd_0.1.c: In function 'main':
> ../src/snd_0.1.c:45: warning: unused variable 'outfile'
> ../src/snd_0.1.c:42: warning: unused variable 'FILE_OUT'
> ../src/snd_0.1.c:41: warning: unused variable 'FILE_NAME'
> ../src/snd_0.1.c:40: warning: unused variable 'AF_setup'
> ../src/snd_0.1.c:38: warning: unused variable 'snd_buffor'
> ../src/snd_0.1.c:37: warning: unused variable 'i'
> ../src/snd_0.1.c: In function 'print_usage':
> ../src/snd_0.1.c:29: warning: control reaches end of non-void function
> Finished building: ../src/snd_0.1.c
You might want to fix these warnings. The first one and the last one seem like they could cause nondeterminism.
Also, you shouldn't be adding -I/usr/include/mpi. mpicc will add the right -I option for you (e.g., do you know for sure that your MPI header files are in /usr/include/mpi?). It's useless at best, and harmful at worst (E.g., if some other MPI implementation is installed into /usr/include/mpi).
> no MPI -program which was based on
>
> **** Build of configuration Debug for project snd_test ****
>
> make all
> Building file: ../main.c
> Invoking: GCC C Compiler
> gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d"
> -MT"main.d" -o "main.o" "../main.c"
> Finished building: ../main.c
>
> Building target: snd_test
> Invoking: GCC C Linker
> gcc -o "snd_test" ./main.o -lsndfile
> Finished building target: snd_test
I notice that you're not including -Wall and a bunch of other compiler flags in the non-MPI install.
I also notice that you're not compiling the same .c files at all.
So if I'm understanding this thread right -- and I may well not be -- it seems like you're saying:
- when I use gcc to compile main.c, the program runs file
- when I used mpicc to compile ../src/snd_0.1.c, the program fails
If that's the case, your comparing apples to oranges here.
--
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
|