[cig-commits] r22828 - in seismo/3D/SPECFEM3D/trunk/src: cuda generate_databases meshfem3D shared specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Fri Sep 20 16:39:36 PDT 2013


Author: dkomati1
Date: 2013-09-20 16:39:35 -0700 (Fri, 20 Sep 2013)
New Revision: 22828

Modified:
   seismo/3D/SPECFEM3D/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases_adios_stubs.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_gll_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_ipati_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/read_partition_files_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_moho_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/meshfem3D/create_regions_mesh.f90
   seismo/3D/SPECFEM3D/trunk/src/meshfem3D/meshfem3D_adios_stubs.f90
   seismo/3D/SPECFEM3D/trunk/src/meshfem3D/save_databases_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_definitions.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_writers.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/adios_manager_stubs.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/safe_alloc_mod.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/assemble_MPI_vector.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_acoustic_calling_routine.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_stacey_viscoelastic.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/initialize_simulation.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_forward_arrays_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_mesh_databases_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_adjoint_kernels.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_forward_arrays_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_kernels_adios.F90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/specfem3D_adios_stubs.f90
Log:
commented out a line that currently breaks the Makefile;
suppressed a conflicting declaration;
suppressed all unused variables;
removed all tab characters;
suppressed useless white spaces.


Modified: seismo/3D/SPECFEM3D/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c	2013-09-20 23:39:35 UTC (rev 22828)
@@ -1,4 +1,4 @@
-/* 
+/*
 !=====================================================================
 !
 !               S p e c f e m 3 D  V e r s i o n  2 . 1
@@ -33,57 +33,57 @@
 
 typedef float realw;
 
- 
 
+
 //
 // src/cuda/check_fields_cuda.cu
 //
 
-void FC_FUNC_(pause_for_debug,PAUSE_FOR_DEBUG)() {} 
+void FC_FUNC_(pause_for_debug,PAUSE_FOR_DEBUG)() {}
 
 void FC_FUNC_(output_free_device_memory,
-              OUTPUT_FREE_DEVICE_MEMORY)(int* myrank_f) {} 
+              OUTPUT_FREE_DEVICE_MEMORY)(int* myrank_f) {}
 
 void FC_FUNC_(get_free_device_memory,
-              get_FREE_DEVICE_MEMORY)(realw* free, realw* used, realw* total ) {} 
+              get_FREE_DEVICE_MEMORY)(realw* free, realw* used, realw* total ) {}
 
 void FC_FUNC_(get_norm_acoustic_from_device,
-              GET_NORM_ACOUSTIC_FROM_DEVICE)(realw* norm,long* Mesh_pointer,int* sim_type) {} 
+              GET_NORM_ACOUSTIC_FROM_DEVICE)(realw* norm,long* Mesh_pointer,int* sim_type) {}
 
 void FC_FUNC_(get_norm_elastic_from_device,
               GET_NORM_ELASTIC_FROM_DEVICE)(realw* norm,
                                             long* Mesh_pointer,
-                                            int* type) {} 
+                                            int* type) {}
 
 void FC_FUNC_(get_max_accel,
-              GET_MAX_ACCEL)(int* itf,int* sizef,long* Mesh_pointer) {} 
+              GET_MAX_ACCEL)(int* itf,int* sizef,long* Mesh_pointer) {}
 
 void FC_FUNC_(check_max_norm_displ_gpu,
-              CHECK_MAX_NORM_DISPL_GPU)(int* size, realw* displ,long* Mesh_pointer,int* announceID) {} 
+              CHECK_MAX_NORM_DISPL_GPU)(int* size, realw* displ,long* Mesh_pointer,int* announceID) {}
 
 void FC_FUNC_(check_max_norm_vector,
-              CHECK_MAX_NORM_VECTOR)(int* size, realw* vector1, int* announceID) {} 
+              CHECK_MAX_NORM_VECTOR)(int* size, realw* vector1, int* announceID) {}
 
 void FC_FUNC_(check_max_norm_displ,
-              CHECK_MAX_NORM_DISPL)(int* size, realw* displ, int* announceID) {} 
+              CHECK_MAX_NORM_DISPL)(int* size, realw* displ, int* announceID) {}
 
 void FC_FUNC_(check_max_norm_b_displ_gpu,
-              CHECK_MAX_NORM_B_DISPL_GPU)(int* size, realw* b_displ,long* Mesh_pointer,int* announceID) {} 
+              CHECK_MAX_NORM_B_DISPL_GPU)(int* size, realw* b_displ,long* Mesh_pointer,int* announceID) {}
 
 void FC_FUNC_(check_max_norm_b_accel_gpu,
-              CHECK_MAX_NORM_B_ACCEL_GPU)(int* size, realw* b_accel,long* Mesh_pointer,int* announceID) {} 
+              CHECK_MAX_NORM_B_ACCEL_GPU)(int* size, realw* b_accel,long* Mesh_pointer,int* announceID) {}
 
 void FC_FUNC_(check_max_norm_b_veloc_gpu,
-              CHECK_MAX_NORM_B_VELOC_GPU)(int* size, realw* b_veloc,long* Mesh_pointer,int* announceID) {} 
+              CHECK_MAX_NORM_B_VELOC_GPU)(int* size, realw* b_veloc,long* Mesh_pointer,int* announceID) {}
 
 void FC_FUNC_(check_max_norm_b_displ,
-              CHECK_MAX_NORM_B_DISPL)(int* size, realw* b_displ,int* announceID) {} 
+              CHECK_MAX_NORM_B_DISPL)(int* size, realw* b_displ,int* announceID) {}
 
 void FC_FUNC_(check_max_norm_b_accel,
-              CHECK_MAX_NORM_B_ACCEL)(int* size, realw* b_accel,int* announceID) {} 
+              CHECK_MAX_NORM_B_ACCEL)(int* size, realw* b_accel,int* announceID) {}
 
 void FC_FUNC_(check_error_vectors,
-              CHECK_ERROR_VECTORS)(int* sizef, realw* vector1,realw* vector2) {} 
+              CHECK_ERROR_VECTORS)(int* sizef, realw* vector1,realw* vector2) {}
 
 
 //
@@ -94,13 +94,13 @@
               COMPUTE_ADD_SOURCES_AC_CUDA)(long* Mesh_pointer,
                                            int* phase_is_innerf,
                                            int* NSOURCESf,
-                                           double* h_stf_pre_compute) {} 
+                                           double* h_stf_pre_compute) {}
 
 void FC_FUNC_(compute_add_sources_ac_s3_cuda,
               COMPUTE_ADD_SOURCES_AC_s3_CUDA)(long* Mesh_pointer,
                                               int* phase_is_innerf,
                                               int* NSOURCESf,
-                                              double* h_stf_pre_compute) {} 
+                                              double* h_stf_pre_compute) {}
 
 void FC_FUNC_(add_sources_ac_sim_2_or_3_cuda,
               ADD_SOURCES_AC_SIM_2_OR_3_CUDA)(long* Mesh_pointer,
@@ -113,7 +113,7 @@
                                                int* time_index,
                                                int* h_islice_selected_rec,
                                                int* nadj_rec_local,
-                                               int* NTSTEP_BETWEEN_READ_ADJSRC) {} 
+                                               int* NTSTEP_BETWEEN_READ_ADJSRC) {}
 
 
 //
@@ -124,19 +124,19 @@
               COMPUTE_ADD_SOURCES_EL_CUDA)(long* Mesh_pointer,
                                            double* h_stf_pre_compute,
                                            int* h_NSOURCES,
-                                           int* h_phase_is_inner) {} 
+                                           int* h_phase_is_inner) {}
 
 void FC_FUNC_(compute_add_sources_el_s3_cuda,
               COMPUTE_ADD_SOURCES_EL_S3_CUDA)(long* Mesh_pointer,
                                               double* h_stf_pre_compute,
                                               int* h_NSOURCES,
-                                              int* h_phase_is_inner) {} 
+                                              int* h_phase_is_inner) {}
 
 void FC_FUNC_(add_source_master_rec_noise_cu,
               ADD_SOURCE_MASTER_REC_NOISE_CU)(long* Mesh_pointer,
                                               int* it_f,
                                               int* irec_master_noise_f,
-                                              int* islice_selected_rec) {} 
+                                              int* islice_selected_rec) {}
 
 void FC_FUNC_(add_sources_el_sim_type_2_or_3,
               ADD_SOURCES_EL_SIM_TYPE_2_OR_3)(long* Mesh_pointer,
@@ -149,7 +149,7 @@
                                                int* time_index,
                                                int* h_islice_selected_rec,
                                                int* nadj_rec_local,
-                                               int* NTSTEP_BETWEEN_READ_ADJSRC) {} 
+                                               int* NTSTEP_BETWEEN_READ_ADJSRC) {}
 
 
 //
@@ -159,15 +159,15 @@
 void FC_FUNC_(compute_coupling_ac_el_cuda,
               COMPUTE_COUPLING_AC_EL_CUDA)(long* Mesh_pointer,
                                            int* phase_is_innerf,
-                                           int* num_coupling_ac_el_facesf) {} 
+                                           int* num_coupling_ac_el_facesf) {}
 
 void FC_FUNC_(compute_coupling_el_ac_cuda,
               COMPUTE_COUPLING_EL_AC_CUDA)(long* Mesh_pointer,
                                            int* phase_is_innerf,
-                                           int* num_coupling_ac_el_facesf) {} 
+                                           int* num_coupling_ac_el_facesf) {}
 
 void FC_FUNC_(compute_coupling_ocean_cuda,
-              COMPUTE_COUPLING_OCEAN_CUDA)(long* Mesh_pointer) {} 
+              COMPUTE_COUPLING_OCEAN_CUDA)(long* Mesh_pointer) {}
 
 
 //
@@ -178,23 +178,23 @@
               TRANSFER_BOUN_POT_FROM_DEVICE)(long* Mesh_pointer,
                                              realw* potential_dot_dot_acoustic,
                                              realw* send_potential_dot_dot_buffer,
-                                             int* FORWARD_OR_ADJOINT){} 
+                                             int* FORWARD_OR_ADJOINT){}
 
 void FC_FUNC_(transfer_asmbl_pot_to_device,
               TRANSFER_ASMBL_POT_TO_DEVICE)(long* Mesh_pointer,
                                             realw* potential_dot_dot_acoustic,
                                             realw* buffer_recv_scalar_ext_mesh,
-                                            int* FORWARD_OR_ADJOINT) {} 
+                                            int* FORWARD_OR_ADJOINT) {}
 
 void FC_FUNC_(compute_forces_acoustic_cuda,
               COMPUTE_FORCES_ACOUSTIC_CUDA)(long* Mesh_pointer,
                                             int* iphase,
                                             int* nspec_outer_acoustic,
-                                            int* nspec_inner_acoustic) {} 
+                                            int* nspec_inner_acoustic) {}
 
 void FC_FUNC_(acoustic_enforce_free_surf_cuda,
               ACOUSTIC_ENFORCE_FREE_SURF_CUDA)(long* Mesh_pointer,
-                                               int* ABSORB_INSTEAD_OF_FREE_SURFACE) {} 
+                                               int* ABSORB_INSTEAD_OF_FREE_SURFACE) {}
 
 
 //
@@ -205,17 +205,17 @@
               TRANSFER_BOUN_ACCEL_FROM_DEVICE)(long* Mesh_pointer,
                                                realw* accel,
                                                realw* send_accel_buffer,
-                                               int* FORWARD_OR_ADJOINT){} 
+                                               int* FORWARD_OR_ADJOINT){}
 
 void FC_FUNC_(transfer_boundary_from_device_a,
               TRANSFER_BOUNDARY_FROM_DEVICE_A)(long* Mesh_pointer,
-                                               int* nspec_outer_elastic) {} 
+                                               int* nspec_outer_elastic) {}
 
 void FC_FUNC_(transfer_boundary_to_device_a,
               TRANSFER_BOUNDARY_TO_DEVICE_A)(long* Mesh_pointer,
                                              realw* buffer_recv_vector_ext_mesh,
                                              int* num_interfaces_ext_mesh,
-                                             int* max_nibool_interfaces_ext_mesh) {} 
+                                             int* max_nibool_interfaces_ext_mesh) {}
 
 void FC_FUNC_(transfer_asmbl_accel_to_device,
               TRANSFER_ASMBL_ACCEL_TO_DEVICE)(long* Mesh_pointer, realw* accel,
@@ -224,7 +224,7 @@
                                                     int* max_nibool_interfaces_ext_mesh,
                                                     int* nibool_interfaces_ext_mesh,
                                                     int* ibool_interfaces_ext_mesh,
-                                                    int* FORWARD_OR_ADJOINT) {} 
+                                                    int* FORWARD_OR_ADJOINT) {}
 
 //void FC_FUNC_(assemble_accel_on_device,
 //              ASSEMBLE_ACCEL_on_DEVICE)(long* Mesh_pointer, realw* accel,
@@ -233,7 +233,7 @@
 //                                              int* max_nibool_interfaces_ext_mesh,
 //                                              int* nibool_interfaces_ext_mesh,
 //                                              int* ibool_interfaces_ext_mesh,
-//                                              int* FORWARD_OR_ADJOINT) {} 
+//                                              int* FORWARD_OR_ADJOINT) {}
 
 void FC_FUNC_(compute_forces_viscoelastic_cuda,
               COMPUTE_FORCES_VISCOELASTIC_CUDA)(long* Mesh_pointer,
@@ -243,12 +243,12 @@
                                                 int* nspec_inner_elastic,
                                                 int* COMPUTE_AND_STORE_STRAIN,
                                                 int* ATTENUATION,
-                                                int* ANISOTROPY) {} 
+                                                int* ANISOTROPY) {}
 
 void FC_FUNC_(sync_copy_from_device,
               SYNC_copy_FROM_DEVICE)(long* Mesh_pointer,
                                      int* iphase,
-                                     realw* send_buffer) {} 
+                                     realw* send_buffer) {}
 
 
 //
@@ -257,22 +257,22 @@
 
 void FC_FUNC_(compute_kernels_elastic_cuda,
               COMPUTE_KERNELS_ELASTIC_CUDA)(long* Mesh_pointer,
-                                            realw* deltat_f) {} 
+                                            realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_strgth_noise_cu,
               COMPUTE_KERNELS_STRGTH_NOISE_CU)(long* Mesh_pointer,
                                                     realw* h_noise_surface_movie,
-                                                    realw* deltat) {} 
+                                                    realw* deltat) {}
 
 void FC_FUNC_(compute_kernels_acoustic_cuda,
               COMPUTE_KERNELS_ACOUSTIC_CUDA)(long* Mesh_pointer,
-                                             realw* deltat_f) {} 
+                                             realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_hess_cuda,
               COMPUTE_KERNELS_HESS_CUDA)(long* Mesh_pointer,
                                          realw* deltat_f,
                                          int* ELASTIC_SIMULATION,
-                                         int* ACOUSTIC_SIMULATION) {} 
+                                         int* ACOUSTIC_SIMULATION) {}
 
 
 //
@@ -282,7 +282,7 @@
 void FC_FUNC_(compute_stacey_acoustic_cuda,
               COMPUTE_STACEY_ACOUSTIC_CUDA)(long* Mesh_pointer,
                                             int* phase_is_innerf,
-                                            realw* h_b_absorb_potential) {} 
+                                            realw* h_b_absorb_potential) {}
 
 
 //
@@ -292,7 +292,7 @@
 void FC_FUNC_(compute_stacey_viscoelastic_cuda,
               COMPUTE_STACEY_VISCOELASTIC_CUDA)(long* Mesh_pointer,
                                            int* phase_is_innerf,
-                                           realw* b_absorb_field) {} 
+                                           realw* b_absorb_field) {}
 
 
 //
@@ -300,10 +300,10 @@
 //
 
 void FC_FUNC_(initialize_cuda_device,
-              INITIALIZE_CUDA_DEVICE)(int* myrank_f,int* ncuda_devices) { 
+              INITIALIZE_CUDA_DEVICE)(int* myrank_f,int* ncuda_devices) {
  fprintf(stderr,"ERROR: GPU_MODE enabled without GPU/CUDA Support. To enable GPU support, reconfigure with --with-cuda flag.\n");
  exit(1);
-} 
+}
 
 
 //
@@ -317,7 +317,7 @@
                                           realw* deltatover2_F,
                                           realw* b_deltat_F,
                                           realw* b_deltatsqover2_F,
-                                          realw* b_deltatover2_F) {} 
+                                          realw* b_deltatover2_F) {}
 
 void FC_FUNC_(it_update_displacement_ac_cuda,
               it_update_displacement_ac_cuda)(long* Mesh_pointer,
@@ -326,50 +326,50 @@
                                                realw* deltatover2_F,
                                                realw* b_deltat_F,
                                                realw* b_deltatsqover2_F,
-                                               realw* b_deltatover2_F) {} 
+                                               realw* b_deltatover2_F) {}
 
 void FC_FUNC_(kernel_3_a_cuda,
               KERNEL_3_A_CUDA)(long* Mesh_pointer,
                                realw* deltatover2_F,
                                realw* b_deltatover2_F,
-                               int* APPROXIMATE_OCEAN_LOAD) {} 
+                               int* APPROXIMATE_OCEAN_LOAD) {}
 
 void FC_FUNC_(kernel_3_b_cuda,
               KERNEL_3_B_CUDA)(long* Mesh_pointer,
                                realw* deltatover2_F,
-                               realw* b_deltatover2_F) {} 
+                               realw* b_deltatover2_F) {}
 
 void FC_FUNC_(kernel_3_a_acoustic_cuda,
-              KERNEL_3_ACOUSTIC_CUDA)(long* Mesh_pointer ) {} 
+              KERNEL_3_ACOUSTIC_CUDA)(long* Mesh_pointer ) {}
 
 void FC_FUNC_(kernel_3_b_acoustic_cuda,
               KERNEL_3_ACOUSTIC_CUDA)(long* Mesh_pointer,
                                       realw* deltatover2_F,
-                                      realw* b_deltatover2_F) {} 
+                                      realw* b_deltatover2_F) {}
 
 
 //
 // src/cuda/noise_tomography_cuda.cu
 //
 
-void FC_FUNC_(fortranflush,FORTRANFLUSH)(int* rank){} 
+void FC_FUNC_(fortranflush,FORTRANFLUSH)(int* rank){}
 
-void FC_FUNC_(fortranprint,FORTRANPRINT)(int* id) {} 
+void FC_FUNC_(fortranprint,FORTRANPRINT)(int* id) {}
 
-void FC_FUNC_(fortranprintf,FORTRANPRINTF)(realw* val) {} 
+void FC_FUNC_(fortranprintf,FORTRANPRINTF)(realw* val) {}
 
-void FC_FUNC_(fortranprintd,FORTRANPRINTD)(double* val) {} 
+void FC_FUNC_(fortranprintd,FORTRANPRINTD)(double* val) {}
 
-void FC_FUNC_(make_displ_rand,MAKE_DISPL_RAND)(long* Mesh_pointer,realw* h_displ) {} 
+void FC_FUNC_(make_displ_rand,MAKE_DISPL_RAND)(long* Mesh_pointer,realw* h_displ) {}
 
 void FC_FUNC_(transfer_surface_to_host,
               TRANSFER_SURFACE_TO_HOST)(long* Mesh_pointer,
-                                        realw* h_noise_surface_movie) {} 
+                                        realw* h_noise_surface_movie) {}
 
 void FC_FUNC_(noise_read_add_surface_movie_cu,
               NOISE_READ_ADD_SURFACE_MOVIE_CU)(long* Mesh_pointer,
                                                realw* h_noise_surface_movie,
-                                               int* NOISE_TOMOGRAPHYf) {} 
+                                               int* NOISE_TOMOGRAPHYf) {}
 
 
 //
@@ -403,7 +403,7 @@
                                         int* USE_MESH_COLORING_GPU_f,
                                         int* nspec_acoustic,int* nspec_elastic,
                                         int* h_myrank,
-                                        int* SAVE_FORWARD ) {} 
+                                        int* SAVE_FORWARD ) {}
 
 void FC_FUNC_(prepare_fields_acoustic_device,
               PREPARE_FIELDS_ACOUSTIC_DEVICE)(long* Mesh_pointer,
@@ -423,11 +423,11 @@
                                               realw* coupling_ac_el_jacobian2Dw,
                                               int* num_colors_outer_acoustic,
                                               int* num_colors_inner_acoustic,
-                                              int* num_elem_colors_acoustic) {} 
+                                              int* num_elem_colors_acoustic) {}
 
 void FC_FUNC_(prepare_fields_acoustic_adj_dev,
               PREPARE_FIELDS_ACOUSTIC_ADJ_DEV)(long* Mesh_pointer,
-                                              int* APPROXIMATE_HESS_KL) {} 
+                                              int* APPROXIMATE_HESS_KL) {}
 
 void FC_FUNC_(prepare_fields_elastic_device,
               PREPARE_FIELDS_ELASTIC_DEVICE)(long* Mesh_pointer,
@@ -463,7 +463,7 @@
                                              realw *c25store,realw *c26store,realw *c33store,
                                              realw *c34store,realw *c35store,realw *c36store,
                                              realw *c44store,realw *c45store,realw *c46store,
-                                             realw *c55store,realw *c56store,realw *c66store ){} 
+                                             realw *c55store,realw *c56store,realw *c66store ){}
 
 void FC_FUNC_(prepare_fields_elastic_adj_dev,
               PREPARE_FIELDS_ELASTIC_ADJ_DEV)(long* Mesh_pointer,
@@ -478,14 +478,14 @@
                                              realw* b_R_xx,realw* b_R_yy,realw* b_R_xy,realw* b_R_xz,realw* b_R_yz,
                                              realw* b_alphaval,realw* b_betaval,realw* b_gammaval,
                                              int* ANISOTROPIC_KL,
-                                             int* APPROXIMATE_HESS_KL){} 
+                                             int* APPROXIMATE_HESS_KL){}
 
 void FC_FUNC_(prepare_sim2_or_3_const_device,
               PREPARE_SIM2_OR_3_CONST_DEVICE)(long* Mesh_pointer,
                                               int* islice_selected_rec,
                                               int* islice_selected_rec_size,
                                               int* nadj_rec_local,
-                                              int* nrec) {} 
+                                              int* nrec) {}
 
 void FC_FUNC_(prepare_fields_noise_device,
               PREPARE_FIELDS_NOISE_DEVICE)(long* Mesh_pointer,
@@ -498,7 +498,7 @@
                                            realw* noise_sourcearray,
                                            realw* normal_x_noise, realw* normal_y_noise, realw* normal_z_noise,
                                            realw* mask_noise,
-                                           realw* free_surface_jacobian2Dw) {} 
+                                           realw* free_surface_jacobian2Dw) {}
 
 void FC_FUNC_(prepare_fields_gravity_device,
               PREPARE_FIELDS_gravity_DEVICE)(long* Mesh_pointer,
@@ -507,10 +507,10 @@
                                              realw* minus_g,
                                              realw* h_wgll_cube,
                                              int* ACOUSTIC_SIMULATION,
-                                             realw* rhostore) {} 
+                                             realw* rhostore) {}
 
 void FC_FUNC_(prepare_seismogram_fields,
-              PREPARE_SEISMOGRAM_FIELDS)(long* Mesh_pointer,int* nrec_local, double* nu, double* hxir, double* hetar, double* hgammar) {} 
+              PREPARE_SEISMOGRAM_FIELDS)(long* Mesh_pointer,int* nrec_local, double* nu, double* hxir, double* hetar, double* hgammar) {}
 
 void FC_FUNC_(prepare_cleanup_device,
               PREPARE_CLEANUP_DEVICE)(long* Mesh_pointer,
@@ -522,7 +522,7 @@
                                       int* ATTENUATION,
                                       int* ANISOTROPY,
                                       int* APPROXIMATE_OCEAN_LOAD,
-                                      int* APPROXIMATE_HESS_KL) {} 
+                                      int* APPROXIMATE_HESS_KL) {}
 
 
 //
@@ -530,35 +530,35 @@
 //
 
 void FC_FUNC_(transfer_fields_el_to_device,
-              TRANSFER_FIELDS_EL_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer) {} 
+              TRANSFER_FIELDS_EL_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_fields_el_from_device,
-              TRANSFER_FIELDS_EL_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer) {} 
+              TRANSFER_FIELDS_EL_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_fields_to_device,
               TRANSFER_B_FIELDS_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                           long* Mesh_pointer) {} 
+                                           long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_fields_from_device,
-              TRANSFER_B_FIELDS_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,long* Mesh_pointer) {} 
+              TRANSFER_B_FIELDS_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_accel_to_device,
-              TRNASFER_ACCEL_TO_DEVICE)(int* size, realw* accel,long* Mesh_pointer) {} 
+              TRNASFER_ACCEL_TO_DEVICE)(int* size, realw* accel,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_accel_from_device,
-              TRANSFER_ACCEL_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer) {} 
+              TRANSFER_ACCEL_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_accel_from_device,
-              TRNASFER_B_ACCEL_FROM_DEVICE)(int* size, realw* b_accel,long* Mesh_pointer) {} 
+              TRNASFER_B_ACCEL_FROM_DEVICE)(int* size, realw* b_accel,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_sigma_from_device,
-              TRANSFER_SIGMA_FROM_DEVICE)(int* size, realw* sigma_kl,long* Mesh_pointer) {} 
+              TRANSFER_SIGMA_FROM_DEVICE)(int* size, realw* sigma_kl,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_displ_from_device,
-              TRANSFER_B_DISPL_FROM_DEVICE)(int* size, realw* displ,long* Mesh_pointer) {} 
+              TRANSFER_B_DISPL_FROM_DEVICE)(int* size, realw* displ,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_displ_from_device,
-              TRANSFER_DISPL_FROM_DEVICE)(int* size, realw* displ,long* Mesh_pointer) {} 
+              TRANSFER_DISPL_FROM_DEVICE)(int* size, realw* displ,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_fields_att_to_device,
               TRANSFER_B_FIELDS_ATT_TO_DEVICE)(long* Mesh_pointer,
@@ -567,7 +567,7 @@
                                                int* size_R,
                                                realw* b_epsilondev_xx,realw* b_epsilondev_yy,realw* b_epsilondev_xy,
                                                realw* b_epsilondev_xz,realw* b_epsilondev_yz,
-                                               int* size_epsilondev) {} 
+                                               int* size_epsilondev) {}
 
 void FC_FUNC_(transfer_fields_att_from_device,
               TRANSFER_FIELDS_ATT_FROM_DEVICE)(long* Mesh_pointer,
@@ -575,7 +575,7 @@
                                                int* size_R,
                                                realw* epsilondev_xx,realw* epsilondev_yy,realw* epsilondev_xy,
                                                realw* epsilondev_xz,realw* epsilondev_yz,
-                                               int* size_epsilondev) {} 
+                                               int* size_epsilondev) {}
 
 void FC_FUNC_(transfer_kernels_el_to_host,
               TRANSFER_KERNELS_EL_TO_HOST)(long* Mesh_pointer,
@@ -583,61 +583,61 @@
                                             realw* h_mu_kl,
                                             realw* h_kappa_kl,
                                             realw* h_cijkl_kl,
-                                            int* NSPEC_AB) {} 
+                                            int* NSPEC_AB) {}
 
 void FC_FUNC_(transfer_kernels_noise_to_host,
               TRANSFER_KERNELS_NOISE_TO_HOST)(long* Mesh_pointer,
                                               realw* h_Sigma_kl,
-                                              int* NSPEC_AB) {} 
+                                              int* NSPEC_AB) {}
 
 void FC_FUNC_(transfer_fields_ac_to_device,
               TRANSFER_FIELDS_AC_TO_DEVICE)(int* size,
                                             realw* potential_acoustic,
                                             realw* potential_dot_acoustic,
                                             realw* potential_dot_dot_acoustic,
-                                            long* Mesh_pointer) {} 
+                                            long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_fields_ac_to_device,
               TRANSFER_B_FIELDS_AC_TO_DEVICE)(int* size,
                                               realw* b_potential_acoustic,
                                               realw* b_potential_dot_acoustic,
                                               realw* b_potential_dot_dot_acoustic,
-                                              long* Mesh_pointer) {} 
+                                              long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_fields_ac_from_device,
               TRANSFER_FIELDS_AC_FROM_DEVICE)(int* size,
                                               realw* potential_acoustic,
                                               realw* potential_dot_acoustic,
                                               realw* potential_dot_dot_acoustic,
-                                              long* Mesh_pointer) {} 
+                                              long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_fields_ac_from_device,
               TRANSFER_B_FIELDS_AC_FROM_DEVICE)(int* size,
                                                 realw* b_potential_acoustic,
                                                 realw* b_potential_dot_acoustic,
                                                 realw* b_potential_dot_dot_acoustic,
-                                                long* Mesh_pointer) {} 
+                                                long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_dot_dot_from_device,
-              TRNASFER_DOT_DOT_FROM_DEVICE)(int* size, realw* potential_dot_dot_acoustic,long* Mesh_pointer) {} 
+              TRNASFER_DOT_DOT_FROM_DEVICE)(int* size, realw* potential_dot_dot_acoustic,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_b_dot_dot_from_device,
-              TRNASFER_B_DOT_DOT_FROM_DEVICE)(int* size, realw* b_potential_dot_dot_acoustic,long* Mesh_pointer) {} 
+              TRNASFER_B_DOT_DOT_FROM_DEVICE)(int* size, realw* b_potential_dot_dot_acoustic,long* Mesh_pointer) {}
 
 void FC_FUNC_(transfer_kernels_ac_to_host,
-              TRANSFER_KERNELS_AC_TO_HOST)(long* Mesh_pointer,realw* h_rho_ac_kl,realw* h_kappa_ac_kl,int* NSPEC_AB) {} 
+              TRANSFER_KERNELS_AC_TO_HOST)(long* Mesh_pointer,realw* h_rho_ac_kl,realw* h_kappa_ac_kl,int* NSPEC_AB) {}
 
 void FC_FUNC_(transfer_kernels_hess_el_tohost,
-              TRANSFER_KERNELS_HESS_EL_TOHOST)(long* Mesh_pointer,realw* h_hess_kl,int* NSPEC_AB) {} 
+              TRANSFER_KERNELS_HESS_EL_TOHOST)(long* Mesh_pointer,realw* h_hess_kl,int* NSPEC_AB) {}
 
 void FC_FUNC_(transfer_kernels_hess_ac_tohost,
-              TRANSFER_KERNELS_HESS_AC_TOHOST)(long* Mesh_pointer,realw* h_hess_ac_kl,int* NSPEC_AB) {} 
+              TRANSFER_KERNELS_HESS_AC_TOHOST)(long* Mesh_pointer,realw* h_hess_ac_kl,int* NSPEC_AB) {}
 
 void FC_FUNC_(transfer_compute_kernel_answers_from_device,
               TRANSFER_COMPUTE_KERNEL_ANSWERS_FROM_DEVICE)(long* Mesh_pointer,
                                                            realw* rho_kl,int* size_rho,
                                                            realw* mu_kl, int* size_mu,
-                                                           realw* kappa_kl, int* size_kappa) {} 
+                                                           realw* kappa_kl, int* size_kappa) {}
 
 void FC_FUNC_(transfer_compute_kernel_fields_from_device,
               TRANSFER_COMPUTE_KERNEL_FIELDS_FROM_DEVICE)(long* Mesh_pointer,
@@ -654,7 +654,7 @@
                                                           realw* kappa_kl, int* size_kappa,
                                                           realw* epsilon_trace_over_3,
                                                           realw* b_epsilon_trace_over_3,
-                                                          int* size_epsilon_trace_over_3) {} 
+                                                          int* size_epsilon_trace_over_3) {}
 
 
 //
@@ -667,14 +667,14 @@
                                               realw* seismograms_d,
                                               realw* seismograms_v,
                                               realw* seismograms_a,
-                                              int* it) {} 
+                                              int* it) {}
 
 void FC_FUNC_(transfer_station_el_from_device,
               TRANSFER_STATION_EL_FROM_DEVICE)(realw* displ,realw* veloc,realw* accel,
                                                    realw* b_displ, realw* b_veloc, realw* b_accel,
                                                    long* Mesh_pointer_f,int* number_receiver_global,
                                                    int* ispec_selected_rec,int* ispec_selected_source,
-                                                   int* ibool) {} 
+                                                   int* ibool) {}
 
 void FC_FUNC_(transfer_station_ac_from_device,
               TRANSFER_STATION_AC_FROM_DEVICE)(realw* potential_acoustic,
@@ -687,5 +687,5 @@
                                                 int* number_receiver_global,
                                                 int* ispec_selected_rec,
                                                 int* ispec_selected_source,
-                                                int* ibool) {} 
+                                                int* ibool) {}
 

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -28,26 +28,26 @@
   subroutine create_regions_mesh()
 
 ! create the different regions of the mesh
-  use generate_databases_par, only:                                            & 
-      nspec => NSPEC_AB,nglob => NGLOB_AB,                                     & 
-      ibool,xstore,ystore,zstore,                                              & 
-      npointot,myrank,LOCAL_PATH,                                              & 
-      nnodes_ext_mesh,nelmnts_ext_mesh,                                        & 
-      nodes_coords_ext_mesh, elmnts_ext_mesh,                                  & 
-      max_memory_size,num_interfaces_ext_mesh, max_interface_size_ext_mesh,    & 
-      my_neighbours_ext_mesh, my_nelmnts_neighbours_ext_mesh,                  & 
-      my_interfaces_ext_mesh,                                                  & 
-      ibool_interfaces_ext_mesh, nibool_interfaces_ext_mesh,                   & 
-      STACEY_ABSORBING_CONDITIONS, nspec2D_xmin, nspec2D_xmax,                 & 
-      nspec2D_ymin, nspec2D_ymax,                                              & 
-      NSPEC2D_BOTTOM, NSPEC2D_TOP,                                             & 
-      ibelm_xmin, ibelm_xmax, ibelm_ymin, ibelm_ymax, ibelm_bottom, ibelm_top, & 
-      nodes_ibelm_xmin,nodes_ibelm_xmax,nodes_ibelm_ymin,nodes_ibelm_ymax,     & 
-      nodes_ibelm_bottom,nodes_ibelm_top,                                      & 
-      SAVE_MESH_FILES,PML_CONDITIONS,FULL_ATTENUATION_SOLID,                   & 
-      ANISOTROPY,NPROC,APPROXIMATE_OCEAN_LOAD,OLSEN_ATTENUATION_RATIO,         & 
-      ATTENUATION,USE_OLSEN_ATTENUATION,                                       & 
-      nspec2D_moho_ext,ibelm_moho,nodes_ibelm_moho,                            & 
+  use generate_databases_par, only:                                            &
+      nspec => NSPEC_AB,nglob => NGLOB_AB,                                     &
+      ibool,xstore,ystore,zstore,                                              &
+      npointot,myrank,LOCAL_PATH,                                              &
+      nnodes_ext_mesh,nelmnts_ext_mesh,                                        &
+      nodes_coords_ext_mesh, elmnts_ext_mesh,                                  &
+      max_memory_size,num_interfaces_ext_mesh, max_interface_size_ext_mesh,    &
+      my_neighbours_ext_mesh, my_nelmnts_neighbours_ext_mesh,                  &
+      my_interfaces_ext_mesh,                                                  &
+      ibool_interfaces_ext_mesh, nibool_interfaces_ext_mesh,                   &
+      STACEY_ABSORBING_CONDITIONS, nspec2D_xmin, nspec2D_xmax,                 &
+      nspec2D_ymin, nspec2D_ymax,                                              &
+      NSPEC2D_BOTTOM, NSPEC2D_TOP,                                             &
+      ibelm_xmin, ibelm_xmax, ibelm_ymin, ibelm_ymax, ibelm_bottom, ibelm_top, &
+      nodes_ibelm_xmin,nodes_ibelm_xmax,nodes_ibelm_ymin,nodes_ibelm_ymax,     &
+      nodes_ibelm_bottom,nodes_ibelm_top,                                      &
+      SAVE_MESH_FILES,PML_CONDITIONS,FULL_ATTENUATION_SOLID,                   &
+      ANISOTROPY,NPROC,APPROXIMATE_OCEAN_LOAD,OLSEN_ATTENUATION_RATIO,         &
+      ATTENUATION,USE_OLSEN_ATTENUATION,                                       &
+      nspec2D_moho_ext,ibelm_moho,nodes_ibelm_moho,                            &
       ADIOS_FOR_MESH
 
   use create_regions_mesh_ext_par

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases_adios_stubs.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases_adios_stubs.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases_adios_stubs.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -4,7 +4,7 @@
 !!
 !!  Stubs for ADIOS functions. Avoid link error when not configured with
 !!  ADIOS.
-!!      
+!!
 !! \author MPBL
 !==============================================================================
 
@@ -15,8 +15,8 @@
 subroutine model_gll_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine 
+  call no_adios_err()
+end subroutine
 
 !----------------------------------------.
 ! Subroutines from model_ipati_adios.F90 |
@@ -25,19 +25,19 @@
 subroutine model_ipati_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine model_ipati_adios 
+  call no_adios_err()
+end subroutine model_ipati_adios
 
 subroutine model_ipati_water_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine model_ipati_water_adios
 
 subroutine read_model_vp_rho_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine read_model_vp_rho_adios
 
 !-------------------------------------------------.
@@ -47,7 +47,7 @@
 subroutine read_partition_files_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine read_partition_files_adios
 
 !-----------------------------------------------.
@@ -57,13 +57,13 @@
 subroutine save_arrays_solver_ext_mesh_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine 
+  call no_adios_err()
+end subroutine
 
 subroutine save_arrays_solver_files_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine save_arrays_solver_files_adios
 
 !--------------------------------------.
@@ -73,5 +73,5 @@
 subroutine crm_save_moho_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine crm_save_moho_adios

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_gll_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_gll_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_gll_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -28,7 +28,7 @@
 !==============================================================================
 !> Read rho, vp, vs from model_values.bp
 !
-! based on modified GLL mesh output from mesher 
+! based on modified GLL mesh output from mesher
 ! used for iterative inversion procedures
 !
 ! \param myrank rank of the mpi process
@@ -82,7 +82,7 @@
   call adios_get_scalar(handle, "rho/local_dim", local_dim_rho, ier)
   call adios_get_scalar(handle, "vp/local_dim", local_dim_vp, ier)
   call adios_get_scalar(handle, "vs/local_dim", local_dim_vs, ier)
-  
+
   start(1) = local_dim_rho * myrank
   count_ad(1) = NGLLX * NGLLY * NGLLZ * nspec
   call adios_selection_boundingbox(sel, 1, start, count_ad)

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_ipati_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_ipati_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/model_ipati_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -49,7 +49,7 @@
   integer :: ier
 
   ! ---------------------------------------------------------------------------
-  ! note: vp not vs structure is available 
+  ! note: vp not vs structure is available
   ! (as is often the case in exploration seismology),
   ! scaling factor
   real, parameter :: SCALING_FACTOR = 1.0/1.8
@@ -195,7 +195,7 @@
   !------------------------'
   call adios_get_scalar(handle, "rho/local_dim", local_dim_rho, ier)
   call adios_get_scalar(handle, "vp/local_dim", local_dim_vp, ier)
-  
+
   start(1) = local_dim_rho * myrank
   count_ad(1) = NGLLX * NGLLY * NGLLZ * nspec
   call adios_selection_boundingbox(sel, 1, start, count_ad)

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/read_partition_files_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/read_partition_files_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/read_partition_files_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -123,7 +123,7 @@
   call adios_schedule_read(handle, sel, "/nglob", 0, 1, nnodes_ext_mesh, ier)
   call adios_schedule_read(handle, sel, "/nspec", 0, 1, nelmnts_ext_mesh, ier)
   ! read physical properties of the materials
-  ! added poroelastic properties and filled with 0 the last 10 entries 
+  ! added poroelastic properties and filled with 0 the last 10 entries
   ! for elastic/acoustic
   call adios_schedule_read(handle, sel, "/nmaterials", 0, 1, nmat_ext_mesh, ier)
   call adios_schedule_read(handle, sel, "/nundef_materials", 0, 1, &
@@ -140,7 +140,7 @@
   num_interfaces_ext_mesh = 0
   max_interface_size_ext_mesh = 0
   if( NPROC > 1 ) then
-    ! format: #number_of_MPI_interfaces  
+    ! format: #number_of_MPI_interfaces
     !         #maximum_number_of_elements_on_each_interface
     call adios_schedule_read(handle, sel, "/nb_interfaces", 0, 1, &
                              num_interfaces_ext_mesh, ier)
@@ -213,7 +213,7 @@
                            nodes_coords_ext_mesh, ier)
 
   start(1) = local_dim_matpropl* myrank
-  count(1) = 16 * nmat_ext_mesh 
+  count(1) = 16 * nmat_ext_mesh
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -222,7 +222,7 @@
                            materials_ext_mesh, ier)
 
   start(1) = local_dim_material_index * myrank
-  count(1) = 2 * nelmnts_ext_mesh 
+  count(1) = 2 * nelmnts_ext_mesh
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -230,7 +230,7 @@
                            mat_ext_mesh, ier)
 
   start(1) = local_dim_elmnts_mesh * myrank
-  count(1) = NGNOD * nelmnts_ext_mesh 
+  count(1) = NGNOD * nelmnts_ext_mesh
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -246,7 +246,7 @@
                            ibelm_xmin, ier)
 
   start(1) = local_dim_nodes_ibelm_xmin * myrank
-  count(1) = nspec2D_xmin * NGNOD2D 
+  count(1) = nspec2D_xmin * NGNOD2D
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -260,7 +260,7 @@
   call adios_schedule_read(handle, sel, "ibelm_xmax/array", 0, 1, &
                            ibelm_xmax, ier)
   start(1) = local_dim_nodes_ibelm_xmax * myrank
-  count(1) = nspec2D_xmax * NGNOD2D 
+  count(1) = nspec2D_xmax * NGNOD2D
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -274,7 +274,7 @@
   call adios_schedule_read(handle, sel, "ibelm_ymin/array", 0, 1, &
                            ibelm_ymin, ier)
   start(1) = local_dim_nodes_ibelm_ymin * myrank
-  count(1) = nspec2D_ymin * NGNOD2D 
+  count(1) = nspec2D_ymin * NGNOD2D
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -288,7 +288,7 @@
   call adios_schedule_read(handle, sel, "ibelm_ymax/array", 0, 1, &
                            ibelm_ymax, ier)
   start(1) = local_dim_nodes_ibelm_ymax * myrank
-  count(1) = nspec2D_ymax * NGNOD2D 
+  count(1) = nspec2D_ymax * NGNOD2D
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -302,7 +302,7 @@
   call adios_schedule_read(handle, sel, "ibelm_bottom/array", 0, 1, &
                            ibelm_bottom, ier)
   start(1) = local_dim_nodes_ibelm_bottom * myrank
-  count(1) = nspec2D_bottom_ext * NGNOD2D 
+  count(1) = nspec2D_bottom_ext * NGNOD2D
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -316,7 +316,7 @@
   call adios_schedule_read(handle, sel, "ibelm_top/array", 0, 1, &
                            ibelm_top, ier)
   start(1) = local_dim_nodes_ibelm_top * myrank
-  count(1) = nspec2D_top_ext * NGNOD2D 
+  count(1) = nspec2D_top_ext * NGNOD2D
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -324,14 +324,14 @@
                            nodes_ibelm_top, ier)
 
   start(1) = local_dim_neighbours_mesh * myrank
-  count(1) = num_interfaces_ext_mesh 
+  count(1) = num_interfaces_ext_mesh
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(handle, sel, "neighbours_mesh/array", 0, 1, &
                            my_neighbours_ext_mesh, ier)
   start(1) = local_dim_num_elmnts_mesh * myrank
-  count(1) = num_interfaces_ext_mesh 
+  count(1) = num_interfaces_ext_mesh
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count)

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -32,7 +32,7 @@
 
 !==============================================================================
 !> \def STRINGIFY_VAR(a)
-!! Macro taking a variable and returning the stringified variable and 
+!! Macro taking a variable and returning the stringified variable and
 !! the variable itself.
 !! STRINGIFY_VAR(x) expand as:
 !!   "x", x
@@ -155,21 +155,21 @@
   !-----------------------------------------------------------------'
   ! Filling a temporary array to avoid doing allreduces for each var.
   max_global_values(1)  = nglob
-  max_global_values(2)  = nspec 
+  max_global_values(2)  = nspec
   max_global_values(3)  = max_nibool_interfaces_ext_mesh
-  max_global_values(4)  = nspec_cpml 
-  max_global_values(5)  = CPML_width_x 
-  max_global_values(6)  = CPML_width_y 
-  max_global_values(7)  = CPML_width_z 
-  max_global_values(8)  = nglob_interface_PML_acoustic 
-  max_global_values(9)  = nglob_interface_PML_elastic 
-  max_global_values(10) = num_abs_boundary_faces 
+  max_global_values(4)  = nspec_cpml
+  max_global_values(5)  = CPML_width_x
+  max_global_values(6)  = CPML_width_y
+  max_global_values(7)  = CPML_width_z
+  max_global_values(8)  = nglob_interface_PML_acoustic
+  max_global_values(9)  = nglob_interface_PML_elastic
+  max_global_values(10) = num_abs_boundary_faces
   max_global_values(11) = nspec2d_xmin
   max_global_values(12) = nspec2d_xmax
   max_global_values(13) = nspec2d_ymin
   max_global_values(14) = nspec2d_ymax
   max_global_values(15) = nspec2d_bottom
-  max_global_values(16) = nspec2d_top 
+  max_global_values(16) = nspec2d_top
   max_global_values(17) = num_free_surface_faces
   max_global_values(18) = num_coupling_ac_el_faces
   max_global_values(19) = num_coupling_ac_po_faces
@@ -252,8 +252,8 @@
   !------------------------.
   ! Define ADIOS Variables |
   !------------------------'
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob))
 
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -267,7 +267,7 @@
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", "z_global", zstore_dummy)
 
-  ! this array is needed for acoustic simulations but also for elastic 
+  ! this array is needed for acoustic simulations but also for elastic
   ! simulations with CPML, thus we allocate it and read it in all cases
   ! (whether the simulation is acoustic, elastic, or acoustic/elastic)
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
@@ -391,10 +391,10 @@
 
   ! C-PML absorbing boundary conditions
   if( PML_CONDITIONS ) then
-    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec_cpml)) 
-    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(CPML_width_x)) 
-    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(CPML_width_y)) 
-    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(CPML_width_z)) 
+    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec_cpml))
+    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(CPML_width_x))
+    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(CPML_width_y))
+    call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(CPML_width_z))
     if( nspec_cpml > 0 ) then
       local_dim = nspec_cpml_wmax
       call define_adios_global_array1D(group, groupsize, &
@@ -430,9 +430,9 @@
       if((SIMULATION_TYPE == 1 .and. SAVE_FORWARD) &
           .or. SIMULATION_TYPE == 3) then
         call define_adios_scalar(group, groupsize, "", &
-                                 STRINGIFY_VAR(nglob_interface_PML_acoustic)) 
+                                 STRINGIFY_VAR(nglob_interface_PML_acoustic))
         call define_adios_scalar(group, groupsize, "", &
-                                 STRINGIFY_VAR(nglob_interface_PML_elastic)) 
+                                 STRINGIFY_VAR(nglob_interface_PML_elastic))
         if(nglob_interface_PML_acoustic > 0) then
           local_dim = nglob_interface_PML_acoustic_wmax
           call define_adios_global_array1D(group, groupsize, &
@@ -451,7 +451,7 @@
 
   ! absorbing boundary surface
   call define_adios_scalar(group, groupsize, "", &
-                           STRINGIFY_VAR(num_abs_boundary_faces)) 
+                           STRINGIFY_VAR(num_abs_boundary_faces))
   if(PML_CONDITIONS)then
     if( num_abs_boundary_faces > 0 ) then
       local_dim = num_abs_boundary_faces_wmax
@@ -518,38 +518,38 @@
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_ymin))
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_ymax))
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_bottom))
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_top)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_top))
 
   if (nspec2d_xmin .ne. 0) then
-    local_dim = nspec2d_xmin_wmax 
+    local_dim = nspec2d_xmin_wmax
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", STRINGIFY_VAR(ibelm_xmin))
-  endif 
+  endif
   if (nspec2d_xmax .ne. 0) then
-    local_dim = nspec2d_xmax_wmax 
+    local_dim = nspec2d_xmax_wmax
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", STRINGIFY_VAR(ibelm_xmax))
   endif
   if (nspec2d_ymin .ne. 0) then
-    local_dim = nspec2d_ymin_wmax 
+    local_dim = nspec2d_ymin_wmax
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", STRINGIFY_VAR(ibelm_ymin))
-  endif                                   
+  endif
   if (nspec2d_ymax .ne. 0) then
-    local_dim = nspec2d_ymax_wmax 
+    local_dim = nspec2d_ymax_wmax
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", STRINGIFY_VAR(ibelm_ymax))
   endif
   if (nspec2d_bottom .ne. 0) then
-    local_dim = nspec2d_bottom_wmax 
+    local_dim = nspec2d_bottom_wmax
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", STRINGIFY_VAR(ibelm_bottom))
   endif
   if (nspec2d_top .ne. 0) then
-    local_dim = nspec2d_top_wmax 
+    local_dim = nspec2d_top_wmax
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", STRINGIFY_VAR(ibelm_top))
-  endif                                 
+  endif
 
   ! free surface
   call define_adios_scalar(group, groupsize, "", &
@@ -773,8 +773,8 @@
   !------------------------------------------.
   ! Write previously defined ADIOS variables |
   !------------------------------------------'
-  call adios_write(handle, STRINGIFY_VAR(nspec), ier) 
-  call adios_write(handle, STRINGIFY_VAR(nglob), ier) 
+  call adios_write(handle, STRINGIFY_VAR(nspec), ier)
+  call adios_write(handle, STRINGIFY_VAR(nglob), ier)
 
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
@@ -788,7 +788,7 @@
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                    "z_global", zstore_dummy)
 
-  ! this array is needed for acoustic simulations but also for elastic 
+  ! this array is needed for acoustic simulations but also for elastic
   ! simulations with CPML, thus we allocate it and read it in all cases
   ! (whether the simulation is acoustic, elastic, or acoustic/elastic)
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
@@ -899,10 +899,10 @@
 
 ! C-PML absorbing boundary conditions
   if( PML_CONDITIONS ) then
-    call adios_write(handle, STRINGIFY_VAR(nspec_cpml), ier) 
-    call adios_write(handle, STRINGIFY_VAR(CPML_width_x), ier) 
-    call adios_write(handle, STRINGIFY_VAR(CPML_width_y), ier) 
-    call adios_write(handle, STRINGIFY_VAR(CPML_width_z), ier) 
+    call adios_write(handle, STRINGIFY_VAR(nspec_cpml), ier)
+    call adios_write(handle, STRINGIFY_VAR(CPML_width_x), ier)
+    call adios_write(handle, STRINGIFY_VAR(CPML_width_y), ier)
+    call adios_write(handle, STRINGIFY_VAR(CPML_width_z), ier)
     if( nspec_cpml > 0 ) then
       local_dim = nspec_cpml_wmax
       call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
@@ -937,9 +937,9 @@
       if((SIMULATION_TYPE == 1 .and. SAVE_FORWARD) &
           .or. SIMULATION_TYPE == 3) then
         call adios_write(handle, &
-                         STRINGIFY_VAR(nglob_interface_PML_acoustic), ier) 
+                         STRINGIFY_VAR(nglob_interface_PML_acoustic), ier)
         call adios_write(handle, &
-                         STRINGIFY_VAR(nglob_interface_PML_elastic), ier) 
+                         STRINGIFY_VAR(nglob_interface_PML_elastic), ier)
         if(nglob_interface_PML_acoustic > 0) then
           local_dim = nglob_interface_PML_acoustic_wmax
           call write_adios_global_1d_array(handle, myrank, sizeprocs, &
@@ -957,7 +957,7 @@
   endif
 
   ! absorbing boundary surface
-  call adios_write(handle, STRINGIFY_VAR(num_abs_boundary_faces), ier) 
+  call adios_write(handle, STRINGIFY_VAR(num_abs_boundary_faces), ier)
   if(PML_CONDITIONS)then
     if( num_abs_boundary_faces > 0 ) then
       local_dim = num_abs_boundary_faces_wmax
@@ -1024,38 +1024,38 @@
   call adios_write(handle, STRINGIFY_VAR(nspec2d_ymin), ier)
   call adios_write(handle, STRINGIFY_VAR(nspec2d_ymax), ier)
   call adios_write(handle, STRINGIFY_VAR(nspec2d_bottom), ier)
-  call adios_write(handle, STRINGIFY_VAR(nspec2d_top), ier) 
+  call adios_write(handle, STRINGIFY_VAR(nspec2d_top), ier)
 
   if (nspec2d_xmin .ne. 0) then
-      local_dim = nspec2d_xmin_wmax 
+      local_dim = nspec2d_xmin_wmax
       call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                        STRINGIFY_VAR(ibelm_xmin))
-  endif 
+  endif
   if (nspec2d_xmax .ne. 0) then
-    local_dim = nspec2d_xmax_wmax 
+    local_dim = nspec2d_xmax_wmax
     call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                      STRINGIFY_VAR(ibelm_xmax))
-  endif 
+  endif
   if (nspec2d_ymin .ne. 0) then
-    local_dim = nspec2d_ymin_wmax 
+    local_dim = nspec2d_ymin_wmax
     call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                      STRINGIFY_VAR(ibelm_ymin))
-  endif 
+  endif
   if (nspec2d_ymax .ne. 0) then
-    local_dim = nspec2d_ymax_wmax 
+    local_dim = nspec2d_ymax_wmax
     call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                      STRINGIFY_VAR(ibelm_ymax))
-  endif 
+  endif
   if (nspec2d_bottom .ne. 0) then
-    local_dim = nspec2d_bottom_wmax 
+    local_dim = nspec2d_bottom_wmax
     call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                      STRINGIFY_VAR(ibelm_bottom))
-  endif 
+  endif
   if (nspec2d_top .ne. 0) then
-    local_dim = nspec2d_top_wmax 
+    local_dim = nspec2d_top_wmax
     call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                      STRINGIFY_VAR(ibelm_top))
-  endif 
+  endif
 
   ! free surface
   call adios_write(handle, STRINGIFY_VAR(num_free_surface_faces), ier)
@@ -1253,7 +1253,7 @@
   !----------------------------------.
   ! Perform the actual write to disk |
   !----------------------------------'
-  call adios_set_path(handle, "", ier)                          
+  call adios_set_path(handle, "", ier)
   call adios_close(handle, ier)
 
   ! stores arrays in binary files
@@ -1314,7 +1314,7 @@
 subroutine save_arrays_solver_files_adios(nspec,nglob,ibool, nspec_wmax, &
                                           nglob_wmax)
 
-  use mpi                                          
+  use mpi
   use generate_databases_par, only: myrank, LOCAL_PATH,     &
                                     xstore, ystore, zstore, &
                                     sizeprocs
@@ -1359,12 +1359,12 @@
   !------------------------.
   ! Define ADIOS Variables |
   !------------------------'
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz))
 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob))
 
   local_dim = nglob_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -1374,7 +1374,7 @@
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", "z_global", zstore_dummy)
 
-  local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax 
+  local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(xstore))
   call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -1396,12 +1396,12 @@
   !------------------------------------------.
   ! Write previously defined ADIOS variables |
   !------------------------------------------'
-  call adios_write(handle, STRINGIFY_VAR(ngllx), ier) 
-  call adios_write(handle, STRINGIFY_VAR(nglly), ier) 
-  call adios_write(handle, STRINGIFY_VAR(ngllz), ier) 
+  call adios_write(handle, STRINGIFY_VAR(ngllx), ier)
+  call adios_write(handle, STRINGIFY_VAR(nglly), ier)
+  call adios_write(handle, STRINGIFY_VAR(ngllz), ier)
 
-  call adios_write(handle, STRINGIFY_VAR(nspec), ier) 
-  call adios_write(handle, STRINGIFY_VAR(nglob), ier) 
+  call adios_write(handle, STRINGIFY_VAR(nspec), ier)
+  call adios_write(handle, STRINGIFY_VAR(nglob), ier)
 
   local_dim = nglob_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
@@ -1426,9 +1426,9 @@
   !----------------------------------.
   ! Perform the actual write to disk |
   !----------------------------------'
-  call adios_set_path(handle, "", ier)                          
+  call adios_set_path(handle, "", ier)
   call adios_close(handle, ier)
-#endif  
+#endif
 #if 1
   !----------------------------------.
   ! Set up the model values to write |
@@ -1469,12 +1469,12 @@
   !------------------------.
   ! Define ADIOS Variables |
   !------------------------'
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz))
 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob))
 
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -1494,12 +1494,12 @@
   !------------------------------------------.
   ! Write previously defined ADIOS variables |
   !------------------------------------------'
-  call adios_write(handle, STRINGIFY_VAR(ngllx), ier) 
-  call adios_write(handle, STRINGIFY_VAR(nglly), ier) 
-  call adios_write(handle, STRINGIFY_VAR(ngllz), ier) 
+  call adios_write(handle, STRINGIFY_VAR(ngllx), ier)
+  call adios_write(handle, STRINGIFY_VAR(nglly), ier)
+  call adios_write(handle, STRINGIFY_VAR(ngllz), ier)
 
-  call adios_write(handle, STRINGIFY_VAR(nspec), ier) 
-  call adios_write(handle, STRINGIFY_VAR(nglob), ier) 
+  call adios_write(handle, STRINGIFY_VAR(nspec), ier)
+  call adios_write(handle, STRINGIFY_VAR(nglob), ier)
 
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
@@ -1512,7 +1512,7 @@
   !----------------------------------.
   ! Perform the actual write to disk |
   !----------------------------------'
-  call adios_set_path(handle, "", ier)                          
+  call adios_set_path(handle, "", ier)
   call adios_close(handle, ier)
 
   deallocate(vp_tmp)

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_moho_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_moho_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_moho_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -32,7 +32,7 @@
 
 !==============================================================================
 !> \def STRINGIFY_VAR(a)
-!! Macro taking a variable and returning the stringified variable and 
+!! Macro taking a variable and returning the stringified variable and
 !! the variable itself.
 !! STRINGIFY_VAR(x) expand as:
 !!   "x", x
@@ -77,7 +77,7 @@
   !-----------------------------------------------------------------'
   ! Filling a temporary array to avoid doing allreduces for each var.
   max_global_values(1) = nspec_ab
-  max_global_values(2) = nspec2d_moho 
+  max_global_values(2) = nspec2d_moho
 
   call MPI_Allreduce(MPI_IN_PLACE, max_global_values, num_vars, &
                      MPI_INTEGER, MPI_MAX, MPI_COMM_WORLD, ier)
@@ -97,8 +97,8 @@
   !------------------------.
   ! Define ADIOS Variables |
   !------------------------'
-  call define_adios_scalar(group, groupsize, "", "nspec", NSPEC_AB) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_moho)) 
+  call define_adios_scalar(group, groupsize, "", "nspec", NSPEC_AB)
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_moho))
 
   local_dim = nspec2d_moho_wmax
   call define_adios_global_array1D(group, groupsize, &
@@ -142,15 +142,15 @@
   !------------------------------------------.
   ! Write previously defined ADIOS variables |
   !------------------------------------------'
-  call adios_write(handle, "nspec", NSPEC_AB, ier) 
-  call adios_write(handle, STRINGIFY_VAR(nspec2d_moho), ier) 
+  call adios_write(handle, "nspec", NSPEC_AB, ier)
+  call adios_write(handle, STRINGIFY_VAR(nspec2d_moho), ier)
 
   local_dim = nspec2d_moho_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, &
                                    local_dim, STRINGIFY_VAR(ibelm_moho_top))
   call write_adios_global_1d_array(handle, myrank, sizeprocs, &
                                    local_dim, STRINGIFY_VAR(ibelm_moho_bot))
-  
+
   local_dim = 3 * NGLLSQUARE * nspec2d_moho_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, &
                                    local_dim, STRINGIFY_VAR(ijk_moho_top))
@@ -172,7 +172,7 @@
   !----------------------------------.
   ! Perform the actual write to disk |
   !----------------------------------'
-  call adios_set_path(handle, "", ier)                          
+  call adios_set_path(handle, "", ier)
   call adios_close(handle, ier)
 end subroutine crm_save_moho_adios
 

Modified: seismo/3D/SPECFEM3D/trunk/src/meshfem3D/create_regions_mesh.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/meshfem3D/create_regions_mesh.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/meshfem3D/create_regions_mesh.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -35,7 +35,7 @@
                                NPROC_XI,NPROC_ETA, &
                                nsubregions,subregions,nblayers,ner_layer,NMATERIALS,material_properties, &
                                myrank, sizeprocs, &
-							   LOCAL_PATH,UTM_X_MIN,UTM_X_MAX,UTM_Y_MIN,UTM_Y_MAX,Z_DEPTH_BLOCK, &
+                 LOCAL_PATH,UTM_X_MIN,UTM_X_MAX,UTM_Y_MIN,UTM_Y_MAX,Z_DEPTH_BLOCK, &
                                CREATE_ABAQUS_FILES,CREATE_DX_FILES,CREATE_VTK_FILES, &
                                USE_REGULAR_MESH,NDOUBLINGS,ner_doublings, &
                                ADIOS_ENABLED, ADIOS_FOR_DATABASES)
@@ -497,7 +497,7 @@
                           CREATE_VTK_FILES,prname)
 
   ! saves mesh as databases file
-  if (ADIOS_FOR_DATABASES) then 
+  if (ADIOS_FOR_DATABASES) then
     call save_databases_adios(LOCAL_PATH, myrank, sizeprocs, &
        nspec,nglob,iproc_xi,iproc_eta, &
        NPROC_XI,NPROC_ETA,addressing,iMPIcut_xi,iMPIcut_eta,&

Modified: seismo/3D/SPECFEM3D/trunk/src/meshfem3D/meshfem3D_adios_stubs.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/meshfem3D/meshfem3D_adios_stubs.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/meshfem3D/meshfem3D_adios_stubs.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -4,12 +4,12 @@
 !!
 !!  Stubs for ADIOS functions. Avoid link error when not configured with
 !!  ADIOS.
-!!      
+!!
 !! \author MPBL
 !==============================================================================
 
 subroutine save_databases_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine save_databases_adios

Modified: seismo/3D/SPECFEM3D/trunk/src/meshfem3D/save_databases_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/meshfem3D/save_databases_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/meshfem3D/save_databases_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -32,7 +32,7 @@
 
 !==============================================================================
 !> \def STRINGIFY_VAR(a)
-!! Macro taking a variable and returning the stringified variable and 
+!! Macro taking a variable and returning the stringified variable and
 !! the variable itself.
 !! STRINGIFY_VAR(x) expand as:
 !!   "x", x
@@ -52,7 +52,7 @@
    NSPEC2D_BOTTOM,NSPEC2D_TOP, NSPEC2DMAX_XMIN_XMAX,NSPEC2DMAX_YMIN_YMAX, &
    ibelm_xmin,ibelm_xmax,ibelm_ymin,ibelm_ymax,ibelm_bottom,ibelm_top,&
    NMATERIALS,material_properties)
-  
+
   use mpi
   use adios_helpers_mod
   use safe_alloc_mod
@@ -72,7 +72,7 @@
   integer nglob
 
   ! MPI cartesian topology
-  ! E for East (= XI_MIN), W for West (= XI_MAX), 
+  ! E for East (= XI_MIN), W for West (= XI_MAX),
   ! S for South (= ETA_MIN), N for North (= ETA_MAX)
   integer, parameter :: W=1,E=2,S=3,N=4,NW=5,NE=6,SE=7,SW=8
   integer iproc_xi,iproc_eta
@@ -102,12 +102,12 @@
   double precision , dimension(NMATERIALS,6) ::  material_properties
   double precision , dimension(16,NMATERIALS) :: matpropl
   integer :: i,ispec,iglob,ier
-  ! dummy_nspec_cpml is used here to match the read instructions 
+  ! dummy_nspec_cpml is used here to match the read instructions
   ! in generate_databases/read_partition_files.f90
   integer :: dummy_nspec_cpml
 
   ! name of the database files
-  character(len=256) LOCAL_PATH 
+  character(len=256) LOCAL_PATH
 
   ! for MPI interfaces
   integer ::  nb_interfaces,nspec_interfaces_max,idoubl
@@ -124,7 +124,7 @@
   integer(kind=8) :: group, handle
   integer(kind=8) :: groupsize, totalsize
   integer :: local_dim, global_dim, offset, varid
-  
+
   !--- Variables to allreduce - wmax stands for world_max
   integer :: nglob_wmax, nspec_wmax, nmaterials_wmax, &
              nspec2d_xmin_wmax, nspec2d_xmax_wmax,    &
@@ -152,14 +152,14 @@
   ! pad dummy zeros to fill up 16 entries (poroelastic medium not allowed)
   matpropl(:,:) = 0.d0
   matpropl(1:6, :) = transpose(material_properties(:,1:6))
-  
+
   nundef_materials = 0
 
   material_index (:,:)=1
   do ispec = 1, nspec
     material_index(2, :)     = 1
     material_index(1, ispec) = true_material_num(ispec)
-  enddo 
+  enddo
 
   call safe_alloc(nodes_ibelm_xmin,ngnod2d, nspec2d_xmin, "nodes_ibelm_xmin")
   call safe_alloc(nodes_ibelm_xmax,ngnod2d, nspec2d_xmax, "nodes_ibelm_xmax")
@@ -170,7 +170,7 @@
   call safe_alloc(nodes_ibelm_top, ngnod2d, nspec2d_top, "nodes_ibelm_top")
   call safe_alloc(elmnts_mesh, NGNOD, nspec, "elmnts_mesh")
 
-  do ispec = 1, nspec 
+  do ispec = 1, nspec
     elmnts_mesh(1,ispec) = ibool(1,1,1,ispec)
     elmnts_mesh(2,ispec) = ibool(2,1,1,ispec)
     elmnts_mesh(3,ispec) = ibool(2,2,1,ispec)
@@ -219,7 +219,7 @@
   enddo
 
   ! JC JC todo: implement C-PML code in internal mesher
-  ! dummy_nspec_cpml is used here to match the read instructions 
+  ! dummy_nspec_cpml is used here to match the read instructions
   ! in generate_databases/read_partition_files.f90
   dummy_nspec_cpml = 0
 
@@ -286,7 +286,7 @@
             .and. (iMPIcut_eta(1,:) .eqv. .true.))
 
     nspec_interfaces_max = maxval(nspec_interface)
-    
+
     call safe_alloc(neighbours_mesh, nb_interfaces, "neighbours_mesh")
     call safe_alloc(num_elmnts_mesh, nb_interfaces, "num_elmnts_mesh")
     call safe_alloc(interfaces_mesh, 6, nspec_interfaces_max, nb_interfaces, &
@@ -302,7 +302,7 @@
       num_elmnts_mesh(interface_num) = nspec_interface(W)
       ispec_interface = 1
       do ispec = 1,nspec
-        if(iMPIcut_xi(1,ispec)) then 
+        if(iMPIcut_xi(1,ispec)) then
           interfaces_mesh(1, ispec_interface, interface_num) = ispec
           interfaces_mesh(2, ispec_interface, interface_num) = 4
           interfaces_mesh(3, ispec_interface, interface_num) &
@@ -314,7 +314,7 @@
           interfaces_mesh(6, ispec_interface, interface_num) &
               = ibool(1,2,2,ispec)
           ispec_interface = ispec_interface + 1
-         endif                               
+         endif
       enddo
       interface_num = interface_num +1
     endif
@@ -336,7 +336,7 @@
           interfaces_mesh(6, ispec_interface, interface_num) &
               = ibool(2,2,2,ispec)
           ispec_interface = ispec_interface + 1
-         endif                                
+         endif
       enddo
       interface_num = interface_num +1
     endif
@@ -358,7 +358,7 @@
           interfaces_mesh(6, ispec_interface, interface_num) &
               = ibool(2,1,2,ispec)
           ispec_interface = ispec_interface + 1
-        endif                                          
+        endif
       enddo
       interface_num = interface_num +1
     endif
@@ -515,34 +515,34 @@
   !------------------------.
   ! Define ADIOS Variables |
   !------------------------'
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz))
 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx_m)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly_m)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz_m)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngnod)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngnod2d)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx_m))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly_m))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz_m))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngnod))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngnod2d))
 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nmaterials)) 
-  call define_adios_scalar(group, groupsize, "", & 
-                           STRINGIFY_VAR(nundef_materials)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglob))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nmaterials))
+  call define_adios_scalar(group, groupsize, "", &
+                           STRINGIFY_VAR(nundef_materials))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec))
 
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_xmin))
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_xmax))
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_ymin))
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_ymax))
   call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_bottom))
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_top)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nspec2d_top))
 
   call define_adios_scalar(group, groupsize, "", "nspec_cpml",dummy_nspec_cpml)
 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nb_interfaces)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nb_interfaces))
   call define_adios_scalar(group, groupsize, "", &
-                           STRINGIFY_VAR(nspec_interfaces_max)) 
+                           STRINGIFY_VAR(nspec_interfaces_max))
 
   local_dim = 3 * nglob_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -557,44 +557,44 @@
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(elmnts_mesh))
 
-  local_dim = nspec2d_xmin_wmax 
+  local_dim = nspec2d_xmin_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(ibelm_xmin))
-  local_dim = NGNOD2D * nspec2d_xmin_wmax                                 
+  local_dim = NGNOD2D * nspec2d_xmin_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(nodes_ibelm_xmin))
-  local_dim = nspec2d_xmax_wmax 
+  local_dim = nspec2d_xmax_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(ibelm_xmax))
-  local_dim = NGNOD2D * nspec2d_xmax_wmax                                 
+  local_dim = NGNOD2D * nspec2d_xmax_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(nodes_ibelm_xmax))
-  local_dim = nspec2d_ymin_wmax 
+  local_dim = nspec2d_ymin_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(ibelm_ymin))
-  local_dim = NGNOD2D * nspec2d_ymin_wmax                                 
+  local_dim = NGNOD2D * nspec2d_ymin_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(nodes_ibelm_ymin))
-  local_dim = nspec2d_ymax_wmax 
+  local_dim = nspec2d_ymax_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(ibelm_ymax))
-  local_dim = NGNOD2D * nspec2d_ymax_wmax                                 
+  local_dim = NGNOD2D * nspec2d_ymax_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(nodes_ibelm_ymax))
-  local_dim = nspec2d_bottom_wmax 
+  local_dim = nspec2d_bottom_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(ibelm_bottom))
-  local_dim = NGNOD2D * nspec2d_bottom_wmax                                 
+  local_dim = NGNOD2D * nspec2d_bottom_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(nodes_ibelm_bottom))
-  local_dim = nspec2d_top_wmax 
+  local_dim = nspec2d_top_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(ibelm_top))
-  local_dim = NGNOD2D * nspec2d_top_wmax                                 
+  local_dim = NGNOD2D * nspec2d_top_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(nodes_ibelm_top))
 
-  local_dim = nb_interfaces_wmax 
+  local_dim = nb_interfaces_wmax
   call define_adios_global_array1D(group, groupsize, local_dim, &
                                    "", STRINGIFY_VAR(neighbours_mesh))
   call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -684,7 +684,7 @@
   local_dim = nspec2d_ymax_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                    STRINGIFY_VAR(ibelm_ymax))
-  if (nspec2d_ymax .ne. 0) then                                   
+  if (nspec2d_ymax .ne. 0) then
   local_dim = NGNOD2D * nspec2d_ymax_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                    STRINGIFY_VAR(nodes_ibelm_ymax))
@@ -696,7 +696,7 @@
     local_dim = NGNOD2D * nspec2d_bottom_wmax
     call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                      STRINGIFY_VAR(nodes_ibelm_bottom))
-  endif                                 
+  endif
   local_dim = nspec2d_top_wmax
   call write_adios_global_1d_array(handle, myrank, sizeprocs, local_dim, &
                                    STRINGIFY_VAR(ibelm_top))
@@ -718,7 +718,7 @@
   !----------------------------------.
   ! Perform the actual write to disk |
   !----------------------------------'
-  call adios_set_path(handle, "", ier)                          
+  call adios_set_path(handle, "", ier)
   call adios_close(handle, ier)
 
   !---------------------------.

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -32,7 +32,7 @@
 !! * Scalar definition
 !! * Global arrays definition
 !!
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 module adios_helpers_mod
   use adios_helpers_definitions_mod

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_definitions.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_definitions.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_definitions.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -31,7 +31,7 @@
 !! * Scalar definition
 !! * Global arrays definition
 !!
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 module adios_helpers_definitions_mod
   implicit none
@@ -46,7 +46,7 @@
   public :: define_adios_global_logical_1d_array
   public :: define_adios_global_array1D
 
-  ! Generic interface to define scalar variables in ADIOS 
+  ! Generic interface to define scalar variables in ADIOS
   interface define_adios_scalar
     module procedure define_adios_double_scalar
     module procedure define_adios_float_scalar
@@ -131,13 +131,13 @@
 
 
 !===============================================================================
-!> Define an ADIOS scalar double precision variable and autoincrement 
+!> Define an ADIOS scalar double precision variable and autoincrement
 !! the adios group size by (8).
 !! \param adios_group The adios group where the variables belongs
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param name The variable name in the ADIOS file.
 !! \param var The variable to be defined. Used for type inference. Can be
 !!            ignored.
@@ -162,20 +162,20 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 6 == real(kind=8) 
+  ! adios: 6 == real(kind=8)
   call adios_define_var (adios_group, name, path, 6,  "", "", "", varid)
   group_size_inc = group_size_inc + 8
 end subroutine define_adios_double_scalar
 
 
 !===============================================================================
-!> Define an ADIOS scalar single precision variable and autoincrement 
+!> Define an ADIOS scalar single precision variable and autoincrement
 !! the adios group size by (8).
 !! \param adios_group The adios group where the variables belongs
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param name The variable name in the ADIOS file.
 !! \param var The variable to be defined. Used for type inference. Can be
 !             ignored.
@@ -193,7 +193,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 6 == real(kind=8) 
+  ! adios: 6 == real(kind=8)
   call adios_define_var (adios_group, name, path, 5,  "", "", "", varid)
   group_size_inc = group_size_inc + 4
 end subroutine define_adios_float_scalar
@@ -206,7 +206,7 @@
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param name The variable name in the ADIOS file.
 !! \param var The variable to be defined. Used for type inference. Can be
 !             ignored.
@@ -224,7 +224,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 2 ~ integer(kind=4) 
+  ! adios: 2 ~ integer(kind=4)
   call adios_define_var (adios_group, name, path, adios_integer,  &
       "", "", "", varid)
   group_size_inc = group_size_inc + 4
@@ -237,7 +237,7 @@
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param name The variable name in the ADIOS file.
 !! \param var The variable to be defined. Used for type inference. Can be
 !             ignored.
@@ -255,7 +255,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 0 == byte == any_data_type(kind=1) 
+  ! adios: 0 == byte == any_data_type(kind=1)
   call adios_define_var (adios_group, name, path, 0,  "", "", "", varid)
   group_size_inc = group_size_inc + 1
 end subroutine define_adios_byte_scalar
@@ -306,7 +306,7 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer(kind=8) :: var_id
-  
+
   ! Define the dimensions of the array. local_dim used as a dummy
   ! variable to call the integer routine.
   call define_adios_global_dims_1d(adios_group, group_size_inc, array_name, &
@@ -341,7 +341,7 @@
   integer, intent(in) :: local_dim
   integer(kind=8), intent(inout) :: group_size_inc
   real, dimension(:), intent(in) :: var
- 
+
   call define_adios_global_1d_real_generic(adios_group, group_size_inc, &
       array_name, local_dim)
 end subroutine define_adios_global_1d_real_1d
@@ -482,7 +482,7 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer(kind=8) :: var_id
-  
+
   ! Define the dimensions of the array. local_dim used as a dummy
   ! variable to call the integer routine.
   call define_adios_global_dims_1d(adios_group, group_size_inc, array_name, &
@@ -517,7 +517,7 @@
   integer, intent(in) :: local_dim
   integer(kind=8), intent(inout) :: group_size_inc
   real(kind=8), dimension(:), intent(in) :: var
- 
+
   call define_adios_global_1d_double_generic(adios_group, group_size_inc, &
       array_name, local_dim)
 end subroutine define_adios_global_1d_double_1d
@@ -658,7 +658,7 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer(kind=8) :: var_id
-  
+
   ! Define the dimensions of the array. local_dim used as a dummy
   ! variable to call the integer routine.
   call define_adios_global_dims_1d(adios_group, group_size_inc, array_name, &
@@ -693,7 +693,7 @@
   integer, intent(in) :: local_dim
   integer(kind=8), intent(inout) :: group_size_inc
   integer(kind=4), dimension(:), intent(in) :: var
- 
+
   call define_adios_global_1d_int_generic(adios_group, group_size_inc, &
       array_name, local_dim)
 end subroutine define_adios_global_1d_int_1d
@@ -834,7 +834,7 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer(kind=8) :: var_id
-  
+
   ! Define the dimensions of the array. local_dim used as a dummy
   ! variable to call the integer routine.
   call define_adios_global_dims_1d(adios_group, group_size_inc, array_name, &
@@ -869,7 +869,7 @@
   integer, intent(in) :: local_dim
   integer(kind=8), intent(inout) :: group_size_inc
   integer(kind=8), dimension(:), intent(in) :: var
- 
+
   call define_adios_global_1d_long_generic(adios_group, group_size_inc, &
       array_name, local_dim)
 end subroutine define_adios_global_1d_long_1d
@@ -1009,15 +1009,15 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer(kind=8) :: var_id
-  
+
   ! Define the dimensions of the array. local_dim used as a dummy
   ! variable to call the integer routine.
   call define_adios_global_dims_1d(adios_group, group_size_inc, array_name, &
       local_dim)
 
   ! The Fortran standard does not specify how variables of LOGICAL type are
-  ! represented, beyond requiring that LOGICAL variables of default kind 
-  ! have the same storage size as default INTEGER and REAL variables. 
+  ! represented, beyond requiring that LOGICAL variables of default kind
+  ! have the same storage size as default INTEGER and REAL variables.
   ! Hence the 'adios_integer' (2) data type to store logical values
   call adios_define_var(adios_group, "array", array_name, 2, &
       array_name // "/local_dim", array_name // "/global_dim", &
@@ -1048,7 +1048,7 @@
   integer, intent(in) :: local_dim
   integer(kind=8), intent(inout) :: group_size_inc
   logical, dimension(:), intent(in) :: var
- 
+
   call define_adios_global_1d_logical_generic(adios_group, group_size_inc, &
       array_name, local_dim)
 end subroutine define_adios_global_1d_logical_1d

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_writers.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_writers.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/adios_helpers_writers.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -34,7 +34,7 @@
 !! \note We do not define function to write scalars variables into adios
 !!       since it is already a single function call.
 !!
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 module adios_helpers_writers_mod
   implicit none
@@ -154,7 +154,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_real_1d(adios_handle, myrank, sizeprocs, &
@@ -182,7 +182,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_real_2d(adios_handle, myrank, sizeprocs, &
@@ -210,7 +210,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_real_3d(adios_handle, myrank, sizeprocs, &
@@ -238,7 +238,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_real_4d(adios_handle, myrank, sizeprocs, &
@@ -266,7 +266,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_real_5d(adios_handle, myrank, sizeprocs, &
@@ -294,7 +294,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_double_1d(adios_handle, myrank, sizeprocs, &
@@ -322,7 +322,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_double_2d(adios_handle, myrank, sizeprocs, &
@@ -350,7 +350,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_double_3d(adios_handle, myrank, sizeprocs, &
@@ -378,7 +378,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_double_4d(adios_handle, myrank, sizeprocs, &
@@ -406,7 +406,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_double_5d(adios_handle, myrank, sizeprocs, &
@@ -434,7 +434,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_integer_1d(adios_handle, myrank, sizeprocs, &
@@ -462,7 +462,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_integer_2d(adios_handle, myrank, sizeprocs, &
@@ -490,7 +490,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_integer_3d(adios_handle, myrank, sizeprocs, &
@@ -518,7 +518,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_integer_4d(adios_handle, myrank, sizeprocs, &
@@ -546,7 +546,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_integer_5d(adios_handle, myrank, sizeprocs, &
@@ -574,7 +574,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_long_1d(adios_handle, myrank, sizeprocs, &
@@ -602,7 +602,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_long_2d(adios_handle, myrank, sizeprocs, &
@@ -630,7 +630,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_long_3d(adios_handle, myrank, sizeprocs, &
@@ -658,7 +658,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_long_4d(adios_handle, myrank, sizeprocs, &
@@ -686,7 +686,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_long_5d(adios_handle, myrank, sizeprocs, &
@@ -714,7 +714,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_logical_1d(adios_handle, myrank, sizeprocs, &
@@ -742,7 +742,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_logical_2d(adios_handle, myrank, sizeprocs, &
@@ -770,7 +770,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_logical_3d(adios_handle, myrank, sizeprocs, &
@@ -798,7 +798,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_logical_4d(adios_handle, myrank, sizeprocs, &
@@ -826,7 +826,7 @@
 !! \param local_dim The number of elements to be writen by each process. Might
 !!                  eventually be padded.
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param array_name The array name in the ADIOS file.
 !! \param array The array to be written
 subroutine write_adios_global_1d_logical_5d(adios_handle, myrank, sizeprocs, &

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/adios_manager_stubs.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/adios_manager_stubs.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/adios_manager_stubs.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -10,8 +10,8 @@
 
   implicit none
 
-  integer :: myrank, code, ier 
-  
+  integer :: myrank, code, ier
+
   call MPI_Comm_rank(MPI_COMM_WORLD, myrank, ier)
   if (myrank == 0) then
     print *, "----------------------------------------------------"
@@ -21,7 +21,7 @@
     print *, "----------------------------------------------------"
   endif
   call MPI_Abort(MPI_COMM_WORLD, code, ier)
-end subroutine 
+end subroutine
 
 !==============================================================================
 !> Initialize ADIOS and setup the xml output file

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -395,10 +395,10 @@
 !! \author MPBL
 subroutine read_adios_parameters(ADIOS_ENABLED, ADIOS_FOR_DATABASES,       &
                                  ADIOS_FOR_MESH, ADIOS_FOR_FORWARD_ARRAYS, &
-                                 ADIOS_FOR_KERNELS) 
+                                 ADIOS_FOR_KERNELS)
   implicit none
   include "constants.h"
-  
+
   logical, intent(out) :: ADIOS_ENABLED, ADIOS_FOR_DATABASES,       &
                           ADIOS_FOR_MESH, ADIOS_FOR_FORWARD_ARRAYS, &
                           ADIOS_FOR_KERNELS
@@ -418,9 +418,9 @@
     call read_value_logical(ADIOS_FOR_FORWARD_ARRAYS, &
                            'solver.ADIOS_FOR_FORWARD_ARRAYS')
     call read_value_logical(ADIOS_FOR_KERNELS, 'solver.ADIOS_FOR_KERNELS')
-  endif 
+  endif
   call close_parameter_file()
-        
+
 end subroutine read_adios_parameters
 
 

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/safe_alloc_mod.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/safe_alloc_mod.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/safe_alloc_mod.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -19,7 +19,7 @@
 module safe_alloc_mod
 
   implicit none
-  
+
   private
 
   public :: safe_alloc
@@ -117,7 +117,7 @@
 
   integer :: myrank, mpi_er
 
-  if(ier /= 0) then 
+  if(ier /= 0) then
     call MPI_Comm_rank(MPI_COMM_WORLD, myrank, mpi_er)
     if (present(usr_msg)) then
       write(error_unit, "('Process ', i6.6, " // &
@@ -138,11 +138,11 @@
   use mpi
 
   integer, intent(in) :: ier
-	character(len=*), intent(in), optional :: usr_msg
+  character(len=*), intent(in), optional :: usr_msg
 
   integer :: myrank, mpi_er
 
-  if(ier /= 0) then 
+  if(ier /= 0) then
     call MPI_Comm_rank(MPI_COMM_WORLD, myrank, mpi_er)
     if (present(usr_msg)) then
       write(error_unit, "('Process ', i6.6, " // &
@@ -158,81 +158,81 @@
 
 !==============================================================================
 !> Allocate a 1D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_float_1d(array, dim1, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_float_1d
 
 !==============================================================================
 !> Allocate a 2D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_float_2d(array, dim1, dim2, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_float_2d
 
 !==============================================================================
 !> Allocate a 3D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_float_3d(array, dim1, dim2, dim3, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_float_3d
 
 !==============================================================================
 !> Allocate a 4D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param dim4 The 4th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_float_4d(array, dim1, dim2, dim3, dim4, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_float_4d
 
 !==============================================================================
 !> Allocate a 1D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
@@ -240,94 +240,94 @@
 !! \param dim5 The 5th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_float_5d(array, dim1, dim2, dim3, dim4, dim5, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4, dim5
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4, dim5), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_float_5d
 
 !==============================================================================
 !> Allocate a 1D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_double_1d(array, dim1, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_double_1d
 
 !==============================================================================
 !> Allocate a 2D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_double_2d(array, dim1, dim2, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_double_2d
 
 !==============================================================================
 !> Allocate a 3D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_double_3d(array, dim1, dim2, dim3, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_double_3d
 
 !==============================================================================
 !> Allocate a 4D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param dim4 The 4th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_double_4d(array, dim1, dim2, dim3, dim4, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_double_4d
 
 !==============================================================================
 !> Allocate a 1D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
@@ -335,94 +335,94 @@
 !! \param dim5 The 5th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_double_5d(array, dim1, dim2, dim3, dim4, dim5, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4, dim5
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4, dim5), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_double_5d
 
 !==============================================================================
 !> Allocate a 1D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_int_1d(array, dim1, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_int_1d
 
 !==============================================================================
 !> Allocate a 2D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_int_2d(array, dim1, dim2, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_int_2d
 
 !==============================================================================
 !> Allocate a 3D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_int_3d(array, dim1, dim2, dim3, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_int_3d
 
 !==============================================================================
 !> Allocate a 4D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param dim4 The 4th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_int_4d(array, dim1, dim2, dim3, dim4, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_int_4d
 
 !==============================================================================
 !> Allocate a 1D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
@@ -430,94 +430,94 @@
 !! \param dim5 The 5th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_int_5d(array, dim1, dim2, dim3, dim4, dim5, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4, dim5
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4, dim5), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_int_5d
 
 !==============================================================================
 !> Allocate a 1D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_long_1d(array, dim1, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_long_1d
 
 !==============================================================================
 !> Allocate a 2D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_long_2d(array, dim1, dim2, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_long_2d
 
 !==============================================================================
 !> Allocate a 3D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_long_3d(array, dim1, dim2, dim3, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_long_3d
 
 !==============================================================================
 !> Allocate a 4D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param dim4 The 4th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_long_4d(array, dim1, dim2, dim3, dim4, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_long_4d
 
 !==============================================================================
 !> Allocate a 1D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
@@ -525,94 +525,94 @@
 !! \param dim5 The 5th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_long_5d(array, dim1, dim2, dim3, dim4, dim5, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4, dim5
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4, dim5), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_long_5d
 
 !!==============================================================================
 !!> Allocate a 1D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param dim1 The dimension of the array
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_alloc_byte_1d(array, dim1, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:), allocatable, intent(inout) :: array
   !integer, intent(in) :: dim1
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !allocate(array(dim1), stat=ier)
   !call check_alloc_err(ier, usr_msg)
 !end subroutine safe_alloc_byte_1d
 !
 !!==============================================================================
 !!> Allocate a 2D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param dim1 The 1st dimension of the array
 !!! \param dim2 The 2nd dimension of the array
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_alloc_byte_2d(array, dim1, dim2, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:), allocatable, intent(inout) :: array
   !integer, intent(in) :: dim1, dim2
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !allocate(array(dim1, dim2), stat=ier)
   !call check_alloc_err(ier, usr_msg)
 !end subroutine safe_alloc_byte_2d
 !
 !!==============================================================================
 !!> Allocate a 3D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param dim1 The 1st dimension of the array
 !!! \param dim2 The 2nd dimension of the array
 !!! \param dim3 The 3rd dimension of the array
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_alloc_byte_3d(array, dim1, dim2, dim3, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:,:), allocatable, intent(inout) :: array
   !integer, intent(in) :: dim1, dim2, dim3
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !allocate(array(dim1, dim2, dim3), stat=ier)
   !call check_alloc_err(ier, usr_msg)
 !end subroutine safe_alloc_byte_3d
 !
 !!==============================================================================
 !!> Allocate a 4D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param dim1 The 1st dimension of the array
 !!! \param dim2 The 2nd dimension of the array
 !!! \param dim3 The 3rd dimension of the array
 !!! \param dim4 The 4th dimension of the array
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_alloc_byte_4d(array, dim1, dim2, dim3, dim4, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:,:,:), allocatable, intent(inout) :: array
   !integer, intent(in) :: dim1, dim2, dim3, dim4
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !allocate(array(dim1, dim2, dim3, dim4), stat=ier)
   !call check_alloc_err(ier, usr_msg)
 !end subroutine safe_alloc_byte_4d
 !
 !!==============================================================================
 !!> Allocate a 1D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param dim1 The 1st dimension of the array
 !!! \param dim2 The 2nd dimension of the array
 !!! \param dim3 The 3rd dimension of the array
@@ -620,94 +620,94 @@
 !!! \param dim5 The 5th dimension of the array
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_alloc_byte_5d(array, dim1, dim2, dim3, dim4, dim5, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   !integer, intent(in) :: dim1, dim2, dim3, dim4, dim5
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !allocate(array(dim1, dim2, dim3, dim4, dim5), stat=ier)
   !call check_alloc_err(ier, usr_msg)
 !end subroutine safe_alloc_byte_5d
 
 !==============================================================================
 !> Allocate a 1D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_logical_1d(array, dim1, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_logical_1d
 
 !==============================================================================
 !> Allocate a 2D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_logical_2d(array, dim1, dim2, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_logical_2d
 
 !==============================================================================
 !> Allocate a 3D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_logical_3d(array, dim1, dim2, dim3, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_logical_3d
 
 !==============================================================================
 !> Allocate a 4D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param dim4 The 4th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_logical_4d(array, dim1, dim2, dim3, dim4, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_logical_4d
 
 !==============================================================================
 !> Allocate a 1D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
@@ -715,466 +715,466 @@
 !! \param dim5 The 5th dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_alloc_logical_5d(array, dim1, dim2, dim3, dim4, dim5, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   integer, intent(in) :: dim1, dim2, dim3, dim4, dim5
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   allocate(array(dim1, dim2, dim3, dim4, dim5), stat=ier)
   call check_alloc_err(ier, usr_msg)
 end subroutine safe_alloc_logical_5d
 
 !==============================================================================
 !> Deallocate a 1D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_float_1d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_float_1d
 
 !==============================================================================
 !> Deallocate a 2D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_float_2d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_float_2d
 
 !==============================================================================
 !> Deallocate a 3D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_float_3d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_float_3d
 
 !==============================================================================
 !> Deallocate a 4D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_float_4d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_float_4d
 
 !==============================================================================
 !> Deallocate a 5D float array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_float_5d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=4), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_float_5d
 
 !==============================================================================
 !> Deallocate a 1D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_double_1d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_double_1d
 
 !==============================================================================
 !> Deallocate a 2D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_double_2d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_double_2d
 
 !==============================================================================
 !> Deallocate a 3D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_double_3d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_double_3d
 
 !==============================================================================
 !> Deallocate a 4D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_double_4d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_double_4d
 
 !==============================================================================
 !> Deallocate a 5D double array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_double_5d(array, usr_msg)
-	! Arguments
+  ! Arguments
   real(kind=8), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_double_5d
 
 !==============================================================================
 !> Deallocate a 1D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_int_1d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_int_1d
 
 !==============================================================================
 !> Deallocate a 2D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_int_2d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_int_2d
 
 !==============================================================================
 !> Deallocate a 3D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_int_3d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_int_3d
 
 !==============================================================================
 !> Deallocate a 4D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_int_4d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_int_4d
 
 !==============================================================================
 !> Deallocate a 5D int array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_int_5d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=4), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_int_5d
 
 !==============================================================================
 !> Deallocate a 1D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_long_1d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_long_1d
 
 !==============================================================================
 !> Deallocate a 2D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_long_2d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_long_2d
 
 !==============================================================================
 !> Deallocate a 3D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !!dim1 The 1st dimension of the array
 !! \param dim2 The 2nd dimension of the array
 !! \param dim3 The 3rd dimension of the array
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_long_3d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_long_3d
 
 !==============================================================================
 !> Deallocate a 4D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_long_4d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_long_4d
 
 !==============================================================================
 !> Deallocate a 5D long array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_long_5d(array, usr_msg)
-	! Arguments
+  ! Arguments
   integer(kind=8), dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_long_5d
 
 !!==============================================================================
 !!> Deallocate a 1D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_dealloc_byte_1d(array, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:), allocatable, intent(inout) :: array
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !deallocate(array, stat=ier)
   !call check_dealloc_err(ier, usr_msg)
 !end subroutine safe_dealloc_byte_1d
 !
 !!==============================================================================
 !!> Deallocate a 2D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_dealloc_byte_2d(array, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:), allocatable, intent(inout) :: array
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !deallocate(array, stat=ier)
   !call check_dealloc_err(ier, usr_msg)
 !end subroutine safe_dealloc_byte_2d
 !
 !!==============================================================================
 !!> Deallocate a 3D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_dealloc_byte_3d(array, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:,:), allocatable, intent(inout) :: array
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !deallocate(array, stat=ier)
   !call check_dealloc_err(ier, usr_msg)
 !end subroutine safe_dealloc_byte_3d
 !
 !!==============================================================================
 !!> Deallocate a 4D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_dealloc_byte_4d(array, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:,:,:), allocatable, intent(inout) :: array
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !deallocate(array, stat=ier)
   !call check_dealloc_err(ier, usr_msg)
 !end subroutine safe_dealloc_byte_4d
 !
 !!==============================================================================
 !!> Deallocate a 5D byte array and check for errors
-!!! \param array The array to allocate 
+!!! \param array The array to allocate
 !!! \param usr_msg A custom error message to print if allocation fails.
 !subroutine safe_dealloc_byte_5d(array, usr_msg)
-	!! Arguments
+  !! Arguments
   !byte, dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   !character(len=*), intent(in), optional :: usr_msg
   !! Local parameters
   !integer :: ier
-!	
+!
   !deallocate(array, stat=ier)
   !call check_dealloc_err(ier, usr_msg)
 !end subroutine safe_dealloc_byte_5d
 
 !==============================================================================
 !> Deallocate a 1D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_logical_1d(array, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_logical_1d
 
 !==============================================================================
 !> Deallocate a 2D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_logical_2d(array, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_logical_2d
 
 !==============================================================================
 !> Deallocate a 3D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_logical_3d(array, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_logical_3d
 
 !==============================================================================
 !> Deallocate a 4D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_logical_4d(array, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_logical_4d
 
 !==============================================================================
 !> Deallocate a 1D logical array and check for errors
-!! \param array The array to allocate 
+!! \param array The array to allocate
 !! \param usr_msg A custom error message to print if allocation fails.
 subroutine safe_dealloc_logical_5d(array, usr_msg)
-	! Arguments
+  ! Arguments
   logical, dimension(:,:,:,:,:), allocatable, intent(inout) :: array
   character(len=*), intent(in), optional :: usr_msg
   ! Local parameters
   integer :: ier
-	
+
   deallocate(array, stat=ier)
   call check_dealloc_err(ier, usr_msg)
 end subroutine safe_dealloc_logical_5d

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/assemble_MPI_vector.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/assemble_MPI_vector.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/assemble_MPI_vector.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -829,7 +829,7 @@
                         Mesh_pointer, &
                         buffer_recv_scalar_ext_mesh,num_interfaces_ext_mesh, &
                         max_nibool_interfaces_ext_mesh, &
-                        nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
+!                       nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
                         request_send_scalar_ext_mesh,request_recv_scalar_ext_mesh, &
                         FORWARD_OR_ADJOINT)
 
@@ -852,8 +852,8 @@
   real(kind=CUSTOM_REAL), dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
        buffer_recv_scalar_ext_mesh
 
-  integer, dimension(num_interfaces_ext_mesh) :: nibool_interfaces_ext_mesh
-  integer, dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: ibool_interfaces_ext_mesh
+! integer, dimension(num_interfaces_ext_mesh) :: nibool_interfaces_ext_mesh
+! integer, dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: ibool_interfaces_ext_mesh
   integer, dimension(num_interfaces_ext_mesh) :: request_send_scalar_ext_mesh,request_recv_scalar_ext_mesh
 
   integer :: FORWARD_OR_ADJOINT

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_acoustic_calling_routine.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_acoustic_calling_routine.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_acoustic_calling_routine.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -594,8 +594,9 @@
       call assemble_MPI_scalar_write_cuda(NPROC,NGLOB_AB,potential_dot_dot_acoustic, &
                         Mesh_pointer,&
                         buffer_recv_scalar_ext_mesh, &
-                        num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
-                        nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
+                        num_interfaces_ext_mesh, &
+                        max_nibool_interfaces_ext_mesh, &
+!                       nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
                         request_send_scalar_ext_mesh,request_recv_scalar_ext_mesh, &
                         1)
 
@@ -604,8 +605,9 @@
         call assemble_MPI_scalar_write_cuda(NPROC,NGLOB_AB,b_potential_dot_dot_acoustic, &
                         Mesh_pointer, &
                         b_buffer_recv_scalar_ext_mesh, &
-                        num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
-                        nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
+                        num_interfaces_ext_mesh, &
+                        max_nibool_interfaces_ext_mesh, &
+!                       nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
                         b_request_send_scalar_ext_mesh,b_request_recv_scalar_ext_mesh, &
                         3)
       endif

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -100,7 +100,7 @@
                         num_abs_boundary_faces, &
                         veloc,rho_vp,rho_vs, &
                         ispec_is_elastic,SIMULATION_TYPE,SAVE_FORWARD, &
-                        NSTEP,it, &
+                        it, &
                         b_num_abs_boundary_faces,b_reclen_field,b_absorb_field,&
                         it_dsm,Veloc_dsm_boundary,Tract_dsm_boundary)
     endif

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_stacey_viscoelastic.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_stacey_viscoelastic.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_stacey_viscoelastic.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -35,7 +35,7 @@
                         num_abs_boundary_faces, &
                         veloc,rho_vp,rho_vs, &
                         ispec_is_elastic,SIMULATION_TYPE,SAVE_FORWARD, &
-                        NSTEP,it, &
+                        it, &
                         b_num_abs_boundary_faces,b_reclen_field,b_absorb_field, &
                         it_dsm,Veloc_dsm_boundary,Tract_dsm_boundary)
 
@@ -68,7 +68,7 @@
 
 ! adjoint simulations
   integer:: SIMULATION_TYPE
-  integer:: NSTEP,it
+  integer:: it
   integer:: b_num_abs_boundary_faces,b_reclen_field
   real(kind=CUSTOM_REAL),dimension(NDIM,NGLLSQUARE,b_num_abs_boundary_faces):: b_absorb_field
 

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/initialize_simulation.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/initialize_simulation.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/initialize_simulation.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -146,12 +146,12 @@
   ! reads in numbers of spectral elements and points for the part of the mesh handled by this process
   call create_name_database(prname,myrank,LOCAL_PATH)
   if (OLD_TEST_TO_FIX_ONE_DAY) call create_name_database(dsmname,myrank,TRAC_PATH)  !! VM VM
- 
 
+
   if (ADIOS_FOR_MESH) then
     call read_mesh_for_init(NSPEC_AB, NGLOB_AB)
   else
-	 open(unit=IIN,file=prname(1:len_trim(prname))//'external_mesh.bin',status='old',&
+   open(unit=IIN,file=prname(1:len_trim(prname))//'external_mesh.bin',status='old',&
           action='read',form='unformatted',iostat=ier)
     if( ier /= 0 ) then
       print*,'error: could not open database '

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -298,11 +298,11 @@
       call transfer_b_fields_to_device(NDIM*NGLOB_AB,b_displ,b_veloc,b_accel,Mesh_pointer)
       ! memory variables if attenuation
       if( ATTENUATION ) then
-        call transfer_b_fields_att_to_device(Mesh_pointer,                    & 
-                           b_R_xx,b_R_yy,b_R_xy,b_R_xz,b_R_yz,                & 
-                           size(b_R_xx),                                      & 
+        call transfer_b_fields_att_to_device(Mesh_pointer,                    &
+                           b_R_xx,b_R_yy,b_R_xy,b_R_xz,b_R_yz,                &
+                           size(b_R_xx),                                      &
                            b_epsilondev_xx,b_epsilondev_yy,b_epsilondev_xy,   &
-                           b_epsilondev_xz,b_epsilondev_yz,                   & 
+                           b_epsilondev_xz,b_epsilondev_yz,                   &
                            size(b_epsilondev_xx))
       endif
     endif

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -92,7 +92,7 @@
   logical, dimension(:),allocatable :: mask_ibool
 
   !MPI variables
-  integer :: sizeprocs,  ier
+  integer :: ier
 
   real(kind=CUSTOM_REAL), dimension(:,:,:,:),allocatable :: model_vp, model_vs, model_vp_new, model_vs_new
   real(kind=CUSTOM_REAL), dimension(:,:,:,:),allocatable :: model_dA, model_dB, total_model

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_forward_arrays_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_forward_arrays_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_forward_arrays_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -52,35 +52,35 @@
   integer(kind=8), pointer :: sel => null()
   integer(kind=8), dimension(1) :: start, count_ad
 
-  integer :: local_dim_potential_acoustic,            & 
-             local_dim_potential_dot_acoustic,        & 
-             local_dim_potential_dot_dot_acoustic,    & 
-             local_dim_displ,                         & 
-             local_dim_veloc,                         & 
-             local_dim_accel,                         & 
-             local_dim_R_xx,                          & 
-             local_dim_R_yy,                          & 
-             local_dim_R_xy,                          & 
-             local_dim_R_xz,                          & 
-             local_dim_R_yz,                          & 
-             local_dim_epsilondev_xx,                 & 
-             local_dim_epsilondev_yy,                 & 
-             local_dim_epsilondev_xy,                 & 
-             local_dim_epsilondev_xz,                 & 
-             local_dim_epsilondev_yz,                 & 
-             local_dim_R_trace,                       & 
-             local_dim_epsilondev_trace,              & 
-             local_dim_displs_poroelastic,            & 
-             local_dim_velocs_poroelastic,            & 
-             local_dim_accels_poroelastic,            & 
-             local_dim_displw_poroelastic,            & 
-             local_dim_velocw_poroelastic,            & 
+  integer :: local_dim_potential_acoustic,            &
+             local_dim_potential_dot_acoustic,        &
+             local_dim_potential_dot_dot_acoustic,    &
+             local_dim_displ,                         &
+             local_dim_veloc,                         &
+             local_dim_accel,                         &
+             local_dim_R_xx,                          &
+             local_dim_R_yy,                          &
+             local_dim_R_xy,                          &
+             local_dim_R_xz,                          &
+             local_dim_R_yz,                          &
+             local_dim_epsilondev_xx,                 &
+             local_dim_epsilondev_yy,                 &
+             local_dim_epsilondev_xy,                 &
+             local_dim_epsilondev_xz,                 &
+             local_dim_epsilondev_yz,                 &
+             local_dim_R_trace,                       &
+             local_dim_epsilondev_trace,              &
+             local_dim_displs_poroelastic,            &
+             local_dim_velocs_poroelastic,            &
+             local_dim_accels_poroelastic,            &
+             local_dim_displw_poroelastic,            &
+             local_dim_velocw_poroelastic,            &
              local_dim_accelw_poroelastic
 
   !-------------------------------------.
   ! Open ADIOS Database file, read mode |
   !-------------------------------------'
-  sel_num = 0             
+  sel_num = 0
 
   database_name = adjustl(LOCAL_PATH)
   database_name = database_name(1:len_trim(database_name)) // "/forward_arrays.bp"
@@ -99,7 +99,7 @@
                           local_dim_potential_dot_acoustic,ier)
     call adios_get_scalar(handle, "potential_dot_dot_acoustic/local_dim",&
                           local_dim_potential_dot_dot_acoustic,ier)
-  endif                          
+  endif
   if (ELASTIC_SIMULATION) then
     call adios_get_scalar(handle, "displ/local_dim",&
                           local_dim_displ,ier)
@@ -289,7 +289,7 @@
       call adios_schedule_read(handle, sel, "epsilondev_yz/array", 0, 1, &
                                b_epsilondev_yz, ier)
 
-      if(FULL_ATTENUATION_SOLID) then 
+      if(FULL_ATTENUATION_SOLID) then
         start(1) = local_dim_R_trace * myrank
         count_ad(1) = NGLLX * NGLLY * NGLLZ * NSPEC_ATTENUATION_AB_kappa * N_SLS
         sel_num = sel_num+1

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_mesh_databases_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_mesh_databases_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/read_mesh_databases_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -93,32 +93,32 @@
   integer(kind=8), pointer :: sel => null()
   integer(kind=8), dimension(1) :: start, count_ad
 
-  integer :: local_dim_ibool, local_dim_x_global, local_dim_y_global,          & 
-             local_dim_z_global, local_dim_xixstore, local_dim_xiystore,       & 
-             local_dim_xizstore, local_dim_etaxstore, local_dim_etaystore,     & 
-             local_dim_etazstore, local_dim_gammaxstore,                       & 
-             local_dim_gammaystore, local_dim_gammazstore,                     & 
-             local_dim_jacobianstore, local_dim_kappastore,                    & 
-             local_dim_mustore, local_dim_rhostore,                            & 
-             local_dim_ispec_is_acoustic, local_dim_ispec_is_elastic,          & 
-             local_dim_ispec_is_poroelastic, local_dim_rmass,                  & 
-             local_dim_rmass_ocean_load, local_dim_rmass_acoustic,             & 
-             local_dim_rmass_acoustic_interface, local_dim_rmass_elastic,      & 
-             local_dim_rmass_elastic_interface, local_dim_rho_vp,              & 
-             local_dim_rho_vs, local_dim_abs_boundary_ispec,                   & 
-             local_dim_abs_boundary_ijk, local_dim_abs_boundary_jacobian2Dw,   & 
-             local_dim_abs_boundary_normal, local_dim_ibelm_xmin,              & 
-             local_dim_ibelm_ymin, local_dim_ibelm_bottom,                     & 
-             local_dim_ibelm_top, local_dim_free_surface_ispec,                & 
-             local_dim_free_surface_ijk, local_dim_free_surface_jacobian2Dw,   & 
-             local_dim_free_surface_normal, local_dim_coupling_ac_el_ispec,    & 
+  integer :: local_dim_ibool, local_dim_x_global, local_dim_y_global,          &
+             local_dim_z_global, local_dim_xixstore, local_dim_xiystore,       &
+             local_dim_xizstore, local_dim_etaxstore, local_dim_etaystore,     &
+             local_dim_etazstore, local_dim_gammaxstore,                       &
+             local_dim_gammaystore, local_dim_gammazstore,                     &
+             local_dim_jacobianstore, local_dim_kappastore,                    &
+             local_dim_mustore, local_dim_rhostore,                            &
+             local_dim_ispec_is_acoustic, local_dim_ispec_is_elastic,          &
+             local_dim_ispec_is_poroelastic, local_dim_rmass,                  &
+             local_dim_rmass_ocean_load, local_dim_rmass_acoustic,             &
+             local_dim_rmass_acoustic_interface, local_dim_rmass_elastic,      &
+             local_dim_rmass_elastic_interface, local_dim_rho_vp,              &
+             local_dim_rho_vs, local_dim_abs_boundary_ispec,                   &
+             local_dim_abs_boundary_ijk, local_dim_abs_boundary_jacobian2Dw,   &
+             local_dim_abs_boundary_normal, local_dim_ibelm_xmin,              &
+             local_dim_ibelm_ymin, local_dim_ibelm_bottom,                     &
+             local_dim_ibelm_top, local_dim_free_surface_ispec,                &
+             local_dim_free_surface_ijk, local_dim_free_surface_jacobian2Dw,   &
+             local_dim_free_surface_normal, local_dim_coupling_ac_el_ispec,    &
              local_dim_coupling_ac_el_ijk,                                     &
-             local_dim_coupling_ac_el_jacobian2Dw,                             & 
-             local_dim_coupling_ac_el_normal, local_dim_my_neighbours_ext_mesh,& 
-             local_dim_nibool_interfaces_ext_mesh,                             & 
-             local_dim_ibool_interfaces_ext_mesh,                              & 
-             local_dim_ispec_is_inner, local_dim_phase_ispec_inner_acoustic,   & 
-             local_dim_phase_ispec_inner_elastic, local_dim_ibelm_xmax,        & 
+             local_dim_coupling_ac_el_jacobian2Dw,                             &
+             local_dim_coupling_ac_el_normal, local_dim_my_neighbours_ext_mesh,&
+             local_dim_nibool_interfaces_ext_mesh,                             &
+             local_dim_ibool_interfaces_ext_mesh,                              &
+             local_dim_ispec_is_inner, local_dim_phase_ispec_inner_acoustic,   &
+             local_dim_phase_ispec_inner_elastic, local_dim_ibelm_xmax,        &
              local_dim_ibelm_ymax, local_dim_rmass_solid_poroelastic,          &
              local_dim_rmass_fluid_poroelastic, local_dim_rhoarraystore,       &
              local_dim_kappaarraystore, local_dim_permstore,                   &
@@ -145,7 +145,7 @@
   !-------------------------------------.
   ! Open ADIOS Database file, read mode |
   !-------------------------------------'
-  sel_num = 0             
+  sel_num = 0
 
   database_name = adjustl(LOCAL_PATH)
   database_name = database_name(1:len_trim(database_name)) // "/external_mesh.bp"
@@ -169,7 +169,7 @@
   !----------------------------------------------.
   ! Fetch values to compute the simulation type. |
   !----------------------------------------------'
-  sel_num = 0             
+  sel_num = 0
   call adios_get_scalar(handle, "ispec_is_acoustic/local_dim",&
                         local_dim_ispec_is_acoustic,ier)
   call adios_get_scalar(handle, "ispec_is_elastic/local_dim",&
@@ -178,7 +178,7 @@
                         local_dim_ispec_is_poroelastic,ier)
 
   start(1) = local_dim_ispec_is_acoustic * myrank
-  count_ad(1) = NSPEC_AB 
+  count_ad(1) = NSPEC_AB
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -227,7 +227,7 @@
   ! Get scalar values. Might be differents for different processors. |
   ! Hence the selection writeblock.                                  |
   !------------------------------------------------------------------'
-  sel_num = 1             
+  sel_num = 1
   sel => selections(sel_num)
   call adios_selection_writeblock(sel, myrank)
 
@@ -371,7 +371,7 @@
                           local_dim_rmass_acoustic,ier)
     call adios_get_scalar(handle, "rmass_acoustic_interface/local_dim",&
                           local_dim_rmass_acoustic_interface,ier)
-  endif 
+  endif
   if( ELASTIC_SIMULATION ) then
     call adios_get_scalar(handle, "rmass/local_dim",&
                           local_dim_rmass,ier)
@@ -389,7 +389,7 @@
                           local_dim_rho_vp,ier)
     call adios_get_scalar(handle, "rho_vs/local_dim",&
                           local_dim_rho_vs,ier)
-  endif 
+  endif
   if( POROELASTIC_SIMULATION ) then
     call adios_get_scalar(handle, "rmass_solid_poroelastic/local_dim",&
                           local_dim_rmass_solid_poroelastic,ier)
@@ -413,7 +413,7 @@
                           local_dim_rho_vpII,ier)
     call adios_get_scalar(handle, "rho_vsI/local_dim",&
                           local_dim_rho_vsI,ier)
-  endif 
+  endif
   if( PML_CONDITIONS ) then
     if( nspec_cpml > 0 ) then
       call adios_get_scalar(handle, "CPML_regions/local_dim",&
@@ -620,8 +620,8 @@
     rmassz_acoustic(:) = 0._CUSTOM_REAL
   endif
 
-  ! this array is needed for acoustic simulations but also for elastic 
-  ! simulations with CPML, thus we now allocate it and read it in all 
+  ! this array is needed for acoustic simulations but also for elastic
+  ! simulations with CPML, thus we now allocate it and read it in all
   ! cases (whether the simulation is acoustic, elastic, or acoustic/elastic)
   allocate(rhostore(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier)
   if( ier /= 0 ) stop 'error allocating array rhostore'
@@ -710,7 +710,7 @@
             c66store(NGLLX,NGLLY,NGLLZ,NSPEC_ANISO),stat=ier)
     if( ier /= 0 ) stop 'error allocating array c11store etc.'
 
-    ! note: currently, they need to be defined, as they are used in the 
+    ! note: currently, they need to be defined, as they are used in the
     !       routine arguments for compute_forces_viscoelastic_Deville()
     allocate(R_xx(NGLLX,NGLLY,NGLLZ,NSPEC_ATTENUATION_AB,N_SLS), &
             R_yy(NGLLX,NGLLY,NGLLZ,NSPEC_ATTENUATION_AB,N_SLS), &
@@ -753,7 +753,7 @@
       allocate(rmass_ocean_load(1),stat=ier)
       if( ier /= 0 ) stop 'error allocating dummy array rmass_ocean_load'
     endif
-! TODO    
+! TODO
 #endif
   else
     ! no elastic attenuation & anisotropy
@@ -820,7 +820,7 @@
     if(ier /= 0) stop 'error allocating array is_CPML'
 
     ! make sure there are no PMLs by default,
-    ! and then below if NSPEC_CPML > 0 we will need the real flags 
+    ! and then below if NSPEC_CPML > 0 we will need the real flags
     ! for this mesh from the disk
     is_CPML(:) = .false.
 
@@ -856,7 +856,7 @@
       endif
     endif
   else
-    ! allocate with a dummy size of zero just to be able to use this array 
+    ! allocate with a dummy size of zero just to be able to use this array
     ! as argument in subroutine calls
     allocate(is_CPML(0),stat=ier)
   endif
@@ -1054,7 +1054,7 @@
 
   if( ACOUSTIC_SIMULATION ) then
     start(1) = local_dim_rmass_acoustic * myrank
-    count_ad(1) = NGLOB_AB 
+    count_ad(1) = NGLOB_AB
     sel_num = sel_num+1
     sel => selections(sel_num)
     call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1089,7 +1089,7 @@
     if( APPROXIMATE_OCEAN_LOAD ) then
       ! ocean mass matrix
       start(1) = local_dim_rmass_ocean_load * myrank
-      count_ad(1) = NGLOB_AB !nglob_ocean 
+      count_ad(1) = NGLOB_AB !nglob_ocean
       sel_num = sel_num+1
       sel => selections(sel_num)
       call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1111,7 +1111,7 @@
 
   if( POROELASTIC_SIMULATION ) then
     start(1) = local_dim_rmass_solid_poroelastic * myrank
-    count_ad(1) = NGLOB_AB 
+    count_ad(1) = NGLOB_AB
     sel_num = sel_num+1
     sel => selections(sel_num)
     call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1135,7 +1135,7 @@
     call adios_selection_boundingbox (sel , 1, start, count_ad)
     call adios_schedule_read(handle, sel, "kappaarraystore/array", 0, 1, &
                              kappaarraystore, ier)
-    
+
     start(1) = local_dim_permstore * myrank
     count_ad(1) =  6 * NGLLX * NGLLY * NGLLZ * NSPEC_AB
     sel_num = sel_num+1
@@ -1315,7 +1315,7 @@
           endif
           if(ACOUSTIC_SIMULATION) then
             start(1) = local_dim_rmassz_acoustic * myrank
-            count_ad(1) = NGLOB_AB ! == nglob_xy in generate_databse 
+            count_ad(1) = NGLOB_AB ! == nglob_xy in generate_databse
             sel_num = sel_num+1
             sel => selections(sel_num)
             call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1331,7 +1331,7 @@
   endif
 
   start(1) = local_dim_ibelm_xmin * myrank
-  count_ad(1) = nspec2D_xmin 
+  count_ad(1) = nspec2D_xmin
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1339,7 +1339,7 @@
                            ibelm_xmin, ier)
 
   start(1) = local_dim_ibelm_xmax * myrank
-  count_ad(1) = nspec2D_xmax 
+  count_ad(1) = nspec2D_xmax
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1347,7 +1347,7 @@
                            ibelm_xmax, ier)
 
   start(1) = local_dim_ibelm_ymin * myrank
-  count_ad(1) = nspec2D_ymin 
+  count_ad(1) = nspec2D_ymin
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1355,7 +1355,7 @@
                            ibelm_ymin, ier)
 
   start(1) = local_dim_ibelm_ymax * myrank
-  count_ad(1) = nspec2D_ymax 
+  count_ad(1) = nspec2D_ymax
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1363,7 +1363,7 @@
                            ibelm_ymax, ier)
 
   start(1) = local_dim_ibelm_bottom * myrank
-  count_ad(1) = nspec2D_bottom 
+  count_ad(1) = nspec2D_bottom
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1371,7 +1371,7 @@
                            ibelm_bottom, ier)
 
   start(1) = local_dim_ibelm_top * myrank
-  count_ad(1) = nspec2D_top 
+  count_ad(1) = nspec2D_top
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1598,7 +1598,7 @@
 
   ! inner / outer elements
   start(1) = local_dim_ispec_is_inner * myrank
-  count_ad(1) = NSPEC_AB 
+  count_ad(1) = NSPEC_AB
   sel_num = sel_num+1
   sel => selections(sel_num)
   call adios_selection_boundingbox (sel , 1, start, count_ad)
@@ -1785,7 +1785,7 @@
   !-------------------------------------.
   ! Open ADIOS Database file, read mode |
   !-------------------------------------'
-  sel_num = 0             
+  sel_num = 0
 
   database_name = adjustl(LOCAL_PATH)
   database_name = database_name(1:len_trim(database_name)) // "/moho.bp"
@@ -1809,7 +1809,7 @@
   !----------------------------------------------.
   ! Fetch values to compute the simulation type. |
   !----------------------------------------------'
-  sel_num = 0             
+  sel_num = 0
   call adios_get_scalar(handle, "ibelm_moho_bot/local_dim",&
                         local_dim_ibelm_moho_bot ,ier)
   call adios_get_scalar(handle, "ibelm_moho_top/local_dim",&

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_adjoint_kernels.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_adjoint_kernels.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_adjoint_kernels.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -30,7 +30,7 @@
 !==============================================================================
 ! \file save_adjoint_kernels
 !
-! TODO   
+! TODO
 ! * Better doxygen documentation.
 !==============================================================================
 
@@ -136,7 +136,7 @@
     call save_kernels_poroelastic(adios_handle)
   endif
 
-  ! save weights for volume integration, 
+  ! save weights for volume integration,
   ! in order to benchmark the kernels with analytical expressions
   if( SAVE_WEIGHTS ) then
     call save_weights_kernel()
@@ -171,7 +171,7 @@
 end subroutine save_adjoint_kernels
 
 !==============================================================================
-!> Save weights for volume integration, 
+!> Save weights for volume integration,
 !! in order to benchmark the kernels with analytical expressions.
 subroutine save_weights_kernel()
   use specfem_par
@@ -201,7 +201,7 @@
   if( ier /= 0 ) stop 'error opening file weights_kernel.bin'
   write(IOUT) weights_kernel
   close(IOUT)
-  
+
   deallocate(weights_kernel,stat=ier)
   if( ier /= 0 ) stop 'error allocating array weights_kernel'
 end subroutine save_weights_kernel

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_forward_arrays_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_forward_arrays_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_forward_arrays_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -32,7 +32,7 @@
 
 !==============================================================================
 !> \def STRINGIFY_VAR(a)
-!! Macro taking a variable and returning the stringified variable and 
+!! Macro taking a variable and returning the stringified variable and
 !! the variable itself.
 !! STRINGIFY_VAR(x) expand as:
 !!   "x", x
@@ -62,7 +62,7 @@
   integer(kind=8) :: group, handle
   integer(kind=8) :: groupsize, totalsize
   integer :: local_dim
-  
+
   !--- Variables to allreduce - wmax stands for world_max
   integer :: nglob_wmax, nspec_wmax, NSPEC_ATTENUATION_wmax, &
              NSPEC_STRAIN_wmax, NSPEC_ATTENUATION_kappa_wmax, N_SLS_wmax
@@ -103,19 +103,19 @@
   !------------------------.
   ! Define ADIOS Variables |
   !------------------------'
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly)) 
-  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz)) 
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllx))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(nglly))
+  call define_adios_scalar(group, groupsize, "", STRINGIFY_VAR(ngllz))
 
-  call define_adios_scalar(group, groupsize, "", "nglob", NGLOB_AB) 
+  call define_adios_scalar(group, groupsize, "", "nglob", NGLOB_AB)
   call define_adios_scalar(group, groupsize, "", &
-                           STRINGIFY_VAR(NSPEC_ATTENUATION_AB)) 
+                           STRINGIFY_VAR(NSPEC_ATTENUATION_AB))
   call define_adios_scalar(group, groupsize, "", &
-                           STRINGIFY_VAR(NSPEC_STRAIN_ONLY)) 
+                           STRINGIFY_VAR(NSPEC_STRAIN_ONLY))
   call define_adios_scalar(group, groupsize, "", &
-                           STRINGIFY_VAR(NSPEC_ATTENUATION_AB_kappa)) 
+                           STRINGIFY_VAR(NSPEC_ATTENUATION_AB_kappa))
   call define_adios_scalar(group, groupsize, "", &
-                           STRINGIFY_VAR(N_SLS)) 
+                           STRINGIFY_VAR(N_SLS))
 
   if( ACOUSTIC_SIMULATION ) then
     local_dim = nglob_wmax
@@ -274,7 +274,7 @@
   !----------------------------------.
   ! Perform the actual write to disk |
   !----------------------------------'
-  call adios_set_path(handle, "", ier)                          
+  call adios_set_path(handle, "", ier)
   call adios_close(handle, ier)
 
 end subroutine save_forward_arrays_adios

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_kernels_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_kernels_adios.F90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/save_kernels_adios.F90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -34,8 +34,8 @@
 !==============================================================================
 
 !> \def STRINGIFY_VAR(a)
-!! Macro taking a variable and returning the stringified variable and 
-!! the variable itself. 
+!! Macro taking a variable and returning the stringified variable and
+!! the variable itself.
 !! STRINGIFY_VAR(x) expand as:
 !!   "x", x
 !! x being the variable name inside the code.
@@ -67,7 +67,7 @@
   implicit none
 
   ! Parameters
-  integer(kind=8), intent(INOUT) :: handle 
+  integer(kind=8), intent(INOUT) :: handle
   logical, intent(IN) :: SAVE_WEIGHTS
   ! Variables
   character(len=256) :: output_name, group_name
@@ -96,14 +96,14 @@
 
   nspec_wmax = max_global_values(1)
 
-  call define_adios_scalar(group, groupsize, "", "nspec", NSPEC_AB) 
+  call define_adios_scalar(group, groupsize, "", "nspec", NSPEC_AB)
 
   local_dim = NGLLX * NGLLY * NGLLZ * nspec_wmax
 
   if( SAVE_WEIGHTS ) then
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", "weights_kernel", dummy_kernel)
-  endif                                   
+  endif
 
   if( ACOUSTIC_SIMULATION ) then
     call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -114,7 +114,7 @@
                                      "", "rhop_ac_kl", dummy_kernel)
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", "alpha_ac_kl", dummy_kernel)
-  endif                                   
+  endif
 
   if( ELASTIC_SIMULATION ) then
     if (ANISOTROPIC_KL) then
@@ -156,8 +156,8 @@
     if (SAVE_MOHO_MESH) then
       call define_adios_global_array1D(group, groupsize, local_dim, &
                                        "", "moho_kl", dummy_kernel)
-    endif                                   
-  endif                                   
+    endif
+  endif
 
   if( POROELASTIC_SIMULATION ) then
     call define_adios_global_array1D(group, groupsize, local_dim, &
@@ -200,7 +200,7 @@
                                      "", "cpII_kl", dummy_kernel)
     call define_adios_global_array1D(group, groupsize, local_dim, &
                                      "", "ratio_kl", dummy_kernel)
-  endif                                   
+  endif
 
   if ( APPROXIMATE_HESS_KL ) then
     if( ACOUSTIC_SIMULATION ) then
@@ -220,22 +220,22 @@
   call adios_open (handle, group_name, output_name, "w", comm, adios_err)
   call adios_group_size (handle, groupsize, adios_totalsize, adios_err)
 
-  call adios_write(handle, "nspec", NSPEC_AB, ier) 
+  call adios_write(handle, "nspec", NSPEC_AB, ier)
 end subroutine define_kernel_adios_variables
 
 !==============================================================================
 !> Perform the actual write of all the kernels variables to file.
-!! \param[IN] adios_handle The handle pointing on the open ADIOS file intended 
+!! \param[IN] adios_handle The handle pointing on the open ADIOS file intended
 !!                         to store kernels.
 !!
 !! \note Obviously this is a general routine that should be extracted and used
 !!       everywhere as the 'adios_handle' argument can be used for any kind of
 !!       ADIOS file.
-!!       The only reason such a routine is defined is to avoid using 
+!!       The only reason such a routine is defined is to avoid using
 !!       ADIOS modules in non ADIOS file, in case the ADIOS library is not
 !!       available on the system.
 subroutine perform_write_adios_kernels(handle)
-  
+
   use adios_write_mod
 
   implicit none
@@ -250,7 +250,7 @@
 
 
 !==============================================================================
-!> Save weights for volume integration, 
+!> Save weights for volume integration,
 !! in order to benchmark the kernels with analytical expressions.
 !subroutine save_weights_kernel_adios(weights_kernel)
   !use specfem_par
@@ -263,8 +263,8 @@
   !real(kind=CUSTOM_REAL), dimension(:,:,:,:), allocatable :: weights_kernel
 
   !!allocate(weights_kernel(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier)
-  
-  !return 
+
+  !return
 !end subroutine save_weights_kernel_adios
 
 !==============================================================================
@@ -282,7 +282,7 @@
   ! local parameters
   integer:: local_dim
 
-  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB 
+  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB
 
   call write_adios_global_1d_array(handle, myrank, sizeprocs, &
                                    local_dim, STRINGIFY_VAR(rho_ac_kl))
@@ -316,7 +316,7 @@
     alphav_kl,alphah_kl,betav_kl,betah_kl, &
     eta_kl, rhop_kl, alpha_kl, beta_kl
 
-  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB 
+  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB
 
   if (ANISOTROPIC_KL) then
     ! outputs transverse isotropic kernels only
@@ -384,7 +384,7 @@
   ! local parameters
   integer :: local_dim
 
-  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB 
+  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB
 
   ! primary kernels
   call write_adios_global_1d_array(handle, myrank, sizeprocs, &
@@ -453,7 +453,7 @@
   integer(kind=8), intent(in) :: handle
   integer :: local_dim
 
-  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB 
+  local_dim = NGLLX * NGLLY * NGLLZ * NSPEC_AB
 
   ! acoustic domains
   if( ACOUSTIC_SIMULATION ) then

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/specfem3D_adios_stubs.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/specfem3D_adios_stubs.f90	2013-09-20 22:02:44 UTC (rev 22827)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/specfem3D_adios_stubs.f90	2013-09-20 23:39:35 UTC (rev 22828)
@@ -4,7 +4,7 @@
 !!
 !!  Stubs for ADIOS functions. Avoid link error when not configured with
 !!  ADIOS.
-!!      
+!!
 !! \author MPBL
 !==============================================================================
 
@@ -15,19 +15,19 @@
 subroutine read_mesh_for_init()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine read_mesh_for_init 
+  call no_adios_err()
+end subroutine read_mesh_for_init
 
 subroutine read_mesh_databases_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine read_mesh_databases_adios
 
 subroutine read_moho_mesh_adjoint_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine read_moho_mesh_adjoint_adios
 
 !-----------------------------------------.
@@ -37,37 +37,37 @@
 subroutine define_kernel_adios_variables()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine define_kernel_adios_variables 
+  call no_adios_err()
+end subroutine define_kernel_adios_variables
 
 subroutine perform_write_adios_kernels()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine 
+  call no_adios_err()
+end subroutine
 
 subroutine save_kernels_acoustic_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine 
+  call no_adios_err()
+end subroutine
 
 subroutine save_kernels_elastic_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
-end subroutine 
+  call no_adios_err()
+end subroutine
 
 subroutine save_kernels_poroelastic_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine save_kernels_poroelastic_adios
 
 subroutine save_kernels_hessian_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine save_kernels_hessian_adios
 
 !------------------------------------------------.
@@ -77,7 +77,7 @@
 subroutine save_forward_arrays_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine save_forward_arrays_adios
 
 !------------------------------------------------.
@@ -87,6 +87,6 @@
 subroutine read_forward_arrays_adios()
   use adios_manager_mod
 
-  call no_adios_err()  
+  call no_adios_err()
 end subroutine read_forward_arrays_adios
 



More information about the CIG-COMMITS mailing list