Skip to content

Commit a4ed64c

Browse files
authored
Merge pull request #1896 from jedwards4b/pio_buffer_size_limit_rename
2 parents 97ea899 + d8da2d2 commit a4ed64c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/clib/pio_darray.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
/** 10MB default limit. */
25-
PIO_Offset pio_buffer_size_limit = PIO_BUFFER_SIZE;
25+
PIO_Offset pio_pnetcdf_buffer_size_limit = PIO_BUFFER_SIZE;
2626

2727
/** Global buffer pool pointer. */
2828
void *CN_bpool = NULL;
@@ -46,7 +46,7 @@ extern int event_num[2][NUM_EVENTS];
4646
/**
4747
* Set the PIO IO node data buffer size limit.
4848
*
49-
* The pio_buffer_size_limit will only apply to files opened after
49+
* The pio_pnetcdf_buffer_size_limit will only apply to files opened after
5050
* the setting is changed.
5151
*
5252
* @param limit the size of the buffer on the IO nodes
@@ -56,11 +56,11 @@ extern int event_num[2][NUM_EVENTS];
5656
PIO_Offset
5757
PIOc_set_buffer_size_limit(PIO_Offset limit)
5858
{
59-
PIO_Offset oldsize = pio_buffer_size_limit;
59+
PIO_Offset oldsize = pio_pnetcdf_buffer_size_limit;
6060

6161
/* If the user passed a valid size, use it. */
6262
if (limit > 0)
63-
pio_buffer_size_limit = limit;
63+
pio_pnetcdf_buffer_size_limit = limit;
6464

6565
return oldsize;
6666
}

src/clib/pio_darray_int.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#endif
2121

2222
/** 10MB default limit. */
23-
extern PIO_Offset pio_buffer_size_limit;
23+
extern PIO_Offset pio_pnetcdf_buffer_size_limit;
2424

2525
/** Initial size of compute buffer. */
2626
long pio_cnbuffer_limit = 33554432;
@@ -1737,7 +1737,7 @@ flush_output_buffer(file_desc_t *file, bool force, PIO_Offset addsize)
17371737
PLOG((2, "flush_output_buffer usage=%ld force=%d",usage, force));
17381738
/* If the user forces it, or the buffer has exceeded the size
17391739
* limit, then flush to disk. */
1740-
if (force || (usage >= pio_buffer_size_limit))
1740+
if (force || (usage >= pio_pnetcdf_buffer_size_limit))
17411741
{
17421742
int rcnt;
17431743
int maxreq;
@@ -2156,7 +2156,7 @@ compute_maxaggregate_bytes(iosystem_desc_t *ios, io_desc_t *iodesc)
21562156

21572157
/* Determine the max bytes that can be held on IO task. */
21582158
if (ios->ioproc && iodesc->maxiobuflen > 0)
2159-
maxbytesoniotask = pio_buffer_size_limit / iodesc->maxiobuflen;
2159+
maxbytesoniotask = pio_pnetcdf_buffer_size_limit / iodesc->maxiobuflen;
21602160

21612161
/* Determine the max bytes that can be held on computation task. */
21622162
if (ios->comp_rank >= 0 && iodesc->ndof > 0)

src/clib/pio_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void pio_log(int severity, const char *fmt, ...);
131131
extern "C" {
132132
#endif
133133

134-
extern PIO_Offset pio_buffer_size_limit;
134+
extern PIO_Offset pio_pnetcdf_buffer_size_limit;
135135

136136
/** Used to sort map points in the subset rearranger. */
137137
typedef struct mapsort

src/clib/pioc_support.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ PIOc_createfile_int(int iosysid, int *ncidp, int *iotype, const char *filename,
21552155
PLOG((2, "Calling ncmpi_create mode = %d", mode));
21562156
ierr = ncmpi_create(ios->io_comm, filename, mode, ios->info, &file->fh);
21572157
if (!ierr)
2158-
ierr = ncmpi_buffer_attach(file->fh, pio_buffer_size_limit);
2158+
ierr = ncmpi_buffer_attach(file->fh, pio_pnetcdf_buffer_size_limit);
21592159
break;
21602160
#endif
21612161
}
@@ -2763,8 +2763,8 @@ PIOc_openfile_retry(int iosysid, int *ncidp, int *iotype, const char *filename,
27632763
{
27642764
if (ios->iomaster == MPI_ROOT)
27652765
PLOG((2, "%d Setting IO buffer %ld", __LINE__,
2766-
pio_buffer_size_limit));
2767-
ierr = ncmpi_buffer_attach(file->fh, pio_buffer_size_limit);
2766+
pio_pnetcdf_buffer_size_limit));
2767+
ierr = ncmpi_buffer_attach(file->fh, pio_pnetcdf_buffer_size_limit);
27682768
}
27692769
PLOG((2, "ncmpi_open(%s) : fd = %d", filename, file->fh));
27702770

0 commit comments

Comments
 (0)