-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Hello, when trying to call the Turbulent Channel 3d example, I get an index out of bond error:
Error evaluating static expression: index 0 is out of bounds for axis 0 with size 0 while evaluating the following code generated from the static expression:
Full Traceback:
==================================================
Simulation Configuration:
Grid size: 300 x 150 x 100
Backend: ComputeBackend.WARP
Velocity set: D3Q27
Precision policy: PrecisionPolicy.FP64FP64
Reynolds number: 180
Max iterations: 10000000
==================================================
Warp CUDA error: Could not open libcuda.so.
Warp CUDA error: Function cuDriverGetVersion_f: a suitable driver entry point was not found
Warp CUDA error 36 (in function cuda_driver_version, /builds/omniverse/warp/warp/native/warp.cu:1649)
Warp 1.5.1 initialized:
CUDA Toolkit 12.6, Driver 0.0 (insufficient CUDA driver version!)
Devices:
"cpu" : "x86_64"
Kernel cache:
/home/path/.cache/warp/1.5.1
Warp UserWarning:
Insufficient CUDA driver version.
The minimum required CUDA driver version is 12.0, but the installed CUDA driver version is 0.0.
Visit https://github.com/NVIDIA/warp/blob/main/README.md#installing for guidance.
registered bc RegularizedBC_8628966996696 with id 1
Module xlb.operator.equilibrium.quadratic_equilibrium 85125be load on device 'cpu' took 1.89 ms (cached)
Module xlb.operator.boundary_masker.indices_boundary_masker 195ee2b load on device 'cpu' took 0.26 ms (cached)
Module xlb.operator.boundary_condition.boundary_condition f193968 load on device 'cpu' took 10.80 ms
Traceback (most recent call last):
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2859, in evaluate_static_expression
value = eval(static_code, vars_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 1, in <module>
IndexError: index 0 is out of bounds for axis 0 with size 0
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1006, in build
adj.eval(adj.tree.body[0])
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1613, in emit_FunctionDef
adj.eval(f)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2496, in emit_Assign
rhs = adj.eval(node.value)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2178, in emit_Call
obj, _ = adj.evaluate_static_expression(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2867, in evaluate_static_expression
raise WarpCodegenError(
warp.codegen.WarpCodegenError: Error evaluating static expression: index 0 is out of bounds for axis 0 with size 0 while evaluating the following code generated from the static expression:
self.precision_policy.store_precision.wp_dtype(float(self.prescribed_value[np.nonzero(self.prescribed_value)[0][0]]))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1006, in build
adj.eval(adj.tree.body[0])
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1613, in emit_FunctionDef
adj.eval(f)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1660, in emit_If
adj.eval(stmt)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2496, in emit_Assign
rhs = adj.eval(node.value)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2244, in emit_Call
out = adj.add_call(func, args, kwargs, type_args, min_outputs=min_outputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1311, in add_call
adj.builder.build_function(func)
File "path_to_lib/lib/python3.12/site-packages/warp/context.py", line 1612, in build_function
func.adj.build(self)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1017, in build
raise e
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1006, in build
adj.eval(adj.tree.body[0])
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1613, in emit_FunctionDef
adj.eval(f)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2496, in emit_Assign
rhs = adj.eval(node.value)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2178, in emit_Call
obj, _ = adj.evaluate_static_expression(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2867, in evaluate_static_expression
raise WarpCodegenError(
warp.codegen.WarpCodegenError: Error while parsing function "prescribed_profile_warp" at path_to_lib/lib/python3.12/site-packages/xlb/operator/boundary_condition/bc_zouhe.py:115:
value = wp.static(
;Error evaluating static expression: index 0 is out of bounds for axis 0 with size 0 while evaluating the following code generated from the static expression:
self.precision_policy.store_precision.wp_dtype(float(self.prescribed_value[np.nonzero(self.prescribed_value)[0][0]]))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "path_to_example/turbulent_channel_3d.py", line 200, in <module>
simulation = TurbulentChannel3D(channel_half_width, Re_tau, u_tau, grid_shape, velocity_set, backend, precision_policy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_example/turbulent_channel_3d.py", line 61, in __init__
self._setup()
File "path_to_example/turbulent_channel_3d.py", line 74, in _setup
self.f_0, self.f_1, self.bc_mask, self.missing_mask = self.stepper.prepare_fields()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/xlb/operator/stepper/nse_stepper.py", line 88, in prepare_fields
f_0, f_1 = self._initialize_auxiliary_data(self.boundary_conditions, f_0, f_1, bc_mask, missing_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/xlb/operator/stepper/nse_stepper.py", line 126, in _initialize_auxiliary_data
f_0, f_1 = bc.aux_data_init(f_0, f_1, bc_mask, missing_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/xlb/operator/boundary_condition/boundary_condition.py", line 204, in aux_data_init
wp.launch(
File "path_to_lib/lib/python3.12/site-packages/warp/context.py", line 5213, in launch
module_exec = kernel.module.load(device, block_dim)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/context.py", line 2053, in load
builder = ModuleBuilder(self, builder_options, hasher=self.hasher)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/context.py", line 1573, in __init__
self.build_kernel(kernel)
File "path_to_lib/lib/python3.12/site-packages/warp/context.py", line 1602, in build_kernel
kernel.adj.build(self)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1017, in build
raise e
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1006, in build
adj.eval(adj.tree.body[0])
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1613, in emit_FunctionDef
adj.eval(f)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1660, in emit_If
adj.eval(stmt)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2496, in emit_Assign
rhs = adj.eval(node.value)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2244, in emit_Call
out = adj.add_call(func, args, kwargs, type_args, min_outputs=min_outputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1311, in add_call
adj.builder.build_function(func)
File "path_to_lib/lib/python3.12/site-packages/warp/context.py", line 1612, in build_function
func.adj.build(self)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1017, in build
raise e
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1006, in build
adj.eval(adj.tree.body[0])
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 1613, in emit_FunctionDef
adj.eval(f)
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2496, in emit_Assign
rhs = adj.eval(node.value)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2704, in eval
return emit_node(adj, node)
^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2178, in emit_Call
obj, _ = adj.evaluate_static_expression(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path_to_lib/lib/python3.12/site-packages/warp/codegen.py", line 2867, in evaluate_static_expression
raise WarpCodegenError(
warp.codegen.WarpCodegenError: Error while parsing function "aux_data_init_kernel" at path_to_lib/lib/python3.12/site-packages/xlb/operator/boundary_condition/boundary_condition.py:190:
prescribed_values = functional(index)
;Error while parsing function "prescribed_profile_warp" at path_to_lib/lib/python3.12/site-packages/xlb/operator/boundary_condition/bc_zouhe.py:115:
value = wp.static(
;Error evaluating static expression: index 0 is out of bounds for axis 0 with size 0 while evaluating the following code generated from the static expression:
self.precision_policy.store_precision.wp_dtype(float(self.prescribed_value[np.nonzero(self.prescribed_value)[0][0]]))
Metadata
Metadata
Assignees
Labels
No labels