[petsc-users] Calling convention from windows VC++ and IFC
SUN Chun
Chun.SUN at 3ds.com
Thu Mar 3 09:48:33 CST 2011
Maybe, you want to look at petscblaslapack.h and turn flag on/off from the #ifdefs in that file. From the original message it seems to me the convention issue is between calling BLAS routine.
-----Original Message-----
From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Alexander Grayver
Sent: Thursday, March 03, 2011 10:34 AM
To: PETSc users list
Subject: Re: [petsc-users] Calling convention from windows VC++ and IFC
Actually, I've added this flag after sending first message to mailing
list (sorry for inconveniences) because I though it could help,
unfortunately it didn't.
The problem probably could be reproduced compiling petsc using
--with-clanguage=cxx and VC++ and then trying to run FORTRAN examples.
On 03.03.2011 16:26, Satish Balay wrote:
> perhaps you can remove '--CXX_CXXFLAGS=-Gz' and retry.
>
> Satish
>
> On Thu, 3 Mar 2011, Alexander Grayver wrote:
>
>> I've sent them, thanks!
>>
>> I also must note that this is a problem for fortran examples only! Because
>> when I've done "make test" after building the situation was:
>>
>> mt at agrayver /cygdrive/d/dev/petsc-3.1-p7
>> $ make PETSC_DIR=/cygdrive/d/dev/petsc-3.1-p7 PETSC_ARCH=cygwin-cxx-debug test
>> Running test examples to verify correct installation
>> C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI
>> process
>> C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2 MPI
>> processes
>> --------------Error detected during compile or link!-----------------------
>> See http://www.mcs.anl.gov/petsc/petsc-2/documentation/troubleshooting.html
>> /cygdrive/d/dev/petsc-3.1-p7/bin/win32fe/win32fe ifort -c -MT -Z7 -fpp
>> -I/cygdrive/d/dev/petsc-3.1-p7/cygwin-cxx-debug/include
>> -I/cygdrive/d/dev/petsc-3.1-p7/include -I/cygdrive/d/Dev/HPC_2008_SDK/Include
>> -I/cygdrive/d/dev/petsc-3.1-p7/cygwin-cxx-debug/include
>> -I/cygdrive/d/Dev/HPC_2008_SDK/Include -o ex5f.o ex5f.F
>>
>> /cygdrive/d/dev/petsc-3.1-p7/bin/win32fe/win32fe ifort -MT -Z7 -fpp -o ex5f
>> ex5f.o -L/cygdrive/d/dev/petsc-3.1-p7/cygwin-cxx-debug/lib
>> -L/cygdrive/d/dev/petsc-3.1-p7/cygwin-cxx-debug/lib -lpetsc
>> -L/cygdrive/d/dev/petsc-3.1-p7/cygwin-cxx-debug/lib -lflapack -lfblas
>> /cygdrive/d/Dev/HPC_2008_SDK/Lib/amd64/msmpi.lib
>> /cygdrive/d/Dev/HPC_2008_SDK/Lib/amd64/msmpifec.lib Gdi32.lib User32.lib
>> Advapi32.lib Kernel32.lib Ws2_32.lib
>>
>> libpetsc.lib(fuser.o) : error LNK2019: unresolved external symbol
>> __imp_GetUserNameA referenced in function "int __cdecl PetscGetUserName(char *
>> const,unsigned__int64)" (?PetscGetUserName@@YAHQEAD_K at Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_ReleaseDC referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct_p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_BitBlt referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct _p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_ExtFloodFill referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct _p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_SelectObject referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct _p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_CreateCompatibleBitmap referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct _p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_CreateCompatibleDC referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct _p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_GetDC referenced in function "int __cdecl
>> PetscDrawSetDoubleBuffer_Win32(struct _p_PetscDraw *)"
>> (?PetscDrawSetDoubleBuffer_Win32@@YAHPEAU_p_PetscDraw@@@Z)
>> libpetsc.lib(win32draw.o) : error LNK2019: unresolved external symbol
>> __imp_UpdateWindow referenced in function "int __cdecl
>> PetscDrawRectangle_Win32(struct _p_PetscDraw
>> *,double,double,double,double,int,int,int,int)"
>> (?PetscDrawRectangle_Win32@@YAHPEAU_p_PetscDraw@@NNNNHHHH at Z)
>>
>> On 03.03.2011 14:49, Satish Balay wrote:
>>> can you send the corresponding configure.log and make.log to
>>> petsc-maint at mcs.anl.gov?
>>>
>>> Satish
>>>
>>> On Thu, 3 Mar 2011, Alexander Grayver wrote:
>>>
>>>> Hello,
>>>>
>>>> I built PETSc-3.1 using VC++ 2008 and IFC 10.1 with the following
>>>> configuration line:
>>>>
>>>> ./config/configure.py --with-cc='win32fe cl' --with-fc='win32fe ifort'
>>>> --with-cxx='win32fe cl' --download-f-blas-lapack=1
>>>> --with-precision=double
>>>> --with-scalar-type=complex --with-clanguage=cxx
>>>> --with-mpi-include="/cygdrive/d/Dev/HPC_2008_SDK/Include"
>>>>
>>>> --with-mpi-lib=["/cygdrive/d/Dev/HPC_2008_SDK/Lib/amd64/msmpi.lib","/cygdrive/d/Dev/HPC_2008_SDK/Lib/amd64/msmpifec.lib"]
>>>> --useThreads=0 --with-shared=0
>>>>
>>>> Note there is C++ as main language.
>>>>
>>>> Now, when I'm trying to build examples I always get similar errors:
>>>>
>>>> Error 2 error LNK2019: unresolved external symbol ZGESVD referenced
>>>> in
>>>> function "int __cdecl KSPComputeExtremeSingularValues_GMRES(struct _p_KSP
>>>> *,double *,double *)"
>>>> (?KSPComputeExtremeSingularValues_GMRES@@YAHPEAU_p_KSP@@PEAN1 at Z)
>>>> libpetsc.lib
>>>> Error 3 error LNK2019: unresolved external symbol ZGEEV referenced
>>>> in
>>>> function "int __cdecl KSPComputeEigenvalues_GMRES(struct _p_KSP
>>>> *,int,double
>>>> *,double *,int *)"
>>>> (?KSPComputeEigenvalues_GMRES@@YAHPEAU_p_KSP@@HPEAN1PEAH at Z)
>>>> libpetsc.lib
>>>> Error 4 error LNK2001: unresolved external symbol ZGEEV
>>>> libpetsc.lib
>>>> Error 5 error LNK2019: unresolved external symbol DZNRM2 referenced
>>>> in
>>>> function "int __cdecl VecNorm_MPI(struct _p_Vec *,enum NormType,double *)"
>>>> (?VecNorm_MPI@@YAHPEAU_p_Vec@@W4NormType@@PEAN at Z) libpetsc.lib
>>>> Error 6 error LNK2001: unresolved external symbol DZNRM2
>>>> libpetsc.lib
>>>> Error 7 error LNK2019: unresolved external symbol DZASUM referenced
>>>> in
>>>> function "int __cdecl VecNorm_Seq(struct _p_Vec *,enum NormType,double *)"
>>>> (?VecNorm_Seq@@YAHPEAU_p_Vec@@W4NormType@@PEAN at Z) libpetsc.lib
>>>> ...
>>>>
>>>> It look like calling conventions are in disagreement. Any ideas? May be I
>>>> should specify conventions myself in configuration line? If so, how to do
>>>> that?
>>>>
>>
More information about the petsc-users
mailing list