On Jul 31, 2012, at 4:26 AM, Pawe³ Jaromin wrote:
> Sorry, in the code is big mes, but I`am sure it not effects my
> problem. - I tried another ways to solve the problem.
I can pretty guarantee you that these two issues will cause you problems. You need to fix them.
Specifically: it seems like you're focusing on the one symptom that you think is the problem. But there seem to be other symptoms that you don't fully grok yet (e.g., how do you know *for absolutely sure* that problems leading from those two warnings aren't leading to silent memory corruption that ends up causing other problems later?), and they might *all* be contributing to the overall problem.
I don't know your code, and I don't know how it's structured. But if I were you, I would fix those two problems. And I'd fix any other warnings that may be leading to non-deterministic behavior.
>> 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
I cited -I (upper case i, as in "include"), not -l (lower case l, as in "library").
You might need to understand your build system a bit more to solve this issue. I do not use Eclipse, so I'm afraid I have no advice to offer here.
All I'm saying is that mpicc adds all the -I, -L, and -l flags that you need. You do not need to add any more. *Usually* adding such extra flags is harmless, but sometimes they can actually be harmful in unexpected ways. You should figure out and fix this issue.
> 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.
I'm afraid I still don't understand what you're saying, and can't reconcile that with the code and compiler snipits you have sent so far (e.g., you said above that the MPI code runs without problems, but before you said that the MPI code had problems -- which is it?). :-(
FWIW, I don't think that the use of libsndfile is the issue. It's a symptom. You have some other problem that is causing the real issue.
In your prior mail, you show compiling one program (snd_0.1.c) with mpicc and a specific set of compiler / linker flags. You say that this program does not work when you run it.
You also showed compiling a different program (main.c) with gcc and what looks to be the same specific set of compiler flags, but without -laudiofile. You say that this program works.
The fact that one works and the other doesn't is likely due to the fact that you have a bug in the one that doesn't work. If you don't understand the MPI-based code, then that might well be the issue -- it may be buggy and you don't yet grok why.
A simple test: compile your non-MPI program with mpicc. You'll most likely see that it works fine.
Remember: mpicc is just a "wrapper" compiler -- it is not a compiler in itself. All it does is add some extra command line options (e.g., -I, -L, and -l options) and invoke the underlying gcc. Hence, mpicc is likely not your issue. A bug (or set of bugs) in your MPI-based code is likely the issue. My best advice to you is to use normal debugging techniques to find this(these) bug(s).
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/