PDA

View Full Version : complie error !why?



yanchengbo
05-23-2006, 10:16 AM
:confused: Why can not I use imsl with mpich2?
But I can only use the imsl without mpich2!
The complier is compaq visual fortran 6.6.
The newest edition mpich2 I can get on your home page.

program main
use imsl
include 'mpif.h'
.......

the biuld window tell me:
Linking...
imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_COMM_RANK already defined in fmpich2.lib(fmpich2.dll)
imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_COMM_SIZE already defined in fmpich2.lib(fmpich2.dll)
imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_FINALIZE already defined in fmpich2.lib(fmpich2.dll)
imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_GET_PROCESSOR_NAME already defined in fmpich2.lib(fmpich2.dll)
imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_INIT already defined in fmpich2.lib(fmpich2.dll)
imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_RECV already defined in fmpich2.lib(fmpich2.dll)
>imslmpistub.lib(MPISTUB.obj) : error LNK2005: _MPI_SEND already defined in fmpich2.lib(fmpich2.dll)
Debug/wholepro.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

if I delete the mpich2.lib.
I can compile the code,but when I excut it.It tells me
FATAL ERROR 1 FORM MPI_INIT A CALL WAS EXECTED USING THE IMSL
DUMMY ROUTINE .PARALLEL PERFORMANCE NEEDS A FUCNTIONING MPI

why?

pate
05-23-2006, 11:48 AM
The Compaq Visual Fortran Professional Edition does not include support for MPI. The separate version sold by IMSL does, but it only supports WMPI 1.2. MPI in general is very version dependent, often a minor version vchange from 1.3 to 1.4,for example, will cause it to not work. But if you are using the Professional Edition of CVF,it doesn't matter, no MPI support is included.