Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] import/export issues on Windows
From: Ben.Kuppers_at_[hidden]
Date: 2010-04-16 01:51:43



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).


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.





From: users-bounces_at_[hidden] [mailto:users-bounces_at_[hidden]] On
Behalf Of Shiqing Fan
Sent: Thursday, April 15, 2010 1:28 PM
To: users_at_[hidden]
Cc: Kuppers, Ben SIEP-PTT/SDRM
Subject: Re: [OMPI users] import/export issues on Windows



It seems Microsoft C++ compiler could recognize what the code wants to
do, while Intel C++ compiler couldn't. I know a solution for this kind
of problem, but it involves some code base changes, I need some time to
test it. At moment, if you want to use Intel C++ compiler, the dirty
solution is just changing "OMPI_DECLSPEC" in ompi/mpi/cxx/functions.h to
"__declspec(dllexport)". Or you could switch to use Microsoft compiler
only for this libmpi_cxx project.


On 2010-4-15 9:52 AM, Ben.Kuppers_at_[hidden] wrote:



When I use 1.4.2rc1 I am able build in Visual Studio 2005 (CMake 2.6.4
default settings VS2005 x64)but I get the following warning (among


11>..\..\..\..\..\ompi\mpi\cxx\ : warning C4273:
'MPI::InitializeIntercepts' : inconsistent dll linkage

11> E:\source\openmpi-1.4.1\ompi/mpi/cxx/functions.h(64) : see
previous definition of 'InitializeIntercepts'


When I convert the Visual Studio projects to use the Intel 10.1 compiler
(required for our production environment) this warning becomes an error:


11>E:\source\openmpi-1.4.2rc1\ompi\mpi\cxx\ error: a
function declared "dllimport" may not be defined

11> MPI::InitializeIntercepts()


This issue seems related to


It appears to me that you are trying to use a single symbol to import
from the c module and export from cxx module at the same time.


Any help would be appreciated,



users mailing list

Shiqing Fan                
High Performance Computing           Tel.: +49 711 685 87234
  Center Stuttgart (HLRS)            Fax.: +49 711 685 65832
Address:Allmandring 30               email: fan_at_[hidden]    
70569 Stuttgart