[cig-commits] [commit] devel: updates ADIOS flag usage, adding initialization to routine read_parameter_file() (ee1025a)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Nov 25 06:56:31 PST 2014
Repository : https://github.com/geodynamics/specfem3d_globe
On branch : devel
Link : https://github.com/geodynamics/specfem3d_globe/compare/0e5b55c6f30be94583639fd325373eecd6facc6d...8be3e0b0267c8d4cf5af3bc26e8903da17bc4fd1
>---------------------------------------------------------------
commit ee1025a22b9f67a18b749e7a0a0824937935873a
Author: daniel peter <peterda at ethz.ch>
Date: Tue Nov 25 15:32:13 2014 +0100
updates ADIOS flag usage, adding initialization to routine read_parameter_file()
>---------------------------------------------------------------
ee1025a22b9f67a18b749e7a0a0824937935873a
src/meshfem3D/create_regions_mesh.F90 | 10 +++++-----
src/meshfem3D/get_absorb.f90 | 4 ++--
src/meshfem3D/model_gll.f90 | 4 ++--
src/meshfem3D/save_arrays_solver.f90 | 8 ++++----
src/shared/read_parameter_file.f90 | 14 +++++++++++++-
src/shared/shared_par.f90 | 3 ++-
src/specfem3D/get_attenuation.f90 | 4 ++--
src/specfem3D/read_forward_arrays.f90 | 6 +++---
src/specfem3D/read_mesh_databases.F90 | 16 ++++++++--------
src/specfem3D/save_forward_arrays.f90 | 6 +++---
src/specfem3D/save_kernels.F90 | 20 ++++++++++----------
src/specfem3D/save_regular_kernels.f90 | 5 ++---
12 files changed, 56 insertions(+), 44 deletions(-)
diff --git a/src/meshfem3D/create_regions_mesh.F90 b/src/meshfem3D/create_regions_mesh.F90
index 470c1fb..6116800 100644
--- a/src/meshfem3D/create_regions_mesh.F90
+++ b/src/meshfem3D/create_regions_mesh.F90
@@ -55,7 +55,7 @@
MAX_NUMBER_OF_MESH_LAYERS,MAX_NUM_REGIONS,NB_SQUARE_CORNERS, &
NGLOB1D_RADIAL_CORNER, &
NGLOB2DMAX_XMIN_XMAX,NGLOB2DMAX_YMIN_YMAX, &
- ADIOS_ENABLED,ADIOS_FOR_ARRAYS_SOLVER, &
+ ADIOS_FOR_ARRAYS_SOLVER, &
ROTATION,EXACT_MASS_MATRIX_FOR_ROTATION,ROLAND_SYLVAIN
use meshfem3D_models_par,only: &
@@ -396,7 +396,7 @@
call flush_IMAIN()
endif
! saves mesh and model parameters
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
if (myrank == 0) write(IMAIN,*) ' in ADIOS file format'
call save_arrays_solver_adios(myrank,nspec,nglob,idoubling,ibool, &
iregion_code,xstore,ystore,zstore, &
@@ -432,7 +432,7 @@
call flush_IMAIN()
endif
! saves boundary file
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
if (myrank == 0) write(IMAIN,*) ' in ADIOS file format'
call save_arrays_boundary_adios()
else
@@ -1318,7 +1318,7 @@ subroutine crm_save_mesh_files(nspec,npointot,iregion_code)
myrank,NGLLX,NGLLY,NGLLZ, &
RICB,RCMB,RTOPDDOUBLEPRIME,R600,R670,R220,R771,R400,R120,R80,RMOHO, &
RMIDDLE_CRUST,ROCEAN, &
- ADIOS_ENABLED,ADIOS_FOR_AVS_DX
+ ADIOS_FOR_AVS_DX
use meshfem3D_models_par,only: &
@@ -1354,7 +1354,7 @@ subroutine crm_save_mesh_files(nspec,npointot,iregion_code)
stat=ier)
if (ier /= 0) stop 'Error in allocate 21'
- if (ADIOS_ENABLED .and. ADIOS_FOR_AVS_DX) then
+ if (ADIOS_FOR_AVS_DX) then
call crm_save_mesh_files_adios(nspec,npointot,iregion_code, &
num_ibool_AVS_DX, mask_ibool)
else
diff --git a/src/meshfem3D/get_absorb.f90 b/src/meshfem3D/get_absorb.f90
index a65efc8..ac390a7 100644
--- a/src/meshfem3D/get_absorb.f90
+++ b/src/meshfem3D/get_absorb.f90
@@ -32,7 +32,7 @@
! Stacey, define flags for absorbing boundaries
use constants
- use meshfem3D_par, only: ADIOS_ENABLED,ADIOS_FOR_ARRAYS_SOLVER
+ use meshfem3D_par, only: ADIOS_FOR_ARRAYS_SOLVER
implicit none
@@ -137,7 +137,7 @@
! save these temporary arrays for the solver for Stacey conditions
! This files will be saved with the help of ADIOS if the
! ADIOS_FOR_ARRAYS_SOLVER flag is set to true in the Par_file
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call get_absorb_adios(myrank, iregion, &
nimin, nimax, njmin, njmax, nkmin_xi, nkmin_eta, &
NSPEC2DMAX_XMIN_XMAX,NSPEC2DMAX_YMIN_YMAX)
diff --git a/src/meshfem3D/model_gll.f90 b/src/meshfem3D/model_gll.f90
index 3df69be..171f011 100644
--- a/src/meshfem3D/model_gll.f90
+++ b/src/meshfem3D/model_gll.f90
@@ -39,7 +39,7 @@
use constants
use meshfem3D_models_par,only: TRANSVERSE_ISOTROPY
- use meshfem3D_par, only: ADIOS_ENABLED,ADIOS_FOR_MODELS
+ use meshfem3D_par, only: ADIOS_FOR_MODELS
implicit none
@@ -87,7 +87,7 @@
if (ier /= 0 ) call exit_MPI(myrank,'Error allocating rho_new,.. arrays')
! reads in model files for each process
- if (ADIOS_ENABLED .and. ADIOS_FOR_MODELS) then
+ if (ADIOS_FOR_MODELS) then
call read_gll_model_adios(myrank,MGLL_V,NSPEC)
else
call read_gll_model(myrank,MGLL_V,NSPEC)
diff --git a/src/meshfem3D/save_arrays_solver.f90 b/src/meshfem3D/save_arrays_solver.f90
index 275c045..dfb327b 100644
--- a/src/meshfem3D/save_arrays_solver.f90
+++ b/src/meshfem3D/save_arrays_solver.f90
@@ -462,7 +462,7 @@
use meshfem3D_par,only: &
myrank,LOCAL_PATH, &
IREGION_CRUST_MANTLE,IREGION_OUTER_CORE,IREGION_INNER_CORE, &
- ADIOS_ENABLED,ADIOS_FOR_MPI_ARRAYS
+ ADIOS_FOR_MPI_ARRAYS
! use create_MPI_interfaces_par
@@ -477,7 +477,7 @@
select case (iregion_code)
case (IREGION_CRUST_MANTLE)
! crust mantle
- if (ADIOS_ENABLED .and. ADIOS_FOR_MPI_ARRAYS) then
+ if (ADIOS_FOR_MPI_ARRAYS) then
call save_MPI_arrays_adios(myrank,IREGION_CRUST_MANTLE,LOCAL_PATH, &
num_interfaces_crust_mantle,max_nibool_interfaces_cm, &
my_neighbours_crust_mantle,nibool_interfaces_crust_mantle, &
@@ -499,7 +499,7 @@
case (IREGION_OUTER_CORE)
! outer core
- if (ADIOS_ENABLED .and. ADIOS_FOR_MPI_ARRAYS) then
+ if (ADIOS_FOR_MPI_ARRAYS) then
call save_MPI_arrays_adios(myrank,IREGION_OUTER_CORE,LOCAL_PATH, &
num_interfaces_outer_core,max_nibool_interfaces_oc, &
my_neighbours_outer_core,nibool_interfaces_outer_core, &
@@ -521,7 +521,7 @@
case (IREGION_INNER_CORE)
! inner core
- if (ADIOS_ENABLED .and. ADIOS_FOR_MPI_ARRAYS) then
+ if (ADIOS_FOR_MPI_ARRAYS) then
call save_MPI_arrays_adios(myrank,IREGION_INNER_CORE,LOCAL_PATH, &
num_interfaces_inner_core,max_nibool_interfaces_ic, &
my_neighbours_inner_core,nibool_interfaces_inner_core, &
diff --git a/src/shared/read_parameter_file.f90 b/src/shared/read_parameter_file.f90
index a9b5f16..7d93c29 100644
--- a/src/shared/read_parameter_file.f90
+++ b/src/shared/read_parameter_file.f90
@@ -254,7 +254,7 @@
call read_value_logical(ADIOS_FOR_MODELS, 'ADIOS_FOR_MODELS', ierr)
if (ierr /= 0) stop 'an error occurred while reading the parameter file: ADIOS_FOR_MODELS'
call read_value_logical(ADIOS_FOR_UNDO_ATTENUATION, 'ADIOS_FOR_UNDO_ATTENUATION', ierr)
- if (ierr /= 0) stop 'an error occurred while reading the parameter file: ADIOS_FOR_UNDO_ATT'
+ if (ierr /= 0) stop 'an error occurred while reading the parameter file: ADIOS_FOR_UNDO_ATTENUATION'
! closes parameter file
call close_parameter_file()
@@ -262,6 +262,18 @@
! ignore EXACT_MASS_MATRIX_FOR_ROTATION if rotation is not included in the simulations
if (.not. ROTATION) EXACT_MASS_MATRIX_FOR_ROTATION = .false.
+ ! re-sets ADIOS flags
+ if (.not. ADIOS_ENABLED) then
+ ADIOS_FOR_FORWARD_ARRAYS = .false.
+ ADIOS_FOR_MPI_ARRAYS = .false.
+ ADIOS_FOR_ARRAYS_SOLVER = .false.
+ ADIOS_FOR_SOLVER_MESHFILES = .false.
+ ADIOS_FOR_AVS_DX = .false.
+ ADIOS_FOR_KERNELS = .false.
+ ADIOS_FOR_MODELS = .false.
+ ADIOS_FOR_UNDO_ATTENUATION = .false.
+ endif
+
! produces simulations compatible with old globe version 5.1.5
if (USE_OLD_VERSION_5_1_5_FORMAT) then
print*
diff --git a/src/shared/shared_par.f90 b/src/shared/shared_par.f90
index dd19a36..d10cdd4 100644
--- a/src/shared/shared_par.f90
+++ b/src/shared/shared_par.f90
@@ -112,7 +112,8 @@
character(len=11) :: GPU_DEVICE
! adios file output
- logical :: ADIOS_ENABLED,ADIOS_FOR_FORWARD_ARRAYS, &
+ logical :: ADIOS_ENABLED
+ logical :: ADIOS_FOR_FORWARD_ARRAYS, &
ADIOS_FOR_MPI_ARRAYS,ADIOS_FOR_ARRAYS_SOLVER,ADIOS_FOR_SOLVER_MESHFILES, &
ADIOS_FOR_AVS_DX,ADIOS_FOR_KERNELS,ADIOS_FOR_MODELS,ADIOS_FOR_UNDO_ATTENUATION
diff --git a/src/specfem3D/get_attenuation.f90 b/src/specfem3D/get_attenuation.f90
index bd58d46..3cb6842 100644
--- a/src/specfem3D/get_attenuation.f90
+++ b/src/specfem3D/get_attenuation.f90
@@ -31,7 +31,7 @@
scale_factor, tau_s, vnspec)
use constants_solver
- use specfem_par,only: ATTENUATION_VAL,ADIOS_ENABLED,ADIOS_FOR_ARRAYS_SOLVER,LOCAL_PATH
+ use specfem_par,only: ATTENUATION_VAL,ADIOS_FOR_ARRAYS_SOLVER,LOCAL_PATH
implicit none
@@ -60,7 +60,7 @@
! All of the following reads use the output parameters as their temporary arrays
! use the filename to determine the actual contents of the read
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call read_attenuation_adios(myrank, iregion_code, &
factor_common, scale_factor, tau_s, vnspec, T_c_source)
else
diff --git a/src/specfem3D/read_forward_arrays.f90 b/src/specfem3D/read_forward_arrays.f90
index b968118..f99be89 100644
--- a/src/specfem3D/read_forward_arrays.f90
+++ b/src/specfem3D/read_forward_arrays.f90
@@ -64,7 +64,7 @@
! read files back from local disk or MT tape system if restart file
if (NUMBER_OF_THIS_RUN > 1) then
- if (ADIOS_ENABLED .and. ADIOS_FOR_FORWARD_ARRAYS) then
+ if (ADIOS_FOR_FORWARD_ARRAYS) then
call read_intermediate_forward_arrays_adios()
else
write(outputname,"('dump_all_arrays',i6.6)") myrank
@@ -139,7 +139,7 @@
if (UNDO_ATTENUATION ) return
! reads in file data
- if (ADIOS_ENABLED .and. ADIOS_FOR_FORWARD_ARRAYS) then
+ if (ADIOS_FOR_FORWARD_ARRAYS) then
call read_forward_arrays_adios()
else
write(outputname,'(a,i6.6,a)') 'proc',myrank,'_save_forward_arrays.bin'
@@ -261,7 +261,7 @@
! current subset iteration
iteration_on_subset_tmp = NSTEP/NT_DUMP_ATTENUATION - iteration_on_subset + 1
- if (ADIOS_ENABLED .and. ADIOS_FOR_UNDO_ATTENUATION) then
+ if (ADIOS_FOR_UNDO_ATTENUATION) then
call read_forward_arrays_undoatt_adios(iteration_on_subset_tmp)
else
! reads in saved wavefield
diff --git a/src/specfem3D/read_mesh_databases.F90 b/src/specfem3D/read_mesh_databases.F90
index 95e0af4..442ad6e 100644
--- a/src/specfem3D/read_mesh_databases.F90
+++ b/src/specfem3D/read_mesh_databases.F90
@@ -224,7 +224,7 @@
if (ier /= 0) stop 'Error allocating b_rmassx, b_rmassy in crust_mantle'
! reads databases file
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call read_arrays_solver_adios(IREGION_CRUST_MANTLE,myrank, &
NSPEC_CRUST_MANTLE,NGLOB_CRUST_MANTLE,NGLOB_XY_CM, &
nspec_iso,nspec_tiso,nspec_ani, &
@@ -361,7 +361,7 @@
if (ier /= 0) stop 'Error allocating dummy rmass and dummy ispec/idoubling in outer core'
! reads in mesh arrays
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call read_arrays_solver_adios(IREGION_OUTER_CORE,myrank, &
NSPEC_OUTER_CORE,NGLOB_OUTER_CORE,NGLOB_XY_dummy, &
nspec_iso,nspec_tiso,nspec_ani, &
@@ -484,7 +484,7 @@
if (ier /= 0) stop 'Error allocating b_rmassx, b_rmassy in inner_core'
! reads in arrays
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call read_arrays_solver_adios(IREGION_INNER_CORE,myrank, &
NSPEC_INNER_CORE,NGLOB_INNER_CORE,NGLOB_XY_IC, &
nspec_iso,nspec_tiso,nspec_ani, &
@@ -600,7 +600,7 @@
integer :: ier
! reads in arrays
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call read_mesh_databases_coupling_adios()
else
! crust and mantle
@@ -893,7 +893,7 @@
! read MPI interfaces from file
! crust mantle
- if (ADIOS_ENABLED .and. ADIOS_FOR_MPI_ARRAYS) then
+ if (ADIOS_FOR_MPI_ARRAYS) then
call read_mesh_databases_MPI_CM_adios()
else
call read_mesh_databases_MPI_CM()
@@ -916,7 +916,7 @@
endif
! outer core
- if (ADIOS_ENABLED .and. ADIOS_FOR_MPI_ARRAYS) then
+ if (ADIOS_FOR_MPI_ARRAYS) then
call read_mesh_databases_MPI_OC_adios()
else
call read_mesh_databases_MPI_OC()
@@ -939,7 +939,7 @@
endif
! inner core
- if (ADIOS_ENABLED .and. ADIOS_FOR_MPI_ARRAYS) then
+ if (ADIOS_FOR_MPI_ARRAYS) then
call read_mesh_databases_MPI_IC_adios()
else
call read_mesh_databases_MPI_IC()
@@ -1259,7 +1259,7 @@
integer :: ier
! reads in arrays
- if (ADIOS_ENABLED .and. ADIOS_FOR_ARRAYS_SOLVER) then
+ if (ADIOS_FOR_ARRAYS_SOLVER) then
call read_mesh_databases_stacey_adios()
else
! crust and mantle
diff --git a/src/specfem3D/save_forward_arrays.f90 b/src/specfem3D/save_forward_arrays.f90
index b111316..27ab14d 100644
--- a/src/specfem3D/save_forward_arrays.f90
+++ b/src/specfem3D/save_forward_arrays.f90
@@ -52,7 +52,7 @@
! save files to local disk or tape system if restart file
if (NUMBER_OF_RUNS > 1 .and. NUMBER_OF_THIS_RUN < NUMBER_OF_RUNS) then
- if (ADIOS_ENABLED .and. ADIOS_FOR_FORWARD_ARRAYS) then
+ if (ADIOS_FOR_FORWARD_ARRAYS) then
call save_intermediate_forward_arrays_adios()
else
write(outputname,"('dump_all_arrays',i6.6)") myrank
@@ -105,7 +105,7 @@
! save last frame of the forward simulation
if (SIMULATION_TYPE == 1 .and. SAVE_FORWARD) then
- if (ADIOS_ENABLED .and. ADIOS_FOR_FORWARD_ARRAYS) then
+ if (ADIOS_FOR_FORWARD_ARRAYS) then
call save_forward_arrays_adios()
else
write(outputname,'(a,i6.6,a)') 'proc',myrank,'_save_forward_arrays.bin'
@@ -200,7 +200,7 @@
endif
endif
- if (ADIOS_ENABLED .and. ADIOS_FOR_UNDO_ATTENUATION) then
+ if (ADIOS_FOR_UNDO_ATTENUATION) then
call save_forward_arrays_undoatt_adios()
else
! current subset iteration
diff --git a/src/specfem3D/save_kernels.F90 b/src/specfem3D/save_kernels.F90
index 6e6a7f6..0d08575 100644
--- a/src/specfem3D/save_kernels.F90
+++ b/src/specfem3D/save_kernels.F90
@@ -31,7 +31,7 @@
use specfem_par, only: NOISE_TOMOGRAPHY,SIMULATION_TYPE,nrec_local, &
APPROXIMATE_HESS_KL,SAVE_REGULAR_KL, &
- current_adios_handle,ADIOS_ENABLED,ADIOS_FOR_KERNELS
+ current_adios_handle,ADIOS_FOR_KERNELS
use specfem_par_innercore, only: rhostore_inner_core,muvstore_inner_core,kappavstore_inner_core, &
rho_kl_inner_core,alpha_kl_inner_core,beta_kl_inner_core
@@ -42,7 +42,7 @@
! Open an handler to the ADIOS file in which kernel variables are written.
if (((SIMULATION_TYPE == 3) .or. (SIMULATION_TYPE == 2 .and. nrec_local > 0)) &
- .and. ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ .and. ADIOS_FOR_KERNELS) then
call define_kernel_adios_variables(current_adios_handle)
endif
@@ -85,7 +85,7 @@
! Write ADIOS defined variables to disk.
if (((SIMULATION_TYPE == 3) .or. (SIMULATION_TYPE == 2 .and. nrec_local > 0)) &
- .and. ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ .and. ADIOS_FOR_KERNELS) then
call perform_write_adios_kernels(current_adios_handle)
endif
@@ -397,7 +397,7 @@
enddo
! writes out kernels to files
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
call write_kernels_cm_adios(current_adios_handle, &
mu_kl_crust_mantle, kappa_kl_crust_mantle, rhonotprime_kl_crust_mantle, &
alphav_kl_crust_mantle,alphah_kl_crust_mantle, &
@@ -576,7 +576,7 @@
enddo
! writes out kernels to file
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
call write_kernels_oc_adios(current_adios_handle)
else
call create_name_database(prname,myrank,IREGION_OUTER_CORE,LOCAL_TMP_PATH)
@@ -643,7 +643,7 @@
enddo
! writes out kernels to file
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
call write_kernels_ic_adios(current_adios_handle)
else
call create_name_database(prname,myrank,IREGION_INNER_CORE,LOCAL_TMP_PATH)
@@ -687,7 +687,7 @@
icb_kl = icb_kl * scale_kl * 1.d3
! writes out kernels to file
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
call write_kernels_boundary_kl_adios(current_adios_handle)
else
call create_name_database(prname,myrank,IREGION_CRUST_MANTLE,LOCAL_TMP_PATH)
@@ -750,7 +750,7 @@
shdur_der(irec_local) = shdur_der(irec_local) * scale_displ**2
! writes out kernels to file
- if (.not. ( ADIOS_ENABLED .and. ADIOS_FOR_KERNELS )) then
+ if (.not. ADIOS_FOR_KERNELS) then
write(outputname,'(a,i6.6)') 'OUTPUT_FILES/src_frechet.',number_receiver_global(irec_local)
open(unit=IOUT,file=trim(outputname),status='unknown',action='write')
!
@@ -781,7 +781,7 @@
enddo
! writes out kernels to file
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
call write_kernels_source_derivatives_adios(current_adios_handle)
endif
@@ -808,7 +808,7 @@
hess_kl_crust_mantle(:,:,:,:) = 2._CUSTOM_REAL * hess_kl_crust_mantle(:,:,:,:) * scale_kl
! writes out kernels to file
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
call write_kernels_hessian_adios(current_adios_handle)
else
! stores into file
diff --git a/src/specfem3D/save_regular_kernels.f90 b/src/specfem3D/save_regular_kernels.f90
index 59b3934..3dbd9d5 100644
--- a/src/specfem3D/save_regular_kernels.f90
+++ b/src/specfem3D/save_regular_kernels.f90
@@ -377,12 +377,11 @@
enddo
! writes out kernels to file
- if (ADIOS_ENABLED .and. ADIOS_FOR_KERNELS) then
+ if (ADIOS_FOR_KERNELS) then
! check implementation
call exit_mpi(myrank,'saving regular kernels in ADIOS file format is not supported yet')
-
else
-
+ ! sets up database name
call create_name_database(prname,myrank,IREGION_CRUST_MANTLE,LOCAL_PATH)
! For anisotropic kernels
More information about the CIG-COMMITS
mailing list