[cig-commits] r22013 - in seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS: EXAMPLES/regional_Greece_small/DATA src/meshfem3D src/shared src/specfem3D

lefebvre at geodynamics.org lefebvre at geodynamics.org
Thu May 9 13:00:07 PDT 2013


Author: lefebvre
Date: 2013-05-09 13:00:06 -0700 (Thu, 09 May 2013)
New Revision: 22013

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/EXAMPLES/regional_Greece_small/DATA/Par_file
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/initialize_mesher.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/meshfem3D_par.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/save_arrays_solver_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/broadcast_compute_parameters.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/read_parameter_file.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/initialize_simulation.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/specfem3D_par.F90
Log:
ADIOS_FOR_SOLVER_MESHFILES flag added. solver meshfiles are saved with adios with the prerequisite that arrays solvers are written with ADIOS as well.

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/EXAMPLES/regional_Greece_small/DATA/Par_file
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/EXAMPLES/regional_Greece_small/DATA/Par_file	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/EXAMPLES/regional_Greece_small/DATA/Par_file	2013-05-09 20:00:06 UTC (rev 22013)
@@ -119,9 +119,9 @@
 # set to true to use GPUs 
 GPU_MODE                        = .false.
 
-# set to true to use GPUs 
+# set to true to use ADIOS 
 ADIOS_ENABLED                   = .true.
 ADIOS_FOR_FORWARD_ARRAYS        = .true.
 ADIOS_FOR_MPI_ARRAYS            = .true.
-#ADIOS_FOR_ARRAYS_SOLVER         = .false.
 ADIOS_FOR_ARRAYS_SOLVER         = .true.
+ADIOS_FOR_SOLVER_MESHFILES      = .true.

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/initialize_mesher.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/initialize_mesher.f90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/initialize_mesher.f90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -104,7 +104,8 @@
 
     ! ADIOS_ENABLED: parameter is optional, may not be in the Par_file
     call read_adios_parameters(ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, &
-        ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER)
+        ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
+        ADIOS_FOR_SOLVER_MESHFILES)
 
   endif
 
@@ -143,7 +144,8 @@
                 ATTENUATION,ATTENUATION_NEW,ATTENUATION_3D,ANISOTROPIC_INNER_CORE,NOISE_TOMOGRAPHY)
   ! broadcasts optional ADIOS_ENABLED 
   call broadcast_adios_parameters(myrank,ADIOS_ENABLED, &
-      ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER)
+      ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
+      ADIOS_FOR_SOLVER_MESHFILES)
 
   ! check that the code is running with the requested number of processes
   if(sizeprocs /= NPROCTOT) call exit_MPI(myrank,'wrong number of MPI processes')

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/meshfem3D_par.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/meshfem3D_par.f90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/meshfem3D_par.f90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -269,7 +269,7 @@
   !-----------------------------------------------------------------
 
   logical :: ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
-      ADIOS_FOR_ARRAYS_SOLVER
+      ADIOS_FOR_ARRAYS_SOLVER, ADIOS_FOR_SOLVER_MESHFILES
 
   end module meshfem3D_par
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/save_arrays_solver_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/save_arrays_solver_adios.F90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/meshfem3D/save_arrays_solver_adios.F90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -40,7 +40,8 @@
     ANISOTROPIC_INNER_CORE,ATTENUATION
 
   use meshfem3D_par,only: &
-    NCHUNKS,ABSORBING_CONDITIONS,SAVE_MESH_FILES, LOCAL_PATH
+    NCHUNKS,ABSORBING_CONDITIONS,SAVE_MESH_FILES, LOCAL_PATH, &
+    ADIOS_FOR_SOLVER_MESHFILES
 
   use create_regions_mesh_par2,only: &
     xixstore,xiystore,xizstore,etaxstore,etaystore,etazstore, &
@@ -934,19 +935,25 @@
   ! uncomment for vp & vs model storage
   if( SAVE_MESH_FILES ) then
     ! outputs model files in binary format
