Skip to content

Commit

Permalink
EXODUS: Prototype to see if can speed up field metadata output (#468)
Browse files Browse the repository at this point in the history
* EXODUS: Prototype to see if can speed up field metadata output

* EXODUS: Check that not in define mode at update or close call

* EXODUS: Initialize all members of exi_file_item struct

* EXODUS: Add calling function to redef calls; increase persist count size

* IOSS: Add calling function to redef calls; increase persist count size

* EXODUS: Avoid writing empty type_name and default separator

* EXODUS: Handle error returns when in persist redef mode

* EXODUS: Fix handling of default separator

* EXODUS: Remove debug printing

---------

Co-authored-by: Greg Sjaardema <[email protected]>
  • Loading branch information
gsjaardema and gdsjaar authored Jul 17, 2024
1 parent 0209541 commit 3e6500f
Show file tree
Hide file tree
Showing 51 changed files with 304 additions and 142 deletions.
2 changes: 2 additions & 0 deletions packages/seacas/libraries/exodus/include/exodusII.h
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,8 @@ EXODUS_EXPORT int ex_get_blob(int exoid, struct ex_blob *blob);
EXODUS_EXPORT int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs);
EXODUS_EXPORT int ex_get_blobs(int exoid, struct ex_blob *blobs);

EXODUS_EXPORT int ex_put_multi_field_metadata(int exoid, const ex_field *field,
const int field_count);
EXODUS_EXPORT int ex_put_field_metadata(int exoid, const ex_field field);
EXODUS_EXPORT int ex_put_field_suffices(int exoid, const ex_field field, const char *suffices);
EXODUS_EXPORT int ex_get_field_metadata(int exoid, ex_field *field);
Expand Down
38 changes: 23 additions & 15 deletions packages/seacas/libraries/exodus/include/exodusII_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -686,28 +686,31 @@ typedef enum exi_element_type exi_element_type;
struct exi_file_item
{
int file_id;
nc_type netcdf_type_code;
nc_type netcdf_type_code; /**< NC_FLOAT or NC_DOUBLE */
int int64_status;
int maximum_name_length;
int time_varid; /* Store to avoid lookup each timestep */
unsigned int assembly_count;
unsigned int blob_count;
unsigned int compression_level; /**< 0 (disabled) to 9 (maximum) compression level for
gzip, 4..32 and even for szip; NetCDF-4 only */
unsigned int persist_define_mode : 10; /**< Stay in define mode until exi_persist_leavedef is
called. Set by exi_persist_redef... */
unsigned int
compression_algorithm : 2; /**< GZIP/ZLIB, SZIP, more may be supported by NetCDF soon */
unsigned int compression_level : 6; /**< 0 (disabled) to 9 (maximum) compression level for
gzip, 4..32 and even for szip; NetCDF-4 only */
compression_algorithm : 4; /**< GZIP/ZLIB, SZIP, more may be supported by NetCDF soon */
unsigned int shuffle : 1; /**< 1 true, 0 false */
unsigned int user_compute_wordsize : 1; /**< 0 for 4 byte or 1 for 8 byte reals */
unsigned int shuffle : 1; /**< 1 true, 0 false */
unsigned int
file_type : 2; /**< 0 - classic, 1 -- 64 bit classic, 2 --NetCDF4, 3 --NetCDF4 classic */
unsigned int is_write : 1; /**< for output or append */
unsigned int is_parallel : 1; /**< 1 true, 0 false */
unsigned int is_hdf5 : 1; /**< 1 true, 0 false */
unsigned int is_pnetcdf : 1; /**< 1 true, 0 false */
unsigned int has_nodes : 1; /**< for input only at this time */
unsigned int has_edges : 1; /**< for input only at this time */
unsigned int has_faces : 1; /**< for input only at this time */
unsigned int has_elems : 1; /**< for input only at this time */
unsigned int is_write : 1; /**< for output or append */
unsigned int is_parallel : 1; /**< 1 true, 0 false */
unsigned int is_hdf5 : 1; /**< 1 true, 0 false */
unsigned int is_pnetcdf : 1; /**< 1 true, 0 false */
unsigned int has_nodes : 1; /**< for input only at this time */
unsigned int has_edges : 1; /**< for input only at this time */
unsigned int has_faces : 1; /**< for input only at this time */
unsigned int has_elems : 1; /**< for input only at this time */
unsigned int in_define_mode : 1; /**< Is the file in nc define mode... */
struct exi_file_item *next;
};

