Skip to content

Commit

Permalink
test_all6 (p6est): use runtime check for zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
cburstedde committed Mar 18, 2024
1 parent f6ca706 commit 5e5e382
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/test_all6.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ main (int argc, char **argv)
double height[3] = { 0., 0., 0.1 };
int i;
int vtk;
#ifdef P4EST_HAVE_ZLIB
int have_zlib;
unsigned crc_computed = 0;
#endif
sc_options_t *opt;
int first_argc;
const char *config_name;
Expand All @@ -189,6 +188,7 @@ main (int argc, char **argv)
sc_set_log_defaults (NULL, NULL, SC_LP_STATISTICS);
#endif
p4est_init (NULL, SC_LP_DEFAULT);
have_zlib = p4est_have_zlib ();

opt = sc_options_new (argv[0]);

Expand Down Expand Up @@ -379,11 +379,11 @@ main (int argc, char **argv)
p6est_lnodes_destroy (lnodes);
}

#ifdef P4EST_HAVE_ZLIB
crc_computed = p6est_checksum (p6est);

P4EST_GLOBAL_PRODUCTIONF ("p6est checksum 0x%08x\n", crc_computed);
#endif
if (have_zlib) {
/* the parallel checksum aborts without zlib configured */
crc_computed = p6est_checksum (p6est);
P4EST_GLOBAL_PRODUCTIONF ("p6est checksum 0x%08x\n", crc_computed);
}

if (save_filename) {
sc_flops_snap (&fi, &snapshot);
Expand Down

0 comments on commit 5e5e382

Please sign in to comment.