Error when Robin boundary condition is applied

Hi all,

I am trying to use the Boundary convective heating model.

However, I face the segmentation error as below:

In debug mode:

/software/compilers/gcc/14.2.0/include/c++/14.2.0/bits/stl_vector.h:1149: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator const [with _Tp = dealii::Tensor<1, 2>; _Alloc = std::allocator<dealii::Tensor<1, 2> >; const_reference = const dealii::Tensor<1, 2>&; size_type = long unsigned int]: Assertion ‘__n < this->size()’ failed.

SIGABRT received

--------------------------------------------------------------------------

prterun detected that one or more processes exited with non-zero status,

thus causing the job to be terminated. The first process to do so was:

Process name: [prterun-node209-1547542@1,26]

Exit code: 1

--------------------------------------------------------------------------

in release mode:

/home/college/2921731K/aspect/build/aspect-release(_ZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS_14AdvectionFieldE+0x582)[0x132f9c2]

[node203:543915] [ 5] /home/college/2921731K/aspect/build/aspect-release(_ZN6aspect9SimulatorILi2EE30assemble_and_solve_temperatureERKdPd+0x2d8)[0xf17af8]

[node203:543915] [ 6] /home/college/2921731K/aspect/build/aspect-release(_ZN6aspect9SimulatorILi2EE35solve_iterated_advection_and_stokesEv+0x2c5)[0xf1cd25]

[node203:543915] [ 7] /home/college/2921731K/aspect/build/aspect-release(_ZN6aspect9SimulatorILi2EE14solve_timestepEv+0x190)[0x1314d00]

[node203:543915] [ 8] /home/college/2921731K/aspect/build/aspect-release(_ZN6aspect9SimulatorILi2EE3runEv+0x2f7)[0x13448f7]

[node203:543915] [ 9] /home/college/2921731K/aspect/build/aspect-release[0x1a985d5]

[node203:543915] [10] /home/college/2921731K/aspect/build/aspect-release(main+0x33f3)[0xb84083]

[node203:543915] [11] /lib64/libc.so.6(__libc_start_main+0xe5)[0x7fd1aa45b7e5]

[node203:543915] [12] /home/college/2921731K/aspect/build/aspect-release(_start+0x2e)[0xb8573e]

[node203:543915] *** End of error message ***

--------------------------------------------------------------------------

prterun noticed that process rank 99 with PID 543999 on node node203 exited on

signal 11 (Segmentation fault).

--------------------------------------------------------------------------

Is this related to the versions of packages I am using?

Could I get advice to solve this problem?

However, the HPC server I am using already has error with multi-node jobs. It may be related to configuration of server.

Thanks for your help!

Cheers,

Hyunseong

@hyunseong96 Is this with a single-processor job (one only 1 MPI rank)? If so, can you run it in a debugger to get a backtrace to see which line of which function this happens in. Separately, can you post the input file you use?

Best

W.

Hi @bangerth ,

It was mpirun with 128 cores. I just put the last repetitive part of error message.

I ran debugging in simpler geometry quickly, and the exception happened at line 2121 of dealii-candi/deal.II-v9.6.1/include/deal.II/base/tensor.h

Exception has occurred.

EXC_BAD_ACCESS (code=1, address=0x0)

europa_chunk_45_ref_newE_20_dis_coarse5_heating2.prm (9.2 KB)

This is the prm file I am using!

Cheers,

Hyunseong

@hyunseong96 I can’t run your input file without the plugins. But in any case, can you run your model on a single processor in debug mode, and in a debugger? This should pinpoint the exact place where this happens, and perhaps why. If you’re new to using debuggers, you may want to watch lectures 25 and/or 41.25 at Wolfgang Bangerth's video lectures to see the basic techniques of using a debugger.

Best

W.

@bangerth I removed the additional plugin as:

europa_chunk_45_ref_newE_20_dis_coarse5_heating_no_additional_plugin.prm (8.9 KB)

With this prm file, I get

error is

--------------------------------------------------------

