printstep as an environment variable

This commit is contained in:
Florian Stecker
2016-10-11 11:32:43 +02:00
parent baf050ee3c
commit 76783124e2
3 changed files with 5 additions and 47 deletions

View File

@@ -318,6 +318,10 @@ void enumerate_balanced_thickenings(semisimple_type_t type, node_t *graph, const
queue_t queue;
int printstep = 0;
if(getenv("PRINTSTEP"))
printstep = atoi(getenv("PRINTSTEP"));
rank = coxeter_rank(type);
order = coxeter_order(type);
@@ -375,7 +379,7 @@ void enumerate_balanced_thickenings(semisimple_type_t type, node_t *graph, const
if(is_fat) {
// ERROR(count >= MAX_THICKENINGS, "Too many balanced thickenings! Increase MAX_THICKENINGS\n");
if(count % 1 == 0)
if(printstep && (count+1) % printstep == 0)
print_thickening(rank, order, level, 0, 0, 0, alphabet, stderr);
fwrite(level, sizeof(signed char), order, outfile);
count++;