Problems in session 3 of CIG ASPECT tutorials

Dear all,
I am trying to learn how to run ASPECT on my virtual machine under the CIG ASPECT tutorials on Youtube, but I met some problems in session 3.

  1. Errors occurred when I tried to run the viscoelastic_bending_beam.prm in release mode:
Line <146> of file <input string>: No entry with name <Use stress averaging> was declared in the current subsection.
----------------------------------------------------
Exception 'dealii::ExcMessage ("Invalid input parameter file.")' on rank 0 on processing: 

--------------------------------------------------------
An error occurred in line <462> of file </home/ubuntu/aspect/source/main.cc> in function
    void parse_parameters(const string&, dealii::ParameterHandler&)
The violated condition was: 
    false
Additional information: 
    Invalid input parameter file.

Stacktrace:
-----------
#0  /home/ubuntu/aspect/aspect-release: parse_parameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, dealii::ParameterHandler&)
#1  /home/ubuntu/aspect/aspect-release: void run_simulator<2>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool)
#2  /home/ubuntu/aspect/aspect-release: main
--------------------------------------------------------

Aborting!
--------------------------------------------------

But the Use stress averaging was already declared in the material subsection:

subsection Material model

  set Model name = viscoelastic

  subsection Viscoelastic
    set Densities            =  2800,  2800,  2800,  2800,  3300
    set Viscosities          = 1.e18, 1.e18, 1.e18, 1.e18, 1.e24
    set Elastic shear moduli = 1.e11, 1.e11, 1.e11, 1.e11, 1.e10
    set Fixed elastic time step     = 1e3
    set Use fixed elastic time step = false
    set Use stress averaging        = false 
    set Viscosity averaging scheme  = maximum composition
  end

end
  1. The prescribed_subduction.prm can’t be executed successfully either:
-----------------------------------------------------------------------------
-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
--     . version 2.5.0-pre (main, 25d58f2b0)
--     . using deal.II 9.4.0
--     .       with 32 bit indices and vectorization level 1 (128 bits)
--     . using Trilinos 12.18.1
--     . using p4est 2.3.2
--     . running in OPTIMIZED mode
--     . running with 2 MPI processes
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
-- For information on how to cite ASPECT, see:
--   https://aspect.geodynamics.org/citing.html?ver=2.5.0-pre&sha=25d58f2b0&src=code
-----------------------------------------------------------------------------
Number of active cells: 1,024 (on 5 levels)
Number of degrees of freedom: 26,647 (8,514+1,105+4,257+4,257+4,257+4,257)

*** Timestep 0:  t=0 years, dt=0 years
   Skipping temperature solve because RHS is zero.
   Solving OP system ... 0 iterations.
   Solving ML_SP system ... 0 iterations.
   Solving crust_SP system ... 0 iterations.
   Rebuilding Stokes preconditioner...
   Solving Stokes system... 200+

---------------------------------------------------------
TimerOutput objects finalize timed values printed to the screen by communicating over MPI in their destructors. 
Since an exception is currently uncaught, this synchronization (and subsequent output) will be skipped to avoid a possible deadlock.
---------------------------------------------------------

----------------------------------------------------
Exception 'ExcMessage (exception_message.str())' on rank 0 on processing: 

--------------------------------------------------------
An error occurred in line <2778> of file </home/ubuntu/aspect/source/utilities.cc> in function
    void aspect::Utilities::linear_solver_failed(const string&, const string&, const std::vector<dealii::SolverControl>&, const std::exception&, ompi_communicator_t* const&, const string&)
The violated condition was: 
    false
