Skip to content
Snippets Groups Projects
Commit 6aa5d035 authored by Xin Li's avatar Xin Li
Browse files

updated intro_lab instruction

parent 90ca39c7
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ All examples are available in both C and Fortran90. ...@@ -50,7 +50,7 @@ All examples are available in both C and Fortran90.
- OpenMP Intro lab: - OpenMP Intro lab:
- [Instructions](intro_lab/README.md) - [Instructions](intro_lab/README.md)
- Simple hello world program [in C](intro_lab/hello.c) and [in Fortran](intro_lab/hello.f90) - Simple hello world program [in C](intro_lab/hello.c) and [in Fortran](intro_lab/hello.f90)
- Calculate pi [in C](intro_lab/pi.c) and [in Fortran](intro_lab/pi.f90) - Calculate π [in C](intro_lab/pi.c) and [in Fortran](intro_lab/pi.f90)
- Solutions will be made available later during the lab - Solutions will be made available later during the lab
- OpenMP Advanced Lab: - OpenMP Advanced Lab:
- [Instructions](advanced_lab/README.md) - [Instructions](advanced_lab/README.md)
......
...@@ -5,4 +5,6 @@ int main () ...@@ -5,4 +5,6 @@ int main ()
int thread_id = 0; int thread_id = 0;
printf("Hello World from thread %d \n", thread_id); printf("Hello World from thread %d \n", thread_id);
return 0;
} }
...@@ -38,4 +38,6 @@ int main () ...@@ -38,4 +38,6 @@ int main ()
pi = step * sum; pi = step * sum;
run_time = omp_get_wtime() - start_time; run_time = omp_get_wtime() - start_time;
printf("\n pi with %ld steps is %lf in %lf seconds\n ",num_steps,pi,run_time); printf("\n pi with %ld steps is %lf in %lf seconds\n ",num_steps,pi,run_time);
return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment