Open knbarton opened 4 years ago
I started a branch for this, parallelism_8
. I added omp do loops to mod_centered_diff.f90
and mod_initialize.f90
. I'm not sure if there's much we could do to add parallelism to mod_comp_next_step.f90
since diffx
/diffy
/diffh
all return full arrays, meaning we can't rewrite the operation an explicit loop.
I wasn't sure how to add the -fopenmp
flag to the CMake file, but it can be compiled directly using these commands:
gfortran -c -fopenmp mod_centered_diff.f90 mod_initialize.f90 mod_comp_next_step.mod tsunami.f90
gfortran -fopenmp tsunami.o mod_initialize.o mod_centered_diff.o mod_comp_next_step.o -o tsunami
This issue is complete when the code runs with OpenMP parallelism.