[petsc-users] Compilation error

Jed Brown jed at jedbrown.org
Fri Jan 24 13:54:49 CST 2014


"Jin, Shuangshuang" <Shuangshuang.Jin at pnnl.gov> writes:

> Hello, I successfully installed Petsc-dev on my cluster with the following configuration:
>
> ./configure --with-scalar-type=complex --with-clanguage=C++ --download-f-blas-lapack PETSC_ARCH=arch-complex --with-fortran-kernels=generic --download-superlu_dist --download-mumps --download-scalapack --download-parmetis --download-metis
>
> The PETSc libraries were built correctly, and test examples were ran to verfy correct installation.
>
> However, when I got to run the example in /Petsc-dev/src/ts/examples/tutorials/ex17.c, I got compilation an error as below:
>
> [d3m956 at philo tutorials]$ make ex17
> mpicxx -o ex17.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g   -fPIC    -I/pic/projects/ds/Powertech_Labs/petsc-dev.6.06.13/include -I/pic/projects/ds/Powertech_Labs/petsc-dev.6.06.13/arch-complex/include -I/share/apps/openmpi/1.6.5/gcc/4.6.2/include    -D__INSDIR__=src/ts/examples/tutorials/ ex17.c
> /pic/projects/ds/Powertech_Labs/petsc-dev.6.06.13/include/petscsnes.h(585): error: invalid argument to attribute "deprecated"
>   PETSC_DEPRECATED("Use SNESGetLineSearch()") PETSC_STATIC_INLINE PetscErrorCode SNESGetSNESLineSearch(SNES snes,SNESLineSearch *ls) {return SNESGetLineSearch(snes,ls);}
>   ^

You must be using a very old "petsc-dev".  Likely scenario here is that
you have changed environments from when you configured, and now this
older version of gcc (the Intel compiler changes its dialect based on
which gcc it finds in path) has a dialect that doesn't support arguments
to attribute deprecated.  This was so common that I unconditionally
turned off use of the argument to attribute deprecated.  (Yes, this is
worse for users that have a stable environment or don't use Intel
compilers, but Intel's indirect environment-dependence causes the
unacceptable breakage above so we had to work around it somehow.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140124/3b2ef780/attachment.pgp>


More information about the petsc-users mailing list