-    call save_arrays_solver_meshfiles(myrank,nspec)
+    if (ADIOS_FOR_SOLVER_MESHFILES) then
+      call save_arrays_solver_meshfiles_adios(myrank,iregion_code, &
+          reg_name, nspec)
+    else
+      call save_arrays_solver_meshfiles(myrank,nspec)
+    endif
   endif
 
 end subroutine save_arrays_solver_adios
 
-!
-!-------------------------------------------------------------------------------------------------
-!
 
-subroutine save_arrays_solver_meshfiles_adios(myrank,nspec)
+!------------------------------------------------------------------------------
+!> \brief TODO
+subroutine save_arrays_solver_meshfiles_adios(myrank, iregion_code, &
+    reg_name, nspec)
 
   ! outputs model files in binary format
-
+  use mpi
+  use adios_write_mod
   use constants
 
   use meshfem3D_models_par,only: &
@@ -959,85 +966,234 @@
 
   implicit none
 
-  integer :: myrank
-  integer :: nspec
+  integer :: myrank, nspec, iregion_code
+  character(len=150) :: reg_name
 
   ! local parameters
   integer :: i,j,k,ispec,ier
   real(kind=CUSTOM_REAL) :: scaleval1,scaleval2
   real(kind=CUSTOM_REAL),dimension(:,:,:,:),allocatable :: temp_store
 
+  ! local parameters
+  character(len=150) :: outputname, group_name
+  integer :: ierr, sizeprocs, comm, local_dim
+  integer(kind=8) :: group_size_inc
+  ! ADIOS variables
+  integer                 :: adios_err
+  integer(kind=8)         :: adios_group, adios_handle, varid
+  integer(kind=8)         :: adios_groupsize, adios_totalsize
+
   ! scaling factors to re-dimensionalize units
   scaleval1 = sngl( sqrt(PI*GRAV*RHOAV)*(R_EARTH/1000.0d0) )
   scaleval2 = sngl( RHOAV/1000.0d0 )
 
+  call world_size(sizeprocs) ! TODO keep it in parameters
+  call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
+
   ! isotropic model
-  ! vp
-  open(unit=27,file=prname(1:len_trim(prname))//'vp.bin', &
-       status='unknown',form='unformatted',action='write',iostat=ier)
-  if( ier /= 0 ) call exit_mpi(myrank,'error opening vp.bin file')
+  ! vp ----------------------------------------------------
+  outputname = trim(reg_name) // "vp.bp" 
+  write(group_name,"('SPECFEM3D_GLOBE_VP_reg',i1)") iregion_code
+  group_size_inc = 0
+  call adios_declare_group(adios_group, group_name, &
+      "", 0, adios_err)
+  call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
-  write(27) sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1
-  close(27)
-  ! vs
-  open(unit=27,file=prname(1:len_trim(prname))//'vs.bin', &
-        status='unknown',form='unformatted',action='write',iostat=ier)
-  if( ier /= 0 ) call exit_mpi(myrank,'error opening vs.bin file')
+  local_dim = size (kappavstore) 
+  call define_adios_global_real_1d_array(adios_group, "vp", &
+      local_dim, group_size_inc)
+  ! Open an ADIOS handler to the restart file.
+  call adios_open (adios_handle, group_name, &
+      outputname, "w", comm, adios_err);
+  call adios_group_size (adios_handle, group_size_inc, &
+                         adios_totalsize, adios_err)
+  call adios_set_path (adios_handle, "vp", adios_err)
+  call write_1D_global_array_adios_dims(adios_handle, myrank, &
+      local_dim, sizeprocs)
+  call adios_write(adios_handle, "array", &
+      sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1, &
+      adios_err)
 
