K2K software install guide

This page is for installing k2k-related software into your computer.
You may only need to install one set of libraries per one machine, in an "experiment account". I'll show you how to install softwares into the experiment account. Users can link these files by setting $EXPERIMENT environment to his/her login shell.

Group Account Management


Setting of CVS

The softwares of K2K (also SK) is managed with CVS & Imake. K2K CVS repository is

k2krep@neutrino.kek.jp
and mirrored SK repository opened for K2K member is
skrep@neutrino.kek.jp
Your username and machine name need to be added to the .rhosts file of the repository accounts to get K2K/SK software via CVS. Please ask administrator (ishida@neutrino.kek.jp).

Lines to be added in your login shell for CVS:

  (example for tcsh users on neutrino.kek.jp)
# for CVS
        setenv DISTTYPE  neutrino 
        setenv EDITOR '/usr/local/bin/mule -nw'
        alias rsh      '/usr/bin/rsh'
        alias k2krep 'setenv CVSROOT :ext:k2krep@neutrino.kek.jp:/home/k2krep/repository'
        alias skrep 'setenv CVSROOT :ext:skrep@neutrino.kek.jp:/home/skrep/repository'
        k2krep
        alias chkrep 'env | grep CVSROOT'
        setenv CVS_RSH /usr/bin/rsh
        setenv CVS_SERVER "env LOGNAME=$LOGNAME cvs"
                                                                           
  (example for bash users)
 	export EDITOR='/usr/bin/X11/emacs -nw'
 	alias rsh='/usr/bin/rsh'
 	alias k2krep='export CVSROOT=:ext:k2krep@neutrino.kek.jp:/home/k2krep/repository'
	alias skrep=export CVSROOT=:ext:skrep@neutrino.kek.jp:/home/skrep/repository'
	k2krep
	alias chkrep='echo CVSROOT is set to: $CVSROOT'
	export CVS_RSH=/usr/bin/rsh
	export CVS_SERVER="env LOGNAME=$LOGNAME cvs"
You need to change CVSROOT environment depending on which software you need. As you see, due to the complicity, three aliases are prepared:


Setting of Imake

Imake is utility to make 'Makefile'. You do not need botherfull setting of -L -l, -i, compiler options if you once setup your site specific definition. At first you need to setup Imake on your machine.

NOTE

Imake config files exist in skrep. The ones in k2krep is OBSOLETE.


  > cd
  > mkdir lib
  > cd lib
  > skrep
  > cvs checkout config

  > cd config

  Example on CCPS/neutrino etc. 
  > ln -s ./site_definitions/kek.def site.def

  > ./install.imake
Please also see instruction of Imake given in here .

* You need to use gnu-make(gmake) as make.
* How you create your site specific definitions: to copy from existing .defs with same machine-type may be best.

Lines to be added in your login shell for Imake: (example for neutrino)

# CERN lib
        setenv CERN /cern 
        setenv CERN_LEVEL 97a
        setenv CERN_ROOT /cern/97a
        set path=(${CERN}/${CERN_LEVEL}/bin $path)
# for IMAKE
        setenv EXPERIMENT "/u/neutrino/k2k"
        setenv EXPERIMENT_LEVEL  pro
        setenv EXPERIMENT_ROOT ${EXPERIMENT}/${EXPERIMENT_LEVEL}
        setenv PACKAGE ${EXPERIMENT}
        setenv PACKAGE_LEVEL ${EXPERIMENT_LEVEL}  
        setenv PACKAGE_ROOT ${PACKAGE}/${PACKAGE_LEVEL}
        set path=($path ${EXPERIMENT}/bin ${EXPERIMENT_ROOT}/bin/`Machine`)
        source ${EXPERIMENT}/bin/imake.cshrc
        unsetenv PRIVATE_ROOT

If you are just after installing Imake, you need:
> source ~/.cshrc


SuperKam libraries

Necessary libraries for FGD analyses:

Procedure

Here '-r sk98b' means to checkout official release tagged as 'sk98b' (see cvs manual), which is the most recent version released by SK offline group (see docs here ):
   k2k/src (k2k specific programs) 
      /atmpd/chgen
      /skam /inc
            /src/zbs
                /iolib
                /rfa_dummy

--- chgen install ---
   skrep(, or chkrep)
   cd (go to home directory)
   mkdir atmpd
   cd atmpd
   cvs checkout chgen
   cd chgen 
   imake_boot ; make install.include ; make install

--- skam_inc install ---
   cd
   mkdir skam
   cd skam
   cvs checkout -r sk98b skam_inc
   mv skam_inc inc
   cd inc
   imake_boot ; make install.include

--- skam_src install ---
   cd ..
   mkdir src
   cd src

   cvs checkout -r sk98b zbs
   cd zbs
   imake_boot ; make install.include ; make install

   cd ..
   cvs checkout -r sk98b rfa_dummy
   cd rfa_dummy
   imake_boot ; make install.include ; make install

   cvs checkout -r sk98b iolib
   cd iolib
   imake_boot ; make install.include ; make install
   cd ..

For skam_src installation,
cvs checkout -r sk98b skam_src cd skam_src imake_boot ; make World
should work. This install all libraries in skam_src.

K2K-specific libraries

In root of experiment account,

cd mkdir pro k2krep cvs checkout -r K2K98a k2kinc cvs checkout -r K2K98a k2ksrc cvs checkout -r K2K98a k2kdb --- k2kinc install --- cd k2kinc imake_boot ; make install.include --- k2ksrc install --- cd ../k2ksrc imake_boot ; make World --- for fgscan (will be included in World, in k2k99a)--- cd fgscan imake_boot ; make install.include ; make install ; make fgscan --- for fgsim --- cd ../fgsim imake_boot ; make fgsim

Setting for Private Users

For development of codes, users need to checkout a certain library into their private work space. The developped libraries will be installed under 'PRIVATE_ROOT' directory. For other libs, ones in experiment account will be linked.

(example for neutrino user) # for IMAKE setenv PRIVATE_ROOT "${home}" alias make 'make PRIVATE=y' # setenv EXPERIMENT "/u/neutrino/k2k" setenv EXPERIMENT_LEVEL pro setenv EXPERIMENT_ROOT ${EXPERIMENT}/${EXPERIMENT_LEVEL} setenv PACKAGE ${EXPERIMENT} setenv PACKAGE_LEVEL ${EXPERIMENT_LEVEL} setenv PACKAGE_ROOT ${PACKAGE}/${PACKAGE_LEVEL} source ${EXPERIMENT}/bin/imake.cshrc set path=($path ${EXPERIMENT}/bin \ ${EXPERIMENT_ROOT}/bin/`${EXPERIMENT}/bin/Machine`) #
Actually, the work will be like..
cd mkdir work cd work cvs checkout mcsft cvs checkout fgsim cd mcsft (improve something...) imake_boot ; make clean ; make install.include ; make install cd ../fgsim imake_boot ; make fgsim (try to figure out the change is okay or not..)

This page was last updated on Monday, January 18, 1999.
Send comments to: ishida@neutrino.kek.jp