<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Matt,<br>
<br>
I didn't call this thru KSPSolve since I'm using HYPRE native struct
interface.<br>
<br>
Anyway, I found the ans - It's due to the usage of :<br>
<br>
call HYPRE_MPI_Comm_f2c(mpi_comm, MPI_COMM_WORLD, ierr)<br>
<br>
It used to be required when using HYPRE with openmpi. However, now
it's not required anymore. Using it cause error.<br>
<pre class="moz-signature" cols="72">Yours sincerely,
TAY wee-beng</pre>
<br>
On 28/11/2011 3:01 PM, Matthew Knepley wrote:
<blockquote
cite="mid:CAMYG4G=KAPMUfNBEf2cdPQpcSF5jF-8gWRgjmOiPiLDdyt6bsQ@mail.gmail.com"
type="cite">On Mon, Nov 28, 2011 at 6:27 AM, TAY wee-beng <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:zonexo@gmail.com">zonexo@gmail.com</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
The code compiles and works ok. However, when I changed my
solver to use HYPRE to solve the poisson equation,<br>
<br>
I got the error:<br>
<br>
[hpc12:29772] *** An error occurred in MPI_comm_size<br>
[hpc12:29772] *** on communicator MPI_COMM_WORLD<br>
[hpc12:29772] *** MPI_ERR_COMM: invalid communicator<br>
[hpc12:29772] *** MPI_ERRORS_ARE_FATAL (your MPI job will now
abort)<br>
1.07user 0.12system 0:01.23elapsed 97%CPU (0avgtext+0avgdata
188432maxresident)k<br>
0inputs+35480outputs (0major+11637minor)pagefaults 0swaps<br>
--------------------------------------------------------------------------<br>
mpiexec has exited due to process rank 0 with PID 29771 on<br>
node hpc12 exiting improperly. There are two reasons this
could occur:<br>
<br>
1. this process did not call "init" before exiting, but others
in<br>
the job did. This can cause a job to hang indefinitely while
it waits<br>
for all processes to call "init". By rule, if one process
calls "init",<br>
then ALL processes must call "init" prior to termination.<br>
<br>
2. this process called "init", but exited without calling
"finalize".<br>
By rule, all processes that call "init" MUST call "finalize"
prior to<br>
exiting or it will be considered an "abnormal termination"<br>
<br>
This may have caused other processes in the application to be<br>
terminated by signals sent by mpiexec (as reported here).<br>
<br>
<br>
This happens after calling the subroutine call
HYPRE_StructStencilCreate(3, 4, stencil_hypre, ierr).<br>
<br>
Btw, my code is using HYPRE's own function to construct the
matrix and solve it.<br>
</blockquote>
<div><br>
</div>
<div>I can only assume you have a bug in your code. Why not just
call this through KSPSolve?</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks!<br>
<br>
Yours sincerely,<br>
<br>
TAY wee-beng<br>
<br>
<br>
On 27/11/2011 10:30 PM, Satish Balay wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
check <a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/documentation/changes/32.html"
target="_blank">http://www.mcs.anl.gov/petsc/documentation/changes/32.html</a><br>
<br>
-> Changed PetscTruth to PetscBool<br>
<br>
satish<br>
<br>
On Sun, 27 Nov 2011, TAY wee-beng wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have trouble compiling my Fortran codes when I upgrade
PETSc from 3.1p8 to<br>
3.2p5.<br>
<br>
My code is something like this:<br>
<br>
module global_data<br>
<br>
use nrtype<br>
<br>
implicit none<br>
<br>
save<br>
<br>
#include "finclude/petsc.h90"<br>
<br>
!grid variables<br>
<br>
integer :: size_x,size_y,size_z,grid_type<br>
!size_x1,size_x2,size_x3,size_y1,size_y2,size_y3<br>
<br>
real(8), allocatable ::<br>
x(:),y(:),z(:),xu(:),yu(:),zu(:),xv(:),yv(:),zv(:),xw(:),yw(:),zw(:),c_cx(:),cu_cx(:),c_cy(:),cv_cy(:),c_cz(:),cw_cz(:)<br>
<br>
!solver variables<br>
<br>
...<br>
<br>
I tried after compiling with the new 3.2p5 and got the
following error:<br>
<br>
/opt/openmpi-1.5.3/bin/mpif90 -c -g -debug all
-implicitnone -warn unused<br>
-fp-stack-check -heap-arrays -ftrapuv -check pointers -O0
-save -w90 -w -w95<br>
-O0 -I/home/wtay/Lib/petsc-3.2-p5_mumps_debug/include<br>
-I/home/wtay/Lib/petsc-3.2-p5_mumps_debug/include
-I/opt/openmpi-1.5.3/include<br>
-o global.o global.F90<br>
global.F90(205): error #5082: Syntax error, found
IDENTIFIER 'FLGG' when<br>
expecting one of: ( % : . = =><br>
PetscTruth flgg<br>
-----------^<br>
global.F90(205): error #6274: This statement must not
appear in the<br>
specification part of a module<br>
PetscTruth flgg<br>
^<br>
global.F90(207): error #6236: A specification statement
cannot appear in the<br>
executable section.<br>
integer(kind=selected_int_kind(5)) reason<br>
^<br>
global.F90(209): error #6236: A specification statement
cannot appear in the<br>
executable section.<br>
integer(kind=selected_int_kind(10)) i_vec<br>
^<br>
global.F90(213): error #6236: A specification statement
cannot appear in the<br>
executable section.<br>
integer ::<br>
myid,num_procs,ksta,kend,ksta_ext,kend_ext,ksta_ext0,ksta2,kend2,kend3<br>
^<br>
global.F90(215): error #6236: A specification statement
cannot appear in the<br>
executable section.<br>
integer ::<br>
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<br>
^<br>
global.F90(217): error #6236: A specification statement
cannot appear in the<br>
executable section.<br>
character(2) :: procs<br>
^<br>
global.F90(205): error #6404: This name does not have a
type, and must have an<br>
explicit type. [PETSCTRUTH]<br>
PetscTruth flgg<br>
^<br>
global.F90(205): error #6404: This name does not have a
type, and must have an<br>
explicit type. [FLGG]<br>
PetscTruth flgg<br>
-----------^<br>
global.F90(229): error #6404: This name does not have a
type, and must have an<br>
explicit type. [KSTA]<br>
ksta=myid*(size_z/num_procs)+1; kend=(myid+1)*(size_z/num_procs)<br>
<br>
<br>
May I know what's wrong?<br>
<br>
Thanks!<br>
<br>
<br>
</blockquote>
</blockquote>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to
which their experiments lead.<br>
-- Norbert Wiener<br>
</blockquote>
</body>
</html>