[petsc-users] [petsc-maint #91113] PETSC-LINK- Error-Using Complex Types

Satish Balay petsc-maint at mcs.anl.gov
Fri Oct 21 11:06:17 CDT 2011


Then you would check 

cd src/ksp/ksp/examples/tutorials
make PETSC_DIR=/home/d022117/petsc-3.2-p2 PETSC_ARCH=arch-mswin-cxx-debug ex2f

and try to match the options in the project files with the onces used here..

Note: The link options like /MT are independent of language..

Satish


On Fri, 21 Oct 2011, Manuel Ricardo Perez Cerquera wrote:

> Yes, The Problem is I'm Using Fortran and Mostly of this options are only
> available for C or C++ projects. I don't know if Petsc Support Complex in
> Fortran language, Do I'm wrong?
> 
> 2011/10/21 Satish Balay <petsc-maint at mcs.anl.gov>
> 
> > Some of these options should be selectable in 'compile' or 'link tab'
> > of the project file settings.
> >
> > >>>>>>>
> > /MT link with LIBCMT.LIB [multithreaded build - not "multithreaded dll"]
> > /GR[-] enable C++ RTTI
> > /EHs enable synchronous C++ EH
> > /EHc extern "C" defaults to nothrow
> > /Z7 enable old-style debug info
> > /Zm<n> max memory alloc (% of default)
> > <<<<<<
> >
> > As Chetan mentioned - the most important option to set is '/MT' for
> > "Multithreaded, static link". You can probably ignore the debug
> > options. Not sure if the c++ RTTI/EH options matter for user code.
> >
> > Satish
> >
> > On Fri, 21 Oct 2011, PEREZ CERQUERA MANUEL RICARDO wrote:
> >
> > > No, With the examples It Works, Is when I linked With
> > > Visual Studio, for example following the instructions I
> > > did:
> > >   $ make PETSC_DIR=/home/d022117/petsc-3.2-p2
> > > PETSC_ARCH=arch-mswin-cxx-debug ex2
> > > I got this
> > >   /home/d022117/petsc-3.2-p2/bin/win32fe/win32fe cl -o
> > > ex2.o -c -MT -GR -EHsc -Z7 -Zm200 -TP
> > > -I/home/d022117/petsc-3.2-p2/include
> > >                     -I/home/d022117/petsc-3.2-p2/arc
> > > h-mswin-cxx-debug/include
> > > -I/cygdrive/c/ProgramFiles/MPICH2/include
> > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ex2.c
> > > ex2.c
> > > /home/d022117/petsc-3.2-p2/bin/win32fe/win32fe cl -MT -GR
> > > -EHsc -Z7 -Zm200  -o ex2 ex2.o
> > > -L/home/d022117/petsc-3.2-p2/arch-mswin-cxx-debug/lib
> > >     -lpetsc -lflapack -lfblas
> > > /cygdrive/c/Program\Files/MPICH2/lib/fmpich2.lib
> > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib
> > > /cygdrive/c/Program\Files/MPICH2/lib/fmpich2s.lib
> > > /cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib Gdi32.lib
> > > User32.lib Advapi32.lib Kernel32.lib Ws2_32.lib
> > > /usr/bin/rm -f ex2.o
> > >
> > > So in VS I linked the libraries libpetsc.lib
> > > libflapack.lib libfblasfmpich2s.lib fmpich2g.lib mpi.lib
> > > Gdi32.lib User32.lib Advapi32.lib Kernel32.lib Ws2_32.lib
> > > , actually I do not know  where to set -MT -GR -EHsc -Z7
> > > -Zm200 options in VS.
> > >
> > > Manuel
> > >
> > > On Fri, 21 Oct 2011 08:37:10 -0500 (CDT)
> > >   Satish Balay <petsc-maint at mcs.anl.gov> wrote:
> > > > Do you get these errors with petsc examples? [when
> > > >compiled with PETSc makefiles?]
> > > >
> > > > Satish
> > > >
> > > > On Fri, 21 Oct 2011, PEREZ CERQUERA MANUEL RICARDO
> > > >wrote:
> > > >
> > > >> Hi all
> > > >>
> > > >> I build the complex version of Petsc. I used Microsoft
> > > >> Visual Stud . Run Petsc in this platform and got the
> > > >> following error:
> > > >>
> > > >> Error 1        error LNK2019: unresolved external
> > > >>symbol>
> > > >> __invalid_parameter_noinfo referenced in function
> > > >> "public:> char & __thiscall
> > > >>std::basic_string<char,struct>
> > > >> std::char_traits<char>,class std::allocator<char>>
> > > >> >::operator[](unsigned int)">
> > > >> (??A?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
> > @QAEAADI at Z)
> > > >>   libpetsc.lib(errtrace.o)
> > > >>
> > > >> Error      2        error LNK2001: unresolved external symbol
> > > >> __invalid_parameter_noinfo libpetsc.lib(err.o)
> > > >> Error      3        error LNK2001: unresolved external symbol
> > > >> __invalid_parameter_noinfo libpetsc.lib(plog.o)
> > > >> Error      4        fatal error LNK1120: 1 unresolved
> > > >> externals  Debug\PAtreju.exe
> > > >>
> > > >> Could someone tell me  how to resolve it.
> > > >> Best regards Manuel
> > > >>
> > > >> Eng. Manuel Ricardo Perez Cerquera. MSc. Ph.D student
> > > >> Antenna and EMC Lab (LACE)
> > > >> Istituto Superiore Mario Boella (ISMB)
> > > >> Politecnico di Torino
> > > >> Via Pier Carlo Boggio 61, Torino 10138, Italy
> > > >> Email: manuel.perezcerquera at polito.it
> > > >> Phone: +39 0112276704
> > > >> Fax: +39 011 2276 299
> > > >>
> > > >>
> > > >
> > >
> > > Eng. Manuel Ricardo Perez Cerquera. MSc. Ph.D student
> > > Antenna and EMC Lab (LACE)
> > > Istituto Superiore Mario Boella (ISMB)
> > > Politecnico di Torino
> > > Via Pier Carlo Boggio 61, Torino 10138, Italy
> > > Email: manuel.perezcerquera at polito.it
> > > Phone: +39 0112276704
> > > Fax: +39 011 2276 299
> > >
> > >
> >
> >
> 
> 
> 



More information about the petsc-users mailing list