Re: [OMPI users] import/export issues on Windows

2010-04-21 Thread Ben.Kuppers
Thank you Shiqing.

-Ben

 

From: Shiqing Fan [mailto:f...@hlrs.de] 
Sent: Wednesday, April 21, 2010 11:30 AM
To: Open MPI Users
Cc: Kuppers, Ben SIEP-PTT/SDRM
Subject: Re: [OMPI users] import/export issues on Windows

 


Hi Ben,

Sorry for response late.

The preprocessor problem is solved now, I don't know why Intel compiler
doesn't accept such kind of definitions. But if you use the latest
trunk, it should work.

I'm working on the import/export problem, and trying to fix it with a
better mechanism. I'll let you know when it's ready.


Thanks,
Shiqing

On 2010-4-19 11:00 AM, ben.kupp...@shell.com wrote: 

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



Re: [OMPI users] import/export issues on Windows

2010-04-21 Thread Shiqing Fan


Hi Ben,

Sorry for response late.

The preprocessor problem is solved now, I don't know why Intel compiler 
doesn't accept such kind of definitions. But if you use the latest 
trunk, it should work.


I'm working on the import/export problem, and trying to fix it with a 
better mechanism. I'll let you know when it's ready.



Thanks,
Shiqing

On 2010-4-19 11:00 AM, ben.kupp...@shell.com wrote:


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:f...@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


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
--
Shiqing Fan  http://www.hlrs.de/people/fan
High Performance Computing   Tel.: +49 711 685 87234
  Center Stuttgart (HLRS)Fax.: +49 711 685 65832
Address:Allmandring 30   email: f...@hlrs.de
70569 Stuttgart



Re: [OMPI users] import/export issues on Windows

2010-04-19 Thread Ben.Kuppers
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:f...@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



Re: [OMPI users] import/export issues on Windows

2010-04-19 Thread Ben.Kuppers
Shiqing,

 

I created new projects from scratch using CMake 2.6.4, selected the
source dir and target dir and chose Visual Studio 8 2005 Win64. Pressed
configure twice to accept all the default setting and then generate.
When I open the Visual Studio project file for ompi_info
(ompi\tools\ompi_info\ompi_info.vcproj) in a text editor there are
multiple copies of the following line:

 

PreprocessorDefinitions="WIN32,_WINDOWS,_DEBUG,_USRDLL,OPAL_IMPORTS,OMPI
_IMPORTS,ORTE_IMPORTS,OMPI_CONFIGURE_DATE=\07:54 AM Mon
04/19/2010 \,OMPI_BUILD_DATE=\07:54 AM Mon
04/19/2010 \,CMAKE_INTDIR=\Debug\"

 

Opening the project in Visual Studio and going to properties,
configuration options, C/C++, Preprocessor, the processor defitions
string contains:

 

WIN32

_WINDOWS

_DEBUG

_USRDLL

OPAL_IMPORTS

OMPI_IMPORTS

ORTE_IMPORTS

"OMPI_CONFIGURE_DATE=\"07:54 AM Mon 04/19/2010 \""

"OMPI_BUILD_DATE=\"07:54 AM Mon 04/19/2010 \""

CMAKE_INTDIR=\"Debug\"

 

-Ben

 

 

From: Shiqing Fan [mailto:f...@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



Re: [OMPI users] import/export issues on Windows

2010-04-16 Thread Shiqing Fan

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

*From:* users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] 
*On Behalf Of *Shiqing Fan

*Sent:* Thursday, April 15, 2010 1:28 PM
*To:* us...@open-mpi.org
*Cc:* Kuppers, Ben SIEP-PTT/SDRM
*Subject:* Re: [OMPI users] import/export issues on Windows


Hi,

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.



Thanks,
Shiqing




On 2010-4-15 9:52 AM, ben.kupp...@shell.com 
<mailto:ben.kupp...@shell.com> wrote:


Hello,

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 
others):


11>..\..\..\..\..\ompi\mpi\cxx\intercepts.cc(81) : 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\intercepts.cc(80): error: a 
function declared "dllimport" may not be defined


11>  MPI::InitializeIntercepts()

This issue seems related to 
http://www.open-mpi.org/community/lists/users/2010/03/12392.php.


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,

Ben

  
  
___

users mailing list
us...@open-mpi.org  <mailto:us...@open-mpi.org>
http://www.open-mpi.org/mailman/listinfo.cgi/users




--
--
Shiqing Fanhttp://www.hlrs.de/people/fan
High Performance Computing   Tel.: +49 711 685 87234
   Center Stuttgart (HLRS)Fax.: +49 711 685 65832
Address:Allmandring 30   email:f...@hlrs.de  <mailto:f...@hlrs.de> 
70569 Stuttgart



___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
--
Shiqing Fan  http://www.hlrs.de/people/fan
High Performance Computing   Tel.: +49 711 685 87234
  Center Stuttgart (HLRS)Fax.: +49 711 685 65832
Address:Allmandring 30   email: f...@hlrs.de
70569 Stuttgart



Re: [OMPI users] import/export issues on Windows

2010-04-16 Thread Ben.Kuppers
Shiqing,

 

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.

 

Thanks,

Ben

 

From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On
Behalf Of Shiqing Fan
Sent: Thursday, April 15, 2010 1:28 PM
To: us...@open-mpi.org
Cc: Kuppers, Ben SIEP-PTT/SDRM
Subject: Re: [OMPI users] import/export issues on Windows

 


Hi,

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. 


Thanks,
Shiqing




On 2010-4-15 9:52 AM, ben.kupp...@shell.com wrote: 

Hello,

 

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
others):

 

11>..\..\..\..\..\ompi\mpi\cxx\intercepts.cc(81) : 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\intercepts.cc(80): error: a
function declared "dllimport" may not be defined

11>  MPI::InitializeIntercepts()

 

This issue seems related to
http://www.open-mpi.org/community/lists/users/2010/03/12392.php.

 

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,

 

Ben

 
 
___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users






-- 
--
Shiqing Fan  http://www.hlrs.de/people/fan
High Performance Computing   Tel.: +49 711 685 87234
  Center Stuttgart (HLRS)Fax.: +49 711 685 65832
Address:Allmandring 30   email: f...@hlrs.de
70569 Stuttgart


Re: [OMPI users] import/export issues on Windows

2010-04-15 Thread Shiqing Fan


Hi,

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.



Thanks,
Shiqing




On 2010-4-15 9:52 AM, ben.kupp...@shell.com wrote:


Hello,

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 
others):


11>..\..\..\..\..\ompi\mpi\cxx\intercepts.cc(81) : 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\intercepts.cc(80): error: a 
function declared "dllimport" may not be defined


11>  MPI::InitializeIntercepts()

This issue seems related to 
http://www.open-mpi.org/community/lists/users/2010/03/12392.php.


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,

Ben


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
--
Shiqing Fan  http://www.hlrs.de/people/fan
High Performance Computing   Tel.: +49 711 685 87234
  Center Stuttgart (HLRS)Fax.: +49 711 685 65832
Address:Allmandring 30   email: f...@hlrs.de
70569 Stuttgart



[OMPI users] import/export issues on Windows

2010-04-15 Thread Ben.Kuppers
Hello,

 

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
others):

 

11>..\..\..\..\..\ompi\mpi\cxx\intercepts.cc(81) : 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\intercepts.cc(80): error: a
function declared "dllimport" may not be defined

11>  MPI::InitializeIntercepts()

 

This issue seems related to
http://www.open-mpi.org/community/lists/users/2010/03/12392.php.

 

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,

 

Ben