Skip to content

Commit 6b60bc8

Browse files
authored
Merge branch 'main' into fillvalue_fix.wif
2 parents 303a848 + fcb8529 commit 6b60bc8

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

doc/source/Introduction.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ processors (see @ref iosystem).
4545
PIO uses <a
4646
href=http://www.unidata.ucar.edu/software/netcdf/docs/html_guide/index.html#user_guide>
4747
netcdf </a> and <a
48-
href=http://trac.mcs.anl.gov/projects/parallel-netcdf> pnetcdf</a> to
48+
href=https://parallel-netcdf.github.io/> pnetcdf</a> to
4949
read and write the netCDF files (see @ref install).
5050

5151
## Basic description of how to optimize IO in a parallel environment:

src/clib/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ endif ()
175175

176176
include(CheckTypeSize)
177177
check_type_size("size_t" SIZEOF_SIZE_T)
178-
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
179-
if (NOT ${SIZEOF_SIZE_T} EQUAL ${SIZEOF_LONG_LONG})
178+
check_type_size("long long" SIZEOF_LONG_LONG)
179+
if (NOT "${SIZEOF_SIZE_T}" STREQUAL "${SIZEOF_LONG_LONG}")
180180
message (FATAL_ERROR "size_t and long long must be the same size!")
181181
endif ()
182182

src/clib/pioc_support.c

+14
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99
#include <pio.h>
1010
#include <pio_internal.h>
1111

12+
#if defined __has_include
13+
#if __has_include (<execinfo.h>)
14+
#define PLATFORM_HAS_EXECINFO
15+
#endif /* __has_include (<execinfo.h>) */
16+
#endif /* __has_include */
17+
18+
#ifdef PLATFORM_HAS_EXECINFO
1219
#include <execinfo.h>
20+
#endif /* PLATFORM_HAS_EXECINFO */
1321

1422
/** This is used with text decomposition files. */
1523
#define VERSNO 2001
@@ -522,6 +530,7 @@ pio_log(int severity, const char *fmt, ...)
522530
void
523531
print_trace(FILE *fp)
524532
{
533+
#ifdef PLATFORM_HAS_EXECINFO
525534
void *array[10];
526535
size_t size;
527536
char **strings;
@@ -540,6 +549,9 @@ print_trace(FILE *fp)
540549
fprintf(fp,"%s\n", strings[i]);
541550

542551
free(strings);
552+
#else
553+
(void)fp;
554+
#endif /* PLATFORM_HAS_EXECINFO */
543555
}
544556

545557
/**
@@ -1532,6 +1544,7 @@ pioc_write_nc_decomp_int(iosystem_desc_t *ios, const char *filename, int cmode,
15321544
strlen(my_order_str) + 1, my_order_str)))
15331545
return pio_err(ios, NULL, ret, __FILE__, __LINE__);
15341546

1547+
#ifdef PLATFORM_HAS_EXECINFO
15351548
/* Write an attribute with the stack trace. This can be helpful
15361549
* for debugging. */
15371550
void *bt[MAX_BACKTRACE];
@@ -1562,6 +1575,7 @@ pioc_write_nc_decomp_int(iosystem_desc_t *ios, const char *filename, int cmode,
15621575
if ((ret = PIOc_put_att_text(ncid, NC_GLOBAL, DECOMP_BACKTRACE_ATT_NAME,
15631576
strlen(full_bt) + 1, full_bt)))
15641577
return pio_err(ios, NULL, ret, __FILE__, __LINE__);
1578+
#endif /* PLATFORM_HAS_EXECINFO */
15651579

15661580
/* We need a dimension for the dimensions in the data. (Example:
15671581
* for 4D data we will need to store 4 dimension IDs.) */

0 commit comments

Comments
 (0)