Additional information: 
    The iterative Stokes solver in Simulator::solve_stokes did not
    converge.
    
    The initial residual was: 8.793477e+14
    The final residual is: 9.991468e+08
    The required residual for convergence is: 8.793477e+08
    See prescribed_subduction/solver_history.txt for the full convergence history.
    
    The solver reported the following error:
    
    --------------------------------------------------------
    An error occurred in line <1286> of file
    </home/ubuntu/deal.II/installed/include/deal.II/lac/solver_gmres.h> in
    function
    void dealii::SolverFGMRES<VectorType>::solve(const MatrixType&, 
    VectorType&, const VectorType&, const PreconditionerType&) [with
    MatrixType = aspect::internal::StokesBlock; PreconditionerType =
    aspect::internal::BlockSchurPreconditioner<dealii::TrilinosWrappers::PreconditionAMG,
    dealii::TrilinosWrappers::PreconditionBase>; VectorType =
    dealii::TrilinosWrappers::MPI::BlockVector]
    The violated condition was:
    false
    Additional information:
    Iterative method reported convergence failure in step 1000. The
    residual in the last step was 9.99147e+08.
    
    This error message can indicate that you have simply not allowed a sufficiently large number of iterations for your iterative solver to converge. 
    This often happens when you increase the size of you problem. 
    In such cases, the last residual will likely still be very small, and you can make the error go away by increasing the allowed number of iterations when setting up the SolverControl object that determines the maximal number of iterations you allow.
    
    The other situation where this error may occur is when your matrix is not invertible (e.g., your matrix has a null-space), or if you try to apply the wrong solver to a matrix (e.g., using CG for a matrix that is not symmetric or not positive definite). In these cases, the residual in the last iteration is likely going to be large.
    
    Stacktrace:
    -----------
    #0  /home/ubuntu/aspect/aspect-release: void
    dealii::SolverFGMRES<dealii::TrilinosWrappers::MPI::BlockVector>::solve<aspect::internal::StokesBlock,
    aspect::internal::BlockSchurPreconditioner<dealii::TrilinosWrappers::PreconditionAMG,
    dealii::TrilinosWrappers::PreconditionBase>
    >(aspect::internal::StokesBlock const&,
    dealii::TrilinosWrappers::MPI::BlockVector&,
    dealii::TrilinosWrappers::MPI::BlockVector const&,
    aspect::internal::BlockSchurPreconditioner<dealii::TrilinosWrappers::PreconditionAMG,
    dealii::TrilinosWrappers::PreconditionBase> const&)
    #1  /home/ubuntu/aspect/aspect-release:
    aspect::Simulator<2>::solve_stokes()
    #2  /home/ubuntu/aspect/aspect-release:
    aspect::Simulator<2>::assemble_and_solve_stokes(bool, double*)
    #3  /home/ubuntu/aspect/aspect-release:
    aspect::Simulator<2>::solve_single_advection_single_stokes()
    #4  /home/ubuntu/aspect/aspect-release:
    aspect::Simulator<2>::solve_timestep()
    #5  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::run()
    #6  /home/ubuntu/aspect/aspect-release: void
    run_simulator<2>(std::__cxx11::basic_string<char,
    std::char_traits<char>, std::allocator<char> > const&,
    std::__cxx11::basic_string<char, std::char_traits<char>,
    std::allocator<char> > const&, bool, bool, bool)
    #7  /home/ubuntu/aspect/aspect-release: main
    --------------------------------------------------------
    

Stacktrace:
-----------
#0  /home/ubuntu/aspect/aspect-release: aspect::Utilities::linear_solver_failed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<dealii::SolverControl, std::allocator<dealii::SolverControl> > const&, std::exception const&, ompi_communicator_t* const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#1  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::solve_stokes()
#2  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::assemble_and_solve_stokes(bool, double*)
#3  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::solve_single_advection_single_stokes()
#4  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::solve_timestep()
#5  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::run()
#6  /home/ubuntu/aspect/aspect-release: void run_simulator<2>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool)
#7  /home/ubuntu/aspect/aspect-release: main
--------------------------------------------------------

Aborting!
----------------------------------------------------

I don’t know why the Stokes solver failed to converge, since I followed the instructions from the video to operate ASPECT. Maybe I lose some details.
Thanks for any kind of guidance.

Sincerely,
Wenjing

Dear Wenjing,

thank you for posting your questions!
Concerning your first question, the parameter Use stress averaging has been removed from the code. Can you try removing the line

   set Use stress averaging        = false

from the input file and run again?

Can you point me to where you downloaded the image for the virtual machine and where you got the input files for the tutorials from?

Thank you,
Anne

