@@ -51,26 +51,25 @@ Simulation::Simulation(const YAML::Node& root_node)
51
51
cudaDeviceGetLimit (& default_stack_size , cudaLimitStackSize );
52
52
cudaDeviceSetLimit (cudaLimitStackSize , nalu_stack_size );
53
53
#elif defined(KOKKOS_ENABLE_HIP )
54
- hipError_t err = hipDeviceGetLimit ( & default_stack_size , hipLimitMallocHeapSize );
55
- if ( err != hipSuccess )
56
- {
57
- /*
58
- This might be useful at some point so keeping it and commenting out.
59
-
60
- printf("%s %s %d : Failure %s in hipDeviceSetLimit\n",
61
- __FILE__,__FUNCTION__,__LINE__,hipGetErrorString(err));
62
- */
54
+ hipError_t err =
55
+ hipDeviceGetLimit ( & default_stack_size , hipLimitMallocHeapSize );
56
+ if ( err != hipSuccess ) {
57
+ /*
58
+ This might be useful at some point so keeping it and commenting out.
59
+
60
+ printf("%s %s %d : Failure %s in hipDeviceSetLimit\n",
61
+ __FILE__,__FUNCTION__,__LINE__,hipGetErrorString(err));
62
+ */
63
63
}
64
64
65
65
err = hipDeviceSetLimit (hipLimitMallocHeapSize , nalu_stack_size );
66
- if (err != hipSuccess )
67
- {
68
- /*
69
- This might be useful at some point so keeping it and commenting out.
70
-
71
- printf("%s %s %d : Failure %s in hipDeviceSetLimit\n",
72
- __FILE__,__FUNCTION__,__LINE__,hipGetErrorString(err));
73
- */
66
+ if (err != hipSuccess ) {
67
+ /*
68
+ This might be useful at some point so keeping it and commenting out.
69
+
70
+ printf("%s %s %d : Failure %s in hipDeviceSetLimit\n",
71
+ __FILE__,__FUNCTION__,__LINE__,hipGetErrorString(err));
72
+ */
74
73
}
75
74
#endif
76
75
}
@@ -84,15 +83,15 @@ Simulation::~Simulation()
84
83
#if defined(KOKKOS_ENABLE_CUDA )
85
84
cudaDeviceSetLimit (cudaLimitStackSize , default_stack_size );
86
85
#elif defined(KOKKOS_ENABLE_HIP )
87
- hipError_t err = hipDeviceSetLimit ( hipLimitMallocHeapSize , default_stack_size );
88
- if ( err != hipSuccess )
89
- {
90
- /*
91
- This might be useful at some point so keeping it and commenting out.
92
-
93
- printf("%s %s %d : Failure %s in hipDeviceSetLimit\n",
94
- __FILE__,__FUNCTION__,__LINE__,hipGetErrorString(err));
95
- */
86
+ hipError_t err =
87
+ hipDeviceSetLimit ( hipLimitMallocHeapSize , default_stack_size );
88
+ if ( err != hipSuccess ) {
89
+ /*
90
+ This might be useful at some point so keeping it and commenting out.
91
+
92
+ printf("%s %s %d : Failure %s in hipDeviceSetLimit\n",
93
+ __FILE__,__FUNCTION__,__LINE__,hipGetErrorString(err));
94
+ */
96
95
}
97
96
#endif
98
97
}
0 commit comments