[petsc-users] Question on re-coding ex29
Alan Wei
zhenglun.wei at gmail.com
Wed Jul 27 13:38:41 CDT 2011
Dear Sir/Madam,
I hope you're having a nice day.
I asked several questions about src/ksp/ksp/example/tutorial/ex29.c
before, and learned some beginning staff of PETSc. Right now, I want to
start to use it to my own program. Firstly, I want to isolate the ComputeRHS
function in ex29, which means I want to put ComputeRHS to another c program
file. I did that; however, some problem pop up when I compile it.
/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/bin/mpicc -o ex29.o
-c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3
-I/home/zlwei/soft/mercurial/petsc-dev/include
-I/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/include
-I/home/zlwei/soft/mercurial/petsc-dev/src/dm/mesh/sieve
-D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex29.c
ex29.c: In function ComputeRHS:
ex29.c:39: error: storage class specified for parameter BCType
ex29.c:44: error: expected specifier-qualifier-list before BCType
ex29.c:61: error: expected =, ,, ;, asm or __attribute__ before { token
ex29.c:117: error: expected =, ,, ;, asm or __attribute__ before { token
ex29.c:130: error: expected =, ,, ;, asm or __attribute__ before { token
ex29.c:197: error: expected =, ,, ;, asm or __attribute__ before { token
ex29.c:220: error: old-style parameter declarations in prototyped function
definition
ex29.c:220: error: expected { at end of input
make: [ex29.o] Error 1 (ignored)
/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/bin/mpicc -o
ComputeRHS.o -c -Wall -Wwrite-strings -Wno-strict-aliasing
-Wno-unknown-pragmas -g3 -I/home/zlwei/soft/mercurial/petsc-dev/include
-I/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/include
-I/home/zlwei/soft/mercurial/petsc-dev/src/dm/mesh/sieve
-D__INSDIR__=src/ksp/ksp/examples/tutorials/ ComputeRHS.c
/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/bin/mpicc -Wall
-Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -o ex29
ex29.o ComputeRHS.o
-L/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/lib -lpetsc
-Wl,-rpath,/home/zlwei/soft/mercurial/petsc-dev/arch-linux2-c-debug/lib
-lflapack -lfblas -lm -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lmpich
-lopa -lmpl -lrt -lpthread -lgcc_s -lmpichf90 -lgfortran -lm -lm -ldl
-lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl
gcc: ex29.o: No such file or directory
make: [ex29] Error 1 (ignored)
The program and modified makefile are attached. Could you please take a look
and give me some suggestions.
best,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110727/42d143aa/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NewEx29.zip
Type: application/zip
Size: 4683 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110727/42d143aa/attachment-0001.zip>
More information about the petsc-users
mailing list