idefix-code/idefix

BUG: V2.1.02 broke my 1D setup

Closed this issue · 3 comments

Describe the issue:

Hi,

After an update to the latest version of idefix, my 1D3C setup is crashing at the first time step due to nans in the VX2 and PRS component (spherical geometry, MHD). It seems to be related to the 1D, as 2D is working fine.

Hash 2f15373 is still working fine.

Error message:

Fluid<Hydro>: Nans were found in the current calculation
Fluid<Hydro>: rank 0 found 512 Nans in Vc and 0 Nans in Vs in the current datablock. Details will be in corresponding process log file.
----------------> DataBlockHost::DataBlockHost(DataBlock)...
----------------> ...returned
rank 0: Nan found  in variable VX2
      global (i,j,k) = (0, 0, 0)
      global (x,y,z) = (1.037109e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable PRS
      global (i,j,k) = (0, 0, 0)
      global (x,y,z) = (1.037109e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable VX2
      global (i,j,k) = (1, 0, 0)
      global (x,y,z) = (1.111328e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable PRS
      global (i,j,k) = (1, 0, 0)
      global (x,y,z) = (1.111328e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable VX2
      global (i,j,k) = (2, 0, 0)
      global (x,y,z) = (1.185547e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable PRS
      global (i,j,k) = (2, 0, 0)
      global (x,y,z) = (1.185547e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable VX2
      global (i,j,k) = (3, 0, 0)
      global (x,y,z) = (1.259766e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable PRS
      global (i,j,k) = (3, 0, 0)
      global (x,y,z) = (1.259766e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable VX2
      global (i,j,k) = (4, 0, 0)
      global (x,y,z) = (1.333984e+00, 0.000000e+00, 0.000000e+00)
rank 0: Nan found  in variable PRS
      global (i,j,k) = (4, 0, 0)
      global (x,y,z) = (1.333984e+00, 0.000000e+00, 0.000000e+00)
... 
*** More Nans have been found in current fluid. Only showing the first 10.
------------> ...returned
--------> ...returned
Main: WARNING! Caught an exception in TimeIntegrator.
Nan found after integration cycle
Main: attempting to save the current state for inspection.
--------> Output::ForceWriteVtk...
------------> Vtk::Write...
Vtk: Write file data.0001.vtk...done in 4.547380e-04 s.
------------> ...returned
--------> ...returned
Main: Aborting current calculation.
Main: Reached t=2.000000e-06
Main: Completed in 0 seconds and 0 cycles
Main: Perfs are 0.000000e+00 cell updates/second
Outputs represent 0% of total run time.
Profiler: maximum memory usage for Host memory space: 1.493359e+02 KB
Main: Job was aborted because of an unrecoverable error.

runtime information:

master branch, hash d0e8220 v2.1.02

hash 2f15373 is working

Thanks @vreville for this bug report. Could you share with me your setup ? (idefix.ini, definition.hpp and idefix.ini) so that I can reproduce the issue?

Ok, I have made a potential fix (#291). HOWEVER, I would like to emphasise that it is probably an incorrect way of doing this, since a problem involving more that 1 COMPONENT in SPHERICAL geometry cannot be one dimensional (essentially because if you start to have motions in theta and /or phi, i.e. non-zero VX2 or VX3, then you will necessarily have a theta-dependence in the flow and the field).

I'm therefore very tempted to throw an error when the user asks for this, as it is probably physically incorrect...

Merged in #291