[petsc-users] C++ compilation error

Choudhary, Devyani D devyani at gatech.edu
Sun Jan 13 14:27:05 CST 2019


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/ce5c25b7/attachment.html>


More information about the petsc-users mailing list