gempy-project / gempy

GemPy is an open-source, Python-based 3-D structural geological modeling software, which allows the implicit (i.e. automatic) creation of complex geological models from interface and orientation data. It also offers support for stochastic modeling to address parameter and model uncertainties.
https://gempy.org
European Union Public License 1.2
984 stars 234 forks source link

Caluclation Surfaces with Topographie produces Theano NotImplementedError #246

Closed domist07 closed 4 years ago

domist07 commented 4 years ago

When i want to interpolate soil layers with topography, theano produces a very long error message. It shows the hint "Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node. (Where) can you set this?

GemPy Code:

geo_model = gp.create_model('Geo_Model')
gp.init_data(geo_model,  [x_min, x_max, y_min, y_max, z_min, z_max], [nx, ny, nz],
             path_o="orientation.csv", path_i="surface_points.csv", default_values=True)
geo_model.grid.set_topography(source='gdal', filepath="topography.grd")
gp.set_interpolator(geo_model, compile_theano=True, theano_optimizer='fast_run', verbose=[])
gp.compute_model(geo_model)

Console Output:

Active grids: ['regular']
Cropped raster to geo_model.grid.extent.
depending on the size of the raster, this can take a while...
storing converted file...
obacht
Compiling theano function...
Level of Optimization:  fast_run
Device:  cpu
Precision:  float64
Number of faults:  0
Compilation Done!

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\vm.py in __call__(self)
    300                                                     self.post_thunk_clear):
--> 301                     thunk()
    302                     for old_s in old_storage:

C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\scan_op.py in rval(p, i, o, n, allow_gc)
    962                  allow_gc=allow_gc):
--> 963             r = p(n, [x[0] for x in i], o)
    964             for o in node.outputs:

C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\scan_op.py in execute(self, node, args, outs)
   1157             raise NotImplementedError(
-> 1158                 "We didn't implemented yet the case where scan do 0 iteration")
   1159         else:

NotImplementedError: We didn't implemented yet the case where scan do 0 iteration

During handling of the above exception, another exception occurred:

NotImplementedError                       Traceback (most recent call last)
<ipython-input-2-0171473df88e> in <module>
     40 # geo_model.modify_kriging_parameters('range', 1000)  # 7000-20000
     41 # geo_model.modify_kriging_parameters('$C_o$', 100)
---> 42 gp.compute_model(geo_model)

C:\ProgramData\Anaconda3\lib\site-packages\gempy-2.0.1-py3.7.egg\gempy\core\gempy_api.py in compute_model(model, output, compute_mesh, reset_weights, reset_scalar, reset_block, sort_surfaces, debug, set_solutions)
    320         model.interpolator.reset_flow_control_initial_results(reset_weights, reset_scalar, reset_block)
    321 
--> 322         sol = model.interpolator.theano_function(*i)
    323     elif output == 'gravity':
    324         model.set_active_grid('centered', reset=False)

C:\ProgramData\Anaconda3\lib\site-packages\theano\compile\function_module.py in __call__(self, *args, **kwargs)
    901         try:
    902             outputs =\
--> 903                 self.fn() if output_subset is None else\
    904                 self.fn(output_subset=output_subset)
    905         except Exception:

C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\vm.py in __call__(self)
    303                         old_s[0] = None
    304             except Exception:
--> 305                 link.raise_with_op(node, thunk)
    306 
    307 

C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\link.py in raise_with_op(node, thunk, exc_info, storage_map)
    323         # extra long error message in that case.
    324         pass
--> 325     reraise(exc_type, exc_value, exc_trace)
    326 
    327 

C:\ProgramData\Anaconda3\lib\site-packages\six.py in reraise(tp, value, tb)
    700                 value = tp()
    701             if value.__traceback__ is not tb:
--> 702                 raise value.with_traceback(tb)
    703             raise value
    704         finally:

C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\vm.py in __call__(self)
    299                 for thunk, node, old_storage in zip(self.thunks, self.nodes,
    300                                                     self.post_thunk_clear):
--> 301                     thunk()
    302                     for old_s in old_storage:
    303                         old_s[0] = None

C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\scan_op.py in rval(p, i, o, n, allow_gc)
    961         def rval(p=p, i=node_input_storage, o=node_output_storage, n=node,
    962                  allow_gc=allow_gc):
--> 963             r = p(n, [x[0] for x in i], o)
    964             for o in node.outputs:
    965                 compute_map[o][0] = True

C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\scan_op.py in execute(self, node, args, outs)
   1156         elif n_steps == 0:
   1157             raise NotImplementedError(
-> 1158                 "We didn't implemented yet the case where scan do 0 iteration")
   1159         else:
   1160             for idx, seq in enumerate(args[1:self.seqs_arg_offset]):

