2 |
# |
# |
3 |
# ccf-setup.csh |
# ccf-setup.csh |
4 |
# |
# |
5 |
# Setup to build CCF from user's home |
# (C) ESA 1999-2019 |
6 |
# |
# |
7 |
# $Id: ccf-setup.csh,v 1.9 2016/03/18 15:59:21 ccflib Exp $ |
# $Id: ccf-setup.csh,v 1.13 2017/12/22 13:26:18 ccflib Exp $ |
8 |
|
|
9 |
|
|
10 |
set host=`hostname | cut -d. -f1` |
set host=`hostname | cut -d. -f1` |
11 |
|
|
12 |
# Identify machine OS name and kernel type |
# CCF can be made on the following hosts: |
13 |
|
# |
14 |
set osname=`uname -s` |
# 1) user's workstations |
15 |
|
# refhost is then a reference SAS builder like sasbld01n |
16 |
set cputype=`uname -m` |
# CCFLIB_HOME is set to the remote ccflib home on /xdata/ccflib |
17 |
|
# |
18 |
|
# 2) any SAS builder |
19 |
|
# refhost is itself |
20 |
|
# CCFLIB_HOME is also the ccflib home directory. |
21 |
|
# There is one exception to these rules: xmac01 |
22 |
|
# |
23 |
|
# |
24 |
|
|
25 |
# Select where to work and define CCFLIB_HOME accordingly |
set GNUVER="7.1" |
26 |
|
|
27 |
switch ($host) |
switch ($host) |
28 |
case sas[bld,dmz]0[1,2]: |
|
29 |
echo "${host} can not be used to build CCFs" |
case sasbld0[1-4]n: |
30 |
echo "Please login instead either on sasbld01n/sasbld02n or use your own Linux WS" |
set refhost=$host |
31 |
case sasbld0[1,2]n: |
setenv CCFLIB_HOME "/home/ccflib" |
|
set kernelbits="64" |
|
|
set refhost=${host} |
|
|
set GNUVER="6.2" |
|
|
setenv CCFLIB_HOME "/home/ccflib" |
|
|
breaksw |
|
|
case sasbld12: |
|
|
set kernelbits="64" |
|
|
set refhost=${host} |
|
|
set GNUVER="6.2" |
|
|
setenv CCFLIB_HOME "/home/ccflib" |
|
32 |
breaksw |
breaksw |
33 |
case xvsoc01: |
|
34 |
set kernelbits="32" |
case xmac01: |
35 |
set refhost="xvsoc01" |
set refhost=$host |
36 |
setenv CCFLIB_HOME "/data/xmm/ccflib" |
setenv CCFLIB_HOME /xdata/ccflib |
37 |
breaksw |
breaksw |
38 |
default : |
|
39 |
set kernelbits="64" |
default: |
40 |
set refhost="sasbld01n" |
set refhost="sasbld01n" |
41 |
set GNUVER="6.2" |
setenv CCFLIB_HOME "/xdata/ccflib" |
|
cd /ccfbuild >& /dev/null |
|
|
if ( $status != 0 ) then |
|
|
setenv CCFLIB_HOME "/xdata/ccflib" |
|
|
else |
|
|
setenv CCFLIB_HOME "/ccfbuild" |
|
|
endif |
|
42 |
breaksw |
breaksw |
43 |
endsw |
endsw |
44 |
|
|
45 |
|
if ( ! $?CCFLIB_HOME ) then |
46 |
|
echo "Error: ccf-setup.csh: Undefined $CCFLIB_HOME - Fix it!" |
47 |
|
exit 1 |
48 |
|
endif |
49 |
|
|
50 |
|
|
51 |
# Define where is the CCF development software |
# Define where is the CCF development software |
52 |
|
|
53 |
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
54 |
|
|
55 |
if ( ! -d $CCFDEV ) then |
if ( ! -d $CCFDEV ) then |
56 |
echo "ccf-setup.csh: $CCFDEV not found! - Abort" |
echo "Error: ccf-setup.csh: $CCFDEV not found! - Abort" |
57 |
return |
exit 1 |
58 |
endif |
endif |
59 |
|
|
60 |
|
|
62 |
|
|
63 |
setenv CVSROOT ${CCFLIB_HOME}/ccfcvs |
setenv CVSROOT ${CCFLIB_HOME}/ccfcvs |
64 |
|
|
65 |
# Heasoft |
# Heasoft and SAS. |
66 |
|
# |
67 |
|
# I M P O R T A N T N O T E |
68 |
|
# |
69 |
|
# We are using old versions of both due to a problem with deceit in latest versions |
70 |
|
# |
71 |
|
# Heasoft |
72 |
|
|
73 |
switch ($host) |
switch ($host) |
74 |
case xvsoc01: |
|
75 |
setenv LHEASOFT=1 |
case xmac01: |
76 |
breaksw |
|
77 |
default: |
setenv PATH "/sasbuild/local/xmac01/GNU_CC_CXX_4.8.5_Yosemite/perl/bin:$PATH" |
78 |
#setenv HEADAS "/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture" |
unsetenv PERL5LIB |
79 |
setenv PATH ${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH} |
setenv HEADAS "/sasbuild/local/xmac01/GNU_CC_CXX_4.8.5_Yosemite/headas/architecture" |
80 |
unsetenv PERL5LIB |
if ( ! -d "$HEADAS" ) then |
81 |
setenv HEADAS "/sasbuild/local/sasbld11/headas/architecture" |
echo "Error: ccf-setup.csh: ${HEADAS} does not exist - Abort" |
82 |
if ( ! -d $HEADAS ) then |
exit 1 |
83 |
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
endif |
84 |
return |
source ${HEADAS}/headas-init.csh |
85 |
endif |
breaksw |
86 |
source ${HEADAS}/headas-init.csh |
|
87 |
breaksw |
# Temporary fix: The SAS 16 and 16.1 deceit and ccfextseq tasks do not work |
88 |
|
# We must use SAS 15 which is not depending on GNUVER |
89 |
|
|
90 |
|
default: |
91 |
|
# |
92 |
|
# For the old versions of Heasoft and SAS we used a different perl |
93 |
|
# |
94 |
|
#setenv PATH ${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.10.1/bin:${PATH} |
95 |
|
setenv PATH /xdata/sasbuild/local/sasbld02/perl_5.10.1/bin:$PATH |
96 |
|
if ( $?PERL5LIB ) then |
97 |
|
setenv PERL5LIB /xdata/sasbuild/local/sasbld02/perl_5.10.1/lib:$PERL5LIB |
98 |
|
else |
99 |
|
setenv PERL5LIB /xdata/sasbuild/local/sasbld02/perl_5.10.1/lib |
100 |
|
endif |
101 |
|
setenv HEADAS "/xdata/sasbuild/local/sasbld02/headas/architecture" |
102 |
|
if ( ! -d $HEADAS ) then |
103 |
|
echo "Error: ccf-setup.csh: $HEADAS does not exist! - Abort" |
104 |
|
exit 1 |
105 |
|
endif |
106 |
|
source ${HEADAS}/headas-init.csh |
107 |
|
breaksw |
108 |
|
|
109 |
endsw |
endsw |
110 |
|
|
111 |
# SAS |
# SAS |
112 |
|
|
113 |
switch ($host) |
switch ($refhost) |
114 |
case xvsoc01: |
|
115 |
setenv SAS_DIR ${CCFLIB_HOME}/xmmsas_20020413_2031 |
case sasbld0[1-4]n: |
116 |
setenv SAS_PATH ${SAS_DIR} |
|
117 |
source $SAS_DIR/sas-setup.csh |
source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh >& /dev/null |
118 |
breaksw |
|
119 |
default: |
breaksw |
120 |
#/sas/bin/confsas |
|
121 |
#source $HOME/setsas.csh > /dev/null |
case xmac01: |
122 |
source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh > /dev/null |
|
123 |
breaksw |
source /sasbuild/installed/xmac01/xmmsas_20160201_1833/setsas.csh >& /dev/null |
124 |
|
|
125 |
|
breaksw |
126 |
|
|
127 |
|
default: |
128 |
|
echo "Please use a Linux workstation to process CCF!" |
129 |
|
exit 1 |
130 |
|
breaksw |
131 |
|
|
132 |
endsw |
endsw |
133 |
|
|
134 |
setenv SAS_MEMORY_MODEL Low |
setenv SAS_MEMORY_MODEL Low |
145 |
|
|
146 |
setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB} |
setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB} |
147 |
|
|
148 |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
# Add the scripts in $CCFLIB_HOME/bin, $CCFLIB_HOME/lib (for example uploadccf) to PATH |
149 |
|
|
150 |
setenv PATH ${CCFLIB_HOME}/bin:${PATH} |
setenv PATH ${CCFLIB_HOME}/bin:${CCFLIB_HOME}/ccfdev/bin:${CCFLIB_HOME}/ccfdev/lib:${PATH} |
151 |
|
|
152 |
# Unsets MAKE if set |
# Unsets MAKE if set |
153 |
|
|
154 |
if ( $?MAKE ) then |
if ( $?MAKE ) then |
155 |
echo "ccf-setup.csh, WARNING: Your environment sets MAKE=$MAKE. It will be unset" |
echo "WARNING: ccf-setup.csh: Your environment sets MAKE=$MAKE. It will be unset !" |
156 |
unsetenv MAKE |
unsetenv MAKE |
157 |
endif |
endif |
158 |
|
|