diff --git a/docs.it4i/software/nvidia-hip.md b/docs.it4i/software/nvidia-hip.md index 1b56874d047ea4c3c05581777b029bc685457ef8..c83584418df5429b5ea5f968a02af5a1440a47b0 100644 --- a/docs.it4i/software/nvidia-hip.md +++ b/docs.it4i/software/nvidia-hip.md @@ -29,7 +29,7 @@ singularity shell /home/vic0092/rocm/centos7-nvidia-rocm.sif The above gives you Singularity / apptainer shell prompt: ```console -Singularity> +Singularity> ``` Verify that you have GPUs active and accessible on the given node: @@ -111,7 +111,7 @@ In this section, we show a basic code example. You can directly copy and paste t } -/* +/* * Square each element in the array A and write to array C. */ template <typename T> @@ -144,9 +144,9 @@ int main(int argc, char *argv[]) C_h = (float*)malloc(Nbytes); CHECK(C_h == 0 ? cudaErrorMemoryAllocation : cudaSuccess ); // Fill with Phi + i - for (size_t i=0; i<N; i++) + for (size_t i=0; i<N; i++) { - A_h[i] = 1.618f + i; + A_h[i] = 1.618f + i; } printf ("info: allocate device mem (%6.2f MB)\n", 2*Nbytes/1024.0/1024.0);