ENH: use DetailInfo for fileOperation I/O information

- allows suppression when the banner is suppressed
This commit is contained in:
Mark Olesen
2020-01-22 20:46:37 +01:00
parent 16e8d29476
commit 860e7df50b
4 changed files with 42 additions and 31 deletions

View File

@ -153,12 +153,12 @@ then
# - libPVFoamReader_SM = (OPENFOAM <= 1912) # - libPVFoamReader_SM = (OPENFOAM <= 1912)
case "$plugin" in case "$plugin" in
blockReader) (blockReader)
for libName in \ for libName in \
ParaFoamBlockReader \ ParaFoamBlockReader \
libParaFoamBlockReader \ libParaFoamBlockReader \
libPVblockMeshReader_SM \ libPVblockMeshReader_SM \
; ;
do do
if [ -f "$PV_PLUGIN_PATH/$libName.so" ] if [ -f "$PV_PLUGIN_PATH/$libName.so" ]
then then
@ -166,13 +166,13 @@ then
break break
fi fi
done done
;; ;;
foamReader) (foamReader)
for libName in \ for libName in \
ParaFoamReader \ ParaFoamReader \
libParaFoamReader \ libParaFoamReader \
libPVFoamReader_SM \ libPVFoamReader_SM \
; ;
do do
if [ -f "$PV_PLUGIN_PATH/$libName.so" ] if [ -f "$PV_PLUGIN_PATH/$libName.so" ]
then then
@ -180,7 +180,7 @@ then
break break
fi fi
done done
;; ;;
esac esac
if [ -n "$pluginError" ] if [ -n "$pluginError" ]
@ -329,22 +329,22 @@ else
# Check existence of essential files # Check existence of essential files
warn=false warn=false
case "$plugin" in case "$plugin" in
blockReader) (blockReader)
blockMeshDict=system/blockMeshDict blockMeshDict=system/blockMeshDict
if [ -f constant/polyMesh/blockMeshDict ] if [ -f constant/polyMesh/blockMeshDict ]
then then
blockMeshDict=constant/polyMesh/blockMeshDict blockMeshDict=constant/polyMesh/blockMeshDict
fi fi
hasFiles system/controlDict "$blockMeshDict" || warn=true hasFiles system/controlDict "$blockMeshDict" || warn=true
;; ;;
foamReader) (foamReader)
hasFiles \ hasFiles \
system/controlDict \ system/controlDict \
"$fvControls/fvSchemes" \ "$fvControls/fvSchemes" \
"$fvControls/fvSolution" || warn=true "$fvControls/fvSolution" || warn=true
;; ;;
esac esac
[ "${warn:-false}" = false ] || { [ "${warn:-false}" = false ] || {

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2017-2018 OpenFOAM Foundation Copyright (C) 2017-2018 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -273,20 +274,23 @@ Foam::fileOperations::collatedFileOperation::collatedFileOperation
if (verbose) if (verbose)
{ {
Info<< "I/O : " << typeName DetailInfo
<< "I/O : " << typeName
<< " (maxThreadFileBufferSize " << maxThreadFileBufferSize << " (maxThreadFileBufferSize " << maxThreadFileBufferSize
<< ')' << endl; << ')' << endl;
if (maxThreadFileBufferSize == 0) if (maxThreadFileBufferSize == 0)
{ {
Info<< " Threading not activated " DetailInfo
<< " Threading not activated "
"since maxThreadFileBufferSize = 0." << nl "since maxThreadFileBufferSize = 0." << nl
<< " Writing may run slowly for large file sizes." << " Writing may run slowly for large file sizes."
<< endl; << endl;
} }
else else
{ {
Info<< " Threading activated " DetailInfo
<< " Threading activated "
"since maxThreadFileBufferSize > 0." << nl "since maxThreadFileBufferSize > 0." << nl
<< " Requires large enough buffer to collect all data" << " Requires large enough buffer to collect all data"
" or thread support " << nl " or thread support " << nl
@ -308,12 +312,15 @@ Foam::fileOperations::collatedFileOperation::collatedFileOperation
} }
Pstream::gatherList(ioRanks); Pstream::gatherList(ioRanks);
Info<< " IO nodes:" << nl; DetailInfo
<< " IO nodes:" << nl;
for (const string& ranks : ioRanks) for (const string& ranks : ioRanks)
{ {
if (!ranks.empty()) if (!ranks.empty())
{ {
Info<< " " << ranks << nl; DetailInfo
<< " " << ranks << nl;
} }
} }
} }
@ -360,20 +367,23 @@ Foam::fileOperations::collatedFileOperation::collatedFileOperation
if (verbose) if (verbose)
{ {
Info<< "I/O : " << typeName DetailInfo
<< "I/O : " << typeName
<< " (maxThreadFileBufferSize " << maxThreadFileBufferSize << " (maxThreadFileBufferSize " << maxThreadFileBufferSize
<< ')' << endl; << ')' << endl;
if (maxThreadFileBufferSize == 0) if (maxThreadFileBufferSize == 0)
{ {
Info<< " Threading not activated " DetailInfo
<< " Threading not activated "
"since maxThreadFileBufferSize = 0." << nl "since maxThreadFileBufferSize = 0." << nl
<< " Writing may run slowly for large file sizes." << " Writing may run slowly for large file sizes."
<< endl; << endl;
} }
else else
{ {
Info<< " Threading activated " DetailInfo
<< " Threading activated "
"since maxThreadFileBufferSize > 0." << nl "since maxThreadFileBufferSize > 0." << nl
<< " Requires large enough buffer to collect all data" << " Requires large enough buffer to collect all data"
" or thread support " << nl " or thread support " << nl

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2017-2018 OpenFOAM Foundation Copyright (C) 2017-2018 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -774,7 +774,7 @@ masterUncollatedFileOperation
if (verbose) if (verbose)
{ {
Info DetailInfo
<< "I/O : " << typeName << "I/O : " << typeName
<< " (maxMasterFileBufferSize " << maxMasterFileBufferSize << ')' << " (maxMasterFileBufferSize " << maxMasterFileBufferSize << ')'
<< endl; << endl;
@ -820,7 +820,7 @@ masterUncollatedFileOperation
if (verbose) if (verbose)
{ {
Info DetailInfo
<< "I/O : " << typeName << "I/O : " << typeName
<< " (maxMasterFileBufferSize " << maxMasterFileBufferSize << ')' << " (maxMasterFileBufferSize " << maxMasterFileBufferSize << ')'
<< endl; << endl;

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2017 OpenFOAM Foundation Copyright (C) 2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.