[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PETSc, hangs, on, PetscInitialize



As the author of this bit of code, I can suggest the following issue. FEAP relies on an mpi implementation
that send standard fortran writes, things like write(*,*),
to the screen when issued, but this is in no way gaurenteed by the mpi standard. FEAP is probably sitting at a prompt waiting for your input but you simply can not see it. I have experienced this
problem on several new installations. There are two solutions: (1) Run in a strictly batch mode, making sure
that your feapname file is setup correctly, and that you have a means to read inputs from a file for the prompts that will appear (in this case a file with the letter y in it to accept the file names read from feapname). (2) re-write all the old non-parallel IO in the code (something I am thinking about but which is a lot of work to set it up so that it works\
in serial mode without petsc and in parallel mode with it).


The fact that it looks like it is hanging in the initialize routine is probably a red-herring.

-sg

Barry Smith wrote:
I would run in the debugger and then stop it after it has
hanged a long time (control c in gdb or dbx) then do where to
determine what it is doing. Send the output from where to petsc-maint@xxxxxxxxxxx if you need to.



Barry

On Fri, 15 Jun 2007, Marcus Heck wrote:

Hi,

I am runing PETSc on the FE-solver FEAP. If I run a normal FE analysis
everithing is fine!

Then I want do run a coupled FSI computation. So I initialize PETSc and
MpCCI (my coupling library) or the other way round (MpCCI, PETSc). But
PETSc enters the PetscInitialize and never comes out. Does anyone has an
idea.

Thanks a lot
Marcus

Here some infos about PETSc and my code:
**************
PETSc config:
./config/configure.py --prefix=/amd/software/linux/petsc-2.3.2-p10 --with-cc=gcc --with-fc=g77 --LD_SHARED= g++ --LDFLAGS="-O1" --with-mpi-dir=/usr/lib/mpich --with-mpi-shared=1


Compile and linking command in both cases are identical, except the MpCCI library includes.

If there is any idea let me know please
Thanks a lot in advance
Marcus

**************
CODE inside FEAP75.f
      write(*,*) 'FEAP starting MpCCI setup and interface definition.'
      call CCI_Init( iError )
      write(*,*) 'FEAP starting MpCCI done'
      write(*,*)'pcontr(): initializing PETSC'
      call PetscInitialize(PETSC_NULL_CHARACTER,petsc_ierr)
      write(*,*)'pcontr(): initializing PETSC done'
      call pstart()

**************
CODE OUTPUT:
 FEAP starting MpCCI setup and interface definition.
===========================================================================
MpCCI 3.0.3 (for MPICH 1.2.5) - compilation date Dec 22 2004 20:08:09
FhG-SCAI, Fraunhofer Institute for Algorithms and Scientific Computing
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany
Coupled computation started at 15-6-2007 11:16:16.
Running on host 'ares'.
===========================================================================

                   ************************************
                   *    This MpCCI 3.0 Professional   *
                   *         is licensed for          *
                   * TU Darmstadt, FB Maschinenbau, M *
                   *    until date 28-feb-2008.       *
                   ************************************

 FEAP starting MpCCI done
 pcontr(): initializing PETSC

**************
strace on the pid tells:
3p$ strace -p17164
Process 17164 attached - interrupt to quit
select(5, [3 4], NULL, NULL, {6, 266000}) = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0})    = 0 (Timeout)
select(5, [3 4], NULL, NULL, {9, 0}
-- 8< --- snip -- 8< ---

**************
Totalview telals following:

main (f77) -> perscinitialize_  (C) -> PETScParseFortranArgs_Private (C)
-> PMPI_Bcast -> inta_Bcast -> ...

Please see screen shot.