-  write(27) sqrt( muvstore/rhostore )*scaleval1
-  close(27)
-  ! rho
-  open(unit=27,file=prname(1:len_trim(prname))//'rho.bin', &
-        status='unknown',form='unformatted',action='write',iostat=ier)
-  if( ier /= 0 ) call exit_mpi(myrank,'error opening rho.bin file')
+  call adios_set_path (adios_handle, "", adios_err)
+  call adios_close(adios_handle, adios_err)
+  ! vs -----------------------------------------------------
+  outputname = trim(reg_name) // "vs.bp" 
+  write(group_name,"('SPECFEM3D_GLOBE_VS_reg',i1)") iregion_code
+  group_size_inc = 0
+  call adios_declare_group(adios_group, group_name, &
+      "", 0, adios_err)
+  call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
-  write(27) rhostore*scaleval2
-  close(27)
+  local_dim = size (rhostore) 
+  call define_adios_global_real_1d_array(adios_group, "vs", &
+      local_dim, group_size_inc)
+  ! Open an ADIOS handler to the restart file.
+  call adios_open (adios_handle, group_name, &
+      outputname, "w", comm, adios_err);
+  call adios_group_size (adios_handle, group_size_inc, &
+                         adios_totalsize, adios_err)
+  call adios_set_path (adios_handle, "vs", adios_err)
+  call write_1D_global_array_adios_dims(adios_handle, myrank, &
+      local_dim, sizeprocs)
+  call adios_write(adios_handle, "array", &
+      sqrt( muvstore/rhostore )*scaleval1, &
+      adios_err)
 
+  call adios_set_path (adios_handle, "", adios_err)
+  call adios_close(adios_handle, adios_err)
+  ! rho ----------------------------------------------------
+  outputname = trim(reg_name) // "rho.bp" 
+  write(group_name,"('SPECFEM3D_GLOBE_RHO_reg',i1)") iregion_code
+  group_size_inc = 0
+  call adios_declare_group(adios_group, group_name, &
+      "", 0, adios_err)
+  call adios_select_method(adios_group, "MPI", "", "", adios_err)
+
+  local_dim = size (rhostore) 
+  call define_adios_global_real_1d_array(adios_group, "rho", &
+      local_dim, group_size_inc)
+  ! Open an ADIOS handler to the restart file.
+  call adios_open (adios_handle, group_name, &
+      outputname, "w", comm, adios_err);
+  call adios_group_size (adios_handle, group_size_inc, &
+                         adios_totalsize, adios_err)
+  call adios_set_path (adios_handle, "rho", adios_err)
+  call write_1D_global_array_adios_dims(adios_handle, myrank, &
+      local_dim, sizeprocs)
+  call adios_write(adios_handle, "array", &
+      rhostore *scaleval2, &
+      adios_err)
+
+  call adios_set_path (adios_handle, "", adios_err)
+  call adios_close(adios_handle, adios_err)
+
   ! transverse isotropic model
   if( TRANSVERSE_ISOTROPY ) then
