[cig-commits] [commit] devel, master: fixed the OpenMP compilation issue detected by BuildBot (c97ba5d)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:28:11 PST 2014


Repository : https://github.com/geodynamics/specfem3d_globe

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

>---------------------------------------------------------------

commit c97ba5d95bef9fbfec8676c9616fbf2f12f0aa36
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Fri Aug 1 19:04:07 2014 +0200

    fixed the OpenMP compilation issue detected by BuildBot


>---------------------------------------------------------------

c97ba5d95bef9fbfec8676c9616fbf2f12f0aa36
 flags.guess                                     | 13 ++++++++++++-
 setup/constants.h.in                            |  6 +++---
 src/specfem3D/compute_forces_inner_core_Dev.F90 |  5 ++---
 src/specfem3D/compute_forces_outer_core_Dev.F90 |  2 +-
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/flags.guess b/flags.guess
index db79dd3..8474d2c 100644
--- a/flags.guess
+++ b/flags.guess
@@ -16,7 +16,18 @@
 ###########################################################################################################################
 ###########################################################################################################################
 ###########################################################################################################################
+
+# if you want to compile with OpenMP, add this to the flags listed below, depending on the compiler you use:
 #
+#   -fopenmp for GNU gfortran
+#   -openmp for Intel ifort
+#   -mp for Portland pgf90
+#   -qsmp=omp for IBM xlf
+
+###########################################################################################################################
+###########################################################################################################################
+###########################################################################################################################
+
 # If you run very large meshes on a relatively small number
 # of processors, the static memory size needed on each processor might become
 # greater than 2 gigabytes, which is the upper limit for 32-bit addressing
@@ -25,7 +36,7 @@
 # or -mcmodel=medium -shared-intel (if you use the Intel ifort / icc compiler)
 # to the configure options of CFLAGS, FCFLAGS and LDFLAGS otherwise the compiler will display an error
 # message (for instance 'relocation truncated to fit: R\_X86\_64\_PC32 against .bss' or something similar);
-#
+
 ###########################################################################################################################
 ###########################################################################################################################
 ###########################################################################################################################
diff --git a/setup/constants.h.in b/setup/constants.h.in
index f99c8c2..b961cec 100644
--- a/setup/constants.h.in
+++ b/setup/constants.h.in
@@ -818,15 +818,15 @@
 !!-----------------------------------------------------------
   integer, parameter :: NSTAGE = 6
 
-  real(kind=CUSTOM_REAL), parameter, dimension(NSTAGE) :: ALPHA_LDDRK = &
+  real(kind=CUSTOM_REAL), dimension(NSTAGE) :: ALPHA_LDDRK = &
     (/0.0_CUSTOM_REAL,-0.737101392796_CUSTOM_REAL, -1.634740794341_CUSTOM_REAL,&
       -0.744739003780_CUSTOM_REAL,-1.469897351522_CUSTOM_REAL,-2.813971388035_CUSTOM_REAL/)
 
-  real(kind=CUSTOM_REAL), parameter, dimension(NSTAGE) :: BETA_LDDRK = &
+  real(kind=CUSTOM_REAL), dimension(NSTAGE) :: BETA_LDDRK = &
     (/0.032918605146_CUSTOM_REAL,0.823256998200_CUSTOM_REAL,0.381530948900_CUSTOM_REAL,&
       0.200092213184_CUSTOM_REAL,1.718581042715_CUSTOM_REAL,0.27_CUSTOM_REAL/)
 
-  real(kind=CUSTOM_REAL), parameter, dimension(NSTAGE) :: C_LDDRK = &
+  real(kind=CUSTOM_REAL), dimension(NSTAGE) :: C_LDDRK = &
     (/0.0_CUSTOM_REAL,0.032918605146_CUSTOM_REAL,0.249351723343_CUSTOM_REAL,&
       0.466911705055_CUSTOM_REAL,0.582030414044_CUSTOM_REAL,0.847252983783_CUSTOM_REAL/)
 
diff --git a/src/specfem3D/compute_forces_inner_core_Dev.F90 b/src/specfem3D/compute_forces_inner_core_Dev.F90
index 0bd2b0c..e29eb65 100644
--- a/src/specfem3D/compute_forces_inner_core_Dev.F90
+++ b/src/specfem3D/compute_forces_inner_core_Dev.F90
@@ -183,11 +183,10 @@
 !$OMP sin_phi, cos_theta_sq, sin_theta_sq, cos_phi_sq, sin_phi_sq, int_radius, minus_g, rho, gxl, gyl, gzl, minus_dg, &
 !$OMP minus_g_over_radius, minus_dg_plus_g_over_radius, Hxxl, Hyyl, Hzzl, Hxyl, Hxzl, Hyzl, sx_l, sy_l, sz_l, &
 !$OMP factor, rho_s_H, newtempx2, newtempy2, newtempz2, fac1, fac2, fac3, sum_terms, newtempx1, newtempx3 , newtempy1, &
-!$OMP newtempy3, newtempz1, newtempz3
 #ifdef FORCE_VECTORIZATION
-!$OMP ,R_xx_val, R_yy_val &
+!$OMP R_xx_val, R_yy_val, &
 #endif
-!$OMP )
+!$OMP newtempy3, newtempz1, newtempz3)
 
 !$OMP DO SCHEDULE(GUIDED)
   do ispec_p = 1,num_elements
diff --git a/src/specfem3D/compute_forces_outer_core_Dev.F90 b/src/specfem3D/compute_forces_outer_core_Dev.F90
index 0073140..b0ce6e9 100644
--- a/src/specfem3D/compute_forces_outer_core_Dev.F90
+++ b/src/specfem3D/compute_forces_outer_core_Dev.F90
@@ -144,7 +144,7 @@
 !$OMP gammax, gammay, gammaz, deltat, two_omega_earth, timeval, A_array_rotation, B_array_rotation,   &
 !$OMP minus_rho_g_over_kappa_fluid, wgll_cube, MOVIE_VOLUME, hprimewgll_xxT, hprimewgll_xx, &
 !$OMP wgllwgll_yz_3D, wgllwgll_xz_3D, wgllwgll_xy_3D, accelfluid, USE_LDDRK, A_array_rotation_lddrk, &
-!$OMP istage, B_array_rotation_lddrk, div_displfluid ) &
+!$OMP istage, B_array_rotation_lddrk, div_displfluid, ALPHA_LDDRK, BETA_LDDRK ) &
 !$OMP PRIVATE( &
 !$OMP ispec_p, ispec, iglob, dummyx_loc, radius, theta, phi, &
 !$OMP cos_theta, sin_theta, cos_phi, sin_phi, int_radius, &



More information about the CIG-COMMITS mailing list