On Mon, Nov 28, 2011 at 6:27 AM, TAY wee-beng <span dir="ltr"><<a 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>
------------------------------<u></u>------------------------------<u></u>--------------<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 href="http://www.mcs.anl.gov/petsc/documentation/changes/32.html" target="_blank">http://www.mcs.anl.gov/petsc/<u></u>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_<u></u>y1,size_y2,size_y3<br>
<br>
real(8), allocatable ::<br>
x(:),y(:),z(:),xu(:),yu(:),zu(<u></u>:),xv(:),yv(:),zv(:),xw(:),yw(<u></u>:),zw(:),c_cx(:),cu_cx(:),c_<u></u>cy(:),cv_cy(:),c_cz(:),cw_cz(:<u></u>)<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_<u></u>mumps_debug/include<br>
-I/home/wtay/Lib/petsc-3.2-p5_<u></u>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_<u></u>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_<u></u>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_<u></u>ext,kend_ext,ksta_ext0,ksta2,<u></u>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,<u></u>ijk_end_m,ijk_sta_mx,ijk_end_<u></u>mx,ijk_sta_my,ijk_end_my,ijk_<u></u>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)+<u></u>1; kend=(myid+1)*(size_z/num_<u></u>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>