File: cshrc

package info (click to toggle)
openfoam 1912.200626-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 238,940 kB
  • sloc: cpp: 1,159,638; sh: 15,902; ansic: 5,195; lex: 660; xml: 387; python: 282; awk: 212; makefile: 103; sed: 88; csh: 3
file content (203 lines) | stat: -rw-r--r-- 7,338 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#----------------------------------*-sh-*--------------------------------------
# =========                 |
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
#  \\    /   O peration     |
#   \\  /    A nd           | www.openfoam.com
#    \\/     M anipulation  |
#------------------------------------------------------------------------------
#     Copyright (C) 2011-2016 OpenFOAM Foundation
#     Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
#     This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
#     etc/cshrc
#
# Description
#     The OpenFOAM environment for C-shell (csh, tcsh).
#     Source manually or from the ~/.cshrc or ~/.login files.
#
#     Most settings can be overridden with a <prefs.csh> file:
#
#       - Base values (eg, from system admin):
#         -  $WM_PROJECT_DIR/etc/prefs.csh
#
#       - User or group values (first file found):
#         -  ~/.OpenFOAM/$FOAM_API/prefs.csh
#         -  ~/.OpenFOAM/prefs.csh
#         -  $WM_PROJECT_SITE/$FOAM_API/etc/prefs.csh
#         -  $WM_PROJECT_SITE/prefs.csh
#
#     Some settings can also be overridden on the command-line when
#     sourcing this file. For example,
#
#       source /path/etc/cshrc WM_COMPILER=Clang WM_LABEL_SIZE=64
#
# Environment
#     FOAM_CONFIG_ETC
#     - alternative/additional location for OpenFOAM etc/ directory
#
#     FOAM_CONFIG_MODE (search mode for etc config files - see foamEtcFile)
#         - eg, FOAM_CONFIG_MODE="o" to only use OpenFOAM config files
#         - no influence on OpenFOAM applications, just the config files
#
#     FOAM_VERBOSE (set/unset)
#         - add extra verbosity when sourcing files
#
#     WM_PROJECT_SITE (optional directory)
#         - local site-specific directory, uses WM_PROJECT_DIR/site if unset
#
# Note
#     Changes made to this file will be lost with the next upgrade.
#
#------------------------------------------------------------------------------

# [WM_PROJECT_VERSION] - A human-readable version name
# A development version is often named 'com' - as in www.openfoam.com
setenv WM_PROJECT_VERSION v1912

#------------------------------------------------------------------------------
# Configuration environment variables.
# Override with <prefs.csh> instead of editing here.

# [WM_COMPILER_TYPE] - Compiler location:
# = system | ThirdParty
setenv WM_COMPILER_TYPE system

# [WM_COMPILER] - Compiler:
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-5] | Gcc7[1-4] | Gcc8[12] |
#   Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi
setenv WM_COMPILER Gcc

# [WM_PRECISION_OPTION] - Floating-point precision:
# = DP | SP | SPDP
setenv WM_PRECISION_OPTION DP

# [WM_LABEL_SIZE] - Label size in bits:
# = 32 | 64
setenv WM_LABEL_SIZE 32

# [WM_COMPILE_OPTION] - Optimised(default), debug, profiling, other:
# = Opt | Debug | Prof
# Other is processor or packaging specific (eg, OptKNL)
setenv WM_COMPILE_OPTION Opt

# [WM_MPLIB] - MPI implementation:
# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM |
#   HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
# Also possible to use INTELMPI-xyz etc and define your own wmake rule
setenv WM_MPLIB SYSTEMOPENMPI


#------------------------------------------------------------------------------
# (advanced / legacy)

# [WM_PROJECT] - This project is "OpenFOAM" - do not change
setenv WM_PROJECT OpenFOAM

# [projectDir] - directory containing this OpenFOAM version.
# \- When this file is located as $WM_PROJECT_DIR/etc/cshrc, the next lines
#    should work when sourced by CSH or TCSH shells. If this however fails,
#    set one of the fallback values to an appropriate path.
#
#    This can be removed if an absolute path is provided for WM_PROJECT_DIR
#    later on in this file.
# --
# If the directory naming does not match WM_PROJECT, need to change here
set projectName="$WM_PROJECT"
set projectDir=`lsof +p $$ |& \
    sed -ne 's@^[^/]*@@;\@/'"$projectName"'[^/]*/etc/cshrc@{s@/etc/cshrc.*@@p; q}'`

