Shiqing,
I am having more import/export issues once I start using the openmpi
binaries that I built with the Microsoft compiler. I get unresolved symbol
errors for MPI::Comm::Comm and for MPI::Datatype::Free when I link our own
program. The C functions MPI_Comm_create and MPI_Type_free are exported but the
C++ equivalents apparently are not. Our source code builds and runs without
issues with the Linux version of openmpi.
Do you have any suggestions?
-Ben
From:
Shiqing Fan [mailto:fan@hlrs.de]
Sent: Friday, April 16, 2010 10:59 AM
To: Open MPI Users
Cc: Kuppers, Ben SIEP-PTT/SDRM
Subject: Re: [OMPI users] import/export issues on Windows
Hi Ben,
I believe changing OMPI_DECLSPEC to
__declspec(dllexport) inside functions.h will allow the cxx module to build
(and export the function) but will break any client using (and thus trying to
import) it. OMPI_DECLSPEC should only be defined as __declspec(dllexport) while
compiling the cxx module (say when libmpi_cxx_EXPORTS is defined).
Yes, as long as there are more functions to export, they
have to be defined in that way. I don't see any option for Intel Compiler to
manage this automatically.
BTW, I also noticed that the Intel compiler has issues
with the preprocessor definitions for ompi_info
"OMPI_CONFIGURE_DATE=\"03:18 PM Wed 04/14/2010 \"" and
"OMPI_BUILD_DATE=\"03:18 PM Wed 04/14/2010
\"". The quotes around the definitions throw it off completely. Is
that something that CMake does or do you instruct CMake to do this? Both the
Intel and Microsoft compiler work correctly without them.
In which project did you see those preprocessor definitions?
Because for me, I don't see them. Actually, they are not used as preprocessors
in the whole solution, but they are only some cached variables in CMake. Could
you please try to do a clean configuration with CMake, and see if they still
exists?
Thanks,
Shiqing
Thanks,
Ben