@@ -315,6 +315,10 @@ <h3>Configuring CGNS Internals</h3>
315315 < td align =center valign =baseline >
316316 < tt > < b > r w m</ b > </ tt >
317317< tbody >
318+ < tr > < td nowrap >
319+ < tt > < b > call cg_configure_f(< span class =in > option</ span > , < span class =in > value</ span > , < span class =out > < i > ier</ i > </ span > );</ b > </ tt >
320+ < td align =center valign =baseline >
321+ < tt > < b > r w m</ b > </ tt >
318322< tr > < td nowrap >
319323 < tt > < b > call cg_exit_on_errors_f(< span class =in > flag</ span > )</ b > </ tt >
320324 < td align =center valign =baseline >
@@ -348,11 +352,14 @@ <h3>Configuring CGNS Internals</h3>
348352 < tt > CG_CONFIG_ERROR</ tt > , < tt > CG_CONFIG_COMPRESS</ tt > ,
349353 < tt > CG_CONFIG_SET_PATH</ tt > , < tt > CG_CONFIG_ADD_PATH</ tt > ,
350354 < tt > CG_CONFIG_FILE_TYPE</ tt > , < tt > CG_CONFIG_RIND_INDEX</ tt > ,
355+ < tt > CG_CONFIG_HDF5_DISKLESS</ tt > ,
356+ < tt > CG_CONFIG_HDF5_DISKLESS_INCR</ tt > ,
357+ < tt > CG_CONFIG_HDF5_DISKLESS_WRITE</ tt > ,
351358 < tt > CG_CONFIG_HDF5_COMPRESS</ tt > , or < tt > CG_CONFIG_HDF5_MPI_COMM</ tt > as
352359 defined in < i > cgnslib.h</ i > .
353360< tr valign =baseline > < td >
354361 < td > < tt > value</ tt > < td >
355- < td > The value to set, type cast as < tt > void *</ tt > .
362+ < td > The value to set, type cast as < tt > void *</ tt > . In Fortran the type is < tt > TYPE(C_PTR) </ tt > .
356363< tr valign =baseline > < td >
357364 < td > < tt > compress</ tt > < td >
358365 < td > CGNS compress (rewrite) setting.
@@ -369,7 +376,7 @@ <h3>Configuring CGNS Internals</h3>
369376</ table >
370377
371378< p >
372- The function < tt > cg_configure</ tt > allows certain CGNS library internal
379+ The function < tt > cg_configure</ tt > allows particular CGNS library internal
373380options to be configured.
374381The currently supported options and expected values are:
375382
@@ -387,7 +394,7 @@ <h3>Configuring CGNS Internals</h3>
387394 going to terminate (i.e., a call to < tt > cg_error_exit()</ tt > ).
388395 The second argument is the error or warning message.
389396 If this is defined, warning and error messages will go to the
390- function, rather than the terminal.
397+ function rather than the terminal.
391398 A < tt > value</ tt > of < tt > NULL</ tt > will remove the call-back
392399 function.
393400< tr valign =baseline > < td >
@@ -396,10 +403,10 @@ <h3>Configuring CGNS Internals</h3>
396403 < td > This is the rewrite-upon-close setting.
397404 < b > Note:</ b > Prior versions of the library would automatically rewrite
398405 the CGNS file when it was closed after being opened in modify mode
399- if there was unused space. This is no longer done, due to possible
406+ if there was unused space. This is no longer done due to possible
400407 conflicts when using parallel I/O. The previous behavior may be
401408 recovered by setting < tt > value</ tt > to a positive integer. In this
402- case the file will be rewritten if the number of node deletions or
409+ case, the file will be rewritten if the number of node deletions or
403410 modifications are equal to or exceed this number. Setting
404411 < tt > value</ tt > to a negative number will force the rewrite
405412 when the file is closed. The default value is 0 (no rewrite).
@@ -411,14 +418,16 @@ <h3>Configuring CGNS Internals</h3>
411418 containing one or more directories, formatted the same as for the
412419 < tt > PATH</ tt > environment variable.
413420 This will replace any current settings.
414- Setting < tt > value</ tt > to < tt > NULL</ tt > will remove all paths.
421+ Setting < tt > value</ tt > to < tt > NULL</ tt > will remove all paths. In Fortran,
422+ the path must terminate with a NULL character, CHAR(0) or C_NULL_CHAR.
415423< tr valign =baseline > < td >
416424< tr valign =baseline > < td >
417425 < td > < tt > CG_CONFIG_ADD_PATH</ tt > < td >
418426 < td > Adds a directory, or list of directories, to the linked-to file
419427 search path.
420428 This is the same as < tt > CG_CONFIG_SET_PATH</ tt > , but adds to the
421- path instead of replacing it.
429+ path instead of replacing it. In Fortran,
430+ the path must terminate with a NULL character, CHAR(0) or C_NULL_CHAR.
422431< tr valign =baseline > < td >
423432< tr valign =baseline > < td >
424433 < td > < tt > CG_CONFIG_FILE_TYPE</ tt > < td >
@@ -440,23 +449,23 @@ <h3>Configuring CGNS Internals</h3>
440449 always represented the start of an array: in an array with no rind
441450 planes, the core location would have index 1; in an array with 1 rind
442451 plane, the core location would have index 2. In version 3.4 of the
443- Mid-Level Library, the behavior of the API was fixed to match that
452+ Mid-Level Library, the API's behavior was fixed to match that
444453 specified in the SIDS: core array locations always begin at index 1.
445454 This option allows for configuring the library to pre-3.4 indexing
446455 behavior (set value to < tt > CG_CONFIG_RIND_ZERO</ tt > ) or the new default
447456 behavior (set value to < tt > CG_CONFIG_RIND_CORE</ tt > ). Note that using
448457 < tt > CG_CONFIG_RIND_ZERO</ tt > is considered obsolete, but is provided for
449- backwards compatability . Most users should not set this option and use
458+ backward compatibility . Most users should not select this option and use
450459 the default. Values used for this option do not need to be explicitly
451- cast as < tt > void*</ tt > . Use of this option does not change the cgns file
460+ cast as < tt > void*</ tt > . This option does not change the cgns file
452461 in any way; it only modifies the API to the library.
453462< tr valign =baseline > < td >
454463< tr valign =baseline > < td >
455464 < td > < tt > CG_CONFIG_HDF5_COMPRESS</ tt > < td >
456465 < td > Sets the compression level for data written from HDF5. The default is
457- no compression. Setting < tt > value</ tt > to -1, will use the default
466+ no compression. Setting < tt > value</ tt > to -1 will use the default
458467 compression level of 6. The acceptable values are 0 to 9, corresponding
459- to gzip compression levels.
468+ to gzip compression levels. < b > This option currently does nothing as compression is not yet implemented </ b > .
460469< tr valign =baseline > < td >
461470< tr valign =baseline > < td >
462471 < td > < tt > CG_CONFIG_HDF5_MPI_COMM</ tt > < td >
@@ -465,6 +474,24 @@ <h3>Configuring CGNS Internals</h3>
465474 typecasting it to a < tt > void *</ tt > . This is generally used
466475 internally - see < a href ="../pcgns/library.html#misc "> cgp_mpi_comm</ a >
467476 instead.
477+ < tr valign =baseline > < td >
478+ < tr valign =baseline > < td >
479+ < td > < tt > CG_CONFIG_HDF5_DISKLESS</ tt > < td >
480+ < td > Performs I/O directly to memory and can be used to create temporary CGNS files that never exist on permanent storage.
481+ The memory is written to disk depending on the state of < tt > CG_CONFIG_HDF5_DISKLESS_WRITE</ tt > . CGNS will use the
482+ < em > core</ em > file driver in HDF5 via < em > H5Pset_fapl_core</ em > , and the parameters associated with
483+ < em > CG_CONFIG_HDF5_DISKLESS</ em > are associated with that API. When < tt > value</ tt > is 1, any previously defined driver mode is ignored.
484+ Setting < tt > value</ tt > to 0 disables the diskless mode, enabling the previous mode. This configuration is
485+ not a valid option when accessing the memory by more than one process.
486+ < tr valign =baseline > < td >
487+ < tr valign =baseline > < td >
488+ < td > < tt > CG_CONFIG_HDF5_DISKLESS_INCR</ tt > < td >
489+ < td > < tt > Value</ tt > specifies the increment by which allocated memory is to be increased each time more memory is required, in bytes.
490+ The default is 10MiB. Ideally, < tt > value</ tt > should be set large enough to minimize repeated increases. The type of < tt > value</ tt > is < em > size_t</ em > in C and < em > C_SIZE_T</ em > in Fortran. Due to a bug with gfortran, it is advisable to use < em > C_LOC</ em > or < em > C_FUNLOC</ em > in-line of the call instead of using a variable.
491+ < tr valign =baseline > < td >
492+ < tr valign =baseline > < td >
493+ < td > < tt > CG_CONFIG_HDF5_DISKLESS_WRITE</ tt > < td >
494+ < td > < tt > Value</ tt > indicates whether to write (< tt > value=1</ tt > ) the memory contents to disk when the file is closed. Otherwise, < tt > value=0</ tt > does not persist the memory to disk.
468495</ table >
469496
470497< p >
@@ -473,12 +500,12 @@ <h3>Configuring CGNS Internals</h3>
473500are convenience functions built on top of < tt > cg_configure</ tt > .
474501
475502< p >
476- There is no Fortran counterpart to function < tt > cg_configure </ tt > or
503+ There is no Fortran counterpart for function
477504< tt > cg_error_handler</ tt > . The Fortran function < tt > cg_exit_on_error_f</ tt >
478- routine be be used in place of < tt > cg_error_handler</ tt > . If < tt > flag</ tt >
505+ routine can be used in place of < tt > cg_error_handler</ tt > . If < tt > flag</ tt >
479506is non-zero, then when an error is encountered, the library will print
480- the error message and exit with an code of 1. Setting < tt > flag</ tt > to
481- zero (the default) prevents this and the error is returned to the user
507+ the error message and exit with a code of 1. Setting < tt > flag</ tt > to
508+ zero (the default) prevents this, and the error is returned to the user
482509code.
483510
484511< p >
0 commit comments