[cig-commits] r21130 - seismo/3D/SPECFEM3D/trunk/src/generate_databases
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Tue Dec 11 06:48:46 PST 2012
Author: dkomati1
Date: 2012-12-11 06:48:46 -0800 (Tue, 11 Dec 2012)
New Revision: 21130
Modified:
seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_mass_matrices.f90
seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver.f90
seismo/3D/SPECFEM3D/trunk/src/generate_databases/setup_color_perm.f90
Log:
added status check for all allocate() statements (a few were missing)
Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_mass_matrices.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_mass_matrices.f90 2012-12-11 02:46:59 UTC (rev 21129)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_mass_matrices.f90 2012-12-11 14:48:46 UTC (rev 21130)
@@ -324,10 +324,7 @@
! elastic domains
if( ELASTIC_SIMULATION ) then
- allocate( rmassx(nglob_xy), &
- rmassy(nglob_xy), &
- rmassz(nglob_xy), &
- stat=ier)
+ allocate( rmassx(nglob_xy), rmassy(nglob_xy), rmassz(nglob_xy), stat=ier)
if(ier /= 0) stop 'error in allocate 21'
rmassx(:) = 0._CUSTOM_REAL
rmassy(:) = 0._CUSTOM_REAL
@@ -336,8 +333,7 @@
! acoustic domains
if( ACOUSTIC_SIMULATION ) then
- allocate( rmassz_acoustic(nglob_xy), &
- stat=ier)
+ allocate( rmassz_acoustic(nglob_xy), stat=ier)
if(ier /= 0) stop 'error in allocate 22'
rmassz_acoustic(:) = 0._CUSTOM_REAL
endif
Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver.f90 2012-12-11 02:46:59 UTC (rev 21129)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/save_arrays_solver.f90 2012-12-11 14:48:46 UTC (rev 21130)
@@ -539,16 +539,6 @@
deallocate(v_tmp_i,iglob_tmp)
endif !if( ACOUSTIC_SIMULATION .and. POROELASTIC_SIMULATION
-! ! saves material flag assigned for each spectral element into a vtk file
-! prname_file = prname(1:len_trim(prname))//'material_flag'
-! allocate(elem_flag(nspec))
-! elem_flag(:) = mat_ext_mesh(1,:)
-! call write_VTK_data_elem_i(nspec,nglob_dummy, &
-! xstore_dummy,ystore_dummy,zstore_dummy,ibool, &
-! elem_flag,prname_file)
-! deallocate(elem_flag)
-! endif
-
endif ! DEBUG
end subroutine save_arrays_solver_files
Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/setup_color_perm.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/setup_color_perm.f90 2012-12-11 02:46:59 UTC (rev 21129)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/setup_color_perm.f90 2012-12-11 14:48:46 UTC (rev 21130)
@@ -563,12 +563,14 @@
! permutes all required mesh arrays according to new ordering
! permutation of ibool
- allocate(temp_array_int(NGLLX,NGLLY,NGLLZ,nspec))
+ allocate(temp_array_int(NGLLX,NGLLY,NGLLZ,nspec),stat=ier)
+ if( ier /= 0 ) stop 'error allocating temporary temp_array_int'
call permute_elements_integer(ibool,temp_array_int,perm,nspec)
deallocate(temp_array_int)
! element domain flags
- allocate(temp_array_logical_1D(nspec))
+ allocate(temp_array_logical_1D(nspec),stat=ier)
+ if( ier /= 0 ) stop 'error allocating temporary temp_array_logical_1D'
call permute_elements_logical1D(ispec_is_acoustic,temp_array_logical_1D,perm,nspec)
call permute_elements_logical1D(ispec_is_elastic,temp_array_logical_1D,perm,nspec)
call permute_elements_logical1D(ispec_is_poroelastic,temp_array_logical_1D,perm,nspec)
@@ -576,7 +578,8 @@
deallocate(temp_array_logical_1D)
! mesh arrays
- allocate(temp_array_real(NGLLX,NGLLY,NGLLZ,nspec))
+ allocate(temp_array_real(NGLLX,NGLLY,NGLLZ,nspec),stat=ier)
+ if( ier /= 0 ) stop 'error allocating temporary temp_array_real'
call permute_elements_real(xixstore,temp_array_real,perm,nspec)
call permute_elements_real(xiystore,temp_array_real,perm,nspec)
call permute_elements_real(xizstore,temp_array_real,perm,nspec)
@@ -679,7 +682,8 @@
! moho surface
if( NSPEC2D_MOHO > 0 ) then
- allocate(temp_array_logical_1D(nspec))
+ allocate(temp_array_logical_1D(nspec),stat=ier)
+ if( ier /= 0 ) stop 'error allocating temporary temp_array_logical_1D'
call permute_elements_logical1D(is_moho_top,temp_array_logical_1D,perm,nspec)
call permute_elements_logical1D(is_moho_bot,temp_array_logical_1D,perm,nspec)
deallocate(temp_array_logical_1D)
More information about the CIG-COMMITS
mailing list