[petsc-users] C++ compilation error

Balay, Satish balay at mcs.anl.gov
Sun Jan 13 20:28:42 CST 2019


Glad you figured this out. Thanks for the update.

Satish

On Sun, 13 Jan 2019, Choudhary, Devyani D wrote:

> It was the issue with the compiler, and is resolved now. I can run the examples now.
> 
> Thank you for your help.
> 
> 
> Devyani
> 
> ________________________________
> From: Balay, Satish <balay at mcs.anl.gov>
> Sent: Sunday, January 13, 2019 5:18:22 PM
> To: Choudhary, Devyani D; petsc-users
> Subject: RE: [petsc-users] C++ compilation error
> 
> 
> Do you get this error with any petsc example – say src/ksp/ksp/examples /tutorials/ex2 ?
> 
> 
> 
> Also, copy paste the complete output from make – when building example or your Test code.
> 
> 
> 
> Satish
> 
> 
> 
> ________________________________
> From: petsc-users <petsc-users-bounces at mcs.anl.gov> on behalf of Choudhary, Devyani D via petsc-users <petsc-users at mcs.anl.gov>
> Sent: Sunday, January 13, 2019 2:27:05 PM
> To: petsc-users
> Subject: Re: [petsc-users] C++ compilation error
> 
> 
> Thank you for the response Satish, but I am still encountering the same issue.
> 
> Following is my makefile:
> 
> 
> PETSC_DIR=/usr/local/pacerepov1/petsc/3.8.3/mvapich2-2.1/intel-15.0/opt/lib/petsc/
> 
> include ${PETSC_DIR}/conf/variables
> include ${PETSC_DIR}/conf/rules
> include ${PETSC_DIR}/conf/test
> 
> hello: hello.o  chkopts
>         -${CLINKER} -o hello hello.o  ${PETSC_LIB}
>         ${RM} hello.o
> 
> It is in the format of petsc examples. I am not sure why I am still getting the error.
> 
> Devyani
> 
> 
> 
> ________________________________
> From: Balay, Satish <balay at mcs.anl.gov>
> Sent: Sunday, January 13, 2019 3:07:58 PM
> To: Choudhary, Devyani D
> Cc: petsc-users at mcs.anl.gov
> Subject: Re: [petsc-users] C++ compilation error
> 
> Presumably PETSc is buit with intel compilers - but somehow gcc/g++ is
> getting used via your makefile.
> 
> Do you get this error when you use PETSc example with a petsc
> makefile? Perhaps you need to format your makefile using petsc
> makefile format. For ex: check
> src/tao/leastsquares/examples/tutorials/makefile
> 
> Satish
> 
> On Sun, 13 Jan 2019, Choudhary, Devyani D via petsc-users wrote:
> 
> > Hi,
> >
> >
> > I am trying to make a simple hello world script using a makefile that includes petsc, and am getting the error
> >
> > "g++: error: unrecognized command line option ‘-wd1572’"
> >
> > I am not sure how to fix it.
> >
> > Please let me know if you have some ideas on how to fix this.
> >
> >
> > Thank you
> >
> 


More information about the petsc-users mailing list