Expand Down Expand Up @@ -797,8 +800,8 @@ extern struct exi_obj_stats *exoII_fam;
extern struct exi_obj_stats *exoII_nm;

EXODUS_EXPORT struct exi_file_item *exi_find_file_item(int exoid);
struct exi_file_item *exi_add_file_item(int exoid);
struct exi_obj_stats *exi_get_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr);
struct exi_file_item *exi_add_file_item(int exoid);
struct exi_obj_stats *exi_get_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr);

EXODUS_EXPORT void exi_rm_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr);

Expand Down Expand Up @@ -854,9 +857,14 @@ EXODUS_EXPORT int exi_put_names(int exoid, int varid, size_t num_entity, char *
ex_entity_type obj_type, const char *subtype, const char *routine);
EXODUS_EXPORT void exi_trim(char *name);
EXODUS_EXPORT void exi_update_max_name_length(int exoid, int length);
EXODUS_EXPORT int exi_redef(int exoid, const char *call_func);
EXODUS_EXPORT int exi_persist_redef(int exoid, const char *call_func);
EXODUS_EXPORT int exi_leavedef(int exoid, /* NemesisI file ID */
const char *call_rout /* Name of calling function */
);
EXODUS_EXPORT int exi_persist_leavedef(int exoid, /* NemesisI file ID */
const char *call_rout /* Name of calling function */
);

EXODUS_EXPORT int exi_check_version(int run_version);
EXODUS_EXPORT int exi_handle_mode(unsigned int my_mode, int is_parallel, int run_version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int exi_put_homogenous_block_params(int exoid, size_t block_count, const struct

/* ======================================================================== */
/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
return (EX_FATAL);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_add_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t

/* element attribute array */
/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
7 changes: 6 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_close.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -57,6 +57,11 @@ int ex_close(int exoid)
EX_FUNC_LEAVE(EX_FATAL);
}

#ifndef NDEBUG
struct exi_file_item *file = exi_find_file_item(exoid);
assert(!file->in_define_mode && file->persist_define_mode == 0);
#endif

/*
* NOTE: If using netcdf-4, exoid must refer to the root group.
* Need to determine whether there are any groups and if so,
Expand Down
2 changes: 2 additions & 0 deletions packages/seacas/libraries/exodus/src/ex_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ int exi_conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_word
new_file->has_edges = 1;
new_file->has_faces = 1;
new_file->has_elems = 1;
new_file->in_define_mode = 0;
new_file->persist_define_mode = 0;
new_file->is_write = is_write;

new_file->next = file_list;
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_copy.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2023 National Technology & Engineering Solutions
* Copyright(C) 1999-2024 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -108,7 +108,7 @@ static int ex_copy_internal(int in_exoid, int out_exoid, int mesh_only)
}

/* put output file into define mode */
EXCHECK(nc_redef(out_exoid));
EXCHECK(exi_redef(out_exoid, __func__));

/* copy global attributes */
EXCHECK(cpy_global_att(in_exoid, out_exoid));
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_create_group.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022, 2024 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand All @@ -26,7 +26,7 @@ int ex_create_group(int parent_id, const char *group_name)
EX_FUNC_LEAVE(EX_FATAL);
}

