<div>Hi Barry,</div><div><br></div><div>For the hmpi_spawn_size, the options in my .petscrc are</div><div>-info</div><div>-pc_view</div><div><div>pc_type hmpi</div><div>-ksp_type preonly</div><div>-ksp_view</div><div>-hmpi_pc_monitor</div>
<div>-hmpi_ksp_monitor</div><div>-hmpi_ksp_type cg</div><div>-hmpi_pc_type hypre</div><div>-hmpi_pc_hypre_type boomeramg</div><div>-hmpi_spawn_size 3</div><div><br></div><div><div>mpiexec.mpich2 -n 1 myprogram</div></div>
<div><br></div></div><div>[0] petscinitialize_(): (Fortran):PETSc successfully started: procs 1</div><div>[0] PetscGetHostName(): Rejecting domainname, likely is NIS gilbert.(none)</div><div>[0] petscinitialize_(): Running on machine: gilbert </div>
<div><br></div><div>[0] PetscCommDuplicate(): Duplicating a communicator 1140850688 -2080374784 max tags = <a href="tel:2147483647" value="+12147483647" target="_blank">2147483647</a></div><div>[0] MatSetUp(): Warning not preallocating matrix storage</div>
<div>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 360 X 360; storage space: 3978 unneeded,3222 used</div>
<div>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 360</div><div>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 9</div><div>[0] Mat_CheckInode(): Found 120 nodes of 360. Limit used: 5. Using Inode routines</div>
<div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374784</div><div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374784</div><div><br></div>
<div><div>Fatal error in PMPI_Bcast: Invalid communicator, error stack:</div><div>PMPI_Bcast(1478): MPI_Bcast(buf=0x7fff30dacecc, count=1, MPI_INT, root=0, comm=0x0) failed</div><div>PMPI_Bcast(1418): Invalid communicator</div>
</div><div><br></div><div>I inserted some print statement between the ksp calls and found that the error occurs in </div><div><br></div><div>call KSPSetFromOptions(ksp, pierr)</div><div><br></div><div>2. If I change hmpi_spawn_size 3 to hmpi_merge_size 2 and launch my job by</div>
<div><br></div><div>mpiexec.mpich2 -n 2 myprogram</div><div><br></div><div><div>[0] petscinitialize_(): (Fortran):PETSc successfully started: procs 2</div><div>[0] PetscGetHostName(): Rejecting domainname, likely is NIS gilbert.(none)</div>
<div>[0] petscinitialize_(): Running on machine: gilbert</div><div>[1] petscinitialize_(): (Fortran):PETSc successfully started: procs 2</div><div>[1] PetscGetHostName(): Rejecting domainname, likely is NIS gilbert.(none)</div>
<div>[1] petscinitialize_(): Running on machine: gilbert</div></div><div><br></div><div><div>[0] PetscCommDuplicate(): Duplicating a communicator 1140850688 -2080374780 max tags = 2147483647</div><div>[0] MatSetUp(): Warning not preallocating matrix storage</div>
<div>[1] PetscCommDuplicate(): Duplicating a communicator 1140850688 -2080374782 max tags = 2147483647</div><div>[0] PetscCommDuplicate(): Duplicating a communicator 1140850689 -2080374777 max tags = 2147483647</div><div>
[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850689 -2080374777</div><div>[1] PetscCommDuplicate(): Duplicating a communicator 1140850689 -2080374780 max tags = 2147483647</div><div>[1] PetscCommDuplicate(): Using internal PETSc communicator 1140850689 -2080374780</div>
<div>[0] MatStashScatterBegin_Private(): No of messages: 1 </div><div>[0] MatStashScatterBegin_Private(): Mesg_to: 1: size: 12896 </div><div>[0] MatAssemblyBegin_MPIAIJ(): Stash has 1611 entries, uses 0 mallocs.</div><div>
[1] MatAssemblyBegin_MPIAIJ(): Stash has 0 entries, uses 0 mallocs.</div><div>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 180 X 180; storage space: 1998 unneeded,1602 used</div><div>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 180</div>
<div>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 9</div><div>[0] Mat_CheckInode(): Found 60 nodes of 180. Limit used: 5. Using Inode routines</div><div>[1] MatAssemblyEnd_SeqAIJ(): Matrix size: 180 X 180; storage space: 1998 unneeded,1602 used</div>
<div>[1] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 180</div><div>[1] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 9</div><div>[1] Mat_CheckInode(): Found 60 nodes of 180. Limit used: 5. Using Inode routines</div>
<div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850689 -2080374777</div><div>[1] PetscCommDuplicate(): Using internal PETSc communicator 1140850689 -2080374780</div><div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850689 -2080374777</div>
<div>[1] PetscCommDuplicate(): Using internal PETSc communicator 1140850689 -2080374780</div><div>[0] VecScatterCreateCommon_PtoS(): Using blocksize 1 scatter</div><div>[0] VecScatterCreate(): General case: MPI to Seq</div>
<div>[1] MatAssemblyEnd_SeqAIJ(): Matrix size: 180 X 3; storage space: 396 unneeded,9 used</div><div>[1] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 3</div><div>[1] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 3</div>
<div>[1] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374782</div><div>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 180 X 3; storage space: 396 unneeded,9 used</div><div>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 3</div>
<div>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 3</div><div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374780</div><div>[0] VecAssemblyBegin_MPI(): Stash has 180 entries, uses 1 mallocs.</div>
<div>[0] VecAssemblyBegin_MPI(): Block-Stash has 0 entries, uses 0 mallocs.</div><div>[1] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374782</div><div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374780</div>
<div>[0] PCSetUp(): Setting up new PC</div><div>[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688 -2080374780</div></div><div><br></div><div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div>
<div>[0]PETSC ERROR: Nonconforming object sizes!</div><div>[0]PETSC ERROR: HMPI preconditioner only works for sequential solves!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 CDT 2012 </div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div>
<div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ../../esd-tough2/xt2_eos4 on a arch-linu named gilbert by gpau Fri Aug 31 13:00:31 2012</div>
<div>[0]PETSC ERROR: Libraries linked from /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/lib</div><div>[0]PETSC ERROR: Configure run at Thu Aug 30 15:27:17 2012</div><div>[0]PETSC ERROR: Configure options --with-debugging=0 --with-mpi-dir=/usr/lib/mpich2 --download-hypre=1 --prefix=/home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib</div>
<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: PCCreate_HMPI() line 283 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/pc/impls/openmp/hpc.c</div>
<div>[0]PETSC ERROR: PCSetType() line 83 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/pc/interface/pcset.c</div><div>[0]PETSC ERROR: PCSetFromOptions() line 188 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/pc/interface/pcset.c</div>
<div>[0]PETSC ERROR: KSPSetFromOptions() line 287 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/ksp/interface/itcl.c</div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div>
<div>[0]PETSC ERROR: No support for this operation for this object type!</div><div>[0]PETSC ERROR: PC does not have apply!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 CDT 2012 </div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div>
<div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ../../esd-tough2/xt2_eos4 on a arch-linu named gilbert by gpau Fri Aug 31 13:00:31 2012</div>
<div>[0]PETSC ERROR: Libraries linked from /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/lib</div><div>[0]PETSC ERROR: Configure run at Thu Aug 30 15:27:17 2012</div><div>[0]PETSC ERROR: Configure options --with-debugging=0 --with-mpi-dir=/usr/lib/mpich2 --download-hypre=1 --prefix=/home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib</div>
<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: PCApply() line 382 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/pc/interface/precon.c</div>
<div>[0]PETSC ERROR: KSPInitialResidual() line 64 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/ksp/interface/itres.c</div><div>[0]PETSC ERROR: KSPSolve_GMRES() line 230 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/ksp/impls/gmres/gmres.c</div>
<div>[0]PETSC ERROR: KSPSolve() line 446 in /home/gpau/tough_codes/esd-tough2/build/Linux-x86_64-Debug-MPI-EOS4/toughlib/tpls/petsc/petsc-3.3-p3-source/src/ksp/ksp/interface/itfunc.c</div></div><div><br></div><div>I note that the error appears to occur at the same point.</div>
<div><br></div><div>George</div><div><br></div><br><div class="gmail_quote">On Fri, Aug 31, 2012 at 11:31 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On Aug 31, 2012, at 1:27 PM, George Pau <<a href="mailto:gpau@lbl.gov" target="_blank">gpau@lbl.gov</a>> wrote:<br>
<br>
> Hi Barry,<br>
><br>
</div><div>> 1. It is the exact same error related to MPI_ERR_COMM and MPI_Bcast.<br>
<br>
</div> That should not happen. Please run and send all the output including the exact command line used<br>
<div><br>
<br>
> I am currently using the MPICH2 distribution provided by ubuntu but if MPICH version that Petsc download with -download-mpich works, I can use that.<br>
> 2. If I use hmpi_merge_size, I will need to launch mpiexec with more than 1 cpus. But, petsc will complain that the pctype hmpi can only be used in serial.<br>
<br>
</div> That should not happen. Run with 2 MPI processes and -hmpi_merge_size 2 and send the complete error message.<br>
<span><font color="#888888"><br>
<br>
Barry<br>
</font></span><div><div><br>
><br>
> George<br>
><br>
><br>
> On Aug 31, 2012, at 11:17 AM, Barry Smith wrote:<br>
><br>
>><br>
>> On Aug 30, 2012, at 10:02 PM, George Pau <<a href="mailto:gpau@lbl.gov" target="_blank">gpau@lbl.gov</a>> wrote:<br>
>><br>
>>> Hi Barry,<br>
>>><br>
>>> I tried with the addition of<br>
>>><br>
>>> -hmpi_spawn_size 3<br>
>>><br>
>>> but I am still getting the same error though.<br>
>><br>
>> The EXACT same error? Or some other error?<br>
>><br>
>> What happens if you run with the -hmpi_merge_size <size> option instead?<br>
>><br>
>> Barry<br>
>><br>
>> 1) I am getting a crash with the spawn version I suspect is due to bugs in the MPICH version I am using related to spawn.<br>
>><br>
>> 2) I am getting errors with the merge version due to Apple's ASLR which they make hard to turn off.<br>
>><br>
>><br>
>>> I am using mpich2. Any other options to try?<br>
>>><br>
>>> George<br>
>>><br>
>>><br>
>>> On Aug 30, 2012, at 7:28 PM, Barry Smith wrote:<br>
>>><br>
>>>><br>
>>>> On Aug 30, 2012, at 7:24 PM, George Pau <<a href="mailto:gpau@lbl.gov" target="_blank">gpau@lbl.gov</a>> wrote:<br>
>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> I have some issues using the -pctype hmpi. I used the same setting found at<br>
>>>>><br>
>>>>> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCHMPI.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCHMPI.html</a><br>
>>>>><br>
>>>>> i.e.<br>
>>>>> -pc_type hmpi<br>
>>>>> -ksp_type preonly<br>
>>>>> -hmpi_ksp_type cg<br>
>>>>> -hmpi_pc_type hypre<br>
>>>>> -hmpi_pc_hypre_type boomeramg<br>
>>>>><br>
>>>>> My command is<br>
>>>>><br>
>>>>> mpiexec -n 1 myprogram<br>
>>>><br>
>>>> Sorry the documentation doesn't make this clearer. You need to start PETSc with special options to get the "worker" processes initialized. From the manual page for PCHMPI it has<br>
>>>><br>
>>>> See PetscHMPIMerge() and PetscHMPISpawn() for two ways to start up MPI for use with this preconditioner<br>
>>>><br>
>>>> This will tell you want option to start PETSc up with.<br>
>>>><br>
>>>> I will fix the PC so that it prints a far more useful error message.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Barry<br>
>>>><br>
>>>><br>
>>>>><br>
>>>>> But, I get<br>
>>>>><br>
>>>>> [gilbert:4041] *** An error occurred in MPI_Bcast<br>
>>>>> [gilbert:4041] *** on communicator MPI_COMM_WORLD<br>
>>>>> [gilbert:4041] *** MPI_ERR_COMM: invalid communicator<br>
>>>>> [gilbert:4041] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)<br>
>>>>><br>
>>>>> with openmpi. I get similar error with mpich2<br>
>>>>><br>
>>>>> Fatal error in PMPI_Bcast: Invalid communicator, error stack:<br>
>>>>> PMPI_Bcast(1478): MPI_Bcast(buf=0x7fffb683479c, count=1, MPI_INT, root=0, comm=0x0) failed<br>
>>>>> PMPI_Bcast(1418): Invalid communicator<br>
>>>>><br>
>>>>> I couldn't figure out what is wrong. My petsc is version 3.3.3 and the configuration is -with-debugging=0 --with-mpi-dir=/usr/lib/openmpi --download-hypre=1 and I am on a Ubuntu machine.<br>
>>>>><br>
>>>>> Note that with the default pc_type and ksp_type, everything is fine. It was also tested with multiple processors. I wondering whether there are some options that I am not specifying correctly?<br>
>>>>><br>
>>>>> --<br>
>>>>> George Pau<br>
>>>>> Earth Sciences Division<br>
>>>>> Lawrence Berkeley National Laboratory<br>
>>>>> One Cyclotron, MS 74-120<br>
>>>>> Berkeley, CA 94720<br>
>>>>><br>
>>>>> <a href="tel:%28510%29%20486-7196" value="+15104867196" target="_blank">(510) 486-7196</a><br>
>>>>> <a href="mailto:gpau@lbl.gov" target="_blank">gpau@lbl.gov</a><br>
>>>>> <a href="http://esd.lbl.gov/about/staff/georgepau/" target="_blank">http://esd.lbl.gov/about/staff/georgepau/</a><br>
>>>>><br>
>>>><br>
>>><br>
>><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">George Pau</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Earth Sciences Division</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Lawrence Berkeley National Laboratory</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">One Cyclotron, MS 74-120</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Berkeley, CA 94720</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><a href="tel:%28510%29%20486-7196" value="+15104867196" target="_blank">(510) 486-7196</a><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<a href="mailto:gpau@lbl.gov" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">gpau@lbl.gov</a><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<a href="http://esd.lbl.gov/about/staff/georgepau/" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">http://esd.lbl.gov/about/staff/georgepau/</a><br>
<br>