Dear Anne,
Thank you for your reply.
Unfortunately, it aborted again when the line was removed from the input file:

-----------------------------------------------------------------------------
-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
--     . version 2.5.0-pre (main, 25d58f2b0)
--     . using deal.II 9.4.0
--     .       with 32 bit indices and vectorization level 1 (128 bits)
--     . using Trilinos 12.18.1
--     . using p4est 2.3.2
--     . running in OPTIMIZED mode
--     . running with 1 MPI process
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
The output directory <output/> provided in the input file appears not to exist.
ASPECT will create it for you.
-----------------------------------------------------------------------------


---------------------------------------------------------
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
synchronization (and subsequent output) will be skipped
to avoid a possible deadlock.
---------------------------------------------------------


----------------------------------------------------
Exception 'ExcMessage ("The compositional field " + name + " you asked for is not used in the simulation.")' on rank 0 on processing: 

--------------------------------------------------------
An error occurred in line <329> of file </home/ubuntu/aspect/source/simulator/introspection.cc> in function
    unsigned int aspect::Introspection<dim>::compositional_index_for_name(const string&) const [with int dim = 2; std::string = std::__cxx11::basic_string<char>]
The violated condition was: 
    it != composition_names.end()
Additional information: 
    The compositional field ve_stress_xx you asked for is not used in the
    simulation.

Stacktrace:
-----------
#0  /home/ubuntu/aspect/aspect-release: aspect::Introspection<2>::compositional_index_for_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
#1  /home/ubuntu/aspect/aspect-release: aspect::MaterialModel::Rheology::Elasticity<2>::parse_parameters(dealii::ParameterHandler&)
#2  /home/ubuntu/aspect/aspect-release: aspect::MaterialModel::Viscoelastic<2>::parse_parameters(dealii::ParameterHandler&)
#3  /home/ubuntu/aspect/aspect-release: aspect::Simulator<2>::Simulator(ompi_communicator_t*, dealii::ParameterHandler&)
#4  /home/ubuntu/aspect/aspect-release: void run_simulator<2>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool)
#5  /home/ubuntu/aspect/aspect-release: main
--------------------------------------------------------

Aborting!

If memory serves, I downloaded the virtual machine image from deal.II and ASPECT virtualbox machine image, and got all the tutorial files from GitHub (aspect-tutorials/2020-tectonics-modeling-tutorial at master · gassmoeller/aspect-tutorials · GitHub).

Hope to get more guidance from you!

Thanks,
Wenjing

@Ensoleille This does not answer your question, but since I noticed it: You are running ASPECT in RELEASE mode. Whenever trying to track down problems, you should always run in DEBUG mode first.

Best
W.

Thanks for the tips, as emphasized in the tutorial videos.

In fact, I used the RELEASE mode because I attempted to follow the video step-by-step in order to learn how to run ASPECT. And that’s how the tutorial video handles the parameter file since it has been tested successfully as an instructional example. I also tried to run in DEBUG mode, but what presented on the terminal is the same.

Thanks again for your kind advice. I’ll keep that in mind and adopt this good habit in the future work.

Sincerely,
Wenjing

The ova linked to shows the ASPECT version is 1.22. Your example above shows you ran v2.5.0. The original tutorial was delivered using v2.2.0. Check whether you are using the proper “older version” of the ova: deal.II and ASPECT virtualbox machine image.

As Anne indicated, there have been changes to the prm so caution is advised when using older prms with the current version of the code.

Hello, I have the same problem as you, have you solved it? If so, can you teach me that?

Thanks,
Yutao

Dear Anne,

According to replies from experts, the error may be caused by the mismatch of the old prm file and the new ASPECT version. So could you please provide revised code?

Thank you,
Wenjing

Dear @Ensoleille,

Rather than use the virtual machine, my suggestion would be to compile ASPECT natively on your system or use the ASPECT docker container in combination with a more recent version of the viscoelastic bending beam benchmark.

The first order design of the benchmark PRM has not changed significantly, so I think you should still be able to follow along with the older tutorial.

Cheers,
John

Another approach maybe to use the online containers for ASPECT which should have a consistent install.

See: