/[CCFs]/ccf-setup.sh
ViewVC logotype

Diff of /ccf-setup.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by ccflib, Mon Feb 20 14:12:08 2017 UTC revision 1.8 by ccflib, Fri Dec 22 10:44:11 2017 UTC
# Line 4  Line 4 
4  #  #
5  # Setup to build CCF from user's home  # Setup to build CCF from user's home
6  #  #
7  # $Id: ccf-setup.sh,v 1.6 2016/03/18 15:59:17 ccflib Exp $  # $Id: ccf-setup.sh,v 1.7 2017/02/20 14:12:08 ccflib Exp $
8    
9    
10  host=`hostname | cut -d. -f1`  host=`hostname | cut -d. -f1`
11    
12  # Identify machine OS name and kernel type  # We can produce CCF on
13    #    1) a user's workstation
14  osname=`uname -s`  #    2) a SAS builder
15    #    3) the XMM-Newton external web server xvsoc01
16  cputype=`uname -m`  #
17    # For SAS we take for all cases the latest SAS, unless is not working
18    
19  # Select where to work and define CCFLIB_HOME accordingly  GNUVER="6.2"
20    
21  case "$host" in  case "$host" in
22     # Exclude these hosts permanently          sasbld0[1,4]n)
23     sasbld01|sasbld02|sasdmz01|sasdmz02)                    refhost=$host
24         echo "$host can not be used to build CCFs"                  export CCFLIB_HOME=/home/ccflib
25         echo "Please log in instead either on sasbld01n/sasbld02n or use your own Linux WS"          ;;
26         exit ;;          xmac01|xmac03|xmc04)
27     # If you want to work on the servers                  refhost=$host
    sasbld01n|sasbld02n|sasbld12)  
        kernelbits="64"  
        refhost=$host  
        GNUVER="6.2"  
        export CCFLIB_HOME=/home/ccflib     ;;  
    # To work on the external server  
    xvsoc01)  
        kernelbits="32"  
        refhost="xvsoc01"              
        export CCFLIB_HOME=/data/xmm/ccflib ;;  
    # Just to work on any Linux WS  
    *)    
        kernelbits="64"  
        refhost="sasbld01n"  
        GNUVER="6.2"  
        cd /ccfbuild 2> /dev/null  
        if [ "$?" != "0" ] ; then  
