From ec7f7f4df9fab20278a20cd954a57513e467636a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 12 Aug 2015 08:59:15 +0100 Subject: [PATCH 1/5] Porting updates --- ThirdParty/AllMake.stage2 | 2 +- etc/prefs.csh-EXAMPLE | 2 +- etc/prefs.sh-EXAMPLE | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ThirdParty/AllMake.stage2 b/ThirdParty/AllMake.stage2 index 9b53ee6f3..44613e46c 100755 --- a/ThirdParty/AllMake.stage2 +++ b/ThirdParty/AllMake.stage2 @@ -102,7 +102,7 @@ then [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_188" ] && { echo "Building openmpi 1.8.8" ( rpm_make -p openmpi-1.8.8 -s openmpi-1.8.8.spec -u http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.gz \ - -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_165_ConfigureAdditionalArgs"') + -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs"') } else echo "Using system installed OpenMPI" diff --git a/etc/prefs.csh-EXAMPLE b/etc/prefs.csh-EXAMPLE index b029715bd..53aa16d49 100644 --- a/etc/prefs.csh-EXAMPLE +++ b/etc/prefs.csh-EXAMPLE @@ -203,7 +203,7 @@ setenv WM_THIRD_PARTY_USE_CMAKE_322 1 # # For AllMake.stage2 setenv WM_THIRD_PARTY_USE_OPENMPI_188 1 -setenv WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs '--enable-mpi-cxx --with-verbs=/usr --with-verbs-libdir=/usr/lib64' +#setenv WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs '--enable-mpi-cxx --with-verbs=/usr --with-verbs-libdir=/usr/lib64' #setenv WM_THIRD_PARTY_USE_OPENMPI_165 1 #setenv WM_THIRD_PARTY_USE_OPENMPI_165_ConfigureAdditionalArgs '--enable-mpi-cxx --with-openib=/usr --with-openib-libdir=/usr/lib64' #setenv WM_THIRD_PARTY_USE_OPENMPI_15 1 diff --git a/etc/prefs.sh-EXAMPLE b/etc/prefs.sh-EXAMPLE index b1d56f921..a6897d035 100644 --- a/etc/prefs.sh-EXAMPLE +++ b/etc/prefs.sh-EXAMPLE @@ -213,7 +213,7 @@ export WM_THIRD_PARTY_USE_CMAKE_322=1 # # For AllMake.stage2 export WM_THIRD_PARTY_USE_OPENMPI_188=1 -export WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs='--enable-mpi-cxx --with-openib=/usr --with-openib-libdir=/usr/lib64' +#export WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs='--enable-mpi-cxx --with-openib=/usr --with-openib-libdir=/usr/lib64' #export WM_THIRD_PARTY_USE_OPENMPI_165=1 #export WM_THIRD_PARTY_USE_OPENMPI_165_ConfigureAdditionalArgs='--enable-mpi-cxx --with-openib=/usr --with-openib-libdir=/usr/lib64' #export WM_THIRD_PARTY_USE_OPENMPI_15=1 From 307f8131e7ca4a76a51c0f376f76d2a9cfa32d2e Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 17 Aug 2015 20:38:31 +0100 Subject: [PATCH 2/5] Set management updates --- .../decomposeSets/decomposeSets.C | 28 ++++++++++++++++--- src/meshTools/sets/topoSets/cellSet.C | 2 +- src/meshTools/sets/topoSets/faceSet.C | 5 ++-- src/meshTools/sets/topoSets/pointSet.C | 5 ++-- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C b/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C index 89dbe0398..497b1ba9f 100644 --- a/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C +++ b/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C @@ -45,6 +45,7 @@ int main(int argc, char *argv[]) // Add option to write empty sets argList::validOptions.insert("writeEmptySets", ""); + argList::validOptions.insert("liveObjectsOnly", ""); # include "setRootCase.H" # include "createTime.H" @@ -52,6 +53,7 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << endl; bool writeEmptySets = args.optionFound("writeEmptySets"); + bool liveObjectsOnly = args.optionFound("liveObjectsOnly"); // Determine the processor count directly label nProcs = 0; @@ -128,10 +130,18 @@ int main(int argc, char *argv[]) { const labelList& addr = procMeshes.pointProcAddressing()[procI]; + const label nProcPoints = procMeshes.meshes()[procI].nPoints(); + labelHashSet procSet; forAll (addr, pointI) { + // Skip list when nPoints is reached + if (liveObjectsOnly && pointI >= nProcPoints) + { + break; + } + if (set.found(addr[pointI])) { procSet.insert(pointI); @@ -143,14 +153,14 @@ int main(int argc, char *argv[]) // Set created, write it Info<< "Writing point set " << set.name() << " on processor " << procI << endl; - pointSet cs + pointSet ps ( procMeshes.meshes()[procI], set.name(), procSet, IOobject::NO_WRITE ); - cs.write(); + ps.write(); } } } @@ -172,10 +182,18 @@ int main(int argc, char *argv[]) { const labelList& addr = procMeshes.faceProcAddressing()[procI]; + const label nProcFaces = procMeshes.meshes()[procI].nFaces(); + labelHashSet procSet; forAll (addr, faceI) { + // Skip list when nPoints is reached + if (liveObjectsOnly && faceI >= nProcFaces) + { + break; + } + // Note faceProcAddressing peculiarity: // change of sign and offset. HJ, 7/Mar/2011 if (set.found(mag(addr[faceI]) - 1)) @@ -189,14 +207,14 @@ int main(int argc, char *argv[]) // Set created, write it Info<< "Writing face set " << set.name() << " on processor " << procI << endl; - faceSet cs + faceSet fs ( procMeshes.meshes()[procI], set.name(), procSet, IOobject::NO_WRITE ); - cs.write(); + fs.write(); } } } @@ -218,6 +236,8 @@ int main(int argc, char *argv[]) { const labelList& addr = procMeshes.cellProcAddressing()[procI]; + // There are no retired cells: no special handling required + labelHashSet procSet; forAll (addr, cellI) diff --git a/src/meshTools/sets/topoSets/cellSet.C b/src/meshTools/sets/topoSets/cellSet.C index c9e6cf36f..aad7c05cc 100644 --- a/src/meshTools/sets/topoSets/cellSet.C +++ b/src/meshTools/sets/topoSets/cellSet.C @@ -61,7 +61,7 @@ cellSet::cellSet : topoSet(mesh, typeName, name, r, w) { - // Make sure set within valid range + // Make sure set within valid range: there are no retired cells check(mesh.nCells()); } diff --git a/src/meshTools/sets/topoSets/faceSet.C b/src/meshTools/sets/topoSets/faceSet.C index 8affe4ae3..f1ab86fc9 100644 --- a/src/meshTools/sets/topoSets/faceSet.C +++ b/src/meshTools/sets/topoSets/faceSet.C @@ -63,7 +63,8 @@ faceSet::faceSet : topoSet(mesh, typeName, name, r, w) { - check(mesh.nFaces()); + // Sets can also contain retired faces. HJ, 17/Aug/2015 + check(mesh.allFaces().size()); } @@ -228,7 +229,7 @@ void faceSet::sync(const polyMesh& mesh) label faceSet::maxSize(const polyMesh& mesh) const { - return mesh.nFaces(); + return mesh.allFaces().size(); } diff --git a/src/meshTools/sets/topoSets/pointSet.C b/src/meshTools/sets/topoSets/pointSet.C index cdcd6d6c9..efd9bb677 100644 --- a/src/meshTools/sets/topoSets/pointSet.C +++ b/src/meshTools/sets/topoSets/pointSet.C @@ -62,7 +62,8 @@ pointSet::pointSet : topoSet(mesh, typeName, name, r, w) { - check(mesh.nPoints()); + // Sets can contain retired points. HJ, 17/Aug/2015 + check(mesh.allPoints().size()); } @@ -147,7 +148,7 @@ void pointSet::sync(const polyMesh& mesh) label pointSet::maxSize(const polyMesh& mesh) const { - return mesh.nPoints(); + return mesh.allPoints().size(); } From 9686a9bc82c7b1b92411c178f22f0239321d3bc8 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 17 Aug 2015 20:38:55 +0100 Subject: [PATCH 3/5] Fixed Windows checkout path --- doc/buildInstructions/Windows/README.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/buildInstructions/Windows/README.txt b/doc/buildInstructions/Windows/README.txt index dc8d1d933..548ab69f1 100644 --- a/doc/buildInstructions/Windows/README.txt +++ b/doc/buildInstructions/Windows/README.txt @@ -157,7 +157,7 @@ Version: 1.11.4-1 (or above) URL : http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-doc.zip For : Automatically downloading files from internet (eg. for use in automated build scripts) -git clone --branch nameClashesForWinPort git://git.code.sf.net/u/dominikchrist/foam-extend-3.1-dc foam-extend-3.1-win +git clone --branch nextRelease git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 4. EXAMPLE OUTPUT FROM SOUCING etc/bashrc.mingw @@ -199,14 +199,14 @@ Checking versions of installed system tools (based on PATH) ... Bison: /bin/bison.exe [bison (GNU Bison) 2.4.2] CMake: /c/Programs/cmake-3.2.3-win32-x86/bin/cmake.exe [cmake version 3.2.3] Flex: /bin/flex.exe [flex 2.5.35] -G++: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64/bin/g++.exe [g++.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2] -GCC: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64/bin/gcc.exe [gcc.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2] +G++: /c/Programs/mingw64/bin/g++.exe [g++.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2] +GCC: /c/Programs/mingw64/bin/gcc.exe [gcc.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2] GMake: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/gmake.exe [GNU Make 4.0.90] Git: /c/Programs/Git/cmd/git.exe [git version 1.9.5.msysgit.1] Java: /c/ProgramData/Oracle/Java/javapath/java.exe [java version "1.8.0_45"] M4: /bin/m4.exe [m4 (GNU M4) 1.4.16] Make: /bin/make.exe [GNU Make 3.81] -MinGW-w64: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64 +MinGW-w64: /c/Programs/mingw64 OpenMPI: /c/Programs/OpenMPI_v1.6.1-x64/bin/mpirun.exe [mpirun.exe (OpenRTE) 1.6.1] PEexports: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/pexports.exe [PExports 0.44 Copyright 1998, Anders Norlander] ParaView: /c/Programs/ParaView-4.3.1 From 88327de814d02aeec119f10bc6424b9b658d4443 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 18 Aug 2015 14:08:10 +0100 Subject: [PATCH 4/5] Bug fix: masked search escape --- src/foam/interpolations/GGIInterpolation/GGIInterpolate.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C b/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C index 018b4e6ce..aed202649 100644 --- a/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C +++ b/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C @@ -145,8 +145,11 @@ void GGIInterpolation::maskedBridge { // Gone beyond my index: my face is not present in the mask // Go one back and check for next uncovered face + if (maskAddrI > 0) + { + maskAddrI--; + } - maskAddrI--; break; } } From 8534381a5f3528ad0802c4fa98657e74110ef31b Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 18 Aug 2015 14:08:59 +0100 Subject: [PATCH 5/5] Fixed default opt option in cshrc --- etc/cshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/cshrc b/etc/cshrc index d2b28e497..c168e97a3 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -153,7 +153,7 @@ if ( ! $?WM_PRECISION_OPTION ) setenv WM_PRECISION_OPTION DP # WM_COMPILE_OPTION = Opt | Debug | Prof if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt -setenv WM_COMPILE_OPTION Opt +#setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Debug # WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2