piernik-dev / piernik

Piernik MHD Code
GNU General Public License v3.0
15 stars 15 forks source link

Fix SIGSEGV in initproblem for mcrtest_cresp #477

Closed mogrodnik closed 2 years ago

mogrodnik commented 2 years ago

In mcrtest_cresp test problem, when setting ncre = 0, the module is switched off and is not being initialized. In mcrtest_cresp problem file, initproblem.F90, a check for 'use_cresp' was overlooked which resulted in segmentation fault. This is fixed by importing 'use_cresp' and checking it during initialization.