Commit 868579776a4c69863163494660ad31a4355e8048

Authored by KMG
2 parents c94348f7 11dc3fcb

Merge pull request #2 from dachary/wip-exit

Merging a set of commits from Loic: Use assert(0) to exit(1) and clean-up some of the test code.
Examples/Makefile.am
@@ -27,7 +27,7 @@ bin_PROGRAMS = jerasure_01 \ @@ -27,7 +27,7 @@ bin_PROGRAMS = jerasure_01 \
27 27
28 check_PROGRAMS = 28 check_PROGRAMS =
29 29
30 -TESTS=test_all_gfs.sh $(check_PROGRAMS) 30 +TESTS=test_all_gfs.sh encode_decode.sh $(check_PROGRAMS)
31 31
32 dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh 32 dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh
33 33
Examples/decoder.c
@@ -62,6 +62,7 @@ same arguments, and encoder.c does error check. @@ -62,6 +62,7 @@ same arguments, and encoder.c does error check.
62 #include <stdlib.h> 62 #include <stdlib.h>
63 #include <string.h> 63 #include <string.h>
64 #include <time.h> 64 #include <time.h>
  65 +#include <assert.h>
65 #include <unistd.h> 66 #include <unistd.h>
66 #include <sys/time.h> 67 #include <sys/time.h>
67 #include <sys/stat.h> 68 #include <sys/stat.h>
@@ -104,12 +105,11 @@ int main (int argc, char **argv) { @@ -104,12 +105,11 @@ int main (int argc, char **argv) {
104 char *c_tech; 105 char *c_tech;
105 106
106 int i, j; // loop control variable, s 107 int i, j; // loop control variable, s
107 - int blocksize; // size of individual files 108 + int blocksize = 0; // size of individual files
108 int origsize; // size of file before padding 109 int origsize; // size of file before padding
109 int total; // used to write data, not padding to file 110 int total; // used to write data, not padding to file
110 struct stat status; // used to find size of individual files 111 struct stat status; // used to find size of individual files
111 int numerased; // number of erased files 112 int numerased; // number of erased files
112 - int dummy;  
113 113
114 /* Used to recreate file names */ 114 /* Used to recreate file names */
115 char *temp; 115 char *temp;
@@ -138,8 +138,8 @@ int main (int argc, char **argv) { @@ -138,8 +138,8 @@ int main (int argc, char **argv) {
138 fprintf(stderr, "usage: inputfile\n"); 138 fprintf(stderr, "usage: inputfile\n");
139 exit(0); 139 exit(0);
140 } 140 }
141 - curdir = (char *)malloc(sizeof(char)*100);  
142 - getcwd(curdir, 100); 141 + curdir = (char *)malloc(sizeof(char)*1000);
  142 + assert(curdir == getcwd(curdir, 1000));
143 143
144 /* Begin recreation of file names */ 144 /* Begin recreation of file names */
145 cs1 = (char*)malloc(sizeof(char)*strlen(argv[1])); 145 cs1 = (char*)malloc(sizeof(char)*strlen(argv[1]));
@@ -270,11 +270,11 @@ int main (int argc, char **argv) { @@ -270,11 +270,11 @@ int main (int argc, char **argv) {
270 stat(fname, &status); 270 stat(fname, &status);
271 blocksize = status.st_size; 271 blocksize = status.st_size;
272 data[i-1] = (char *)malloc(sizeof(char)*blocksize); 272 data[i-1] = (char *)malloc(sizeof(char)*blocksize);
273 - dummy = fread(data[i-1], sizeof(char), blocksize, fp); 273 + assert(blocksize == fread(data[i-1], sizeof(char), blocksize, fp));
274 } 274 }
275 else { 275 else {
276 fseek(fp, blocksize*(n-1), SEEK_SET); 276 fseek(fp, blocksize*(n-1), SEEK_SET);
277 - dummy = fread(data[i-1], sizeof(char), buffersize/k, fp); 277 + assert(buffersize/k == fread(data[i-1], sizeof(char), buffersize/k, fp));
278 } 278 }
279 fclose(fp); 279 fclose(fp);
280 } 280 }
@@ -293,11 +293,11 @@ int main (int argc, char **argv) { @@ -293,11 +293,11 @@ int main (int argc, char **argv) {
293 stat(fname, &status); 293 stat(fname, &status);
294 blocksize = status.st_size; 294 blocksize = status.st_size;
295 coding[i-1] = (char *)malloc(sizeof(char)*blocksize); 295 coding[i-1] = (char *)malloc(sizeof(char)*blocksize);
296 - dummy = fread(coding[i-1], sizeof(char), blocksize, fp); 296 + assert(blocksize == fread(coding[i-1], sizeof(char), blocksize, fp));
297 } 297 }
298 else { 298 else {
299 fseek(fp, blocksize*(n-1), SEEK_SET); 299 fseek(fp, blocksize*(n-1), SEEK_SET);
300 - dummy = fread(coding[i-1], sizeof(char), blocksize, fp); 300 + assert(blocksize == fread(coding[i-1], sizeof(char), blocksize, fp));
301 } 301 }
302 fclose(fp); 302 fclose(fp);
303 } 303 }
Examples/encode_decode.sh 0 → 100755
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
  1 +#!/bin/bash -e
  2 +#
  3 +# Copyright (C) 2014 Red Hat <contact@redhat.com>
  4 +#
  5 +# Author: Loic Dachary <loic@dachary.org>
  6 +#
  7 +# This program is free software; you can redistribute it and/or modify
  8 +# it under the terms of the GNU Library Public License as published by
  9 +# the Free Software Foundation; either version 2, or (at your option)
  10 +# any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU Library Public License for more details.
  16 +#
  17 +trap "rm -fr T Coding" EXIT
  18 +
  19 +dd if=/dev/urandom of=T bs=4096 count=1
  20 +./encoder T 3 2 reed_sol_van 8 0 0
  21 +./decoder T
