[CMake] How to compile MPI code

Mª Dolores Villalobos Ortiz lolalobos17 at yahoo.es
Fri Jun 24 04:20:47 EDT 2011


I'll check my system, maybe cmake "can't find" MPI properly.

I'm using cmake 2.8.4. and my code works when I compile without cmake (I use those instructions exactly). 

Thank you

--- El jue, 23/6/11, Todd Gamblin <tgamblin at llnl.gov> escribió:

De: Todd Gamblin <tgamblin at llnl.gov>
Asunto: Re: [CMake] How to compile MPI code
Para: "Mª Dolores Villalobos Ortiz" <lolalobos17 at yahoo.es>
CC: "cmake at cmake.org" <cmake at cmake.org>
Fecha: jueves, 23 de junio, 2011 05:13

On Jun 22, 2011, at 11:11 AM, Mª Dolores Villalobos Ortiz wrote:

> Thank you.
> 
> I have tried to compile my code using that version of CMakeLists, but it doesn't work. My program's output is still wrong.

Whether or not mpiexec launches properly isn't something CMake can control.  If you are getting rank 0 for all your processes when you launch mpiexec, this is more than likely a problem with your system.

Just out of curiosity, what version of MPI are you using?  And does the code work when you compile it *without* CMake?  e.g. if you just run:

    mpicxx -o hello hello.cpp
    mpiexec -n 2 ./hello

Does that work, or does that do the same thing?

-Todd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110624/80f36156/attachment-0001.htm>


More information about the CMake mailing list