NotImplementedError: We didn't implemented yet the case where scan do 0 iteration
Apply node that caused the error: for{cpu,Looping}(Elemwise{minimum,no_inplace}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, Subtensor{:int64:}.0, IncSubtensor{Set;:int64:}.0, IncSubtensor{Set;:int64:}.0, IncSubtensor{Set;:int64:}.0, IncSubtensor{Set;:int64:}.0, IncSubtensor{Set;:int64:}.0, IncSubtensor{Set;:int64:}.0, IncSubtensor{Set;:int64:}.0, Number of points per surface used to split rest-ref, fault relation matrix, <TensorType(float64, scalar)>, <TensorType(float64, scalar)>, Range, Covariance at 0, <TensorType(float64, scalar)>, Nugget effect of gradients, Nugget effect of scalar, Attenuation factor, Sigmoid Outside, Sigmoid slope, <TensorType(int32, vector)>, <TensorType(bool, vector)>, Coordinates of the grid points to interpolate, All the surface_points points at once, Position of the dips, Angle of every dip, Azimuth, Polarity, Values that the blocks are taking)
Toposort index: 154
Inputs types: [TensorType(int64, scalar), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(bool, vector), TensorType(bool, vector), TensorType(bool, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(int32, vector), TensorType(float64, 4D), TensorType(float64, matrix), TensorType(float64, 3D), TensorType(float64, 3D), TensorType(bool, 3D), TensorType(bool, 3D), TensorType(float64, 4D), TensorType(int32, vector), TensorType(int32, matrix), TensorType(float64, scalar), TensorType(float64, scalar), TensorType(float64, scalar), TensorType(float64, scalar), TensorType(float64, scalar), TensorType(float64, vector), TensorType(float64, vector), TensorType(float64, scalar), TensorType(float64, scalar), TensorType(float64, scalar), TensorType(int32, vector), TensorType(bool, vector), TensorType(float64, matrix), TensorType(float64, matrix), TensorType(float64, matrix), TensorType(float64, vector), TensorType(float64, vector), TensorType(float64, vector), TensorType(float64, matrix)]
Inputs shapes: [(), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (1, 1, 1, 28663), (1, 0), (1, 1, 28663), (1, 0, 0), (1, 1, 28663), (1, 1, 28663), (1, 1, 1, 28663), (5,), (0, 0), (), (), (), (), (), (18,), (139,), (), (), (), (0,), (2,), (28663, 3), (139, 3), (6, 3), (6,), (6,), (6,), (1, 12)]
Inputs strides: [(), (4,), (4,), (4,), (4,), (4,), (4,), (4,), (4,), (4,), (1,), (1,), (1,), (4,), (4,), (4,), (4,), (229304, 229304, 229304, 8), (8, 8), (229304, 229304, 8), (8, 8, 8), (28663, 28663, 1), (28663, 28663, 1), (229304, 229304, 229304, 8), (4,), (4, 4), (), (), (), (), (), (8,), (8,), (), (), (), (4,), (1,), (24, 8), (8, 1112), (8, 48), (8,), (8,), (8,), (96, 8)]
Inputs values: [array(0, dtype=int64), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=bool), array([], dtype=bool), array([], dtype=bool), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), array([], dtype=int32), 'not shown', array([], shape=(1, 0), dtype=float64), 'not shown', array([], shape=(1, 0, 0), dtype=float64), 'not shown', 'not shown', 'not shown', array([58, 17, 20, 19, 20]), array([], shape=(0, 0), dtype=int32), array(10.), array(2.), array(7.86868546e-05), array(0.00026878), array(4.), 'not shown', 'not shown', array(2.), array(50.), array(50000.), array([], dtype=int32), array([False, False]), 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown']
Inputs type_num: [9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7, 7, 7, 7, 12, 12, 12, 12, 0, 0, 12, 7, 7, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 7, 0, 12, 12, 12, 12, 12, 12, 12]
Outputs clients: [[Subtensor{int64::}(for{cpu,Looping}.0, Constant{1})], [Subtensor{int64::}(for{cpu,Looping}.1, Constant{1})], [Subtensor{int64::}(for{cpu,Looping}.2, Constant{1})], [Subtensor{int64::}(for{cpu,Looping}.3, Constant{1})], [Subtensor{int64::}(for{cpu,Looping}.4, Constant{1})], [Subtensor{int64::}(for{cpu,Looping}.5, Constant{1})], []]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
  File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3063, in run_cell_async
    interactivity=interactivity, compiler=compiler, result=result)
  File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3254, in run_ast_nodes
    if (await self.run_code(code, result,  async_=asy)):
  File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3331, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-0171473df88e>", line 39, in <module>
    theano_optimizer='fast_run', verbose=[])
  File "C:\ProgramData\Anaconda3\lib\site-packages\gempy-2.0.1-py3.7.egg\gempy\core\gempy_api.py", line 233, in set_interpolator
    geo_model.interpolator.compile_th_fn_geo(inplace=True, grid=grid)
  File "C:\ProgramData\Anaconda3\lib\site-packages\gempy-2.0.1-py3.7.egg\gempy\core\interpolator.py", line 1008, in compile_th_fn_geo
    self.theano_graph.theano_output(),
  File "C:\ProgramData\Anaconda3\lib\site-packages\gempy-2.0.1-py3.7.egg\gempy\core\theano\theano_graph_pro.py", line 556, in theano_output
    solutions[:9] = self.compute_series()
  File "C:\ProgramData\Anaconda3\lib\site-packages\gempy-2.0.1-py3.7.egg\gempy\core\theano\theano_graph_pro.py", line 431, in compute_series
    profile=False

