[petsc-dev] petfmm example gravity problem

neiosun neiosun at gmail.com
Tue Aug 13 23:40:30 CDT 2013


Hi,

I just began to use petfmm.  When I tried the example sequence_test, there
is a problem about metis.h. After I added this file to petfmm folder,  now
it works.

However, when I tried different example like gravityAnomaly, there is
always something wrong.

Below is my configuration for petsc and the error code for gravityanomaly.

====
used PETSC3.2.p7, with the configuration
./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack
--download-mpich --with-clanguage=cxx --download-boost --with-sieve
--download-parmetis

======
dong:~/petfmm/src/examples$ ./make.py --example=gravityAnomaly
Building gravityAnomaly for kernel BiotSavart and evaluator Iteration in 2
dimensions in serial
Traceback (most recent call last):
  File "./make.py", line 292, in <module>
    Maker().build()
  File "./make.py", line 288, in build
    self.executeShellCommand('make')
  File "/home/dong/petsc-3.2-p7/config/BuildSystem/script.py", line 256, in
executeShellCommand
    checkCommand(command, status, output, error)
  File "/home/dong/petsc-3.2-p7/config/BuildSystem/script.py", line 212, in
defaultCheckCommand
    if status: raise RuntimeError('Could not execute "%s":\n%s' %
(command,output+error))
RuntimeError: Could not execute "make":
/home/dong/petsc-3.2-p7/linux-gnu-c-debug/bin/mpicxx -o gravityAnomaly.o -c
-Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g -I..
-DDIMENSION=2 -DNUM_TERMS=17 -DNUM_COEFFICIENTS=17 -DNEIGHBOR_RADIUS=1
-I/home/dong/petsc-3.2-p7/include
-I/home/dong/petsc-3.2-p7/linux-gnu-c-debug/include
-I/home/dong/petsc-3.2-p7/include/sieve -D__INSDIR__= gravityAnomaly.cxx
/home/dong/petsc-3.2-p7/linux-gnu-c-debug/bin/mpicxx -Wall -Wwrite-strings
-Wno-strict-aliasing -Wno-unknown-pragmas -g -I.. -DDIMENSION=2
-DNUM_TERMS=17 -DNUM_COEFFICIENTS=17 -DNEIGHBOR_RADIUS=1  -o gravityAnomaly
gravityAnomaly.o -L/home/dong/petsc-3.2-p7/linux-gnu-c-debug/lib  -lpetsc
-Wl,-rpath,/home/dong/petsc-3.2-p7/linux-gnu-c-debug/lib -lparmetis -lmetis
-lpthread -lflapack -lfblas -lm -L/usr/lib/gcc/x86_64-linux-gnu/4.6
-L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -ldl -lmpich -lopa
-lmpl -lrt -lpthread -lgcc_s -lmpichf90 -lgfortran -lm -lgfortran -lm
-lquadmath -lm -lmpichcxx -lstdc++ -ldl -lmpich -lopa -lmpl -lrt -lpthread
-lgcc_s -ldl
gravityAnomaly.cxx: In function ‘int main(int, char**)’:
gravityAnomaly.cxx:265:47: error: cannot convert ‘Field<PETSc::Point<2>,
std::complex<double>, double>::potential_type {aka std::complex<double>}’
to ‘PetscScalar {aka double}’ in assignment
gravityAnomaly.cxx:266:31: error: invalid types ‘Field<PETSc::Point<2>,
std::complex<double>, double>::field_type {aka double}[int]’ for array
subscript
gravityAnomaly.cxx:267:31: error: invalid types ‘Field<PETSc::Point<2>,
std::complex<double>, double>::field_type {aka double}[int]’ for array
subscript
gravityAnomaly.cxx:268:31: error: invalid types ‘Field<PETSc::Point<2>,
std::complex<double>, double>::field_type {aka double}[int]’ for array
subscript
gravityAnomaly.cxx:284:65: error: cannot convert ‘Blob<PETSc::Point<2>,
double, std::complex<double>, double>::potential_type {aka
std::complex<double>}’ to ‘PetscScalar {aka double}’ in assignment
gravityAnomaly.cxx:285:40: error: invalid types ‘Blob<PETSc::Point<2>,
double, std::complex<double>, double>::field_type {aka double}[int]’ for
array subscript
gravityAnomaly.cxx:286:40: error: invalid types ‘Blob<PETSc::Point<2>,
double, std::complex<double>, double>::field_type {aka double}[int]’ for
array subscript
gravityAnomaly.cxx:287:40: error: invalid types ‘Blob<PETSc::Point<2>,
double, std::complex<double>, double>::field_type {aka double}[int]’ for
array subscript
make: [gravityAnomaly.o] Error 1 (ignored)
g++: error: gravityAnomaly.o: No such file or directory
make: *** [gravityAnomaly] Error 1
========================================================

What should I do with this error?


Yours,

Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130814/7667bd38/attachment.html>


More information about the petsc-dev mailing list