if ((status = nc_redef(parent_id)) != NC_NOERR) {
if ((status = exi_redef(parent_id, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", parent_id);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
16 changes: 10 additions & 6 deletions packages/seacas/libraries/exodus/src/ex_get_field_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ int ex_get_field_metadata(int exoid, ex_field *field)
EX_FUNC_ENTER();

int varid;
int att_count = exi_get_attribute_count(exoid, field->entity_type, field->entity_id, &varid);
int att_count = exi_get_attribute_count(exoid, field[0].entity_type, field[0].entity_id, &varid);
if (att_count < 0) {
char errmsg[MAX_ERR_LENGTH];
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Negative attribute count (%d) on %s with id %" PRId64,
att_count, ex_name_of_object(field->entity_type), field->entity_id);
att_count, ex_name_of_object(field[0].entity_type), field[0].entity_id);
ex_err_fn(exoid, __func__, errmsg, EX_INTERNAL);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand All @@ -140,7 +140,7 @@ int ex_get_field_metadata(int exoid, ex_field *field)
char errmsg[MAX_ERR_LENGTH];
snprintf(errmsg, MAX_ERR_LENGTH,
"ERROR: failed to get attribute named %s on %s with id %" PRId64, attr_name,
ex_name_of_object(field->entity_type), field->entity_id);
ex_name_of_object(field[0].entity_type), field[0].entity_id);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand All @@ -165,6 +165,10 @@ int ex_get_field_metadata(int exoid, ex_field *field)
if (found == -1) {
which = count;
strcpy(field[count].name, fld_name);
/* Set default separator type... */
field[count].component_separator[0] = '_';
field[count].component_separator[1] = '\0';

count++;
}

Expand All @@ -174,7 +178,7 @@ int ex_get_field_metadata(int exoid, ex_field *field)
char errmsg[MAX_ERR_LENGTH];
snprintf(errmsg, MAX_ERR_LENGTH,
"ERROR: failed to get parameters for attribute named %s on %s with id %" PRId64,
attr_name, ex_name_of_object(field->entity_type), field->entity_id);
attr_name, ex_name_of_object(field[0].entity_type), field[0].entity_id);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand Down Expand Up @@ -205,7 +209,7 @@ int ex_get_field_metadata(int exoid, ex_field *field)
snprintf(
errmsg, MAX_ERR_LENGTH,
"ERROR: Invalid field metadata attribute type %s on field %s on %s with id %" PRId64,
fld_type, fld_name, ex_name_of_object(field->entity_type), field->entity_id);
fld_type, fld_name, ex_name_of_object(field[0].entity_type), field[0].entity_id);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand All @@ -214,7 +218,7 @@ int ex_get_field_metadata(int exoid, ex_field *field)
snprintf(errmsg, MAX_ERR_LENGTH,
"ERROR: failed to read field metadata attribute type %s on field %s on %s with id "
"%" PRId64,
fld_type, fld_name, ex_name_of_object(field->entity_type), field->entity_id);
fld_type, fld_name, ex_name_of_object(field[0].entity_type), field[0].entity_id);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver
int dim_str_name = 0;
int stat_dim = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name);
if (stat_att != NC_NOERR || stat_dim != NC_NOERR) {
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH,
"ERROR: failed to place file id %d named %s into define mode", exoid, canon_path);
ex_err_fn(exoid, __func__, errmsg, status);
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_open_par.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float
if (mode & EX_WRITE) { /* Appending */
/* turn off automatic filling of netCDF variables */
if (is_pnetcdf) {
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(canon_path);
Expand All @@ -335,7 +335,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float
int stat_dim = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name);
if (stat_att != NC_NOERR || stat_dim != NC_NOERR) {
if (!in_redef) {
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode",
exoid);
ex_err_fn(exoid, __func__, errmsg, status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp)
EX_ELEM_SET, VAR_ELS_STAT, elset_stat);

/* put file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
goto error_ret;
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_put_assemblies.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl
/* Assembly has not already been defined */
/* put netcdf file into define mode */
if (!in_define) {
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode",
exoid);
ex_err_fn(exoid, __func__, errmsg, status);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_put_attr_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/libraries/exodus/src/ex_put_attribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id,
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down Expand Up @@ -84,7 +84,7 @@ int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down Expand Up @@ -137,7 +137,7 @@ int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, c
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_put_blobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs)

int *entlst_id = (int *)calloc(count, sizeof(int));

if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(entlst_id);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_put_block_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(blocks_to_define);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_put_cmap_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int ex_put_cmap_params(int exoid, const void_int *node_cmap_ids,

/* Put NetCDF file into define mode */
int status;
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to file ID %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ file ID %d",
} /* "if (num_e_comm_maps >0)" */

/* Put NetCDF file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file ID %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param)
EX_FUNC_LEAVE(EX_NOERR);
}
/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *const
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(eb_array);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_put_concat_sets.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s
}

/* put netcdf file into define mode */
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(set_stat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids,
/* make the definitions */
/* go into define mode. define num_frames, num_frames9 */
int status;
if ((status = nc_redef(exoid)) != NC_NOERR) {
if ((status = exi_redef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
Expand Down
Loading

0 comments on commit 3e6500f

Please sign in to comment.