An error occurred in line <406> of file </Users/h.kim.6/dealii-candi/tmp/unpack/deal.II-v9.7.0/source/base/timer.cc> in function

void dealii::TimerOutput::enter_subsection(const std::string &)

The violated condition was:

std::find(active_sections.begin(), active_sections.end(), section_name) == active_sections.end()

Additional information:

Cannot enter the already active section <Assemble temperature system>.

Stacktrace:

-----------

#0 2 libdeal_II.g.9.7.0.dylib 0x0000000114236fd8 _ZN6dealii11TimerOutput16enter_subsectionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 876: 2 libdeal_II.g.9.7.0.dylib 0x0000000114236fd8 _ZN6dealii11TimerOutput16enter_subsectionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE

#1 3 aspect-debug 0x0000000100509b7c _ZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS_14AdvectionFieldE + 196: 3 aspect-debug 0x0000000100509b7c _ZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS_14AdvectionFieldE

#2 4 aspect-debug 0x00000001001406f4 _ZN6aspect9SimulatorILi2EE30assemble_and_solve_temperatureERKdPd + 928: 4 aspect-debug 0x00000001001406f4 _ZN6aspect9SimulatorILi2EE30assemble_and_solve_temperatureERKdPd

#3 5 aspect-debug 0x0000000100146a60 _ZN6aspect9SimulatorILi2EE35solve_iterated_advection_and_stokesEv + 308: 5 aspect-debug 0x0000000100146a60 _ZN6aspect9SimulatorILi2EE35solve_iterated_advection_and_stokesEv

#4 6 ??? 0x000000010980c1b0 0x0 + 4454400432: 6 ??? 0x000000010980c1b0 0x0

#5 7 aspect-debug 0x0000000100b8a194 main + 0: 7 aspect-debug 0x0000000100b8a194 main

#6 8 aspect-debug 0x0000000100509204 _ZN6aspect9SimulatorILi2EE31local_assemble_advection_systemERKNS_14AdvectionFieldERKN6dealii6VectorIdEERKNS5_18TriaActiveIteratorINS5_15DoFCellAccessorILi2ELi2ELb0EEEEERNS_8internal8Assembly7Scratch15AdvectionSystemILi2EEERNSH_8CopyData15AdvectionSystemILi2EEE + 3760: 8 aspect-debug 0x0000000100509204 _ZN6aspect9SimulatorILi2EE31local_assemble_advection_systemERKNS_14AdvectionFieldERKN6dealii6VectorIdEERKNS5_18TriaActiveIteratorINS5_15DoFCellAccessorILi2ELi2ELb0EEEEERNS_8internal8Assembly7Scratch15AdvectionSystemILi2EEERNSH_8CopyData15AdvectionSystemILi2EEE

#7 9 aspect-debug 0x00000001005a87b8 _ZN6dealii10WorkStream8internal10sequential3runIZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS4_14AdvectionFieldEEUlRKNS_18TriaActiveIteratorINS_15DoFCellAccessorILi2ELi2ELb0EEEEERNS4_8internal8Assembly7Scratch15AdvectionSystemILi2EEERNSH_8CopyData15AdvectionSystemILi2EEEE_ZNS6_25assemble_advection_systemES9_EUlRKSO_E_NS_16FilteredIteratorISD_EESK_SO_EEvRKT1_RKNS_9std_cxx2013type_identityISW_E4typeET_T0_RKT2_RKT3_ + 196: 9 aspect-debug 0x00000001005a87b8 _ZN6dealii10WorkStream8internal10sequential3runIZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS4_14AdvectionFieldEEUlRKNS_18TriaActiveIteratorINS_15DoFCellAccessorILi2ELi2ELb0EEEEERNS4_8internal8Assembly7Scratch15AdvectionSystemILi2EEERNSH_8CopyData15AdvectionSystemILi2EEEE_ZNS6_25assemble_advection_systemES9_EUlRKSO_E_NS_16FilteredIteratorISD_EESK_SO_EEvRKT1_RKNS_9std_cxx2013type_identityISW_E4typeET_T0_RKT2_RKT3_

