ENH: add mpiBufferSize optimisationSwitch (issue #517)

- allows configuration without an environment variable.
  For compatibility still respect MPI_BUFFER_SIZE env-variable.
This commit is contained in:
Mark Olesen
2017-07-05 15:52:44 +02:00
parent a4c81f5962
commit e54a930dcc
7 changed files with 51 additions and 52 deletions

View File

@ -257,19 +257,7 @@ if ( "$FOAM_MPI" != dummy ) then
_foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}
endif
# Minimum MPI buffer size (used by all except SGI MPI)
if ( ! $?minBufferSize ) set minBufferSize=20000000
if ( $?MPI_BUFFER_SIZE ) then
if ( $MPI_BUFFER_SIZE < $minBufferSize ) then
setenv MPI_BUFFER_SIZE $minBufferSize
endif
else
setenv MPI_BUFFER_SIZE $minBufferSize
endif
# Cleanup environment
# ~~~~~~~~~~~~~~~~~~~
unset minBufferSize
# Alternative to 'mpiBufferSize' controlDict entry
#setenv MPI_BUFFER_SIZE 20000000
#------------------------------------------------------------------------------