[petsc-users] How to exclude -C compiler option (VecGetArray in Fortran)
Danyang Su
danyang.su at gmail.com
Fri Aug 9 16:44:12 CDT 2013
Hi All,
I get some problem in VecGetArray in Fortran, which I guess is due to
the default -C compiler option.
Current compiler option are:
$ make ksp_inhm
/cygdrive/c/cygwin/packages/petsc-3.4.2/bin/win32fe/win32fe ifort -c
-MT -Z7 -fpp -I/cygdrive/c/cygwin/packages/petsc-3.4.2/in
clude
-I/cygdrive/c/cygwin/packages/petsc-3.4.2/arch-mswin-c-debug/include
-I/cygdrive/c/cygwin/packages/parmetis-4.0.3/include
-I/cygdrive/c/cygwin/packages/metis-5.1.0/include -I/cygdrive/c/Program\
Files/MPICH2/include -o ksp_inhm.o ksp_inhm.F90
/cygdrive/c/cygwin/packages/petsc-3.4.2/bin/win32fe/win32fe cl -MT
-wd4996 -Z7 -o ksp_inhm_d ksp_inhm.o -L/cygdrive/c/cygwin/p
ackages/petsc-3.4.2/arch-mswin-c-debug/lib -lpetsc -lflapack -lfblas
/cygdrive/c/cygwin/packages/parmetis-4.0.3/build/libparmet
is/Release/parmetis.lib
/cygdrive/c/cygwin/packages/metis-5.1.0/build/libmetis/Release/metis.lib
/cygdrive/c/Program\ Files/MPIC
H2/lib/fmpich2.lib /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib
/cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib Gdi32.lib Us
er32.lib Advapi32.lib Kernel32.lib Ws2_32.lib
Relevant codes are as follows:
#define xx_a(ib) xx_v(xx_i + (ib))
PetscScalar :: xx_v(1)
PetscOffset :: xx_i
...
call VecGetArray(x, xx_v, xx_i, ierr)
write(*, 90) istart+1, xx_a(istart+1), iend, xx_a(iend) !istart and
iend are the ownership range
90 format ('x(', i6, ') = ',e11.4, ' x(', i6, ') = ',e11.4)
call VecRestoreArray(x, xx_v, xx_i, ierr)
The output (xx_a(istart+1), xx_a(iend)) is CORRECT for the processor 0,
but INCORRECT for the other processors.
I found in the manual that for the fortran user, the compiler option -C
should not be used. How I can set this option?
Thanks and regards,
Danyang
More information about the petsc-users
mailing list