#8 10 aspect-debug 0x000000010050c78c _ZN6dealii10WorkStream3runIZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS2_14AdvectionFieldEEUlRKNS_18TriaActiveIteratorINS_15DoFCellAccessorILi2ELi2ELb0EEEEERNS2_8internal8Assembly7Scratch15AdvectionSystemILi2EEERNSF_8CopyData15AdvectionSystemILi2EEEE_ZNS4_25assemble_advection_systemES7_EUlRKSM_E_NS_16FilteredIteratorISB_EESI_SM_EEvRKT1_RKNS_9std_cxx2013type_identityISU_E4typeET_T0_RKT2_RKT3_jj + 220: 10 aspect-debug 0x000000010050c78c _ZN6dealii10WorkStream3runIZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS2_14AdvectionFieldEEUlRKNS_18TriaActiveIteratorINS_15DoFCellAccessorILi2ELi2ELb0EEEEERNS2_8internal8Assembly7Scratch15AdvectionSystemILi2EEERNSF_8CopyData15AdvectionSystemILi2EEEE_ZNS4_25assemble_advection_systemES7_EUlRKSM_E_NS_16FilteredIteratorISB_EESI_SM_EEvRKT1_RKNS_9std_cxx2013type_identityISU_E4typeET_T0_RKT2_RKT3_jj

#9 11 aspect-debug 0x000000010050a018 _ZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS_14AdvectionFieldE + 1376: 11 aspect-debug 0x000000010050a018 _ZN6aspect9SimulatorILi2EE25assemble_advection_systemERKNS_14AdvectionFieldE

#10 12 aspect-debug 0x00000001001406f4 _ZN6aspect9SimulatorILi2EE30assemble_and_solve_temperatureERKdPd + 928: 12 aspect-debug 0x00000001001406f4 _ZN6aspect9SimulatorILi2EE30assemble_and_solve_temperatureERKdPd

#11 13 aspect-debug 0x0000000100146a60 _ZN6aspect9SimulatorILi2EE35solve_iterated_advection_and_stokesEv + 308: 13 aspect-debug 0x0000000100146a60 _ZN6aspect9SimulatorILi2EE35solve_iterated_advection_and_stokesEv

#12 14 aspect-debug 0x00000001005327d4 _ZN6aspect9SimulatorILi2EE14solve_timestepEv + 300: 14 aspect-debug 0x00000001005327d4 _ZN6aspect9SimulatorILi2EE14solve_timestepEv

#13 15 aspect-debug 0x0000000100534f24 _ZN6aspect9SimulatorILi2EE3runEv + 956: 15 aspect-debug 0x0000000100534f24 _ZN6aspect9SimulatorILi2EE3runEv

#14 16 aspect-debug 0x0000000100b8c060 main + 7884: 16 aspect-debug 0x0000000100b8c060 main

#15 17 dyld 0x000000018607ab98 start + 6076: 17 dyld 0x000000018607ab98 start

--------------------------------------------------------

Abort() was called during dealing with an assertion or exception.

Traceback functionality not available

This happens at line 1163 of aspect/source/simulator/assemply.cc about local_assemble_advection_system.

Hope this is the right one.

Cheers,

Hyunseong

Hi Hyunseong,

You forgot to specify which boundary heat flux plugin you want to use in the Boundary convective heating model section. Adding

set List of boundary heat flux model names = function

fixed it for me.
No idea why this error is the result; but it’s good to know and will hopefully allow us to catch this problem earlier and give a more useful error message.

Cheers,
Juliane

@jdannberg

Yes, this did fix the error! Ugh sorry it was my mistake to write same line (coefficient) twice, thinking I wrote all needed :frowning:

Thank you!!

Cheers,

Hyunseong

I added a patch in Do some error checking to avoid accessing invalid vector elements. by bangerth · Pull Request #6687 · geodynamics/aspect · GitHub that makes sure we get a better error message, rather than just accessing the invalid vector elements.

Best

W.