# set projectDir="$HOME/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION"
# set projectDir="/opt/openfoam/OpenFOAM-$WM_PROJECT_VERSION"
# set projectDir="/usr/local/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION"
################################################################################
# Or optionally hard-coded (eg, with autoconfig)
# set projectDir="@PROJECT_DIR@"

# [FOAM_SIGFPE] - Trap floating-point exceptions.
#               - overrides the 'trapFpe' controlDict entry
# = true | false
#setenv FOAM_SIGFPE true

# [FOAM_SETNAN] - Initialize memory with NaN
#               - overrides the 'setNaN' controlDict entry
# = true | false
#setenv FOAM_SETNAN false

# [FOAM_CODE_TEMPLATES] - dynamicCode templates
# - unset: uses 'foamEtcFile -list codeTemplates/dynamicCode'
##setenv FOAM_CODE_TEMPLATES "$WM_PROJECT_DIR/etc/codeTemplates/dynamicCode"

# [FOAM_JOB_DIR] - location of jobControl
#                - unset: equivalent to ~/.OpenFOAM/jobControl
#setenv FOAM_JOB_DIR "$HOME/.OpenFOAM/jobControl"

# [WM_OSTYPE] - Operating System Type (set automatically)
# = POSIX | MSwindows
#setenv WM_OSTYPE POSIX

# [WM_ARCH_OPTION] - compiling with -m32 option on 64-bit system
# = 32 | 64
#   * on a 64-bit OS this can be 32 or 64
#   * on a 32-bit OS this option is ignored (always 32-bit)
#setenv WM_ARCH_OPTION 64

# [FOAM_EXTRA_CXXFLAGS]
# Additional compilation flags - do not inherit from the environment.
# Set after sourcing or via <prefs.csh> to avoid surprises.
unsetenv FOAM_EXTRA_CXXFLAGS

################################################################################
# NO (NORMAL) USER EDITING BELOW HERE

# Capture values of old directories to be cleaned from PATH, LD_LIBRARY_PATH
set foamOldDirs=
if ( $?WM_PROJECT_DIR ) then
   set foamOldDirs="$foamOldDirs $WM_PROJECT_DIR"
endif
if ( $?WM_THIRD_PARTY_DIR ) then
   set foamOldDirs="$foamOldDirs $WM_THIRD_PARTY_DIR"
endif
if ( $?WM_PROJECT ) then
   set foamOldDirs="$foamOldDirs $HOME/$WM_PROJECT/$LOGNAME"
endif
if ( $?FOAM_SITE_APPBIN ) then
   set foamOldDirs="$foamOldDirs $FOAM_SITE_APPBIN"
endif
if ( $?FOAM_SITE_LIBBIN ) then
   set foamOldDirs="$foamOldDirs $FOAM_SITE_LIBBIN"
endif

# [WM_PROJECT_DIR] - Location of this OpenFOAM version
setenv WM_PROJECT_DIR "$projectDir"

# [WM_PROJECT_USER_DIR] - Location of user files
setenv WM_PROJECT_USER_DIR "$HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION"

# [WM_PROJECT_SITE] - Location of site-specific (group) files
# Default (unset) implies WM_PROJECT_DIR/site
# Normally defined in calling environment

if ( $?WM_PROJECT_SITE ) then
    set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs"
    if ( ! -d "$WM_PROJECT_SITE" ) unsetenv WM_PROJECT_SITE
else
    unsetenv WM_PROJECT_SITE
endif


# Finalize setup of OpenFOAM environment
if ( -d "$WM_PROJECT_DIR" ) then
    if ($?FOAM_VERBOSE && $?prompt) echo "source $WM_PROJECT_DIR/etc/config.csh/setup"
    source "$WM_PROJECT_DIR/etc/config.csh/setup" $argv[*]
else
    echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION"
    echo "No directory: $WM_PROJECT_DIR"
endif

# Cleanup variables (done as final statement for a clean exit code)
unset foamOldDirs projectDir projectName

#------------------------------------------------------------------------------