Examples/encoder.c
@@ -326,7 +326,7 @@ int main (int argc, char **argv) { @@ -326,7 +326,7 @@ int main (int argc, char **argv) {
326 326
327 /* Get current working directory for construction of file names */ 327 /* Get current working directory for construction of file names */
328 curdir = (char*)malloc(sizeof(char)*1000); 328 curdir = (char*)malloc(sizeof(char)*1000);
329 - getcwd(curdir, 1000); 329 + assert(curdir == getcwd(curdir, 1000));
330 330
331 if (argv[1][0] != '-') { 331 if (argv[1][0] != '-') {
332 332
Examples/test_all_gfs.sh
1 -# 1 +#!/bin/bash
2 # 2 #
3 # Copyright (c) 2013, James S. Plank and Kevin Greenan 3 # Copyright (c) 2013, James S. Plank and Kevin Greenan
4 # All rights reserved. 4 # All rights reserved.
@@ -42,6 +42,11 @@ k=12 @@ -42,6 +42,11 @@ k=12
42 m=3 42 m=3
43 seed=1370 43 seed=1370
44 44
  45 +if ! test -x ${GF_METHODS} ; then
  46 + ${GF_METHODS}
  47 + exit 1
  48 +fi
  49 +
45 # Test all w=8 50 # Test all w=8
46 ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' | 51 ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' |
47 while read method; do 52 while read method; do
@@ -48,6 +48,7 @@ @@ -48,6 +48,7 @@
48 #include <stdlib.h> 48 #include <stdlib.h>
49 #include <string.h> 49 #include <string.h>
50 #include <errno.h> 50 #include <errno.h>
  51 +#include <assert.h>
51 52
52 #include "galois.h" 53 #include "galois.h"
53 54
@@ -78,25 +79,25 @@ gf_t* galois_init_field(int w, @@ -78,25 +79,25 @@ gf_t* galois_init_field(int w,
78 79
79 if (w <= 0 || w > 32) { 80 if (w <= 0 || w > 32) {
80 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w); 81 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w);
81 - exit(1); 82 + assert(0);
82 } 83 }
83 84
84 gfp = (gf_t *) malloc(sizeof(gf_t)); 85 gfp = (gf_t *) malloc(sizeof(gf_t));
85 if (!gfp) { 86 if (!gfp) {
86 fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w); 87 fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w);
87 - exit(1); 88 + assert(0);
88 } 89 }
89 90
90 scratch_size = gf_scratch_size(w, mult_type, region_type, divide_type, arg1, arg2); 91 scratch_size = gf_scratch_size(w, mult_type, region_type, divide_type, arg1, arg2);
91 if (!scratch_size) { 92 if (!scratch_size) {
92 fprintf(stderr, "ERROR -- cannot get scratch size for base field w=%d\n", w); 93 fprintf(stderr, "ERROR -- cannot get scratch size for base field w=%d\n", w);
93 - exit(1); 94 + assert(0);
94 } 95 }
95 96
96 scratch_memory = malloc(scratch_size); 97 scratch_memory = malloc(scratch_size);
97 if (!scratch_memory) { 98 if (!scratch_memory) {
98 fprintf(stderr, "ERROR -- cannot get scratch memory for base field w=%d\n", w); 99 fprintf(stderr, "ERROR -- cannot get scratch memory for base field w=%d\n", w);
99 - exit(1); 100 + assert(0);
100 } 101 }
101 102
102 if(!gf_init_hard(gfp, 103 if(!gf_init_hard(gfp,
@@ -111,7 +112,7 @@ gf_t* galois_init_field(int w, @@ -111,7 +112,7 @@ gf_t* galois_init_field(int w,
111 scratch_memory)) 112 scratch_memory))
112 { 113 {
113 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w); 114 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w);
114 - exit(1); 115 + assert(0);
115 } 116 }
116 117
117 gfp_is_composite[w] = 0; 118 gfp_is_composite[w] = 0;
@@ -130,25 +131,25 @@ gf_t* galois_init_composite_field(int w, @@ -130,25 +131,25 @@ gf_t* galois_init_composite_field(int w,
130 131
131 if (w <= 0 || w > 32) { 132 if (w <= 0 || w > 32) {
132 fprintf(stderr, "ERROR -- cannot init composite field for w=%d\n", w); 133 fprintf(stderr, "ERROR -- cannot init composite field for w=%d\n", w);
133 - exit(1); 134 + assert(0);
134 } 135 }
135 136
136 gfp = (gf_t *) malloc(sizeof(gf_t)); 137 gfp = (gf_t *) malloc(sizeof(gf_t));
137 if (!gfp) { 138 if (!gfp) {
138 fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w); 139 fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w);
139 - exit(1); 140 + assert(0);
140 } 141 }
141 142
142 scratch_size = gf_scratch_size(w, GF_MULT_COMPOSITE, region_type, divide_type, degree, 0); 143 scratch_size = gf_scratch_size(w, GF_MULT_COMPOSITE, region_type, divide_type, degree, 0);
143 if (!scratch_size) { 144 if (!scratch_size) {
144 fprintf(stderr, "ERROR -- cannot get scratch size for composite field w=%d\n", w); 145 fprintf(stderr, "ERROR -- cannot get scratch size for composite field w=%d\n", w);
145 - exit(1); 146 + assert(0);
146 } 147 }
147 148
148 scratch_memory = malloc(scratch_size); 149 scratch_memory = malloc(scratch_size);
149 if (!scratch_memory) { 150 if (!scratch_memory) {
150 fprintf(stderr, "ERROR -- cannot get scratch memory for composite field w=%d\n", w); 151 fprintf(stderr, "ERROR -- cannot get scratch memory for composite field w=%d\n", w);
151 - exit(1); 152 + assert(0);
152 } 153 }
153 154
154 if(!gf_init_hard(gfp, 155 if(!gf_init_hard(gfp,
@@ -163,7 +164,7 @@ gf_t* galois_init_composite_field(int w, @@ -163,7 +164,7 @@ gf_t* galois_init_composite_field(int w,
163 scratch_memory)) 164 scratch_memory))
164 { 165 {
165 fprintf(stderr, "ERROR -- cannot init default composite field for w=%d\n", w); 166 fprintf(stderr, "ERROR -- cannot init default composite field for w=%d\n", w);
166 - exit(1); 167 + assert(0);
167 } 168 }
168 gfp_is_composite[w] = 1; 169 gfp_is_composite[w] = 1;
169 return gfp; 170 return gfp;
@@ -197,17 +198,17 @@ static void galois_init(int w) @@ -197,17 +198,17 @@ static void galois_init(int w)
197 { 198 {
198 if (w <= 0 || w > 32) { 199 if (w <= 0 || w > 32) {
199 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w); 200 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w);
200 - exit(1); 201 + assert(0);
201 } 202 }
202 203
203 switch (galois_init_default_field(w)) { 204 switch (galois_init_default_field(w)) {
204 case ENOMEM: 205 case ENOMEM:
205 fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w); 206 fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w);
206 - exit(1); 207 + assert(0);
207 break; 208 break;
208 case EINVAL: 209 case EINVAL:
209 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w); 210 fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w);
210 - exit(1); 211 + assert(0);
211 break; 212 break;
212 } 213 }
213 } 214 }
@@ -246,12 +247,12 @@ void galois_change_technique(gf_t *gf, int w) @@ -246,12 +247,12 @@ void galois_change_technique(gf_t *gf, int w)
246 { 247 {
247 if (w <= 0 || w > 32) { 248 if (w <= 0 || w > 32) {
248 fprintf(stderr, "ERROR -- cannot support Galois field for w=%d\n", w); 249 fprintf(stderr, "ERROR -- cannot support Galois field for w=%d\n", w);
249 - exit(1); 250 + assert(0);
250 } 251 }
251 252
252 if (!is_valid_gf(gf, w)) { 253 if (!is_valid_gf(gf, w)) {
253 fprintf(stderr, "ERROR -- overriding with invalid Galois field for w=%d\n", w); 254 fprintf(stderr, "ERROR -- overriding with invalid Galois field for w=%d\n", w);
254 - exit(1); 255 + assert(0);
255 } 256 }
256 257
257 if (gfp_array[w] != NULL) { 258 if (gfp_array[w] != NULL) {
src/jerasure.c
@@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
47 #include <stdio.h> 47 #include <stdio.h>
48 #include <stdlib.h> 48 #include <stdlib.h>
49 #include <string.h> 49 #include <string.h>
  50 +#include <assert.h>
50 51
51 #include "galois.h" 52 #include "galois.h"
52 #include "jerasure.h" 53 #include "jerasure.h"
@@ -311,7 +312,7 @@ void jerasure_matrix_encode(int k, int m, int w, int *matrix, @@ -311,7 +312,7 @@ void jerasure_matrix_encode(int k, int m, int w, int *matrix,
311 312
312 if (w != 8 && w != 16 && w != 32) { 313 if (w != 8 && w != 16 && w != 32) {
313 fprintf(stderr, "ERROR: jerasure_matrix_encode() and w is not 8, 16 or 32\n"); 314 fprintf(stderr, "ERROR: jerasure_matrix_encode() and w is not 8, 16 or 32\n");
314 - exit(1); 315 + assert(0);
315 } 316 }
316 317
317 for (i = 0; i < m; i++) { 318 for (i = 0; i < m; i++) {
@@ -328,7 +329,7 @@ void jerasure_bitmatrix_dotprod(int k, int w, int *bitmatrix_row, @@ -328,7 +329,7 @@ void jerasure_bitmatrix_dotprod(int k, int w, int *bitmatrix_row,
328 329
329 if (size%(w*packetsize) != 0) { 330 if (size%(w*packetsize) != 0) {
330 fprintf(stderr, "jerasure_bitmatrix_dotprod - size%c(w*packetsize)) must = 0\n", '%'); 331 fprintf(stderr, "jerasure_bitmatrix_dotprod - size%c(w*packetsize)) must = 0\n", '%');
331 - exit(1); 332 + assert(0);
332 } 333 }
333 334
334 bpptr = (dest_id < k) ? data_ptrs[dest_id] : coding_ptrs[dest_id-k]; 335 bpptr = (dest_id < k) ? data_ptrs[dest_id] : coding_ptrs[dest_id-k];
@@ -567,7 +568,7 @@ void jerasure_free_schedule_cache(int k, int m, int ***cache) @@ -567,7 +568,7 @@ void jerasure_free_schedule_cache(int k, int m, int ***cache)
567 568
568 if (m != 2) { 569 if (m != 2) {
569 fprintf(stderr, "jerasure_free_schedule_cache(): m must equal 2\n"); 570 fprintf(stderr, "jerasure_free_schedule_cache(): m must equal 2\n");
570 - exit(1); 571 + assert(0);
571 } 572 }
572 573
573 for (e1 = 0; e1 < k+m; e1++) { 574 for (e1 = 0; e1 < k+m; e1++) {
@@ -589,7 +590,7 @@ void jerasure_matrix_dotprod(int k, int w, int *matrix_row, @@ -589,7 +590,7 @@ void jerasure_matrix_dotprod(int k, int w, int *matrix_row,
589 590
590 if (w != 1 && w != 8 && w != 16 && w != 32) { 591 if (w != 1 && w != 8 && w != 16 && w != 32) {
591 fprintf(stderr, "ERROR: jerasure_matrix_dotprod() called and w is not 1, 8, 16 or 32\n"); 592 fprintf(stderr, "ERROR: jerasure_matrix_dotprod() called and w is not 1, 8, 16 or 32\n");
592 - exit(1); 593 + assert(0);
593 } 594 }
594 595
595 init = 0; 596 init = 0;
@@ -1456,12 +1457,12 @@ void jerasure_bitmatrix_encode(int k, int m, int w, int *bitmatrix, @@ -1456,12 +1457,12 @@ void jerasure_bitmatrix_encode(int k, int m, int w, int *bitmatrix,
1456 1457
1457 if (packetsize%sizeof(long) != 0) { 1458 if (packetsize%sizeof(long) != 0) {
1458 fprintf(stderr, "jerasure_bitmatrix_encode - packetsize(%d) %c sizeof(long) != 0\n", packetsize, '%'); 1459 fprintf(stderr, "jerasure_bitmatrix_encode - packetsize(%d) %c sizeof(long) != 0\n", packetsize, '%');
1459 - exit(1); 1460 + assert(0);
1460 } 1461 }
1461 if (size%(packetsize*w) != 0) { 1462 if (size%(packetsize*w) != 0) {
1462 fprintf(stderr, "jerasure_bitmatrix_encode - size(%d) %c (packetsize(%d)*w(%d))) != 0\n", 1463 fprintf(stderr, "jerasure_bitmatrix_encode - size(%d) %c (packetsize(%d)*w(%d))) != 0\n",
1463 size, '%', packetsize, w); 1464 size, '%', packetsize, w);
1464 - exit(1); 1465 + assert(0);
1465 } 1466 }
1466 1467
1467 for (i = 0; i < m; i++) { 1468 for (i = 0; i < m; i++) {
src/reed_sol.c
@@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
47 #include <stdio.h> 47 #include <stdio.h>
48 #include <stdlib.h> 48 #include <stdlib.h>
49 #include <string.h> 49 #include <string.h>
  50 +#include <assert.h>
50 51
51 #include <gf_complete.h> 52 #include <gf_complete.h>
52 #include "galois.h" 53 #include "galois.h"
@@ -107,7 +108,7 @@ void reed_sol_galois_w08_region_multby_2(char *region, int nbytes) @@ -107,7 +108,7 @@ void reed_sol_galois_w08_region_multby_2(char *region, int nbytes)
107 if (!gf_init_hard(&GF08, 8, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT, 108 if (!gf_init_hard(&GF08, 8, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
108 prim08, 0, 0, NULL, NULL)) { 109 prim08, 0, 0, NULL, NULL)) {
109 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w08_region_multby_2\n"); 110 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w08_region_multby_2\n");
110 - exit(1); 111 + assert(0);
111 } 112 }
112 } 113 }
113 GF08.multiply_region.w32(&GF08, region, region, 2, nbytes, 0); 114 GF08.multiply_region.w32(&GF08, region, region, 2, nbytes, 0);
@@ -123,7 +124,7 @@ void reed_sol_galois_w16_region_multby_2(char *region, int nbytes) @@ -123,7 +124,7 @@ void reed_sol_galois_w16_region_multby_2(char *region, int nbytes)
123 if (!gf_init_hard(&GF16, 16, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT, 124 if (!gf_init_hard(&GF16, 16, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
124 prim16, 0, 0, NULL, NULL)) { 125 prim16, 0, 0, NULL, NULL)) {
125 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w16_region_multby_2\n"); 126 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w16_region_multby_2\n");
126 - exit(1); 127 + assert(0);
127 } 128 }
128 } 129 }
129 GF16.multiply_region.w32(&GF16, region, region, 2, nbytes, 0); 130 GF16.multiply_region.w32(&GF16, region, region, 2, nbytes, 0);
@@ -139,7 +140,7 @@ void reed_sol_galois_w32_region_multby_2(char *region, int nbytes) @@ -139,7 +140,7 @@ void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
139 if (!gf_init_hard(&GF32, 32, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT, 140 if (!gf_init_hard(&GF32, 32, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
140 prim32, 0, 0, NULL, NULL)) { 141 prim32, 0, 0, NULL, NULL)) {
141 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w32_region_multby_2\n"); 142 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w32_region_multby_2\n");
142 - exit(1); 143 + assert(0);
143 } 144 }
144 } 145 }
145 GF32.multiply_region.w32(&GF32, region, region, 2, nbytes, 0); 146 GF32.multiply_region.w32(&GF32, region, region, 2, nbytes, 0);
@@ -223,7 +224,7 @@ int *reed_sol_big_vandermonde_distribution_matrix(int rows, int cols, int w) @@ -223,7 +224,7 @@ int *reed_sol_big_vandermonde_distribution_matrix(int rows, int cols, int w)
223 if (j >= rows) { /* This should never happen if rows/w are correct */ 224 if (j >= rows) { /* This should never happen if rows/w are correct */
224 fprintf(stderr, "reed_sol_big_vandermonde_distribution_matrix(%d,%d,%d) - couldn't make matrix\n", 225 fprintf(stderr, "reed_sol_big_vandermonde_distribution_matrix(%d,%d,%d) - couldn't make matrix\n",
225 rows, cols, w); 226 rows, cols, w);
226 - exit(1); 227 + assert(0);
227 } 228 }
228 229
229 /* If necessary, swap rows */ 230 /* If necessary, swap rows */