From e86b72cb2b6850eea3a29178a44f6992ca3ae5de Mon Sep 17 00:00:00 2001 From: eschnett Date: Wed, 30 Oct 2013 15:38:58 +0000 Subject: Use CCTK_ERROR for errors git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TwoPunctures/trunk@136 b2a53a04-0f4f-0410-87ed-f9f25ced00cf --- src/TP_utilities.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/TP_utilities.c b/src/TP_utilities.c index cca944d..a11aee1 100644 --- a/src/TP_utilities.c +++ b/src/TP_utilities.c @@ -18,7 +18,7 @@ ivector (long nl, long nh) retval = malloc(sizeof(int)*(nh-nl+1)); if(retval == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure in ivector()"); + CCTK_ERROR ("allocation failure in ivector()"); return retval - nl; } @@ -32,7 +32,7 @@ dvector (long nl, long nh) retval = malloc(sizeof(CCTK_REAL)*(nh-nl+1)); if(retval == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure in dvector()"); + CCTK_ERROR ("allocation failure in dvector()"); return retval - nl; } @@ -46,12 +46,12 @@ imatrix (long nrl, long nrh, long ncl, long nch) retval = malloc(sizeof(int *)*(nrh-nrl+1)); if(retval == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (1) in imatrix()"); + CCTK_ERROR ("allocation failure (1) in imatrix()"); /* get all memory for the matrix in on chunk */ retval[0] = malloc(sizeof(int)*(nrh-nrl+1)*(nch-ncl+1)); if(retval[0] == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (2) in imatrix()"); + CCTK_ERROR ("allocation failure (2) in imatrix()"); /* apply column and row offsets */ retval[0] -= ncl; @@ -75,12 +75,12 @@ dmatrix (long nrl, long nrh, long ncl, long nch) retval = malloc(sizeof(CCTK_REAL *)*(nrh-nrl+1)); if(retval == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (1) in dmatrix()"); + CCTK_ERROR ("allocation failure (1) in dmatrix()"); /* get all memory for the matrix in on chunk */ retval[0] = malloc(sizeof(CCTK_REAL)*(nrh-nrl+1)*(nch-ncl+1)); if(retval[0] == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (2) in dmatrix()"); + CCTK_ERROR ("allocation failure (2) in dmatrix()"); /* apply column and row offsets */ retval[0] -= ncl; @@ -105,16 +105,16 @@ d3tensor (long nrl, long nrh, long ncl, long nch, long ndl, long ndh) /* get memory for index structures */ retval = malloc(sizeof(CCTK_REAL **)*(nrh-nrl+1)); if(retval == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (1) in dmatrix()"); + CCTK_ERROR ("allocation failure (1) in d3tensor()"); retval[0] = malloc(sizeof(CCTK_REAL *)*(nrh-nrl+1)*(nch-ncl+1)); if(retval[0] == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (2) in dmatrix()"); + CCTK_ERROR ("allocation failure (2) in d3tensor()"); /* get all memory for the tensor in on chunk */ retval[0][0] = malloc(sizeof(CCTK_REAL)*(nrh-nrl+1)*(nch-ncl+1)*(ndh-ndl+1)); if(retval[0][0] == NULL) - CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (3) in dmatrix()"); + CCTK_ERROR ("allocation failure (3) in d3tensor()"); /* apply all offsets */ retval[0][0] -= ndl; @@ -180,7 +180,7 @@ free_dmatrix (CCTK_REAL **m, long nrl, long nrh, long ncl, long nch) void free_d3tensor (CCTK_REAL ***t, long nrl, long nrh, long ncl, long nch, long ndl, long ndh) -/* free a CCTK_REAL f3tensor allocated by f3tensor() */ +/* free a CCTK_REAL d3tensor allocated by d3tensor() */ { free(t[nrl][ncl]+ndl); free(t[nrl]+ncl); -- cgit v1.2.3