[cig-commits] r21174 - seismo/2D/SPECFEM2D/trunk/src/specfem2D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sat Dec 15 17:07:50 PST 2012


Author: dkomati1
Date: 2012-12-15 17:07:50 -0800 (Sat, 15 Dec 2012)
New Revision: 21174

Modified:
   seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
Log:
added check of error code of some allocate() statements


Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90	2012-12-16 00:53:57 UTC (rev 21173)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90	2012-12-16 01:07:50 UTC (rev 21174)
@@ -3354,12 +3354,12 @@
                             coord,nglob,npgeo,factor_subsample_image)
 
     ! allocate an array for image data
-    allocate(image_color_data(NX_IMAGE_color,NZ_IMAGE_color))
-    allocate(image_color_vp_display(NX_IMAGE_color,NZ_IMAGE_color))
+    allocate(image_color_data(NX_IMAGE_color,NZ_IMAGE_color),stat=ier); if(ier /= 0) stop 'error in an allocate statement 1'
+    allocate(image_color_vp_display(NX_IMAGE_color,NZ_IMAGE_color),stat=ier); if(ier /= 0) stop 'error in an allocate statement 2'
 
     ! allocate an array for the grid point that corresponds to a given image data point
-    allocate(iglob_image_color(NX_IMAGE_color,NZ_IMAGE_color))
-    allocate(copy_iglob_image_color(NX_IMAGE_color,NZ_IMAGE_color))
+    allocate(iglob_image_color(NX_IMAGE_color,NZ_IMAGE_color),stat=ier); if(ier /= 0) stop 'error in an allocate statement 3'
+    allocate(copy_iglob_image_color(NX_IMAGE_color,NZ_IMAGE_color),stat=ier); if(ier /= 0) stop 'error in an allocate statement 4'
 
     ! creates pixels indexing
     call prepare_color_image_pixels(myrank,NX_IMAGE_color,NZ_IMAGE_color, &



More information about the CIG-COMMITS mailing list