Hi,
I don't think those warnings could cause your linker problem.
My suggestion is to just use the compiler wrappers that built with Open
MPI, there are a few settings that you could have missed in your Visual
Studio configurations. To see what compiler/linker options that used in
the wrappers, you can simply run the wrapper with option '--showme',
e.g. "mpicc --showme", the output usually looks like:
---------------------------------------------------------------------------------------------------
cl.exe /I"C:\Program Files\OpenMPI_v1.4.1-win32\include" /TC /D
"OMPI_IMPORTS" /D "OPAL_IMPORTS" /D "ORTE_IMPORTS" /link
/LIBPATH:"C:\Program Files\OpenMPI_v1.4.1-win32\lib" libmpid.lib
libopen-pald.lib libopen-rted.lib advapi32.lib Ws2_32.lib shlwapi.lib
---------------------------------------------------------------------------------------------------
I guess that you probably missed the "Preprocessor definitions", i.e.
"OMPI_IMPORTS", "OPAL_IMPORTS" and "ORTE_IMPORTS". If you add them into
your Visual Studio configuration, it should work.
Regards,
Shiqing
T. Farago wrote:
I just checked out OpenMPI trunk (3 feb 2010) after continuing my
adventures from the 19th of January
(http://www.open-mpi.org/community/lists/users/2010/01/11810.php,
"Win32 compilation broken (MSVC2008, OpenMPI1.4.1)")
Every time I try to get even a simple mpi application to compile I get
linker errors (in this case about _ompi_mpi_double, _ompi_mpi_int and
_omp_mpi_comm_world being unresolved external symbols) even when
libmpi.lib and libmpi_cxx.lib are added as additional dependencies).
Hell, even the most simple:
#include <mpi.h>
#pragma comment(lib, "libmpi.lib")
int main(int argc, char* argv[]) {
int n = 0;
MPI_Comm_size(MPI_COMM_WORLD, &n);
return 0;
}
gives a linker error when using shared libraries about
_ompi_mpi_comm_world. The symbol is defined however in libmpi.lib, as
witnessed by dumpbin. /me is really confused now.
While looking through the code of openmpi I came across a few
interesting warnings, see below:
warning C4013: 'opal_event_warn' undefined; assuming extern returning
int opal\event\WIN32-Code\win32.c 168
warning C4700: uninitialized local variable 'headdir'
used orte\util\hnp_contact.c 239
warning LNK4049: locally defined symbol _ompi_cr_continue_like_restart
imported btl_sm.obj
warning LNK4049: locally defined symbol _ompi_cr_continue_like_restart
imported pml_ob1.obj
warning LNK4217: locally defined symbol _ompi_cr_continue_like_restart
imported in function _mca_bml_r2_ft_event bml_r2_ft.obj
warning LNK4217: locally defined symbol _ompi_cr_continue_like_restart
imported in function _mca_mpool_sm_module_init mpool_sm_module.obj
warning C4273: '_isatty' : inconsistent dll linkage show_help_lex.c
warning C4273: '_isatty' : inconsistent dll linkage keyval_lex.c
warning C4273: 'MPI::ARGV_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 147
warning C4273: 'MPI::ARGVS_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 148
warning C4273: 'MPI::BAND' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
123
warning C4273: 'MPI::BOOL' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
107
warning C4273: 'MPI::BOR' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
124
warning C4273: 'MPI::BOTTOM' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 45
warning C4273: 'MPI::BXOR' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
125
warning C4273: 'MPI::BYTE' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
66
warning C4273: 'MPI::CHAR' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
54
warning C4273: 'MPI::COMM_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 137
warning C4273: 'MPI::COMM_SELF' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 114
warning C4273: 'MPI::COMM_WORLD' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 113
warning C4273: 'MPI::COMPLEX' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 108
warning C4273: 'MPI::DATATYPE_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 138
warning C4273: 'MPI::DOUBLE' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 64
warning C4273: 'MPI::DOUBLE_COMPLEX' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 109
warning C4273: 'MPI::DOUBLE_INT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 72
warning C4273: 'MPI::ERRHANDLER_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 141
warning C4273: 'MPI::ERRORS_ARE_FATAL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 49
warning C4273: 'MPI::ERRORS_RETURN' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 50
warning C4273: 'MPI::ERRORS_THROW_EXCEPTIONS' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 51
warning C4273: 'MPI::FILE_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 143
warning C4273: 'MPI::FLOAT' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
63
warning C4273: 'MPI::FLOAT_INT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 71
warning C4273: 'MPI::GROUP_EMPTY' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 151
warning C4273: 'MPI::GROUP_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 132
warning C4273: 'MPI::IN_PLACE' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 46
warning C4273: 'MPI::INFO_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 134
warning C4273: 'MPI::INT' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
56
warning C4273: 'MPI::LAND' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
126
warning C4273: 'MPI::LB' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
155
warning C4273: 'MPI::LONG' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
57
warning C4273: 'MPI::LONG_DOUBLE' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 65
warning C4273: 'MPI::LONG_DOUBLE_COMPLEX' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 110
warning C4273: 'MPI::LONG_DOUBLE_INT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 76
warning C4273: 'MPI::LONG_INT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 73
warning C4273: 'MPI::LONG_LONG' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 104
warning C4273: 'MPI::LOR' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
127
warning C4273: 'MPI::LXOR' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
128
warning C4273: 'MPI::MAX' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
117
warning C4273: 'MPI::MAXLOC' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 121
warning C4273: 'MPI::MIN' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
118
warning C4273: 'MPI::MINLOC' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 122
warning C4273: 'MPI::OP_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 140
warning C4273: 'MPI::PACKED' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 67
warning C4273: 'MPI::PROD' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
120
warning C4273: 'MPI::REPLACE' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 129
warning C4273: 'MPI::REQUEST_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 139
warning C4273: 'MPI::SHORT' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
55
warning C4273: 'MPI::SHORT_INT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 75
warning C4273: 'MPI::SIGNED_CHAR' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 58
warning C4273: 'MPI::SUM' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
119
warning C4273: 'MPI::TWOINT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 74
warning C4273: 'MPI::UB' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
154
warning C4273: 'MPI::UNSIGNED' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 61
warning C4273: 'MPI::UNSIGNED_CHAR' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 59
warning C4273: 'MPI::UNSIGNED_LONG' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 62
warning C4273: 'MPI::UNSIGNED_LONG_LONG' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 103
warning C4273: 'MPI::UNSIGNED_SHORT' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 60
warning C4273: 'MPI::WCHAR' : inconsistent dll linkage ompi\mpi\cxx\mpicxx.cc
68
warning C4273: 'MPI::WIN_NULL' : inconsistent dll
linkage ompi\mpi\cxx\mpicxx.cc 133
warning C4273: 'MPIR_Breakpoint' : inconsistent dll
linkage orte\tools\orterun\debuggers.c 732
warning C4273: 'ompi_cr_continue_like_restart' : inconsistent dll
linkage ompi\runtime\ompi_cr.c 71
warning C4273: 'ompi_info_component_map_t_class' : inconsistent dll
linkage ompi\tools\ompi_info\components.c 141
warning C4273: 'orterun_globals' : inconsistent dll
linkage orte\tools\orterun\orterun.c 130
_______________________________________________
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