[petsc-users] C++ compilation error

Balay, Satish balay at mcs.anl.gov
Sun Jan 13 16:18:22 CST 2019


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190113/15781808/attachment-0001.html>


More information about the petsc-users mailing list