diff --git a/intro_lab/solutions/pi_loop.f90 b/intro_lab/solutions/pi_loop.f90 index 91f5d83bfb3430959ce12a425307233e5aeba593..286da8535e179eebc7d872625be114e741e92098 100755 --- a/intro_lab/solutions/pi_loop.f90 +++ b/intro_lab/solutions/pi_loop.f90 @@ -48,7 +48,8 @@ do num_threads = 1, MAX_THREADS pi = step * raw_sum run_time = OMP_GET_WTIME() - start_time - print '(" pi is ", f12.6, " in ", f12.6, " seconds and ", i0, " threads")', pi, run_time, num_threads + print '(" pi is ", f12.6, " in ", f12.6, " seconds and ", i0, " threads. Error = ", e15.6)', & + pi, run_time, num_threads, abs(3.14159265358979323846D0 - pi) enddo diff --git a/intro_lab/solutions/pi_spmd_final.f90 b/intro_lab/solutions/pi_spmd_final.f90 index f21b2eace608f435f511bc09377720cd2f421f50..571a32dd0bcdb9441f48210db5785fb8dc890083 100755 --- a/intro_lab/solutions/pi_spmd_final.f90 +++ b/intro_lab/solutions/pi_spmd_final.f90 @@ -58,7 +58,8 @@ do num_threads = 1, MAX_THREADS pi = step * full_sum run_time = OMP_GET_WTIME() - start_time - print '(" pi is ", f12.6, " in ", f12.6, " seconds and ", i0, " threads")', pi, run_time, num_threads + print '(" pi is ", f12.6, " in ", f12.6, " seconds and ", i0, " threads. Error = ", e15.6)', & + pi, run_time, num_threads, abs(3.14159265358979323846D0 - pi) enddo diff --git a/intro_lab/solutions/pi_spmd_simple.f90 b/intro_lab/solutions/pi_spmd_simple.f90 index 737ca1b0269b9c8d90473fca7302386cf0c09d1b..eb87ddf8206edc483083f1ec6ea8bc28f095575f 100755 --- a/intro_lab/solutions/pi_spmd_simple.f90 +++ b/intro_lab/solutions/pi_spmd_simple.f90 @@ -59,7 +59,8 @@ do num_threads = 1, MAX_THREADS pi = step * full_sum run_time = OMP_GET_WTIME() - start_time - print '(" pi is ", f12.6, " in ", f12.6, " seconds and ", i0, " threads")', pi, run_time, num_threads + print '(" pi is ", f12.6, " in ", f12.6, " seconds and ", i0, " threads. Error = ", e15.6)', & + pi, run_time, num_threads, abs(3.14159265358979323846D0 - pi) enddo