Debugprint of the apply node: 
for{cpu,Looping}.0 [id A] <TensorType(float64, 4D)> ''   
 |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | |Elemwise{minimum,no_inplace} [id C] <TensorType(int64, scalar)> ''   
 | | |Elemwise{minimum,no_inplace} [id D] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id E] <TensorType(int64, scalar)> ''   
 | | | | |Elemwise{minimum,no_inplace} [id F] <TensorType(int64, scalar)> ''   
 | | | | | |Elemwise{minimum,no_inplace} [id G] <TensorType(int64, scalar)> ''   
 | | | | | | |Elemwise{minimum,no_inplace} [id H] <TensorType(int64, scalar)> ''   
 | | | | | | | |Elemwise{minimum,no_inplace} [id I] <TensorType(int64, scalar)> ''   
 | | | | | | | | |Elemwise{minimum,no_inplace} [id J] <TensorType(int64, scalar)> ''   
 | | | | | | | | | |Elemwise{minimum,no_inplace} [id K] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | |Elemwise{minimum,no_inplace} [id L] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | |Elemwise{minimum,no_inplace} [id M] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | |Elemwise{minimum,no_inplace} [id N] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | | |Elemwise{minimum,no_inplace} [id O] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | | | |Elemwise{minimum,no_inplace} [id P] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | | | | |Subtensor{int64} [id Q] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | | | | | |Shape [id R] <TensorType(int64, vector)> ''   
 | | | | | | | | | | | | | | | | | |Subtensor{int64:int64:} [id S] <TensorType(int32, vector)> 'Length of surface_points in every series[0:-1]'   
 | | | | | | | | | | | | | | | | |Constant{0} [id T] <int64>
 | | | | | | | | | | | | | | | |Subtensor{int64} [id U] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | | | |   |Shape [id V] <TensorType(int64, vector)> ''   
 | | | | | | | | | | | | | | |   | |Subtensor{int64::} [id W] <TensorType(int32, vector)> 'Length of surface_points in every series[1:]'   
 | | | | | | | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | | | | | | | |Subtensor{int64} [id X] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | | |   |Shape [id Y] <TensorType(int64, vector)> ''   
 | | | | | | | | | | | | | |   | |Subtensor{int64:int64:} [id Z] <TensorType(int32, vector)> 'Length of foliations in every series[0:-1]'   
 | | | | | | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | | | | | | |Subtensor{int64} [id BA] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | | |   |Shape [id BB] <TensorType(int64, vector)> ''   
 | | | | | | | | | | | | |   | |Subtensor{int64::} [id BC] <TensorType(int32, vector)> 'Length of foliations in every series[1:]'   
 | | | | | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | | | | | |Subtensor{int64} [id BD] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | | |   |Shape [id BE] <TensorType(int64, vector)> ''   
 | | | | | | | | | | | |   | |Subtensor{int64:int64:} [id BF] <TensorType(int32, vector)> 'Length of weights in every series[0:-1]'   
 | | | | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | | | | |Subtensor{int64} [id BG] <TensorType(int64, scalar)> ''   
 | | | | | | | | | | |   |Shape [id BH] <TensorType(int64, vector)> ''   
 | | | | | | | | | | |   | |Subtensor{int64::} [id BI] <TensorType(int32, vector)> 'Length of weights in every series[1:]'   
 | | | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | | | |Subtensor{int64} [id BJ] <TensorType(int64, scalar)> ''   
 | | | | | | | | | |   |Shape [id BK] <TensorType(int64, vector)> ''   
 | | | | | | | | | |   | |Subtensor{int64:int64:} [id BL] <TensorType(int32, vector)> 'List with the number of surfaces[0:-1]'   
 | | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | | |Subtensor{int64} [id BM] <TensorType(int64, scalar)> ''   
 | | | | | | | | |   |Shape [id BN] <TensorType(int64, vector)> ''   
 | | | | | | | | |   | |Subtensor{int64::} [id BO] <TensorType(int32, vector)> 'List with the number of surfaces[1:]'   
 | | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | | |Subtensor{int64} [id BP] <TensorType(int64, scalar)> ''   
 | | | | | | | |   |Shape [id BQ] <TensorType(int64, vector)> ''   
 | | | | | | | |   | |Subtensor{int64::} [id BR] <TensorType(int32, vector)> 'Grade of the universal drift[0:]'   
 | | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | | |Subtensor{int64} [id BS] <TensorType(int64, scalar)> ''   
 | | | | | | |   |Shape [id BT] <TensorType(int64, vector)> ''   
 | | | | | | |   | |Subtensor{int64::} [id BU] <TensorType(bool, vector)> 'Vector controlling if weights must be recomputed[0:]'   
 | | | | | | |   |Constant{0} [id T] <int64>
 | | | | | | |Subtensor{int64} [id BV] <TensorType(int64, scalar)> ''   
 | | | | | |   |Shape [id BW] <TensorType(int64, vector)> ''   
 | | | | | |   | |Subtensor{int64::} [id BX] <TensorType(bool, vector)> 'Vector controlling if scalar matrix must be recomputed[0:]'   
 | | | | | |   |Constant{0} [id T] <int64>
 | | | | | |Subtensor{int64} [id BY] <TensorType(int64, scalar)> ''   
 | | | | |   |Shape [id BZ] <TensorType(int64, vector)> ''   
 | | | | |   | |Subtensor{int64::} [id CA] <TensorType(bool, vector)> 'Vector controlling if block matrix must be recomputed[0:]'   
 | | | | |   |Constant{0} [id T] <int64>
 | | | | |Subtensor{int64} [id CB] <TensorType(int64, scalar)> ''   
 | | | |   |Shape [id CC] <TensorType(int64, vector)> ''   
 | | | |   | |Subtensor{int64::} [id CD] <TensorType(int32, vector)> 'The series (fault) is finite[0:]'   
 | | | |   |Constant{0} [id T] <int64>
 | | | |Subtensor{int64} [id CE] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id CF] <TensorType(int64, vector)> ''   
 | | |   | |Subtensor{int64::} [id CG] <TensorType(int32, vector)> ''   
 | | |   |   |<TensorType(int32, vector)> [id CH] <TensorType(int32, vector)>
 | | |   |   |Constant{0} [id T] <int64>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id CI] <TensorType(int64, scalar)> ''   
 | |   |Shape [id CJ] <TensorType(int64, vector)> ''   
 | |   | |Subtensor{int64::} [id CK] <TensorType(int32, vector)> ''   
 | |   |   |<TensorType(int32, vector)> [id CL] <TensorType(int32, vector)>
 | |   |   |Constant{0} [id T] <int64>
 | |   |Constant{0} [id T] <int64>
 | |TensorConstant{5000} [id CM] <TensorType(int64, scalar)>
 |Subtensor{:int64:} [id CN] <TensorType(int32, vector)> ''   
 | |Subtensor{int64:int64:} [id S] <TensorType(int32, vector)> 'Length of surface_points in every series[0:-1]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |   |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 |Subtensor{:int64:} [id CP] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id W] <TensorType(int32, vector)> 'Length of surface_points in every series[1:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CQ] <TensorType(int32, vector)> ''   
 | |Subtensor{int64:int64:} [id Z] <TensorType(int32, vector)> 'Length of foliations in every series[0:-1]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CR] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id BC] <TensorType(int32, vector)> 'Length of foliations in every series[1:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CS] <TensorType(int32, vector)> ''   
 | |Subtensor{int64:int64:} [id BF] <TensorType(int32, vector)> 'Length of weights in every series[0:-1]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CT] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id BI] <TensorType(int32, vector)> 'Length of weights in every series[1:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CU] <TensorType(int32, vector)> ''   
 | |Subtensor{int64:int64:} [id BL] <TensorType(int32, vector)> 'List with the number of surfaces[0:-1]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CV] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id BO] <TensorType(int32, vector)> 'List with the number of surfaces[1:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CW] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id BR] <TensorType(int32, vector)> 'Grade of the universal drift[0:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CX] <TensorType(bool, vector)> ''   
 | |Subtensor{int64::} [id BU] <TensorType(bool, vector)> 'Vector controlling if weights must be recomputed[0:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CY] <TensorType(bool, vector)> ''   
 | |Subtensor{int64::} [id BX] <TensorType(bool, vector)> 'Vector controlling if scalar matrix must be recomputed[0:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id CZ] <TensorType(bool, vector)> ''   
 | |Subtensor{int64::} [id CA] <TensorType(bool, vector)> 'Vector controlling if block matrix must be recomputed[0:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id DA] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id CD] <TensorType(int32, vector)> 'The series (fault) is finite[0:]'   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id DB] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id CG] <TensorType(int32, vector)> ''   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id DC] <TensorType(int32, vector)> ''   
 | |Subtensor{int64::} [id CK] <TensorType(int32, vector)> ''   
 | |ScalarFromTensor [id CO] <int64> ''   
 |Subtensor{:int64:} [id DD] <TensorType(int32, vector)> ''   
 | |TensorConstant{[   0    1..4998 4999]} [id DE] <TensorType(int32, vector)>
 | |ScalarFromTensor [id CO] <int64> ''   
 |IncSubtensor{Set;:int64:} [id DF] <TensorType(float64, 4D)> ''   
 | |AllocEmpty{dtype='float64'} [id DG] <TensorType(float64, 4D)> ''   
 | | |Elemwise{add,no_inplace} [id DH] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id DI] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id DJ] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id DK] <TensorType(float64, 4D)> ''   
 | | |   |   |InplaceDimShuffle{x,0,1,2} [id DL] <TensorType(float64, (True, False, False, False))> ''   
 | | |   |     |block matrix [id DM] <TensorType(float64, 3D)>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id DN] <TensorType(int64, scalar)> ''   
 | | | |Shape [id DJ] <TensorType(int64, vector)> ''   
 | | | |Constant{1} [id DO] <int64>
 | | |Subtensor{int64} [id DP] <TensorType(int64, scalar)> ''   
 | | | |Shape [id DJ] <TensorType(int64, vector)> ''   
 | | | |Constant{2} [id DQ] <int64>
 | | |Subtensor{int64} [id DR] <TensorType(int64, scalar)> ''   
 | |   |Shape [id DJ] <TensorType(int64, vector)> ''   
 | |   |Constant{3} [id DS] <int64>
 | |Rebroadcast{0} [id DK] <TensorType(float64, 4D)> ''   
 | |ScalarFromTensor [id DT] <int64> ''   
 |   |Subtensor{int64} [id DI] <TensorType(int64, scalar)> ''   
 |IncSubtensor{Set;:int64:} [id DU] <TensorType(float64, matrix)> ''   
 | |AllocEmpty{dtype='float64'} [id DV] <TensorType(float64, matrix)> ''   
 | | |Elemwise{add,no_inplace} [id DW] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id DX] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id DY] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id DZ] <TensorType(float64, matrix)> ''   
 | | |   |   |InplaceDimShuffle{x,0} [id EA] <TensorType(float64, row)> ''   
 | | |   |     |Weights vector [id EB] <TensorType(float64, vector)>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id EC] <TensorType(int64, scalar)> ''   
 | |   |Shape [id DY] <TensorType(int64, vector)> ''   
 | |   |Constant{1} [id DO] <int64>
 | |Rebroadcast{0} [id DZ] <TensorType(float64, matrix)> ''   
 | |ScalarFromTensor [id ED] <int64> ''   
 |   |Subtensor{int64} [id DX] <TensorType(int64, scalar)> ''   
 |IncSubtensor{Set;:int64:} [id EE] <TensorType(float64, 3D)> ''   
 | |AllocEmpty{dtype='float64'} [id EF] <TensorType(float64, 3D)> ''   
 | | |Elemwise{add,no_inplace} [id EG] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id EH] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id EI] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id EJ] <TensorType(float64, 3D)> ''   
 | | |   |   |InplaceDimShuffle{x,0,1} [id EK] <TensorType(float64, (True, False, False))> ''   
 | | |   |     |Scalar matrix [id EL] <TensorType(float64, matrix)>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id EM] <TensorType(int64, scalar)> ''   
 | | | |Shape [id EI] <TensorType(int64, vector)> ''   
 | | | |Constant{1} [id DO] <int64>
 | | |Subtensor{int64} [id EN] <TensorType(int64, scalar)> ''   
 | |   |Shape [id EI] <TensorType(int64, vector)> ''   
 | |   |Constant{2} [id DQ] <int64>
 | |Rebroadcast{0} [id EJ] <TensorType(float64, 3D)> ''   
 | |ScalarFromTensor [id EO] <int64> ''   
 |   |Subtensor{int64} [id EH] <TensorType(int64, scalar)> ''   
 |IncSubtensor{Set;:int64:} [id EP] <TensorType(float64, 3D)> ''   
 | |AllocEmpty{dtype='float64'} [id EQ] <TensorType(float64, 3D)> ''   
 | | |Elemwise{add,no_inplace} [id ER] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id ES] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id ET] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id EU] <TensorType(float64, 3D)> ''   
 | | |   |   |InplaceDimShuffle{x,0,1} [id EV] <TensorType(float64, (True, False, False))> ''   
 | | |   |     |Alloc [id EW] <TensorType(float64, matrix)> ''   
 | | |   |       |TensorConstant{0.0} [id EX] <TensorType(float64, scalar)>
 | | |   |       |Subtensor{int64} [id EY] <TensorType(int64, scalar)> ''   
 | | |   |       | |Shape [id EZ] <TensorType(int64, vector)> ''   
 | | |   |       | | |<TensorType(int32, vector)> [id CH] <TensorType(int32, vector)>
 | | |   |       | |Constant{0} [id T] <int64>
 | | |   |       |Subtensor{int64} [id FA] <TensorType(int32, scalar)> ''   
 | | |   |         |List with the number of surfaces [id FB] <TensorType(int32, vector)>
 | | |   |         |Constant{-1} [id FC] <int64>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id FD] <TensorType(int64, scalar)> ''   
 | | | |Shape [id ET] <TensorType(int64, vector)> ''   
 | | | |Constant{1} [id DO] <int64>
 | | |Subtensor{int64} [id FE] <TensorType(int64, scalar)> ''   
 | |   |Shape [id ET] <TensorType(int64, vector)> ''   
 | |   |Constant{2} [id DQ] <int64>
 | |Rebroadcast{0} [id EU] <TensorType(float64, 3D)> ''   
 | |ScalarFromTensor [id FF] <int64> ''   
 |   |Subtensor{int64} [id ES] <TensorType(int64, scalar)> ''   
 |IncSubtensor{Set;:int64:} [id FG] <TensorType(bool, 3D)> ''   
 | |AllocEmpty{dtype='bool'} [id FH] <TensorType(bool, 3D)> ''   
 | | |Elemwise{add,no_inplace} [id FI] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id FJ] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id FK] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id FL] <TensorType(bool, 3D)> ''   
 | | |   |   |InplaceDimShuffle{x,0,1} [id FM] <TensorType(bool, (True, False, False))> ''   
 | | |   |     |mask matrix [id FN] <TensorType(bool, matrix)>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id FO] <TensorType(int64, scalar)> ''   
 | | | |Shape [id FK] <TensorType(int64, vector)> ''   
 | | | |Constant{1} [id DO] <int64>
 | | |Subtensor{int64} [id FP] <TensorType(int64, scalar)> ''   
 | |   |Shape [id FK] <TensorType(int64, vector)> ''   
 | |   |Constant{2} [id DQ] <int64>
 | |Rebroadcast{0} [id FL] <TensorType(bool, 3D)> ''   
 | |ScalarFromTensor [id FQ] <int64> ''   
 |   |Subtensor{int64} [id FJ] <TensorType(int64, scalar)> ''   
 |IncSubtensor{Set;:int64:} [id FR] <TensorType(bool, 3D)> ''   
 | |AllocEmpty{dtype='bool'} [id FS] <TensorType(bool, 3D)> ''   
 | | |Elemwise{add,no_inplace} [id FT] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id FU] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id FV] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id FW] <TensorType(bool, 3D)> ''   
 | | |   |   |InplaceDimShuffle{x,0,1} [id FX] <TensorType(bool, (True, False, False))> ''   
 | | |   |     |Elemwise{second,no_inplace} [id FY] <TensorType(bool, matrix)> ''   
 | | |   |       |mask matrix [id FN] <TensorType(bool, matrix)>
 | | |   |       |TensorConstant{(1, 1) of False} [id FZ] <TensorType(bool, (True, True))>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id GA] <TensorType(int64, scalar)> ''   
 | | | |Shape [id FV] <TensorType(int64, vector)> ''   
 | | | |Constant{1} [id DO] <int64>
 | | |Subtensor{int64} [id GB] <TensorType(int64, scalar)> ''   
 | |   |Shape [id FV] <TensorType(int64, vector)> ''   
 | |   |Constant{2} [id DQ] <int64>
 | |Rebroadcast{0} [id FW] <TensorType(bool, 3D)> ''   
 | |ScalarFromTensor [id GC] <int64> ''   
 |   |Subtensor{int64} [id FU] <TensorType(int64, scalar)> ''   
 |IncSubtensor{Set;:int64:} [id GD] <TensorType(float64, 4D)> ''   
 | |AllocEmpty{dtype='float64'} [id GE] <TensorType(float64, 4D)> ''   
 | | |Elemwise{add,no_inplace} [id GF] <TensorType(int64, scalar)> ''   
 | | | |Elemwise{minimum,no_inplace} [id B] <TensorType(int64, scalar)> ''   
 | | | |Subtensor{int64} [id GG] <TensorType(int64, scalar)> ''   
 | | |   |Shape [id GH] <TensorType(int64, vector)> ''   
 | | |   | |Rebroadcast{0} [id GI] <TensorType(float64, 4D)> ''   
 | | |   |   |InplaceDimShuffle{x,0,1,2} [id GJ] <TensorType(float64, (True, False, False, False))> ''   
 | | |   |     |Elemwise{second,no_inplace} [id GK] <TensorType(float64, 3D)> ''   
 | | |   |       |block matrix [id DM] <TensorType(float64, 3D)>
 | | |   |       |TensorConstant{(1, 1, 1) of 0.0} [id GL] <TensorType(float64, (True, True, True))>
 | | |   |Constant{0} [id T] <int64>
 | | |Subtensor{int64} [id GM] <TensorType(int64, scalar)> ''   
 | | | |Shape [id GH] <TensorType(int64, vector)> ''   
 | | | |Constant{1} [id DO] <int64>
 | | |Subtensor{int64} [id GN] <TensorType(int64, scalar)> ''   
 | | | |Shape [id GH] <TensorType(int64, vector)> ''   
 | | | |Constant{2} [id DQ] <int64>
 | | |Subtensor{int64} [id GO] <TensorType(int64, scalar)> ''   
 | |   |Shape [id GH] <TensorType(int64, vector)> ''   
 | |   |Constant{3} [id DS] <int64>
 | |Rebroadcast{0} [id GI] <TensorType(float64, 4D)> ''   
 | |ScalarFromTensor [id GP] <int64> ''   
 |   |Subtensor{int64} [id GG] <TensorType(int64, scalar)> ''   
 |Number of points per surface used to split rest-ref [id GQ] <TensorType(int32, vector)>
 |fault relation matrix [id GR] <TensorType(int32, matrix)>
 |<TensorType(float64, scalar)> [id GS] <TensorType(float64, scalar)>
 |<TensorType(float64, scalar)> [id GT] <TensorType(float64, scalar)>
 |Range [id GU] <TensorType(float64, scalar)>
 |Covariance at 0 [id GV] <TensorType(float64, scalar)>
 |<TensorType(float64, scalar)> [id GW] <TensorType(float64, scalar)>
 |Nugget effect of gradients [id GX] <TensorType(float64, vector)>
 |Nugget effect of scalar [id GY] <TensorType(float64, vector)>
 |Attenuation factor [id GZ] <TensorType(float64, scalar)>
 |Sigmoid Outside [id HA] <TensorType(float64, scalar)>
 |Sigmoid slope [id HB] <TensorType(float64, scalar)>
 |<TensorType(int32, vector)> [id CH] <TensorType(int32, vector)>
 |<TensorType(bool, vector)> [id HC] <TensorType(bool, vector)>
 |Coordinates of the grid points to interpolate [id HD] <TensorType(float64, matrix)>
 |All the surface_points points at once [id HE] <TensorType(float64, matrix)>
 |Position of the dips [id HF] <TensorType(float64, matrix)>
 |Angle of every dip [id HG] <TensorType(float64, vector)>
 |Azimuth [id HH] <TensorType(float64, vector)>
 |Polarity [id HI] <TensorType(float64, vector)>
 |Values that the blocks are taking [id HJ] <TensorType(float64, matrix)>
for{cpu,Looping}.1 [id A] <TensorType(float64, matrix)> ''   
for{cpu,Looping}.2 [id A] <TensorType(float64, 3D)> ''   
for{cpu,Looping}.3 [id A] <TensorType(float64, 3D)> ''   
for{cpu,Looping}.4 [id A] <TensorType(bool, 3D)> ''   
for{cpu,Looping}.5 [id A] <TensorType(bool, 3D)> ''   
for{cpu,Looping}.6 [id A] <TensorType(float64, 4D)> ''   

Inner graphs of the scan ops:

for{cpu,Looping}.0 [id A] <TensorType(float64, 4D)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 > |block matrix[t-1] [id HL] <TensorType(float64, 3D)> -> [id DF]
 > |if{} [id HM] <TensorType(float64, matrix)> ''   
 > | |Vector controlling if block matrix must be recomputed[t] [id HN] <TensorType(bool, scalar)> -> [id CZ]
 > | |if{} [id HO] <TensorType(float64, matrix)> ''   
 > | | |The series (fault) is finite[t] [id HP] <TensorType(int32, scalar)> -> [id DA]
 > | | |Sum{axis=[0], acc_dtype=float64} [id HQ] <TensorType(float64, matrix)> 'The chunk of block model of a specific series'   
 > | | |Sum{axis=[0], acc_dtype=float64} [id HR] <TensorType(float64, matrix)> 'The chunk of block model of a specific series'   
 > | |Subtensor{int32, ::} [id HS] <TensorType(float64, matrix)> ''   
 > |   |block matrix[t-1] [id HL] <TensorType(float64, 3D)> -> [id DF]
 > |   |ScalarFromTensor [id HT] <int32> ''   
 > |     |<TensorType(int32, scalar)> [id HU] <TensorType(int32, scalar)> -> [id DD]
 > |ScalarFromTensor [id HT] <int32> ''   
 > |Constant{0} [id HV] <int8>
 > |ScalarFromTensor [id HW] <int64> ''   
 >   |Elemwise{add,no_inplace} [id HX] <TensorType(int64, scalar)> ''   
 >     |Elemwise{add,no_inplace} [id HY] <TensorType(int64, scalar)> ''   
 >     | |Subtensor{int64} [id HZ] <TensorType(int64, scalar)> ''   
 >     | | |Shape [id IA] <TensorType(int64, vector)> ''   
 >     | | | |Coordinates of the grid points to interpolate_copy [id IB] <TensorType(float64, matrix)> -> [id HD]
 >     | | |Constant{0} [id IC] <int64>
 >     | |Elemwise{mul,no_inplace} [id ID] <TensorType(int64, scalar)> ''   
 >     |   |TensorConstant{2} [id IE] <TensorType(int8, scalar)>
 >     |   |Elemwise{sub,no_inplace} [id IF] <TensorType(int64, scalar)> ''   
 >     |     |Subtensor{int64} [id IG] <TensorType(int64, scalar)> ''   
 >     |     | |Shape [id IH] <TensorType(int64, vector)> ''   
 >     |     | | |All the surface_points points at once_copy [id II] <TensorType(float64, matrix)> -> [id HE]
 >     |     | |Constant{0} [id IC] <int64>
 >     |     |Subtensor{int64} [id IJ] <TensorType(int64, scalar)> ''   
 >     |       |Shape [id IK] <TensorType(int64, vector)> ''   
 >     |       | |Number of points per surface used to split rest-ref_copy [id IL] <TensorType(int32, vector)> -> [id GQ]
 >     |       |Constant{0} [id IC] <int64>
 >     |TensorConstant{0} [id IM] <TensorType(int8, scalar)>
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 > |Weights vector[t-1] [id IO] <TensorType(float64, vector)> -> [id DU]
 > |if{} [id IP] <TensorType(float64, vector)> ''   
 > | |Vector controlling if weights must be recomputed[t] [id IQ] <TensorType(bool, scalar)> -> [id CX]
 > | |Reshape{1} [id IR] <TensorType(float64, vector)> 'Dual Kriging parameters'   
 > | |Subtensor{int32:int32:} [id IS] <TensorType(float64, vector)> ''   
 > |   |Weights vector[t-1] [id IO] <TensorType(float64, vector)> -> [id DU]
 > |   |ScalarFromTensor [id IT] <int32> ''   
 > |   | |Length of weights in every series[t] [id IU] <TensorType(int32, scalar)> -> [id CS]
 > |   |ScalarFromTensor [id IV] <int32> ''   
 > |     |Length of weights in every series[t+1] [id IW] <TensorType(int32, scalar)> -> [id CT]
 > |ScalarFromTensor [id IT] <int32> ''   
 > |ScalarFromTensor [id IV] <int32> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 > |Scalar matrix[t-1] [id IY] <TensorType(float64, matrix)> -> [id EE]
 > |if{} [id IZ] <TensorType(float64, vector)> ''   
 > | |Vector controlling if scalar matrix must be recomputed[t] [id JA] <TensorType(bool, scalar)> -> [id CY]
 > | |Subtensor{int64} [id JB] <TensorType(float64, vector)> 'Value of the potential field at every point'   
 > | |Subtensor{int32} [id JC] <TensorType(float64, vector)> ''   
 > |   |Scalar matrix[t-1] [id IY] <TensorType(float64, matrix)> -> [id EE]
 > |   |ScalarFromTensor [id HT] <int32> ''   
 > |ScalarFromTensor [id HT] <int32> ''   
 > |Constant{0} [id HV] <int8>
 > |ScalarFromTensor [id HW] <int64> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 > |<TensorType(float64, matrix)> [id JE] <TensorType(float64, matrix)> -> [id EP]
 > |AdvancedSubtensor1 [id JF] <TensorType(float64, vector)> ''   
 > | |Subtensor{int64:int64:} [id JG] <TensorType(float64, vector)> ''   
 > | | |if{} [id IZ] <TensorType(float64, vector)> ''   
 > | | |ScalarFromTensor [id JH] <int64> ''   
 > | | | |Elemwise{mul,no_inplace} [id JI] <TensorType(int64, scalar)> ''   
 > | | |   |TensorConstant{-2} [id JJ] <TensorType(int8, scalar)>
 > | | |   |Elemwise{sub,no_inplace} [id IF] <TensorType(int64, scalar)> ''   
 > | | |ScalarFromTensor [id JK] <int64> ''   
 > | |   |Elemwise{neg,no_inplace} [id JL] <TensorType(int64, scalar)> ''   
 > | |     |Elemwise{sub,no_inplace} [id IF] <TensorType(int64, scalar)> ''   
 > | |Subtensor{int32:int32:} [id JM] <TensorType(int32, vector)> ''   
 > |   |CumOp{None, add} [id JN] <TensorType(int32, vector)> 'Number of points per surfaces after rest-ref. This is used for finding the differentsurface points withing a layer.'   
 > |   |ScalarFromTensor [id JO] <int32> ''   
 > |   | |List with the number of surfaces[t] [id JP] <TensorType(int32, scalar)> -> [id CU]
 > |   |ScalarFromTensor [id JQ] <int32> ''   
 > |     |List with the number of surfaces[t+1] [id JR] <TensorType(int32, scalar)> -> [id CV]
 > |<TensorType(int32, scalar)> [id HU] <TensorType(int32, scalar)> -> [id DD]
 > |Elemwise{sub,no_inplace} [id JS] <TensorType(int32, vector)> ''   
 >   |Subtensor{int32:int32:} [id JT] <TensorType(int32, vector)> ''   
 >   | |TensorConstant{[   1    2..4998 4999]} [id JU] <TensorType(int32, vector)>
 >   | |ScalarFromTensor [id JO] <int32> ''   
 >   | |ScalarFromTensor [id JQ] <int32> ''   
 >   |TensorConstant{(1,) of 1} [id JV] <TensorType(int8, (True,))>
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 > |IncSubtensor{Set;int64:int32:, int8:int64:} [id JX] <TensorType(bool, matrix)> ''   
 > | |IncSubtensor{Set;int32:int32:, int8:int64:} [id JY] <TensorType(bool, matrix)> ''   
 > | | |mask matrix[t-1] [id JZ] <TensorType(bool, matrix)> -> [id FG]
 > | | |if{} [id KA] <TensorType(bool, vector)> ''   
 > | | | |<TensorType(int32, scalar)> [id KB] <TensorType(int32, scalar)> -> [id DC]
 > | | | |Elemwise{gt,no_inplace} [id KC] <TensorType(bool, vector)> ''   
 > | | | | |if{} [id IZ] <TensorType(float64, vector)> ''   
 > | | | | |InplaceDimShuffle{x} [id KD] <TensorType(float64, (True,))> ''   
 > | | | |   |MaxAndArgmax{axis=(0,)}.0 [id KE] <TensorType(float64, scalar)> 'max'   
 > | | | |Subtensor{int32, int8:int64:} [id KF] <TensorType(bool, vector)> ''   
 > | | |   |mask matrix[t-1] [id JZ] <TensorType(bool, matrix)> -> [id FG]
 > | | |   |ScalarFromTensor [id KG] <int32> ''   
 > | | |   | |Elemwise{sub,no_inplace} [id KH] <TensorType(int32, scalar)> ''   
 > | | |   |   |<TensorType(int32, scalar)> [id HU] <TensorType(int32, scalar)> -> [id DD]
 > | | |   |   |TensorConstant{1} [id KI] <TensorType(int8, scalar)>
 > | | |   |Constant{0} [id HV] <int8>
 > | | |   |ScalarFromTensor [id HW] <int64> ''   
 > | | |ScalarFromTensor [id KG] <int32> ''   
 > | | |ScalarFromTensor [id HT] <int32> ''   
 > | | |Constant{0} [id HV] <int8>
 > | | |ScalarFromTensor [id HW] <int64> ''   
 > | |Subtensor{::int64} [id KJ] <TensorType(bool, matrix)> ''   
 > | | |CumOp{0, mul} [id KK] <TensorType(bool, matrix)> ''   
 > | | | |Subtensor{::int64} [id KL] <TensorType(bool, matrix)> ''   
 > | | |   |Subtensor{int64:int32:, int8:int64:} [id KM] <TensorType(bool, matrix)> ''   
 > | | |   | |IncSubtensor{Set;int32:int32:, int8:int64:} [id JY] <TensorType(bool, matrix)> ''   
 > | | |   | |ScalarFromTensor [id KN] <int64> ''   
 > | | |   | | |Elemwise{sub,no_inplace} [id KO] <TensorType(int64, scalar)> ''   
 > | | |   | |   |<TensorType(int32, scalar)> [id HU] <TensorType(int32, scalar)> -> [id DD]
 > | | |   | |   |MaxAndArgmax{axis=(0,)}.0 [id KP] <TensorType(int64, scalar)> 'max'   
 > | | |   | |ScalarFromTensor [id HT] <int32> ''   
 > | | |   | |Constant{0} [id HV] <int8>
 > | | |   | |ScalarFromTensor [id HW] <int64> ''   
 > | | |   |Constant{-1} [id KQ] <int64>
 > | | |Constant{-1} [id KQ] <int64>
 > | |ScalarFromTensor [id KN] <int64> ''   
 > | |ScalarFromTensor [id HT] <int32> ''   
 > | |Constant{0} [id HV] <int8>
 > | |ScalarFromTensor [id HW] <int64> ''   
 > |if{} [id KR] <TensorType(bool, vector)> ''   
 > | |<TensorType(int32, scalar)> [id KS] <TensorType(int32, scalar)> -> [id DB]
 > | |Elemwise{gt,no_inplace} [id KT] <TensorType(bool, vector)> ''   
 > | | |if{} [id IZ] <TensorType(float64, vector)> ''   
 > | | |InplaceDimShuffle{x} [id KU] <TensorType(float64, (True,))> ''   
 > | |   |Elemwise{neg,no_inplace} [id KV] <TensorType(float64, scalar)> ''   
 > | |     |MaxAndArgmax{axis=(0,)}.0 [id KW] <TensorType(float64, scalar)> 'max'   
 > | |Elemwise{mul,no_inplace} [id KX] <TensorType(bool, vector)> ''   
 > |   |InplaceDimShuffle{x} [id KY] <TensorType(bool, (True,))> ''   
 > |   | |Elemwise{invert,no_inplace} [id KZ] <TensorType(bool, scalar)> ''   
 > |   |   |Subtensor{int32} [id LA] <TensorType(bool, scalar)> ''   
 > |   |     |<TensorType(bool, vector)> [id LB] <TensorType(bool, vector)> -> [id HC]
 > |   |     |ScalarFromTensor [id HT] <int32> ''   
 > |   |Elemwise{second,no_inplace} [id LC] <TensorType(bool, vector)> ''   
 > |     |if{} [id IZ] <TensorType(float64, vector)> ''   
 > |     |TensorConstant{(1,) of True} [id LD] <TensorType(bool, (True,))>
 > |ScalarFromTensor [id HT] <int32> ''   
 > |Constant{0} [id HV] <int8>
 > |ScalarFromTensor [id HW] <int64> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 > |<TensorType(bool, matrix)> [id LF] <TensorType(bool, matrix)> -> [id FR]
 > |Elemwise{add,no_inplace} [id LG] <TensorType(bool, vector)> ''   
 > | |if{} [id KR] <TensorType(bool, vector)> ''   
 > | |if{} [id LH] <TensorType(bool, vector)> ''   
 > |   |Subtensor{int32} [id LA] <TensorType(bool, scalar)> ''   
 > |   |Elemwise{gt,no_inplace} [id KT] <TensorType(bool, vector)> ''   
 > |   |Elemwise{second,no_inplace} [id LI] <TensorType(bool, vector)> ''   
 > |     |if{} [id IZ] <TensorType(float64, vector)> ''   
 > |     |TensorConstant{(1,) of False} [id LJ] <TensorType(bool, (True,))>
 > |Elemwise{mul,no_inplace} [id LK] <TensorType(bool, vector)> ''   
 > | |Subtensor{:int64:} [id LL] <TensorType(bool, vector)> ''   
 > | | |<TensorType(bool, vector)> [id LB] <TensorType(bool, vector)> -> [id HC]
 > | | |ScalarFromTensor [id LM] <int64> ''   
 > | |   |Subtensor{int64} [id LN] <TensorType(int64, scalar)> ''   
 > | |     |Shape [id LO] <TensorType(int64, vector)> ''   
 > | |     | |<TensorType(int32, vector)> [id LP] <TensorType(int32, vector)> -> [id CH]
 > | |     |Constant{0} [id IC] <int64>
 > | |Elemwise{invert,no_inplace} [id LQ] <TensorType(bool, vector)> ''   
 > |   |Elemwise{Cast{bool}} [id LR] <TensorType(bool, vector)> ''   
 > |     |Subtensor{:int64:} [id LS] <TensorType(int32, vector)> ''   
 > |       |Subtensor{::, int8} [id LT] <TensorType(int32, vector)> ''   
 > |       | |fault relation matrix_copy [id LU] <TensorType(int32, matrix)> -> [id GR]
 > |       | |ScalarFromTensor [id LV] <int8> ''   
 > |       |   |Elemwise{Cast{int8}} [id LW] <TensorType(int8, scalar)> ''   
 > |       |     |<TensorType(int32, scalar)> [id HU] <TensorType(int32, scalar)> -> [id DD]
 > |       |ScalarFromTensor [id LM] <int64> ''   
 > |MakeSlice [id LX] <slice> ''   
 >   |TensorConstant{0} [id IM] <TensorType(int8, scalar)>
 >   |Elemwise{add,no_inplace} [id HX] <TensorType(int64, scalar)> ''   
 >   |NoneConst [id LY] <NoneTypeT>
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   
 > |<TensorType(float64, 3D)> [id MA] <TensorType(float64, 3D)> -> [id GD]
 > |if{} [id HM] <TensorType(float64, matrix)> ''   
 > |ScalarFromTensor [id HT] <int32> ''   
 > |Constant{0} [id HV] <int8>
 > |ScalarFromTensor [id HW] <int64> ''   

for{cpu,Looping}.1 [id A] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   

for{cpu,Looping}.2 [id A] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   

for{cpu,Looping}.3 [id A] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   

for{cpu,Looping}.4 [id A] <TensorType(bool, 3D)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   

for{cpu,Looping}.5 [id A] <TensorType(bool, 3D)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   

for{cpu,Looping}.6 [id A] <TensorType(float64, 4D)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id HK] <TensorType(float64, 3D)> ''   
 >IncSubtensor{Set;int32:int32:} [id IN] <TensorType(float64, vector)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id IX] <TensorType(float64, matrix)> ''   
 >AdvancedIncSubtensor{inplace=False,  set_instead_of_inc=True} [id JD] <TensorType(float64, matrix)> ''   
 >IncSubtensor{Set;int32, int8:int64:} [id JW] <TensorType(bool, matrix)> ''   
 >AdvancedBooleanIncSubtensor{inplace=False,  set_instead_of_inc=True} [id LE] <TensorType(bool, matrix)> ''   
 >IncSubtensor{Set;int32, ::, int8:int64:} [id LZ] <TensorType(float64, 3D)> ''   

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
elimh commented 4 years ago

I think this problem is caused by the topography - it seems that the extent of your raster file is smaller than the extent of the model. Would you mind to check that by comparing geo_model.grid.regular_grid.extent and the extent of the raster file? You can get the latter either directly from gdal or by using this code from gempy:

