[petsc-users] Error compiling code when upgrading from 3.1p8 to 3.2p5

TAY wee-beng zonexo at gmail.com
Sun Nov 27 15:27:12 CST 2011


Hi,

I have trouble compiling my Fortran codes when I upgrade PETSc  from 
3.1p8 to 3.2p5.

My code is something like this:

module global_data

use nrtype

implicit none

save

#include "finclude/petsc.h90"

!grid variables

integer :: size_x,size_y,size_z,grid_type    
!size_x1,size_x2,size_x3,size_y1,size_y2,size_y3

real(8), allocatable :: 
x(:),y(:),z(:),xu(:),yu(:),zu(:),xv(:),yv(:),zv(:),xw(:),yw(:),zw(:),c_cx(:),cu_cx(:),c_cy(:),cv_cy(:),c_cz(:),cw_cz(:)

!solver variables

...

I tried after compiling with the new 3.2p5 and got the following error:

/opt/openmpi-1.5.3/bin/mpif90 -c -g -debug all -implicitnone -warn 
unused -fp-stack-check -heap-arrays -ftrapuv -check pointers -O0 -save 
-w90 -w -w95    -O0   -I/home/wtay/Lib/petsc-3.2-p5_mumps_debug/include 
-I/home/wtay/Lib/petsc-3.2-p5_mumps_debug/include 
-I/opt/openmpi-1.5.3/include    -o global.o global.F90
global.F90(205): error #5082: Syntax error, found IDENTIFIER 'FLGG' when 
expecting one of: ( % : . = =>
PetscTruth flgg
-----------^
global.F90(205): error #6274: This statement must not appear in the 
specification part of a module
PetscTruth flgg
^
global.F90(207): error #6236: A specification statement cannot appear in 
the executable section.
integer(kind=selected_int_kind(5)) reason
^
global.F90(209): error #6236: A specification statement cannot appear in 
the executable section.
integer(kind=selected_int_kind(10)) i_vec
^
global.F90(213): error #6236: A specification statement cannot appear in 
the executable section.
integer :: 
myid,num_procs,ksta,kend,ksta_ext,kend_ext,ksta_ext0,ksta2,kend2,kend3
^
global.F90(215): error #6236: A specification statement cannot appear in 
the executable section.
integer :: 
ijk_sta_p,ijk_end_p,ijk_sta_m,ijk_end_m,ijk_sta_mx,ijk_end_mx,ijk_sta_my,ijk_end_my,ijk_sta_mz,ijk_end_mz
^
global.F90(217): error #6236: A specification statement cannot appear in 
the executable section.
character(2) :: procs
^
global.F90(205): error #6404: This name does not have a type, and must 
have an explicit type.   [PETSCTRUTH]
PetscTruth flgg
^
global.F90(205): error #6404: This name does not have a type, and must 
have an explicit type.   [FLGG]
PetscTruth flgg
-----------^
global.F90(229): error #6404: This name does not have a type, and must 
have an explicit type.   [KSTA]
ksta=myid*(size_z/num_procs)+1; kend=(myid+1)*(size_z/num_procs)


May I know what's wrong?

Thanks!

-- 
Yours sincerely,

TAY wee-beng



More information about the petsc-users mailing list