-    ! vpv
-    open(unit=27,file=prname(1:len_trim(prname))//'vpv.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening vpv.bin file')
+    ! vpv ----------------------------------------------------
+    outputname = trim(reg_name) // "vpv.bp" 
+    write(group_name,"('SPECFEM3D_GLOBE_VPV_reg',i1)") iregion_code
+    group_size_inc = 0
+    call adios_declare_group(adios_group, group_name, &
+        "", 0, adios_err)
+    call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
-    write(27) sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1
-    close(27)
-    ! vph
-    open(unit=27,file=prname(1:len_trim(prname))//'vph.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening vph.bin file')
+    local_dim = size (kappavstore) 
+    call define_adios_global_real_1d_array(adios_group, "vpv", &
+        local_dim, group_size_inc)
+    ! Open an ADIOS handler to the restart file.
+    call adios_open (adios_handle, group_name, &
+        outputname, "w", comm, adios_err);
+    call adios_group_size (adios_handle, group_size_inc, &
+                           adios_totalsize, adios_err)
+    call adios_set_path (adios_handle, "vpv", adios_err)
+    call write_1D_global_array_adios_dims(adios_handle, myrank, &
+        local_dim, sizeprocs)
+    call adios_write(adios_handle, "array", &
+        sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1, &
+        adios_err)
 
-    write(27) sqrt( (kappahstore+4.*muhstore/3.)/rhostore )*scaleval1
-    close(27)
-    ! vsv
-    open(unit=27,file=prname(1:len_trim(prname))//'vsv.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening vsv.bin file')
+    call adios_set_path (adios_handle, "", adios_err)
+    call adios_close(adios_handle, adios_err)
+    ! vph ----------------------------------------------------
+    outputname = trim(reg_name) // "vph.bp" 
+    write(group_name,"('SPECFEM3D_GLOBE_VPH_reg',i1)") iregion_code
+    group_size_inc = 0
+    call adios_declare_group(adios_group, group_name, &
+        "", 0, adios_err)
+    call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
-    write(27) sqrt( muvstore/rhostore )*scaleval1
-    close(27)
-    ! vsh
-    open(unit=27,file=prname(1:len_trim(prname))//'vsh.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening vsh.bin file')
+    local_dim = size (kappavstore) 
+    call define_adios_global_real_1d_array(adios_group, "vph", &
+        local_dim, group_size_inc)
+    ! Open an ADIOS handler to the restart file.
+    call adios_open (adios_handle, group_name, &
+        outputname, "w", comm, adios_err);
+    call adios_group_size (adios_handle, group_size_inc, &
+                           adios_totalsize, adios_err)
+    call adios_set_path (adios_handle, "vph", adios_err)
+    call write_1D_global_array_adios_dims(adios_handle, myrank, &
+        local_dim, sizeprocs)
+    call adios_write(adios_handle, "array", &
+        sqrt( (kappahstore+4.*muhstore/3.)/rhostore )*scaleval1, &
+        adios_err)
 
-    write(27) sqrt( muhstore/rhostore )*scaleval1
-    close(27)
-    ! rho
-    open(unit=27,file=prname(1:len_trim(prname))//'rho.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening rho.bin file')
+    call adios_set_path (adios_handle, "", adios_err)
+    call adios_close(adios_handle, adios_err)
+    ! vsv -----------------------------------------------------
+    outputname = trim(reg_name) // "vsv.bp" 
+    write(group_name,"('SPECFEM3D_GLOBE_VSV_reg',i1)") iregion_code
+    group_size_inc = 0
+    call adios_declare_group(adios_group, group_name, &
+        "", 0, adios_err)
+    call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
-    write(27) rhostore*scaleval2
-    close(27)
-    ! eta
-    open(unit=27,file=prname(1:len_trim(prname))//'eta.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening eta.bin file')
+    local_dim = size (rhostore) 
+    call define_adios_global_real_1d_array(adios_group, "vsv", &
+        local_dim, group_size_inc)
+    ! Open an ADIOS handler to the restart file.
+    call adios_open (adios_handle, group_name, &
+        outputname, "w", comm, adios_err);
+    call adios_group_size (adios_handle, group_size_inc, &
+                           adios_totalsize, adios_err)
+    call adios_set_path (adios_handle, "vsv", adios_err)
+    call write_1D_global_array_adios_dims(adios_handle, myrank, &
+        local_dim, sizeprocs)
+    call adios_write(adios_handle, "array", &
+        sqrt( muvstore/rhostore )*scaleval1, &
+        adios_err)
 
-    write(27) eta_anisostore
-    close(27)
+    call adios_set_path (adios_handle, "", adios_err)
+    call adios_close(adios_handle, adios_err)
+    ! vsh -----------------------------------------------------
+    outputname = trim(reg_name) // "vsh.bp" 
+    write(group_name,"('SPECFEM3D_GLOBE_VSH_reg',i1)") iregion_code
+    group_size_inc = 0
+    call adios_declare_group(adios_group, group_name, &
+        "", 0, adios_err)
+    call adios_select_method(adios_group, "MPI", "", "", adios_err)
+
+    local_dim = size (rhostore) 
+    call define_adios_global_real_1d_array(adios_group, "vsh", &
+        local_dim, group_size_inc)
+    ! Open an ADIOS handler to the restart file.
+    call adios_open (adios_handle, group_name, &
+        outputname, "w", comm, adios_err);
+    call adios_group_size (adios_handle, group_size_inc, &
+                           adios_totalsize, adios_err)
+    call adios_set_path (adios_handle, "vsh", adios_err)
+    call write_1D_global_array_adios_dims(adios_handle, myrank, &
+        local_dim, sizeprocs)
+    call adios_write(adios_handle, "array", &
+        sqrt( muhstore/rhostore )*scaleval1, &
+        adios_err)
+
+    call adios_set_path (adios_handle, "", adios_err)
+    call adios_close(adios_handle, adios_err)
+    ! eta ----------------------------------------------------
+    outputname = trim(reg_name) // "eta.bp" 
+    write(group_name,"('SPECFEM3D_GLOBE_ETA_reg',i1)") iregion_code
+    group_size_inc = 0
+    call adios_declare_group(adios_group, group_name, &
+        "", 0, adios_err)
+    call adios_select_method(adios_group, "MPI", "", "", adios_err)
+
+    local_dim = size (eta_anisostore) 
+    call define_adios_global_real_1d_array(adios_group, "eta", &
+        local_dim, group_size_inc)
+    ! Open an ADIOS handler to the restart file.
+    call adios_open (adios_handle, group_name, &
+        outputname, "w", comm, adios_err);
+    call adios_group_size (adios_handle, group_size_inc, &
+                           adios_totalsize, adios_err)
+    call adios_set_path (adios_handle, "eta", adios_err)
+    call write_1D_global_array_adios_dims(adios_handle, myrank, &
+        local_dim, sizeprocs)
+    call adios_write(adios_handle, "array", &
+        eta_anisostore, &
+        adios_err)
+
+    call adios_set_path (adios_handle, "", adios_err)
+    call adios_close(adios_handle, adios_err)
   endif ! TRANSVERSE_ISOTROPY
 
   ! shear attenuation
@@ -1070,14 +1226,32 @@
       enddo
     endif
 
-    ! Qmu
-    open(unit=27,file=prname(1:len_trim(prname))//'qmu.bin', &
-          status='unknown',form='unformatted',action='write',iostat=ier)
-    if( ier /= 0 ) call exit_mpi(myrank,'error opening qmu.bin file')
+    ! Qmu --------------------------------------------------
+    outputname = trim(reg_name) // "qmu.bp" 
+    write(group_name,"('SPECFEM3D_GLOBE_QMU_reg',i1)") iregion_code
+    group_size_inc = 0
+    call adios_declare_group(adios_group, group_name, &
+        "", 0, adios_err)
+    call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
-    write(27) temp_store
-    close(27)
+    local_dim = size (temp_store) 
+    call define_adios_global_real_1d_array(adios_group, "qmu", &
+        local_dim, group_size_inc)
+    ! Open an ADIOS handler to the restart file.
+    call adios_open (adios_handle, group_name, &
+        outputname, "w", comm, adios_err);
+    call adios_group_size (adios_handle, group_size_inc, &
+                           adios_totalsize, adios_err)
+    call adios_set_path (adios_handle, "qmu", adios_err)
+    call write_1D_global_array_adios_dims(adios_handle, myrank, &
+        local_dim, sizeprocs)
+    call adios_write(adios_handle, "array", &
+        temp_store, &
+        adios_err)
 
+    call adios_set_path (adios_handle, "", adios_err)
+    call adios_close(adios_handle, adios_err)
+
     ! frees temporary memory
     deallocate(temp_store)
   endif ! ATTENUATION

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/broadcast_compute_parameters.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/broadcast_compute_parameters.f90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/broadcast_compute_parameters.f90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -352,7 +352,7 @@
 !1        forward arrays are stored with the help of ADIOS.
 subroutine broadcast_adios_parameters(myrank,ADIOS_ENABLED,  &
     ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
-    ADIOS_FOR_ARRAYS_SOLVER)
+    ADIOS_FOR_ARRAYS_SOLVER, ADIOS_FOR_SOLVER_MESHFILES)
 
   implicit none
 
@@ -363,7 +363,7 @@
   
   integer:: myrank
   logical:: ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
-      ADIOS_FOR_ARRAYS_SOLVER
+      ADIOS_FOR_ARRAYS_SOLVER, ADIOS_FOR_SOLVER_MESHFILES
   ! local parameters
   integer :: ier
   call MPI_BCAST(ADIOS_ENABLED,1,MPI_LOGICAL,0,MPI_COMM_WORLD,ier)
@@ -377,5 +377,8 @@
   call MPI_BCAST(ADIOS_FOR_ARRAYS_SOLVER,1,MPI_LOGICAL,0,MPI_COMM_WORLD,ier)
   if( ier /= 0 ) call exit_MPI(myrank, &
       'error broadcasting ADIOS_FOR_ARRAYS_SOLVER')
+  call MPI_BCAST(ADIOS_FOR_SOLVER_MESHFILES,1,MPI_LOGICAL,0,MPI_COMM_WORLD,ier)
+  if( ier /= 0 ) call exit_MPI(myrank, &
+      'error broadcasting ADIOS_FOR_SOLVER_MESHFILES')
 
 end subroutine broadcast_adios_parameters

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/read_parameter_file.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/read_parameter_file.f90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/shared/read_parameter_file.f90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -237,19 +237,21 @@
 !-------------------------------------------------------------------------------------------------
 !
   subroutine read_adios_parameters(ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, &
-      ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER)
+      ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
+      ADIOS_FOR_SOLVER_MESHFILES)
 
   implicit none
   include "constants.h"
 
   logical :: ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
-      ADIOS_FOR_ARRAYS_SOLVER
+      ADIOS_FOR_ARRAYS_SOLVER, ADIOS_FOR_SOLVER_MESHFILES
 
   ! initializes flags
   ADIOS_ENABLED = .false.
   ADIOS_FOR_FORWARD_ARRAYS = .false.
   ADIOS_FOR_MPI_ARRAYS = .false.
   ADIOS_FOR_ARRAYS_SOLVER = .false.
+  ADIOS_FOR_SOLVER_MESHFILES = .false.
   ! opens file Par_file
   call open_parameter_file()
   call read_value_logical(ADIOS_ENABLED, 'solver.ADIOS_ENABLED')
@@ -260,6 +262,8 @@
         'solver.ADIOS_FOR_MPI_ARRAYS')
     call read_value_logical(ADIOS_FOR_ARRAYS_SOLVER, &
         'solver.ADIOS_FOR_ARRAYS_SOLVER')
+    call read_value_logical(ADIOS_FOR_SOLVER_MESHFILES, &
+        'solver.ADIOS_FOR_ARRAYS_SOLVER')
   endif
   call close_parameter_file()
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/initialize_simulation.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/initialize_simulation.f90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/initialize_simulation.f90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -109,7 +109,8 @@
     call read_gpu_mode(GPU_MODE)
     ! ADIOS_ENABLED: parameter is optional, may not be in the Par_file
     call read_adios_parameters(ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, &
-        ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER)
+        ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
+        ADIOS_FOR_SOLVER_MESHFILES)
   endif
 
   ! distributes parameters from master to all processes
@@ -151,7 +152,8 @@
   call broadcast_gpu_parameters(myrank,GPU_MODE)
   ! broadcasts optional ADIOS_ENABLED 
   call broadcast_adios_parameters(myrank,ADIOS_ENABLED, &
-      ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER)
+      ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
+      ADIOS_FOR_SOLVER_MESHFILES)
   ! get the base pathname for output files
   call get_value_string(OUTPUT_FILES, 'OUTPUT_FILES', 'OUTPUT_FILES')
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/specfem3D_par.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/specfem3D_par.F90	2013-05-09 20:00:00 UTC (rev 22012)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SUNFLOWER_ADIOS/src/specfem3D/specfem3D_par.F90	2013-05-09 20:00:06 UTC (rev 22013)
@@ -308,7 +308,7 @@
   !-----------------------------------------------------------------
 
   logical :: ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
-      ADIOS_FOR_ARRAYS_SOLVER
+      ADIOS_FOR_ARRAYS_SOLVER, ADIOS_FOR_SOLVER_MESHFILES
 
   !-----------------------------------------------------------------
   ! time scheme



More information about the CIG-COMMITS mailing list