from gempy.utils import create_topography
dem = create_topography.Load_DEM_GDAL("topography.grd")
print(dem.extent)

At the moment it is safer if the raster file is larger or at least the same size as the geomodel, which means you could try to adjust the model extent accordingly.

Also, to make it easier for me to fix this, would you mind to make an imshow of geo_model.grid.topography.topo.dem_zval with colorbar and put it here as a comment?

domist07 commented 4 years ago
geo_model.grid.regular_grid.extent =
[3514076.123, 3514114.756, 5428506.806, 5428609.140, 140.000, 232.825]

geo_model.grid.topography.extent = 
[3514076, 3514114, 5428506, 5428609]

grafik

I have tried to set the extend of the regular_grid to [3514080, 3514110, 5428520, 5428600, 140, 233] but the same error occurs.

elimh commented 4 years ago

Ok sorry, I meant to print the extent of the original raster file, using this code:

from gempy.utils import create_topography
dem = create_topography.Load_DEM_GDAL("topography.grd")
print(dem.extent)

(The geo_model.grid.topography extent is after cropping the raster to the regular grid, so these two extents should always be similar anyways. )

After that you could try to set your regular grid extent to dem.extent.

Does the image of the topography look like you would expect?

elimh commented 4 years ago

This problem was caused by a problem with the coordinate systems of the input data, not by the topography, and is now solved :)