[Yt-svn] yt-commit r1306 - trunk/yt/lagos/hop
    sskory at wrangler.dreamhost.com 
    sskory at wrangler.dreamhost.com
       
    Wed May 13 21:34:33 PDT 2009
    
    
  
Author: sskory
Date: Wed May 13 21:34:32 2009
New Revision: 1306
URL: http://yt.spacepope.org/changeset/1306
Log:
The old way of initializing these arrays was causing crashes on Kraken for very large my_comm->nb values (>1e6)
Modified:
   trunk/yt/lagos/hop/hop_regroup.c
Modified: trunk/yt/lagos/hop/hop_regroup.c
==============================================================================
--- trunk/yt/lagos/hop/hop_regroup.c	(original)
+++ trunk/yt/lagos/hop/hop_regroup.c	Wed May 13 21:34:32 2009
@@ -446,8 +446,11 @@
        the arrays should be no larger than my_comm->nb. 
        Skory.
     */
-    int g1temp[my_comm->nb], g2temp[my_comm->nb];
-    float denstemp[my_comm->nb];
+    int *g1temp,*g2temp;
+    float *denstemp;
+    g1temp = (int *)malloc(sizeof(int) * my_comm->nb);
+    g2temp = (int *)malloc(sizeof(int) * my_comm->nb);
+    denstemp = (int *)malloc(sizeof(int) * my_comm->nb);
     
     int temppos = 0;
     for(j=0;j<(my_comm->nb);j++) {
    
    
More information about the yt-svn
mailing list