2012/7/30 Jeff Squyres <jsquy...@cisco.com>: > 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.
Sorry, in the code is big mes, but I`am sure it not effects my problem. - I tried another ways to solve the problem. > > 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). > I don't know why, but in Eclipse I had to add option -l. Was not enought #include mpi/mpi.h - problem "undefined references" in linker :(. >> 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. Not exactly, maybe I show You my thinking: Because I need to procesing wav files, I wanted load it into array, then by MPI_Scater send to nodes. I haveI found a code that does this, and then i try use with MPI (sndfile lib). "main" in "snd_test" is exactly this code, witch copmpile and runs without problems. So, after that I copied it into MPI program to master node "rank == 0". I expected run the same way like in no MPI program. It means, that I compare normal code with the same code in MPI runs by node 0. Jeff, Thank you for your commitment, but I'm afraid about misunderstanding. I try clarify the problem as good as I can, but I feel that You don't understand me. Maybe my english is not enough good :(.I hope, background above, give you bigger view for what I want to do. Maybe You have suggestion, how do it or good example how deal with it. > > -- > Jeff Squyres > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users -- ------------------ pozdrawiam Paweł Jaromin