From c1493b1748fad2fa2beb45fcb4389b91f048ed17 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 9 Nov 2010 12:49:27 +0100 Subject: [PATCH] ENH: move scotch settings to etc/apps/scotch - NB: A csh version is not needed, since the values here are only sourced during the wmake process --- etc/apps/scotch/bashrc | 39 +++++++++++++++++++++++++++++++++ src/parallel/decompose/Allwmake | 16 ++++++++++---- 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 etc/apps/scotch/bashrc diff --git a/etc/apps/scotch/bashrc b/etc/apps/scotch/bashrc new file mode 100644 index 0000000000..5058df0ed1 --- /dev/null +++ b/etc/apps/scotch/bashrc @@ -0,0 +1,39 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# File +# scotch/bashrc +# +# Description +# Setup file for scotch include/libraries. +# Sourced during wmake process only. +# +# Note +# A csh version is not needed, since the values here are only sourced +# during the wmake process +#------------------------------------------------------------------------------ + +export SCOTCH_VERSION=scotch_5.1.10b +export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION + +# ----------------------------------------------------------------------------- diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index 82fa74bec3..22515e65d2 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -1,10 +1,18 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -set -x -SCOTCH_VERSION=scotch_5.1.10b -SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION -export SCOTCH_ARCH_PATH +# get SCOTCH_VERSION, SCOTCH_ARCH_PATH +settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc` +if [ -f "$settings" ] +then + . $settings + echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH" +else + echo + echo "Error: no apps/scotch/bashrc settings" + echo +fi +set -x wmakeLnInclude decompositionMethods