28                  export CCFLIB_HOME=/xdata/ccflib                  export CCFLIB_HOME=/xdata/ccflib
29         else          ;;
30                  export CCFLIB_HOME=/ccfbuild          xvsoc01)
31         fi                  refhost=$host
32                    export CCFLIB_HOME=/data/xmm/ccflib
33            ;;
34            *)  
35                    refhost="sasbld01n"
36                    # Check that /ccfbuild is in fact available
37                    where=`pwd`
38                    cd /ccfbuild 2> /dev/null
39                    if [ "$?" != "0" ] ; then
40                            export CCFLIB_HOME=/xdata/ccflib
41                    else
42                            export CCFLIB_HOME=/ccfbuild
43                    fi
44                    cd $where
45         ;;         ;;
46  esac  esac
47    
48    if [ -z "$CCFLIB_HOME" ] ; then
49            echo "Error: Undefined $CCFLIB_HOME - Fix your environment!"
50            return
51    fi
52    
53  # Define where is the CCF development software  # Define where is the CCF development software
54    
55  export CCFDEV=${CCFLIB_HOME}/ccfdev  export CCFDEV=${CCFLIB_HOME}/ccfdev
56    
57  if [ ! -d "${CCFDEV}" ] ; then  if [ ! -d "${CCFDEV}" ] ; then
58     echo "ccf-setup.sh: ${CCFDEV} not found ! - Abort"     echo "Error: ccf-setup.sh: ${CCFDEV} not found ! - Abort"
59     return     return
60  fi  fi
61    
# Line 66  export CVSROOT=${CCFLIB_HOME}/ccfcvs Line 67  export CVSROOT=${CCFLIB_HOME}/ccfcvs
67  # Heasoft  # Heasoft
68    
69  case "$host" in  case "$host" in
70    # There is not Heasoft in xvsoc01  
71    xvsoc01)  export LHEASOFT=1 ;;          # Heasoft is not available in xvsoc01
72    # For the time being we force to use the Heasoft installation used for SAS 15  
73            xvsoc01)  export LHEASOFT=1
74    *)          ;;
75       #export HEADAS=/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture          
76       export PATH=${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH}  
77       unset PERL5LIB          # For the time being we force to use the Heasoft installation used for SAS 15
78       export HEADAS="/sasbuild/local/sasbld02/headas/architecture"  
79              if [ ! -d "$HEADAS" ] ; then          xmac01|xmac03|xmac04)
80                 echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"                  export PATH=/sasbuild/local/${host}/GNU_CC_CXX_4.8.5_Yosemite/perl/bin:$PATH
81                 return                  unset PERL5LIB
82              fi                  export HEADAS=/sasbuild/local/${host}/GNU_CC_CXX_4.8.5_Yosemite/headas/architecture
83              . ${HEADAS}/headas-init.sh  ;;                  if [ ! -d "$HEADAS" ] ; then
84   esac                          echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
85                            return
86                    fi
87                    . ${HEADAS}/headas-init.sh  ;;
88    
89                    
90            # Temporary fix: The SAS 16 and 16.1 deceit and ccfextseq tasks do not work
91            # We must use SAS 15 which is not depending on GNUVER
92    
93            *)
94            
95            #export HEADAS=/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture
96            export PATH=${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH}
97            unset PERL5LIB
98            export HEADAS="/sasbuild/local/sasbld02/headas/architecture"
99                    if [ ! -d "$HEADAS" ] ; then
100                            echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
101                            return
102                    fi
103                    . ${HEADAS}/headas-init.sh
104            ;;
105    
106    esac
107    
108  # SAS  # SAS
109    
110    
111  case "$host" in  case "$refhost" in
112    # Use an old SAS which still works fine!          # Use an old SAS which still works fine!
113    xvsoc01) export SAS_DIR=${CCFLIB_HOME}/xmmsas_20020413_2031          xvsoc01) export SAS_DIR=${CCFLIB_HOME}/xmmsas_20020413_2031
114             export SAS_PATH=$SAS_DIR                  export SAS_PATH=$SAS_DIR
115             . $SAS_DIR/sas-setup.sh     ;;                  . $SAS_DIR/sas-setup.sh
116    # For the time being we force to use SAS 15 given that deceit does not work on SAS 16          ;;
117    *)        
118       #/sas/bin/confsas          # For the time being we force to use SAS 15 given that deceit does not work on SAS 16
119       #. $HOME/setsas.sh 1> /dev/null          # For Linux, the installation of SAS is local to CCFLIB_HOME under local/SAS
120       # For the time being we force to use SAS 15 given that deceit does not work on SAS 16          # This installation has been made with perl 5.18.4 as SAS_PERL so we use it.    
121       # The installation of SAS is local to CCFLIB_HOME under local/SAS  
122       # This installation has been made with perl 5.18.4 as SAS_PERL so we use it.          sasbld01n|sasbld02n|sasbld03n|sasbld04n)
123       . ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.sh 1> /dev/null          
124       ;;          #/sas/bin/confsas
125            #. $HOME/setsas.sh 1> /dev/null
126            # For the time being we force to use SAS 15 given that deceit does not work on SAS 16
127            # The installation of SAS is local to CCFLIB_HOME under local/SAS
128            # This installation has been made with perl 5.18.4 as SAS_PERL so we use it.
129    
130            . ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.sh 1> /dev/null
131            ;;
132    
133            xmac01)
134            .  
135            ;;
136            
137            *)
138                    echo "Please use a Linux workstation to process CCF!"
139                    return
140            ;;
141            
142  esac  esac
143    
144  export SAS_MEMORY_MODEL=Low  export SAS_MEMORY_MODEL=Low
# Line 118  fi Line 158  fi
158  export PERL5LIB=${CCFDEV}/lib/perl5:${PERL5LIB}  export PERL5LIB=${CCFDEV}/lib/perl5:${PERL5LIB}
159    
160    
161  # Add the scripts in $CCFLIB_HOME/bin to PATH  # Add the scripts in $CCFLIB_HOME/bin and $CCFLIB_HOME/lib (for example uploadccf) to PATH
162    
163  export PATH=${CCFLIB_HOME}/bin:${PATH}  export PATH=${CCFLIB_HOME}/bin:${CCFLIB_HOME}/lib:${PATH}
164    
165  # Unset MAKE if set  # Unset MAKE if set
166    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.27