Introducing the FOAM_SITE_DIR environment variable.
[foam-extend-3.2.git] / etc / settings.csh
blob31c46d8cd08c5c6837888de0b0bde3edd9156fec
1 #----------------------------------*-sh-*--------------------------------------
2 # =========                 |
3 # \\      /  F ield         | foam-extend: Open Source CFD
4 #  \\    /   O peration     | Version:     3.2
5 #   \\  /    A nd           | Web:         http://www.foam-extend.org
6 #    \\/     M anipulation  | For copyright notice see file Copyright
7 #------------------------------------------------------------------------------
8 # License
9 #     This file is part of foam-extend.
11 #     foam-extend is free software: you can redistribute it and/or modify it
12 #     under the terms of the GNU General Public License as published by the
13 #     Free Software Foundation, either version 3 of the License, or (at your
14 #     option) any later version.
16 #     foam-extend is distributed in the hope that it will be useful, but
17 #     WITHOUT ANY WARRANTY; without even the implied warranty of
18 #     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 #     General Public License for more details.
21 #     You should have received a copy of the GNU General Public License
22 #     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 # Script
25 #     etc/settings.csh
27 # Description
28 #     Startup file for FOAM
29 #     Sourced from FOAM-??/etc/cshrc
31 #------------------------------------------------------------------------------
33 # prefix to PATH
34 alias _foamAddPath 'set path=(\!* $path)'
35 # prefix to LD_LIBRARY_PATH
36 alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
38 # location of the jobControl directory
39 setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl
41 # wmake configuration
42 setenv WM_DIR $WM_PROJECT_DIR/wmake
43 setenv WM_LINK_LANGUAGE c++
44 setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
45 set path=($WM_DIR $path)
47 # base configuration
48 setenv FOAM_APP $WM_PROJECT_DIR/applications
49 setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
50 setenv FOAM_LIB $WM_PROJECT_DIR/lib
51 setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
52 setenv FOAM_SRC $WM_PROJECT_DIR/src
54 # shared site configuration - similar naming convention as ~FOAM expansion
55 setenv FOAM_SITE_DIR $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
56 setenv FOAM_SITE_APPBIN $FOAM_SITE_DIR/bin/$WM_OPTIONS
57 setenv FOAM_SITE_LIBBIN $FOAM_SITE_DIR/lib/$WM_OPTIONS
59 # user configuration
60 setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
61 setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
63 # convenience
64 setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
65 setenv FOAM_UTILITIES $FOAM_APP/utilities
66 setenv FOAM_SOLVERS $FOAM_APP/solvers
67 setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
69 # add FOAM scripts and wmake to the path
70 set path=($WM_DIR $WM_PROJECT_DIR/bin $path)
72 _foamAddPath $FOAM_APPBIN
73 _foamAddPath $FOAM_SITE_APPBIN
74 _foamAddPath $FOAM_USER_APPBIN
75  # Make sure to pick up dummy versions of external libraries last
76 _foamAddLib  $FOAM_LIBBIN/dummy
77 _foamAddLib  $FOAM_LIBBIN
78 _foamAddLib  $FOAM_SITE_LIBBIN
79 _foamAddLib  $FOAM_USER_LIBBIN
82 # Select compiler installation
83 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84 # compilerInstall = FOAM | System
85 #set compilerInstall=FOAM
86 #set compilerInstall=System
87 if ( ! $?compilerInstall ) then
88     setenv compilerInstall System
89 endif
91 switch ("$compilerInstall")
92 case FOAM:
93     switch ("$WM_COMPILER")
94     case Gcc:
95         setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS
96         _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.csh
97         _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.csh
98         _foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.csh
99         _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS/etc/gcc-4.6.4.csh
100     breaksw
101     case Gcc49:
102         setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS
103         _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS/etc/gcc-4.9.2.csh
104     breaksw
105     case Gcc47:
106         setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS
107         _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.csh
108         _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.csh
109         _foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.csh
110         _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS/etc/gcc-4.7.4.csh
111     breaksw
112     case Gcc45:
113         setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS
114         _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.csh
115         _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.csh
116         _foamSource $WM_THIRD_PARTY_DIR/packages/mpc-0.8.2/platforms/$WM_OPTIONS/etc/mpc-0.8.2.csh
117         _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS/etc/gcc-4.5.1.csh
118     breaksw
119     case Gcc44:
120         setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
121         _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.csh
122         _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.csh
123         _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.csh
124     breaksw
125     endsw
127     # Check that the compiler directory can be found
128     if ( ! -d "$WM_COMPILER_DIR" ) then
129         echo
130         echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
131         echo "    Cannot find $WM_COMPILER_DIR installation."
132         echo "    Please install this compiler version or if you wish to use the system compiler,"
133         echo "    change the 'compilerInstall' setting to 'System' in this file"
134         echo
135     endif
137     _foamAddPath ${WM_COMPILER_DIR}/bin
138     _foamAddLib  ${WM_COMPILER_DIR}/lib${WM_COMPILER_LIB_ARCH}
139     _foamAddLib  ${WM_COMPILER_DIR}/lib
141     breaksw
142 endsw
145 switch ("$WM_COMPILER")
146 case Gcc*:
147     setenv WM_CC 'gcc'
148     setenv WM_CXX 'g++'
149     breaksw
150 case Icc:
151     setenv WM_CC 'icc'
152     setenv WM_CXX 'icpc'
153     breaksw
154 endsw
156 # Communications library
157 # ~~~~~~~~~~~~~~~~~~~~~~
159 unset MPI_ARCH_PATH
161 set mpi_version=unknown
163 switch ("$WM_MPLIB")
164 case OPENMPI:
165     if ($?WM_THIRD_PARTY_USE_OPENMPI_188 != 0 && -d $WM_THIRD_PARTY_DIR/packages/openmpi-1.8.8/platforms/$WM_OPTIONS ) then
166         set mpi_version=openmpi-1.8.8
168         if ($?FOAM_VERBOSE && $?prompt) then
169             echo "Using openmpi-1.8.8 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
170         endif
171         _foamSource  $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh
173     else if ($?WM_THIRD_PARTY_USE_OPENMPI_165 != 0 && -d $WM_THIRD_PARTY_DIR/packages/openmpi-1.6.5/platforms/$WM_OPTIONS ) then
174         set mpi_version=openmpi-1.6.5
176         if ($?FOAM_VERBOSE && $?prompt) then
177             echo "Using openmpi-1.6.5 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
178         endif
179         _foamSource  $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh
181     else if ($?WM_THIRD_PARTY_USE_OPENMPI_143 != 0 && -d $WM_THIRD_PARTY_DIR/packages/openmpi-1.4.3/platforms/$WM_OPTIONS ) then
182         set mpi_version=openmpi-1.4.3
184         if ($?FOAM_VERBOSE && $?prompt) then
185             echo "Using openmpi-1.4.3 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
186         endif
187         _foamSource  $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh
189     else if ($?WM_THIRD_PARTY_USE_OPENMPI_143 != 0 && -d $WM_THIRD_PARTY_DIR/packages/openmpi-1.5/platforms/$WM_OPTIONS ) then
190         set mpi_version=openmpi-1.5
192         if ($?FOAM_VERBOSE && $?prompt) then
193             echo "Using openmpi-1.5 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
194         endif
195         _foamSource  $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh
196     endif
198     unset mpi_version
199     breaksw
201 case SYSTEMOPENMPI:
202     set mpi_version=openmpi-system
204     # make sure not the "old" mpi is used
205     # Not sure if this is necessary anymore.
206     # export OPAL_PREFIX=
208     # Make sure OPENMPI_BIN_DIR is set and valid
209     if ($?OPENMPI_BIN_DIR != 0 ) then
210         if (-d "${OPENMPI_BIN_DIR}" ) then
211         # User defined value specified for OPENMPI_BIN_DIR
212         #
213         # WARNING:
214         #          We assume this path specified by $OPENMPI_BIN_DIR is valid
215         #          We assume the command mpicc is located somewhere under this path
216         #          We assume the file mpi.h is located somewhere under this path
217         #
218             #          Otherwise, please double check your openmpi installation, you are
219         #          probably missing the openmpi runtime and/or development packages
220         #          available for your system.
221         #
222         _foamAddPath $OPENMPI_BIN_DIR
223          endif
224     else
225     # Here, we assume your environment is already set for running
226     # and developing with openmpi.
227     #
228     # Initialize OPENMPI_BIN_DIR using the path to mpicc
229         set mpicc_cmd=`which mpicc`
230         setenv OPENMPI_BIN_DIR `dirname $mpicc_cmd`
231         unset mpicc_cmd
232     endif
234     # Make sure OPENMPI_LIB_DIR is set
235     if ( $?OPENMPI_LIB_DIR == 0 ) then
236         # Initialize OPENMPI_LIB_DIR using the path to mpicc
237         setenv OPENMPI_LIB_DIR "`mpicc --showme:libdirs`"
238     endif
240     # Make sure the dynamic libraries are accessible
241     if( $?OPENMPI_LIB_DIR != 0 ) then
242         _foamAddLib $OPENMPI_LIB_DIR
243     endif
245     setenv MPI_HOME `dirname $OPENMPI_BIN_DIR`
246     setenv MPI_ARCH_PATH $MPI_HOME
247     setenv OPAL_PREFIX $MPI_ARCH_PATH
249     # We initialize the rest of the environment using mpicc --showme:
250     if ($?OPENMPI_INCLUDE_DIR == 0) then
251         setenv OPENMPI_INCLUDE_DIR "`mpicc --showme:incdirs`"
252     endif
254     if (${?OPENMPI_COMPILE_FLAGS} == 0) then
255         setenv OPENMPI_COMPILE_FLAGS "`mpicc --showme:compile`"
256     endif
258     if (${?OPENMPI_COMPILE_FLAGS} == 0) then
259         setenv OPENMPI_COMPILE_FLAGS "`mpicc --showme:compile`"
260     endif
262     if (${?OPENMPI_LINK_FLAGS} == 0) then
263         setenv OPENMPI_LINK_FLAGS "`mpicc --showme:link`"
264     endif
266     #
267     # WARNING: We assume the file mpi.h will be available under the directories identified
268     #          by the variable $OPENMPI_INCLUDE_DIR. Otherwise, please double check your
269     #          system openmpi installation.
271     # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
272     setenv PINC "$OPENMPI_COMPILE_FLAGS"
273     setenv PLIBS "$OPENMPI_LINK_FLAGS"
275     # No longer needed, but we keep this as a reference, just in case...
276     #libDir `echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
277     #_foamAddLib $libDir
279     if ($?FOAM_VERBOSE && $?prompt) then
280         echo "Using system installed OpenMPI:"
281         echo "    OPENMPI_BIN_DIR       : $OPENMPI_BIN_DIR"
282         echo "    OPENMPI_LIB_DIR       : $OPENMPI_LIB_DIR"
283         echo "    OPENMPI_INCLUDE_DIR   : $OPENMPI_INCLUDE_DIR"
284         echo "    OPENMPI_COMPILE_FLAGS : $OPENMPI_COMPILE_FLAGS"
285         echo "    OPENMPI_LINK_FLAGS    : $OPENMPI_LINK_FLAGS"
286         echo ""
287         echo "    MPI_HOME              : $MPI_HOME"
288         echo "    MPI_ARCH_PATH         : $MPI_ARCH_PATH"
289         echo "    OPAL_PREFIX           : $OPAL_PREFIX"
290         echo "    PINC                  : $PINC"
291         echo "    PLIBS                 : $PLIBS"
292     endif
294     unset mpi_version
295     breaksw
297 case MVAPICH2:
298     set mpi_version=mvapich2
300     if ($?MVAPICH2_BIN_DIR != 0) then
301         if (-d "${MVAPICH2_BIN_DIR}" ) then
302         _foamAddPath $MVAPICH2_BIN_DIR
303         endif
304     else
305         set mpicc_cmd=`which mpicc`
306         setenv MVAPICH2_BIN_DIR `dirname $mpicc_cmd`
307         unset mpicc_cmd
308     endif
310     setenv MPI_HOME `dirname $MVAPICH2_BIN_DIR`
311     setenv MPI_ARCH_PATH $MPI_HOME
313     setenv  PINC "`mpicc -show -cc= -nativelinking`"
314     setenv  PLIBS "`mpicc -show -cc= | sed "s%$PINC%%"`"
316     if ($?FOAM_VERBOSE && $?prompt) then
317         echo "  Environment variables defined for MVAPICH2:"
318         echo "    MPI_ARCH_PATH         : $MPI_ARCH_PATH"
319         echo "    PINC                  : $PINC"
320         echo "    PLIBS                 : $PLIBS"
321     endif
323     unset mpi_version
324     breaksw
326 case MPICH:
327     set mpi_version=mpich-1.2.4
328     setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
329     setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
330     setenv MPICH_ROOT $MPI_ARCH_PATH
332     _foamAddPath $MPI_ARCH_PATH/bin
333     _foamAddLib  $MPI_ARCH_PATH/lib
335     unset mpi_version
336     breaksw
338 case MPICH-GM:
339     setenv MPI_ARCH_PATH /opt/mpi
340     setenv MPICH_PATH $MPI_ARCH_PATH
341     setenv MPICH_ROOT $MPI_ARCH_PATH
342     setenv GM_LIB_PATH /opt/gm/lib64
344     _foamAddPath $MPI_ARCH_PATH/bin
345     _foamAddLib  $MPI_ARCH_PATH/lib
346     _foamAddLib  $GM_LIB_PATH
347     breaksw
349 case HPMPI:
350     setenv MPI_HOME /opt/hpmpi
351     setenv MPI_ARCH_PATH $MPI_HOME
352     setenv MPICH_ROOT=$MPI_ARCH_PATH
354     _foamAddPath $MPI_ARCH_PATH/bin
356     switch (`uname -m`)
357     case i686:
358         _foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
359         breaksw
360     case x86_64:
361         _foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
362         breaksw
363     case ia64:
364         _foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
365         breaksw
366     default:
367         echo Unknown processor type `uname -m` for Linux
368         breaksw
369     endsw
370     breaksw
372 case GAMMA:
373     setenv MPI_ARCH_PATH /usr
374     breaksw
376 case MPI:
377     setenv MPI_ARCH_PATH /opt/mpi
378     breaksw
380 case FJMPI:
381     setenv MPI_ARCH_PATH /opt/FJSVmpi2
382     _foamAddPath $MPI_ARCH_PATH/bin
383     _foamAddLib  $MPI_ARCH_PATH/lib/sparcv9
384     _foamAddLib  /opt/FSUNf90/lib/sparcv9
385     _foamAddLib  /opt/FJSVpnidt/lib
386     breaksw
388 case QSMPI:
389     setenv MPI_ARCH_PATH /usr/lib/mpi
390     _foamAddPath $MPI_ARCH_PATH/bin
391     _foamAddLib $MPI_ARCH_PATH/lib
393     breaksw
395 case SGIMPI:
396     if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
398     if ( ! -d "$MPI_ROOT" ) then
399         echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
400         echo "    MPI_ROOT not a valid mpt installation directory."
401         echo "    Please set MPI_ROOT to the mpt installation directory."
402         echo "    (usually done by loading the mpt module)"
403         echo "    MPI_ROOT currently set to '$MPI_ROOT'"
404     endif
406     if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
407         setenv MPI_ROOT ${MPI_ROOT:h}
408     endif
410     setenv FOAM_MPI ${MPI_ROOT:t}
411     setenv MPI_ARCH_PATH $MPI_ROOT
414     if ($?FOAM_VERBOSE && $?prompt) then
415         echo "Using SGI MPT:"
416         echo "    MPI_ROOT : $MPI_ROOT"
417         echo "    FOAM_MPI : $FOAM_MPI"
418     endif
421     _foamAddPath    $MPI_ARCH_PATH/bin
422     _foamAddLib     $MPI_ARCH_PATH/lib
423     breaksw
425 case INTELMPI:
426     if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
428     if ( ! -d "$MPI_ROOT" ) then
429         echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
430         echo "    MPI_ROOT not a valid mpt installation directory."
431         echo "    Please set MPI_ROOT to the mpt installation directory."
432         echo "    (usually done by loading the mpt module)"
433         echo "    MPI_ROOT currently set to '$MPI_ROOT'"
434     endif
436     if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
437         setenv MPI_ROOT ${MPI_ROOT:h}
438     endif
440     setenv FOAM_MPI ${MPI_ROOT:t}
441     setenv MPI_ARCH_PATH $MPI_ROOT
444     if ($?FOAM_VERBOSE && $?prompt) then
445         echo "Using INTEL MPT:"
446         echo "    MPI_ROOT : $MPI_ROOT"
447         echo "    FOAM_MPI : $FOAM_MPI"
448     endif
451     _foamAddPath    $MPI_ARCH_PATH/bin64
452     _foamAddLib     $MPI_ARCH_PATH/lib64
453     breaksw
455 default:
456     breaksw
457 endsw
459 # Set the minimum MPI buffer size (used by all platforms except SGI MPI)
460 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
461 set minBufferSize=20000000
463 if ( $?MPI_BUFFER_SIZE ) then
464     if ( $MPI_BUFFER_SIZE < $minBufferSize ) then
465         setenv MPI_BUFFER_SIZE $minBufferSize
466     endif
467 else
468     setenv MPI_BUFFER_SIZE $minBufferSize
469 endif
471 # CUDA library
472 # ~~~~~~~~~~~~
473 if ( $?CUDA_SYSTEM == 0 && -e /usr/local/cuda-5.5/bin/nvcc ) then
474     setenv CUDA_DIR /usr/local/cuda-5.5
475     setenv CUDA_BIN_DIR $CUDA_DIR/bin
476     setenv CUDA_LIB_DIR $CUDA_DIR/lib64
477     setenv CUDA_INCLUDE_DIR $CUDA_DIR/include
478     setenv CUDA_ARCH sm_20
479 endif
481 if ( $?CUDA_BIN_DIR ) then
482     _foamAddPath $CUDA_BIN_DIR
483 endif
485 if ( $?CUDA_LIB_DIR ) then
486     _foamAddLib $CUDA_LIB_DIR
487 endif
489 # CGAL library if available
490 # ~~~~~~~~~~~~~~~~~~~~~~~~~
491 if ( $?CGAL_LIB_DIR ) then
492     _foamAddLib $CGAL_LIB_DIR
493 endif
495 # Mesquite library if available
496 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
497 if ( $?MESQUITE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_MESQUITE_212 != 0 && -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS ) then
498     _foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS/etc/mesquite-2.1.2.csh
499 endif
501 # Metis library if available
502 # ~~~~~~~~~~~~~~~~~~~~~~~~~~
503 if ( $?METIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_METIS_510 != 0 && -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ) then
504     _foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.csh
505 endif
507 # ParMetis library if available
508 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
509 if ( $?PARMETIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARMETIS_403 != 0 && -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ) then
510     _foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.csh
511 endif
513 # ParMGridGen library if available
514 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
515 if ( $?PARMGRIDGEN_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARMGRIDGEN_10 != 0 && -e $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS ) then
516     _foamSource $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS/etc/ParMGridGen-1.0.csh
517 endif
519 # Load Libccmio library
520 # ~~~~~~~~~~~~~~~~~~~~~
521 if ( $?LIBCCMIO_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_LIBCCMIO_261 != 0 && -e $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1/platforms/$WM_OPTIONS ) then
522     _foamSource $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1/platforms/$WM_OPTIONS/etc/libccmio-2.6.1.csh
523 endif
526 # Scotch library if available
527 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~
528 if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_604 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ) then
529     _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.csh
530 endif
532 if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_600 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ) then
533     _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.csh
534 endif
536 # Switch on the hoard memory allocator if available
537 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
538 #if ( -f $FOAM_LIBBIN/libhoard.so ) then
539 #    setenv LD_PRELOAD $FOAM_LIBBIN/libhoard.so:${LD_PRELOAD}
540 #endif
542 # Third party packages
544 # cmake
545 # ~~~~~
546 if ( $?CMAKE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_CMAKE_322 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-3.2.2/platforms/$WM_OPTIONS ) then
547     _foamSource $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS/etc/cmake-3.2.2.csh
548 endif
550 if ( $?CMAKE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_CMAKE_2812 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.12/platforms/$WM_OPTIONS ) then
551     _foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS/etc/cmake-2.8.12.csh
552 endif
554 # m4
555 # ~~~~~
556 if ( $?M4_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_M4_1416 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/m4-1.4.16/platforms/$WM_OPTIONS ) then
557     _foamSource $WM_THIRD_PARTY_DIR/packages/m4-1.4.16/platforms/$WM_OPTIONS/etc/m4-1.4.16.csh
558 endif
560 # bison
561 # ~~~~~
562 if ( $?BISON_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_BISON_27 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/bison-2.7/platforms/$WM_OPTIONS ) then
563     _foamSource $WM_THIRD_PARTY_DIR/packages/bison-2.7/platforms/$WM_OPTIONS/etc/bison-2.7.csh
564 endif
566 # flex
567 # ~~~~~
568 if ( $?FLEX_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_FLEX_2535 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/flex-2.5.35/platforms/$WM_OPTIONS ) then
569     _foamSource $WM_THIRD_PARTY_DIR/packages/flex-2.5.35/platforms/$WM_OPTIONS/etc/flex-2.5.35.csh
570 endif
572 # zoltan
573 # ~~~~~
574 if ( $?ZOLTAN_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_ZOLTAN_35 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/zoltan-3.5/platforms/$WM_OPTIONS ) then
575     _foamSource $WM_THIRD_PARTY_DIR/packages/zoltan-3.5/platforms/$WM_OPTIONS/etc/zoltan-3.5.csh
576 endif
578 # Python
579 # ~~~~~
580 if ( $?PYTHON_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PYTHON_27 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/Python-2.7/platforms/$WM_OPTIONS ) then
581     _foamSource $WM_THIRD_PARTY_DIR/packages/Python-2.7/platforms/$WM_OPTIONS/etc/Python-2.7.csh
582 endif
584 # PyFoam
585 # ~~~~~~
586 if ( $?PYFOAM_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PYFOAM_063 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/PyFoam-0.6.3/platforms/noarch ) then
587     _foamSource $WM_THIRD_PARTY_DIR/packages/PyFoam-0.6.3/platforms/noarch/etc/PyFoam-0.6.3.csh
588 endif
589 if ( $?PYFOAM_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PYFOAM_063 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/PyFoam-0.6.4/platforms/noarch ) then
590     _foamSource $WM_THIRD_PARTY_DIR/packages/PyFoam-0.6.4/platforms/noarch/etc/PyFoam-0.6.4.csh
591 endif
593 # hwloc
594 # ~~~~~
595 if ( $?HWLOC_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_HWLOC_172 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/hwloc-1.7.2/platforms/$WM_OPTIONS ) then
596     _foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS/etc/hwloc-1.7.2.csh
597 endif
598 if ( $?HWLOC_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_HWLOC_1101 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/hwloc-1.10.1/platforms/$WM_OPTIONS ) then
599     _foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.10.1/platforms/$WM_OPTIONS/etc/hwloc-1.10.1.csh
600 endif
602 # QT
603 # ~~~~~
604 if ( $?QT_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_QT_486 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS )then
605     _foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.5.csh
606 endif
608 # PARAVIEW
609 # ~~~~~
610 if ( $?PARAVIEW_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARAVIEW_431 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-4.3.1/platforms/$WM_OPTIONS ) then
611     _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.3.1/platforms/$WM_OPTIONS/etc/ParaView-4.3.1.csh
612 endif
613 if ( $?PARAVIEW_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARAVIEW_410 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-4.1.0/platforms/$WM_OPTIONS ) then
614     _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.1.0/platforms/$WM_OPTIONS/etc/ParaView-4.1.0.csh
615 endif
616 if ( $?PARAVIEW_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARAVIEW_401 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-4.0.1/platforms/$WM_OPTIONS ) then
617     _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.0.1/platforms/$WM_OPTIONS/etc/ParaView-4.0.1.csh
618 endif
620 if ( $?PARAVIEW_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARAVIEW_3141 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.14.1/platforms/$WM_OPTIONS ) then
621    _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.14.1/platforms/$WM_OPTIONS/etc/ParaView-3.14.1.csh
622 endif
624 if ( $?PARAVIEW_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARAVIEW_381 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.8.1/platforms/$WM_OPTIONS ) then
625     _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.csh
626 endif
628 # llvm
629 # ~~~~~
630 if ( $?LLVM_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_LLVM_360 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/llvm-3.6.0/platforms/$WM_OPTIONS ) then
631     _foamSource $WM_THIRD_PARTY_DIR/packages/llvm-3.6.0/platforms/$WM_OPTIONS/etc/llvm-3.6.0.csh
632 endif
634 # mesa
635 # ~~~~~
636 if ( $?MESA_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_MESA_GIT != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/mesa-git/platforms/$WM_OPTIONS ) then
637     _foamSource $WM_THIRD_PARTY_DIR/packages/mesa-git/platforms/$WM_OPTIONS/etc/mesa-git.csh
638 endif
641 if ( $WM_ARCH == "darwinIntel" || $WM_ARCH == "darwinIntel64" ) then
642     setenv DYLD_LIBRARY_PATH ${LD_LIBRARY_PATH}
643 endif
645 # cleanup environment:
646 # ~~~~~~~~~~~~~~~~~~~~
647 unalias _foamAddPath
648 unalias _foamAddLib
649 unset minBufferSize
651 # -----------------------------------------------------------------------------