Hi everyone,

I am learning to use deal.II these days, and definitely I am a new guy
to deal.II.

>From the tutorial step-17 I figured out that deal.II needs PETSc and
p4est to be installed. I removed the former deal.II directory and
installed PETSc and p4est from source. The version of PETSc is 3.1-p8,
and 0.3.3.8 for p4est. Then I re-compiled deal.II with the support of
PETSc and p4est, of course with mpi enabled. deal.II version is 7.0.

Then I tried to run example program step-17. Everything seemed quit
well. But things changed when I invoked step-18. Step-18 gave me the
following out put:

========================setp-18 output==============================
Timestep 1 at time 1
  Cycle 0:
    Number of active cells:       3712 (by partition: 3712)
    Number of degrees of freedom: 17226 (by partition: 17226)
    Assembling system... norm of rhs is 2.34224e+10
    Solver converged in 104 iterations.
    Updating quadrature point data...
  Cycle 1:
    Number of active cells:       12812 (by partition: 12812)
    Number of degrees of freedom: 51738 (by partition: 51738)
    Assembling system... norm of rhs is 2.32185e+10
    Solver converged in 122 iterations.
    Updating quadrature point data...
    Moving mesh...

Timestep 2 at time 2
    Assembling system...[0]PETSC ERROR: --------------------- Error
Message ------------------------------------
[0]PETSC ERROR: Argument out of range!
[0]PETSC ERROR: Inserting a new nonzero (10379, 10377) into matrix!
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar 17
13:37:48 CDT 2011
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18
on a linux-gnu named ubuntu by huyaoyu Fri Aug  5 13:28:46 2011
[0]PETSC ERROR: Libraries linked
from /home/huyaoyu/Downloads/petsc-3.1-p8/linux-gnu-c-debug/lib
[0]PETSC ERROR: Configure run at Fri Aug  5 09:22:06 2011
[0]PETSC ERROR: Configure options --with-cc=/usr/bin/mpicc
--with-fc=/usr/bin/mpif90 --download-f-blas-lapack=1 --with-shared
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: MatSetValues_MPIAIJ() line 358 in
src/mat/impls/aij/mpi/mpiaij.c
[0]PETSC ERROR: MatSetValues() line 992 in src/mat/interface/matrix.c
--------------------------------------------------------
An error occurred in line <1708> of file
</home/huyaoyu/Downloads/deal.II-non-threads/include/deal.II/lac/petsc_matrix_base.h>
 in function
    void dealii::PETScWrappers::MatrixBase::add(unsigned int, unsigned
int, const unsigned int*, const PetscScalar*, bool, bool)
The violated condition was: 
    ierr == 0
The name and call sequence of the exception was:
    ExcPETScError(ierr)
Additional Information: 
An error with error number 63 occured while calling a PETSc function

Stacktrace:
-----------
#0  /home/huyaoyu/Downloads/deal.II-non-threads/lib/libdeal_II.g.so.7.0.0: 
dealii::PETScWrappers::MatrixBase::add(unsigned int, unsigned int, unsigned int 
const*, double const*, bool, bool)
#1  /home/huyaoyu/Downloads/deal.II-non-threads/lib/libdeal_II.g.so.7.0.0: void 
dealii::ConstraintMatrix::distribute_local_to_global<dealii::PETScWrappers::MPI::SparseMatrix,
 dealii::Vector<double> >(dealii::FullMatrix<double> const&, 
dealii::Vector<double> const&, std::vector<unsigned int, 
std::allocator<unsigned int> > const&, 
dealii::PETScWrappers::MPI::SparseMatrix&, dealii::Vector<double>&, 
dealii::internal::bool2type<false>) const
#2  /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18: void
dealii::ConstraintMatrix::distribute_local_to_global<dealii::PETScWrappers::MPI::SparseMatrix>(dealii::FullMatrix<double>
 const&, std::vector<unsigned int, std::allocator<unsigned int> > const&, 
dealii::PETScWrappers::MPI::SparseMatrix&) const
#3  /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18:
QuasiStaticElasticity::TopLevel<3>::assemble_system()
#4  /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18:
QuasiStaticElasticity::TopLevel<3>::solve_timestep()
#5  /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18:
QuasiStaticElasticity::TopLevel<3>::do_timestep()
#6  /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18:
QuasiStaticElasticity::TopLevel<3>::run()
#7  /home/huyaoyu/workspace/deal-learn/step-18/Debug/step-18: main
--------------------------------------------------------
=========================end of step-18 output=================

It seems that step-18 got a error from a PETSc function call. And the
error number PETSc returned is 63. PETSc showed that an argument may be
out of range.

I tried to use gdb to debug the program and found that step-18 received
the error after the function call in
include/deal.II/lac/petsc_matrix_base.h line 1705 which is

const int ierr = MatSetValues (matrix, 1, &petsc_i, n_columns,
col_index_ptr,col_value_ptr, ADD_VALUES);

with the local variables:
petsc_i        = 10379
n_colums       = 24
*col_index_ptr = 10377
*col_value_ptr = 1575965153.515595
ierr = 63

There is only one computer in the cluster. And I just want to work
through the deal.II tutorial. The computer has ubuntu 11.04 64bit
installed.

How can I get the step-18 program work properly? I am reading the
details the tutorial provides for step-17 and step-18. Maybe I have
missed some important instructions.

Thanks in advance.

HuYaoyu


_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to