# ASPECT 3D Model Runtime Error: ExcInternalError - Dimension Check Failure

**URL:** <https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324>\
**Category:** ASPECT\
**Created:** [October 10, 2025, 8:31pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324 "2025-10-10T20:31:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![3Faker3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/3faker3/32/2411_2.png) [@3Faker3](https://community.geodynamics.org/u/3Faker3)\
**Post date:** [October 10, 2025, 8:31pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/1 "2025-10-10T20:31:28Z")

</div>

Hi.all  
I am encountering a dimension mismatch error when running a specific 3D mantle convection model in ASPECT, The error occurs during parameter parsing with the condition prm.get\_integer(“Dimension”) == dim failing.(ASPECT version: 3.0.0)  
core error:Aborting!  
Abort(1) on node 87 (rank 87 in comm 0): application called MPI\_Abort(MPI\_COMM\_WORLD, 1) - process 87  
An error occurred in line \<1463\> of file \</path/to/aspect/source/simulator/parameters.cc\> in functionvoid aspect::Parameters::parse\_parameters(dealii::ParameterHandler&, MPI\_Comm) [with int dim = 2; MPI\_Comm = int]The violated condition was:prm.get\_integer(“Dimension”) == dimAdditional information:This exception – which is used in many places in the library –usually indicates that some condition which the author of the codethought must be satisfied at a certain point in an algorithm, is notfulfilled. An example would be that the first part of an algorithmsorts elements of an array in ascending order, and a second part ofthe algorithm later encounters an element that is not larger than theprevious one.  
There is usually not very much you can do if you encounter such an  
exception since it indicates an error in deal.II, not in your own  
program. Try to come up with the smallest possible program that still  
demonstrates the error and contact the deal.II mailing lists with it  
to obtain help.  
Stacktrace:  
#0 /path/to/aspect/aspect-build/aspect: aspect::Parameters\<2\>::parse\_parameters(dealii::ParameterHandler&, int)#1 /path/to/aspect/aspect-build/aspect: aspect::Parameters\<2\>::Parameters(dealii::ParameterHandler&, int)#2 /path/to/aspect/aspect-build/aspect: aspect::Simulator\<2\>::Simulator(int, dealii::ParameterHandler&)#3 /path/to/aspect/aspect-build/aspect: void run\_simulator\<2\>(std::\_\_cxx11::basic\_string\<char, std::char\_traits, std::allocator \> const&, std::\_\_cxx11::basic\_string\<char, std::char\_traits, std::allocator \> const&, bool, bool, bool, bool)#4 /path/to/aspect/aspect-build/aspect: main  
set Dimension = 3  
set Use years in output instead of seconds = true  
set End time = 10e6  
set Output directory = Result

set Nonlinear solver scheme = single Advection, iterated Stokes  
set Nonlinear solver tolerance = 1e-3  
set Max nonlinear iterations = 55  
set CFL number = 1  
set Resume computation = auto  
set Pressure normalization= no  
set Surface pressure=0

subsection Solver parameters  
subsection Advection solver parameters  
set GMRES solver restart length = 200  
end  
subsection Stokes solver parameters  
set Linear solver tolerance = 1e-5  
set Linear solver A block tolerance = 1.0e-2  
set Use full A block as preconditioner = false

# set Stokes solver type = block AMG

```
set Number of cheap Stokes solver steps= 5000

```

end  
set Temperature solver tolerance = 1e-11  
set Composition solver tolerance = 1e-11  
end  
subsection Discretization  
set Temperature polynomial degree = 2  
set Composition polynomial degree = 2  
set Stokes velocity polynomial degree = 2  
set Use discontinuous composition discretization = true  
end  
subsection Gravity model  
set Model name = vertical  
subsection Vertical  
set Magnitude = 9.81  
end  
end  
subsection Formulation  
set Formulation = Boussinesq approximation  
end

subsection Heating model  
set List of model names = compositional heating  
subsection Compositional heating  
set Use compositional field for heat production averaging = 0,0,1,0,0,1,0,0,0,0,1,0,0  
set Compositional heating values = 0, 0 ,1.0e-6 ,0, 0,1.0e-6, 0 ,0, 0,0, 1.0e-6, 0, 0  
end  
end  
#------ domain and meshing -----------  
subsection Geometry model  
set Model name = box  
subsection Box  
set X extent = 4000e3  
set Y extent = 2000e3  
set Z extent = 1500e3  
end  
end

### 

subsection Mesh refinement  
set Initial global refinement = 5  
set Initial adaptive refinement = 3  
set Time steps between mesh refinement = 5  
set Refinement fraction = 0.35  
set Coarsening fraction = 0.15  
set Strategy = composition threshold, strain rate  
subsection Composition threshold  
set Compositional field thresholds = 0.25,0.25,0.25,0.25,0.25,0.25,0.05,0.25,0.25,0.25,0.25,0  
end  
end  
#---- initial temp and comp fields —  
subsection Initial temperature model  
set Model name = ascii data  
subsection Ascii data model  
set Data directory = ./data/  
set Data file name = temperature\_3D.txt  
end  
end  
subsection Compositional fields  
set Number of fields =12  
set Names of fields = ct\_up,ct\_low,ct\_mantle,con\_up,con\_low,con\_mantle,wk,sed,oc\_up,oc\_low,oc\_mantle,plastic\_strain  
end  
subsection Initial composition model  
set Model name = ascii data  
subsection Ascii data model  
set Data directory = ./data/  
set Data file name = composition\_3D.txt  
end  
end  
#------- boundary conditions -------------  
subsection Boundary temperature model  
set Fixed temperature boundary indicators = top, bottom  
set List of model names = box  
subsection Box  
set Bottom temperature = 1623  
set Top temperature = 273  
end  
end  
subsection Boundary composition model  
set Fixed composition boundary indicators =right  
set List of model names =initial composition  
end  
subsection Boundary velocity model  
set Tangential velocity boundary indicators =top,bottom,left,front,back  
set Prescribed velocity boundary indicators = right:function  
subsection Function  
set Function constants = cm=100.0, transition\_upper\_z=1300e3, transition\_lower\_z=200e3,  
right\_speed=5.0, left\_speed=-5.0, x\_divider=1500e3  
set Variable names = x,y,z  
set Function expression = (x \> x\_divider) ? ((z \>= transition\_upper\_z) ? left\_speed/cm : \  
(z \<= transition\_lower\_z) ? right\_speed/cm :\  
left\_speed/cm + (right\_speed/cm - left\_speed/cm) \*(z - transition\_upper\_z) / (transition\_lower\_z - transition\_upper\_z)) :0;0  
end  
end  
subsection Material model  
set Model name = visco plastic  
set Material averaging = harmonic average  
#project to Q1 only viscosity  
subsection Visco Plastic  
set Reference temperature = 1623  
set Minimum strain rate = 1.e-20  
set Minimum viscosity = 0.5e20  
set Maximum viscosity = 1e24  
set Adiabat temperature gradient for viscosity = 9.24e-09 # 0.3 K/km  
set Minimum strain rate=1e-20  
set Thermal diffusivities = 1.e-6  
set Heat capacities = 1250.  
set Thermal expansivities = 3.0e-5  
set Densities = background:3300,ct\_up:2800,ct\_low:2900,ct\_mantle:3300,con\_up:2800,con\_low:2900,con\_mantle:3300,wk:3200,sed:2600,oc\_up:3000,oc\_low:3000,oc\_mantle:3300,plastic\_strain:3300  
set Activation energies for Peierls creep=320e3  
set Activation energies for diffusion creep =background:375e3,ct\_up:154e3,ct\_low:300e3,ct\_mantle:375e3,con\_up:154e3,con\_low:300e3,con\_mantle:375e3,wk:100e3,sed:100e3,oc\_up:154e3,oc\_low:300e3,oc\_mantle:375e3,plastic\_strain:0  
set Activation volumes for diffusion creep =background:15e-6,ct\_up:2e-6,ct\_low:8e-6,ct\_mantle:15e-6,con\_up:2e-6,con\_low:8e-6,con\_mantle:15e-6,wk:1.5e-6,sed:1.5e-6,oc\_up:2e-6,oc\_low:8e-6,oc\_mantle:15e-6,plastic\_strain:0  
set Viscous flow law = composite  
set Prefactors for dislocation creep =background:1e-15,ct\_up:5e-18,ct\_low:3e-17,ct\_mantle:1e-14,con\_up:5e-18,con\_low:3e-17,con\_mantle:1e-14,wk:1e-20,sed:1e-20,oc\_up:5e-18,oc\_low:3e-17,oc\_mantle:1e-15,plastic\_strain:0  
set Stress exponents for dislocation creep =background:3.5,ct\_up:2.3,ct\_low:3.2,ct\_mantle:3.5,con\_up:2.3,con\_low:3.2,con\_mantle:3.2,wk:3,sed:2.3,oc\_up:2.3,oc\_low:3.2,oc\_mantle:3.5,plastic\_strain:0  
set Prefactors for diffusion creep =background:1e-20,ct\_up:5e-22,ct\_low:1e-21,ct\_mantle:1e-20,con\_up:5e-22,con\_low:1e-21,con\_mantle:1e-20,wk:1e-22,sed:1e-22,oc\_up:5e-22,oc\_low:1e-21,oc\_mantle:1e-20,plastic\_strain:0  
set Yield mechanism = drucker  
set Angles of internal friction = background:30,ct\_up:25,ct\_low:35,ct\_mantle:10,con\_up:25,con\_low:35,con\_mantle:10,wk:1,sed:10,oc\_up:25,oc\_low:35,oc\_mantle:10,plastic\_strain:0  
set Cohesions = background:20e6,ct\_up:10e6,ct\_low:50e6,ct\_mantle:0.1e6,con\_up:10e6,con\_low:50e6,con\_mantle:0.1e6,wk:0.1e6,sed:0.1e6,oc\_up:10e6,oc\_low:2e6,oc\_mantle:20e6,plastic\_strain:0  
set Maximum yield stress = 1.0e9  
set Strain weakening mechanism = plastic weakening with plastic strain only  
set Start plasticity strain weakening intervals = 0.1  
set End plasticity strain weakening intervals = 0.5  
set Cohesion strain weakening factors = 0.1  
set Friction strain weakening factors = 0.1  
end  
end

subsection Postprocess  
set List of postprocessors = basic statistics, composition statistics, heat flux statistics,  
mass flux statistics, pressure statistics, temperature statistics,  
topography, velocity statistics, visualization,material statistics  
subsection Visualization  
set List of output variables =material properties,strain rate  
set Time between graphical output = 10e3  
set Output format = vtu  
subsection Material properties  
set List of material properties=density,thermal expansivity,specific heat,viscosity  
end  
end  
end  
subsection Checkpointing  
set Steps between checkpoint = 10  
end

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [October 12, 2025, 10:13pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/2 "2025-10-12T22:13:29Z")

</div>

@3Faker3 For some reason, ASPECT is trying to read the input file as if it described a 2d situation, even though you clearly say `set Dimension = 3` at the top. I can’t say why that is – do you have any other statements of the form `set Dimension = …` in the input file? Can you attach the input file as an attachment (rather than copy-pasting it)?

Best

W.

---

<div class="post-metadata">

**Author:** ![3Faker3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/3faker3/32/2411_2.png) [@3Faker3](https://community.geodynamics.org/u/3Faker3)\
**Post date:** [October 13, 2025, 9:24am UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/3 "2025-10-13T09:24:00Z")

</div>

**Okay, thank you for your reply. This is my input PRM file. There are no other statements of the form** `set Dimension=...` **. I have tried changing parameters such as switching the visco-plastic model to simple, modifying the boundary velocity conditions, and so on, but this issue still persists.**

[3dmodel.prm](https://community.geodynamics.org/uploads/short-url/cJ9xYqBt9O500eqVIbszhX18Wk3.prm) (7.7 KB)

---

<div class="post-metadata">

**Author:** ![3Faker3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/3faker3/32/2411_2.png) [@3Faker3](https://community.geodynamics.org/u/3Faker3)\
**Post date:** [October 13, 2025, 9:50am UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/4 "2025-10-13T09:50:10Z")

</div>

The data file(composition file,temperature file) is too large to upload on the forum, so I have sent it to you via email instead.

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [October 13, 2025, 3:14pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/5 "2025-10-13T15:14:05Z")

</div>

@3Faker3 I can reproduce this. I believe the issue is that you are using a file with DOS line endings on a Linux system. I haven’t quite figured out why we do not generate an error that explains the issue – we have the code for that, but for some reason it doesn’t trigger.

I’ll work on that over the next few days. In the meantime, if you save your input file with Unix line endings (for example, use the `dos2unix` script on it), it should work.

Best

W.

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [October 13, 2025, 3:38pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/6 "2025-10-13T15:38:00Z")

</div>

@3Faker3 There is now a patch here: [https://github.com/geodynamics/aspect/pull/6712](https://github.com/geodynamics/aspect/pull/6712). With this patch, you would get the following error message with your input file:

```auto

 --------------------------------------------------------
An error occurred in line <145> of file </tempest/a/accounts/bangerth/p/deal.II/1/projects/aspect/source/main.cc> in function
    unsigned int {anonymous}::get_dimension(const std::string&)
The violated condition was: 
    dimension.find('\r') == std::string::npos
Additional information: 
    It appears that your input file uses Windows-style line endings
    ('\r\n') but you are running on a system where the C++ run time
    environment expects input files to have Unix-style line endings
    ('\n'). You need to convert your input file to use the correct line
    endings before running ASPECT with it.

Stacktrace:
-----------
#0 ./aspect: 
#1 ./aspect: main
--------------------------------------------------------

```

The resolution is the same: You need to save your input file with Unix line endings if you run on Linux.

Best

W.

---

<div class="post-metadata">

**Author:** ![3Faker3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/3faker3/32/2411_2.png) [@3Faker3](https://community.geodynamics.org/u/3Faker3)\
**Post date:** [October 14, 2025, 3:45pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/7 "2025-10-14T15:45:30Z")

</div>

Thank you for your previous help. After applying the change to Unix file format, the code executes. However, I am now encountering an issue where the composition fails to load, and I am currently debugging this problem.

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [October 14, 2025, 5:29pm UTC](https://community.geodynamics.org/t/aspect-3d-model-runtime-error-excinternalerror-dimension-check-failure/4324/8 "2025-10-14T17:29:32Z")

</div>

@3Faker3 Yes, that would be a different issue. If that turns out to be a separate bug, please open a new issue about that!

Best  
WB
