From 76b9563dc3f33356dc44217732ad2be3038f67fd Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 3 Jul 2017 23:54:50 +0100 Subject: [PATCH] new OpenFOAM June 2017 release: OpenFOAM-v1706 (#4652) - renamed develop version from 'plus' to 'develop' - patches now prefixed by corresponding OpenFOAM version number. This makes it easier to sort and see what old/junk exists. - remove MPI_BUFFER_SIZEk env variable (for all openfoam variants). The OpenFOAM shell setup addresses this and there is no reason to pollute the module environment at this stage. --- .../builtin/packages/foam-extend/package.py | 1 - ...openfoam-bin-1612.patch => 1612-bin.patch} | 0 ...foam-build-1612.patch => 1612-build.patch} | 0 ...openfoam-etc-1612.patch => 1612-etc.patch} | 0 ...lib-1612.patch => 1612-mgridgen-lib.patch} | 0 ...openfoam-mpi-1612.patch => 1612-mpi.patch} | 0 ...1612.patch => 1612-scotch-metis-lib.patch} | 0 ...enfoam-site-1612.patch => 1612-site.patch} | 0 ...n-lib-1612.patch => 1612-zoltan-lib.patch} | 0 ...am-site-plus.patch => openfoam-site.patch} | 0 .../builtin/packages/openfoam-com/package.py | 42 +++++++++++-------- .../{openfoam-etc-41.patch => 41-etc.patch} | 0 .../{openfoam-site-41.patch => 41-site.patch} | 0 .../builtin/packages/openfoam-org/package.py | 5 +-- 14 files changed, 26 insertions(+), 22 deletions(-) rename var/spack/repos/builtin/packages/openfoam-com/{openfoam-bin-1612.patch => 1612-bin.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{openfoam-build-1612.patch => 1612-build.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{openfoam-etc-1612.patch => 1612-etc.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{mgridgen-lib-1612.patch => 1612-mgridgen-lib.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{openfoam-mpi-1612.patch => 1612-mpi.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{scotch-metis-lib-1612.patch => 1612-scotch-metis-lib.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{openfoam-site-1612.patch => 1612-site.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{zoltan-lib-1612.patch => 1612-zoltan-lib.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-com/{openfoam-site-plus.patch => openfoam-site.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-org/{openfoam-etc-41.patch => 41-etc.patch} (100%) rename var/spack/repos/builtin/packages/openfoam-org/{openfoam-site-41.patch => 41-site.patch} (100%) diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py index a6776b182f2..9e4a6c4d0b4 100644 --- a/var/spack/repos/builtin/packages/foam-extend/package.py +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -143,7 +143,6 @@ def setup_environment(self, spack_env, run_env): run_env.set('WM_PROJECT_DIR', self.projectdir) for d in ['wmake', self.archbin]: # bin already added automatically run_env.prepend_path('PATH', join_path(self.projectdir, d)) - run_env.set('MPI_BUFFER_SIZE', "20000000") def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """Provide location of the OpenFOAM project. diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-bin.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-bin.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-build.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-build.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-etc.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-etc.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/mgridgen-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-mgridgen-lib.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/mgridgen-lib-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-mgridgen-lib.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-mpi.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-mpi.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-scotch-metis-lib.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-scotch-metis-lib.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-site.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/openfoam-site-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-site.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-zoltan-lib.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch rename to var/spack/repos/builtin/packages/openfoam-com/1612-zoltan-lib.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site-plus.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-com/openfoam-site-plus.patch rename to var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch diff --git a/var/spack/repos/builtin/packages/openfoam-com/package.py b/var/spack/repos/builtin/packages/openfoam-com/package.py index 9e930535a01..0e2c0275d38 100644 --- a/var/spack/repos/builtin/packages/openfoam-com/package.py +++ b/var/spack/repos/builtin/packages/openfoam-com/package.py @@ -54,6 +54,9 @@ # - Combining +zoltan with +int64 has not been tested, but probably won't work. # - Combining +mgridgen with +int64 or +float32 probably won't work. # +# The spack 'develop' version of openfoam-com retains the upstream +# WM_PROJECT_VERSION=plus naming internally. +# ############################################################################## from spack import * from spack.environment import * @@ -258,12 +261,14 @@ class OpenfoamCom(Package): """ homepage = "http://www.openfoam.com/" - baseurl = "https://sourceforge.net/projects/openfoamplus/files" + baseurl = "https://sourceforge.net/projects/openfoamplus/files/" + gitrepo = "https://develop.openfoam.com/Development/OpenFOAM-plus.git" + version('1706', '630d30770f7b54d6809efbf94b7d7c8f', + url=baseurl + 'v1706/OpenFOAM-v1706.tgz') version('1612', 'ca02c491369150ab127cbb88ec60fbdf', - url=baseurl + '/v1612+/OpenFOAM-v1612+.tgz') - version('plus', branch='develop', # Note: needs user credentials - git='https://develop.openfoam.com/Development/OpenFOAM-plus.git') + url=baseurl + 'v1612+/OpenFOAM-v1612+.tgz') + version('develop', branch='develop', git=gitrepo) # Needs credentials variant('int64', default=False, description='Compile with 64-bit label') @@ -309,27 +314,29 @@ class OpenfoamCom(Package): # Workaround: use preferred variants "+plugins +qt" in # ~/.spack/packages.yaml + # 1706 ok with newer paraview but avoid pv-5.2, pv-5.3 readers + depends_on('paraview@5.4:', when='@1706:+paraview') # 1612 plugins need older paraview - # The native reader in paraview 5.2 is broken, so start after that depends_on('paraview@:5.0.1', when='@1612+paraview') - depends_on('paraview@5.3:', when='@1706:+paraview') - depends_on('paraview@5.3:', when='@plus+paraview') # General patches common = ['spack-Allwmake', 'README-spack'] assets = [] # Version-specific patches - patch('openfoam-bin-1612.patch', when='@1612') - patch('openfoam-etc-1612.patch', when='@1612') - patch('openfoam-site-1612.patch', when='@1612') - patch('openfoam-mpi-1612.patch', when='@1612') - patch('openfoam-build-1612.patch', when='@1612') - patch('mgridgen-lib-1612.patch', when='@1612') - patch('scotch-metis-lib-1612.patch', when='@1612') - patch('zoltan-lib-1612.patch', when='@1612') + patch('1612-bin.patch', when='@1612') + patch('1612-build.patch', when='@1612') + patch('1612-etc.patch', when='@1612') + patch('1612-site.patch', when='@1612') + patch('1612-mpi.patch', when='@1612') + patch('1612-mgridgen-lib.patch', when='@1612') + patch('1612-scotch-metis-lib.patch', when='@1612') + patch('1612-zoltan-lib.patch', when='@1612') - patch('openfoam-site-plus.patch', when='@plus') + # This patch is reasonably version-invariant + # 1) default site directly under WM_PROJECT_DIR + # 2) no FOAM_EXT_LIBBIN required + patch('openfoam-site.patch', when='@1706:') # Some user config settings # default: 'compile-option': 'RpathOpt', @@ -349,7 +356,7 @@ class OpenfoamCom(Package): etc_config = {} phases = ['configure', 'build', 'install'] - build_script = './spack-Allwmake' # <- Added by patch() method. + build_script = './spack-Allwmake' # From patch() method. # # - End of definitions / setup - @@ -360,7 +367,6 @@ def setup_environment(self, spack_env, run_env): run_env.set('WM_PROJECT_DIR', self.projectdir) for d in ['wmake', self.archbin]: # bin already added automatically run_env.prepend_path('PATH', join_path(self.projectdir, d)) - run_env.set('MPI_BUFFER_SIZE', "20000000") def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """Provide location of the OpenFOAM project. diff --git a/var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch b/var/spack/repos/builtin/packages/openfoam-org/41-etc.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch rename to var/spack/repos/builtin/packages/openfoam-org/41-etc.patch diff --git a/var/spack/repos/builtin/packages/openfoam-org/openfoam-site-41.patch b/var/spack/repos/builtin/packages/openfoam-org/41-site.patch similarity index 100% rename from var/spack/repos/builtin/packages/openfoam-org/openfoam-site-41.patch rename to var/spack/repos/builtin/packages/openfoam-org/41-site.patch diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py index a31cc2e2107..bc0658597ab 100644 --- a/var/spack/repos/builtin/packages/openfoam-org/package.py +++ b/var/spack/repos/builtin/packages/openfoam-org/package.py @@ -103,8 +103,8 @@ class OpenfoamOrg(Package): assets = ['bin/foamEtcFile'] # Version-specific patches - patch('openfoam-etc-41.patch', when='@4.1') - patch('openfoam-site-41.patch', when='@4.1') + patch('41-etc.patch', when='@4.1') + patch('41-site.patch', when='@4.1') # Some user config settings config = { @@ -134,7 +134,6 @@ def setup_environment(self, spack_env, run_env): run_env.set('WM_PROJECT_DIR', self.projectdir) for d in ['wmake', self.archbin]: # bin already added automatically run_env.prepend_path('PATH', join_path(self.projectdir, d)) - run_env.set('MPI_BUFFER_SIZE', "20000000") def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """Provide location of the OpenFOAM project.