Re: [OMPI users] vs2010: MPI_Address() unresolved
Does this happen also for other MPI_* functions? Probably you need to add OMPI_IMPORTS as an extra preprocessor. Regards, Shiqing On 2011-11-19 1:02 AM, MM wrote: Hi, I get this style of errors when trying to link against libmpid.lib (compiled with instructions from README.Windows part 1 cmake): mylib.lib(myfile.obj): : error LNK2001: unresolved external symbol __imp__MPI_Address I set BUILD_SHARED_LIBS to false, so I generate static libs. I've also checked that the /MDd is set and indeed libmpid.lib are built against the DLL version of the C++ runtime when I open the solution in vs2010. I myself link my application against the /MDd as well. I don't know why it's looking for __impl__MPI_Address (__impl__ is a prefix related to DLLs somehow). I gather this MPI_Address() function resides in libmpi.lib and libmpid.lib PS: I didn't have these link errors when I built against the prebuilt win libraries from the website, what are the CMAke flags for those? Thanks, MM ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- --- Shiqing Fan High Performance Computing Center Stuttgart (HLRS) Tel: ++49(0)711-685-87234 Nobelstrasse 19 Fax: ++49(0)711-685-65832 70569 Stuttgart http://www.hlrs.de/organization/people/shiqing-fan/ email: f...@hlrs.de
Re: [OMPI users] mpic++-wrapper-data.txt msvc10 Release/Debug 1.5.4
Hi, There is no easy solution. But you can try to use WANT_EXE_DEBUG_POSTFIX option in CMake GUI. Enabling this option will generate different executable.library names for debug and release build. For example, mpic++d.exe for debug and mpic++.exe for release. For you case, just build both debug and release version of Open MPI 1.5.4, and install them into the same path, you will get two sets of executables/libraries (with "d" postfix for debug version) and mpic++ config files (mpic++d-wrapper-data.txt for debug version). Then just append your own debug/release compile options in the config files, and build with boost mpi as you need. Hope this helps. Regards, Shiqing On 2011-11-18 9:44 PM, MM wrote: Hello, Compiling boost mpi library uses mpic++ to get the compile flags to pass to cl.exe and link libs to pass to the linker. In my case: >>> mpic++ -showme:compile /I"C:\Program Files\openmpi\bin/../include" /TP /EHsc */MD* >>> mpic++ -showme:link /link /LIBPATH:"C:\Program Files\openmpi\bin/../lib" *libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib* To choose Release build or Debug build, is it possible to use mpic++-wrapper-data.txt to specify both options? Release */MD* *libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib* ** Debug */MDd* *libmpi_cxxd.lib libmpid.lib libopen-pald.lib libopen-rted.lib advapi32.lib Ws2_32.lib shlwapi.lib* is there a debug version of "*advapi32.lib Ws2_32.lib shlwapi.lib"* ** For now, I will just override that file for Release, build boost mpi, override for Debug, build for Debug. thanks, MM ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- --- Shiqing Fan High Performance Computing Center Stuttgart (HLRS) Tel: ++49(0)711-685-87234 Nobelstrasse 19 Fax: ++49(0)711-685-65832 70569 Stuttgart http://www.hlrs.de/organization/people/shiqing-fan/ email: f...@hlrs.de
[OMPI users] vs2010: MPI_Address() unresolved
Hi, I get this style of errors when trying to link against libmpid.lib (compiled with instructions from README.Windows part 1 cmake): mylib.lib(myfile.obj): : error LNK2001: unresolved external symbol __imp__MPI_Address I set BUILD_SHARED_LIBS to false, so I generate static libs. I've also checked that the /MDd is set and indeed libmpid.lib are built against the DLL version of the C++ runtime when I open the solution in vs2010. I myself link my application against the /MDd as well. I don't know why it's looking for __impl__MPI_Address (__impl__ is a prefix related to DLLs somehow). I gather this MPI_Address() function resides in libmpi.lib and libmpid.lib PS: I didn't have these link errors when I built against the prebuilt win libraries from the website, what are the CMAke flags for those? Thanks, MM
[OMPI users] mpic++-wrapper-data.txt msvc10 Release/Debug 1.5.4
Hello, Compiling boost mpi library uses mpic++ to get the compile flags to pass to cl.exe and link libs to pass to the linker. In my case: >>> mpic++ -showme:compile /I"C:\Program Files\openmpi\bin/../include" /TP /EHsc /MD >>> mpic++ -showme:link /link /LIBPATH:"C:\Program Files\openmpi\bin/../lib" libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib To choose Release build or Debug build, is it possible to use mpic++-wrapper-data.txt to specify both options? Release /MD libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib Debug /MDd libmpi_cxxd.lib libmpid.lib libopen-pald.lib libopen-rted.lib advapi32.lib Ws2_32.lib shlwapi.lib is there a debug version of "advapi32.lib Ws2_32.lib shlwapi.lib" For now, I will just override that file for Release, build boost mpi, override for Debug, build for Debug. thanks, MM
Re: [OMPI users] Memory corruption due to MPI_Status_c2f
Oops... I misread the documentation. It is stated that for fortran, "The status argument must be declared as an array of size MPI_STATUS_SIZE, as in integer status(MPI_STATUS_SIZE)" Since I declared the fortran status with "MPI_Fint f_status;", their isn't enough room for storing the status. Francois Trahay On Friday 18 November 2011 15:12:07 François Trahay wrote: > Hi, > I have a C+Fortran program that seems to crash due to OpenMPI > implementation of MPI_Status_c2f. When my program calls this function, a > memory corruption happens. > Here's a test program that reproduce the bug. It allocates and fills a > buffer, call MPI_Status_c2f (using a valid status) and print the buffer. > Before calling MPI_Status_c2f, the buffer contains (0,1,2,...31). After the > function call, it contains(x, x, ...20, 21, 22, ...31) > > From this example, it seems that the first 80 bytes (20 integers) of this > buffer get corrupted. > > I tried this program with open mpi 1.4.3, 1.4.4 and the latest nightly > snapshot (openmpi-1.7a1r25487) and they all have the same bug. > > Any idea to solve this problem ? > > Francois Trahay
[OMPI users] Memory corruption due to MPI_Status_c2f
Hi, I have a C+Fortran program that seems to crash due to OpenMPI implementation of MPI_Status_c2f. When my program calls this function, a memory corruption happens. Here's a test program that reproduce the bug. It allocates and fills a buffer, call MPI_Status_c2f (using a valid status) and print the buffer. Before calling MPI_Status_c2f, the buffer contains (0,1,2,...31). After the function call, it contains(x, x, ...20, 21, 22, ...31) From this example, it seems that the first 80 bytes (20 integers) of this buffer get corrupted. I tried this program with open mpi 1.4.3, 1.4.4 and the latest nightly snapshot (openmpi-1.7a1r25487) and they all have the same bug. Any idea to solve this problem ? Francois Trahay #include #include #include #include #define CANARI_SIZE 32 #define SIZE 100 #define TAG 1 #define TAG2 2 int main(int argc, char**argv) { int comm_size, comm_rank; MPI_Init(,); MPI_Comm_size(MPI_COMM_WORLD, _size); MPI_Comm_rank(MPI_COMM_WORLD, _rank); if (comm_size != 2) { fprintf(stderr, "This program requires 2 MPI processes, aborting...\n"); goto out; } char buffer[SIZE]; MPI_Request req; MPI_Status status; char canari1[CANARI_SIZE]; MPI_Fint f_status; char canari2[CANARI_SIZE]; int i; if(comm_rank == 0) { memset(buffer, 0x11, SIZE); MPI_Irecv(buffer, SIZE, MPI_CHAR, 1, TAG, MPI_COMM_WORLD, ); MPI_Wait(, ); for(i=0;i