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

TAY wee-beng zonexo at gmail.com
Wed Nov 30 14:42:07 CST 2011


Hi Matt,

I didn't call this thru KSPSolve since I'm using HYPRE native struct 
interface.

Anyway, I found the ans  - It's due to the usage of :

call HYPRE_MPI_Comm_f2c(mpi_comm, MPI_COMM_WORLD, ierr)

It used to be required when using HYPRE with openmpi. However, now it's 
not required anymore. Using it cause error.

Yours sincerely,

TAY wee-beng


On 28/11/2011 3:01 PM, Matthew Knepley wrote:
> On Mon, Nov 28, 2011 at 6:27 AM, TAY wee-beng <zonexo at gmail.com 
> <mailto:zonexo at gmail.com>> wrote:
>
>     Hi,
>
>     The code compiles and works ok. However, when I changed my solver
>     to use HYPRE to solve the poisson equation,
>
>     I got the error:
>
>     [hpc12:29772] *** An error occurred in MPI_comm_size
>     [hpc12:29772] *** on communicator MPI_COMM_WORLD
>     [hpc12:29772] *** MPI_ERR_COMM: invalid communicator
>     [hpc12:29772] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
>     1.07user 0.12system 0:01.23elapsed 97%CPU (0avgtext+0avgdata
>     188432maxresident)k
>     0inputs+35480outputs (0major+11637minor)pagefaults 0swaps
>     --------------------------------------------------------------------------
>     mpiexec has exited due to process rank 0 with PID 29771 on
>     node hpc12 exiting improperly. There are two reasons this could occur:
>
>     1. this process did not call "init" before exiting, but others in
>     the job did. This can cause a job to hang indefinitely while it waits
>     for all processes to call "init". By rule, if one process calls
>     "init",
>     then ALL processes must call "init" prior to termination.
>
>     2. this process called "init", but exited without calling "finalize".
>     By rule, all processes that call "init" MUST call "finalize" prior to
>     exiting or it will be considered an "abnormal termination"
>
>     This may have caused other processes in the application to be
>     terminated by signals sent by mpiexec (as reported here).
>
>
>     This happens after calling the subroutine call
>     HYPRE_StructStencilCreate(3, 4, stencil_hypre, ierr).
>
>     Btw, my code is using HYPRE's own function to construct the matrix
>     and solve it.
>
>
> I can only assume you have a bug in your code. Why not just call this 
> through KSPSolve?
>
>   Matt
>
>     Thanks!
>
>     Yours sincerely,
>
>     TAY wee-beng
>
>
>     On 27/11/2011 10:30 PM, Satish Balay wrote:
>
>         check http://www.mcs.anl.gov/petsc/documentation/changes/32.html
>
>         ->  Changed PetscTruth to PetscBool
>
>         satish
>
>         On Sun, 27 Nov 2011, TAY wee-beng wrote:
>
>             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!
>
>
>
>
>
> -- 
> What most experimenters take for granted before they begin their 
> experiments is infinitely more interesting than any results to which 
> their experiments lead.
> -- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111130/4147907d/attachment.htm>


More information about the petsc-users mailing list