diff --git a/include/common.h b/include/common.h index b76b0068e..008b79843 100644 --- a/include/common.h +++ b/include/common.h @@ -29,7 +29,7 @@ typedef char ErrorMsg[_ERRORMSGSIZE_]; /**< Generic error messages (there is such a field in each structure) */ #define _FILENAMESIZE_ 256 /**< size of the string read in each line of the file (extra characters not taken into account) */ -#define _BASEPATHSIZE_ 1000 /**< allowed size of the base path */ +#define _BASEPATHSIZE_ 1024 /**< allowed size of the base path */ typedef char FileName[_FILENAMESIZE_+_BASEPATHSIZE_]; #define _SUFFIXNAMESIZE_ 4 /**< maximum size of the short string appended to file names to account for initial conditions, etc. */ diff --git a/tools/evolver_ndf15.c b/tools/evolver_ndf15.c index 0d2937235..f379fe361 100644 --- a/tools/evolver_ndf15.c +++ b/tools/evolver_ndf15.c @@ -119,9 +119,9 @@ int evolver_ndf15( buffer_size= 15*neqp*sizeof(double) - +neqp*sizeof(int) +neqp*sizeof(double*) - +(7*neq+1)*sizeof(double); + +(7*neq+1)*sizeof(double) + +neqp*sizeof(int); /* the double and double* (pointer) are 8-bit. For odd neqp, it happens that the int (4-bit) misaligns the memory */ class_alloc(buffer, buffer_size, @@ -143,10 +143,12 @@ int evolver_ndf15( tempvec1 =yppinterp+neqp; tempvec2 =tempvec1+neqp; - interpidx=(int*)(tempvec2+neqp); + /*interpidx=(int*)(tempvec2+neqp); - dif =(double**)(interpidx+neqp); + dif =(double**)(interpidx+neqp);*/ + dif = (double **)(tempvec2 + neqp); dif[1] =(double*)(dif+neqp); + interpidx=(int *)(dif[1] + 7 * neq + 1); /* put int array last for memory alignment */ for(j=2;j<=neq;j++) dif[j] = dif[j-1]+7; /* Set row pointers... */ dif[0] = NULL; /* for (ii=0;ii<(7*neq+1);ii++) dif[1][ii]=0.; */ diff --git a/tools/hyperspherical.c b/tools/hyperspherical.c index 937d83645..9489fb7e9 100644 --- a/tools/hyperspherical.c +++ b/tools/hyperspherical.c @@ -1029,7 +1029,7 @@ int hyperspherical_get_xmin(HyperInterpStruct *pHIS, int left_index, right_index, index_l, j; int nl = pHIS->l_size; int nx = pHIS->x_size; - int REFINE=10; + const int REFINE=10; double x[REFINE]; double Phi[REFINE]; double *phivec = pHIS->phi;