Note: Darin uses Alphas; you should grab the files appropriate for your platform.
Note: Tim Cox at UC Davis did extensive comparison and found that the CERN version of CMSIM has 99% of the Davis code in it. Thus, you should install the CERN version. He will install the remaining Davis code soon. Installing the CERN version now has some advantages: you'll get the c++ demon out of the way now. That part of the installation is decidedly non trivial....
Here are some instructions I put together on installing the CERN version of CMSIM. It probably isn't complete, so if I've forgotten anything let me know. Feel free to pass it along if this is still a problem for others. I compiled the UCD version of CMSIM by replacing the "src" and "cmdb" directories with those from UCD.
***************
$CMS_PATH/utils/config/site.def
- replace AFS config directory with local one:
#define ConfigDir /heeusers/acosta/cms/cmsim/utils/config
/* DEA:
#define ConfigDir /afs/cern.ch/cms/utils/config
*/
***************
$CMS_PATH/utils/config/osf1.def
- add more compiler flags for DEC Alpha:
< #define CMSExtraFortranFlags -align records -align dcommons -static \
< -assume backslash -non_shared -taso -warn argument_checking \
< -warn truncated_source -fpe2 -pad_source
---
> #define CMSExtraFortranFlags -static -G 3 -pad_source
Note: I asked Darin why he used these new compiler flags, and got this
response:
Those were compiler flags ZEUS uses for the Alpha platform. They seemed
reasonable. for example, I didn't want shared libraries so that in the
future I can run the executable under alpha linux. Also, I wanted more
compiler time error messages, and I wanted to allow some floating point
excpetions. However, it could very well be that some of these flags cause
problems for CMSIM. I'm looking into it. But for any other platform,
i.e. Sun, you may not need any additional flags. At least you should not
blindly add any flags.
The last sentence, about not blindly adding flags, is always good
advice.
***************
$CMS_PATH/utils/imakecp:
9,10c9
< # /afs/cern.ch/cms/utils/imakecp $DIR2ROOT/$i
< /heeusers/acosta/cms/cmsim/utils/imakecp $DIR2ROOT/$i
---
> /afs/cern.ch/cms/utils/imakecp $DIR2ROOT/$i
***************
$CMS_PATH/utils/libbuild:
- replace AFS directories with local ones:
31,32c31
< #set RULESDIR=/afs/cern.ch/cms/utils/config
< set RULESDIR=/heeusers/acosta/cms/cmsim/utils/config
---
> set RULESDIR=/afs/cern.ch/cms/utils/config
145,146c144
< # /afs/cern.ch/cms/utils/imakecp $PWD
< /heeusers/acosta/cms/cmsim/utils/imakecp $PWD
---
> /afs/cern.ch/cms/utils/imakecp $PWD
***************
$CMS_PATH/setup/cshrc
- Put in local directories:
setenv CMS_PATH /heeusers/acosta/cms/cmsim
setenv CMS_SYS `$CMS_PATH/utils/fake-sys`
setenv CERN /heeusers/acosta/cern/$CMS_SYS
***************
$CMS_PATH/cmsim/cms112/examples/cmsim/cmsbuild
- put in local directory, add any link flags:
15,16c15
< #set AFS = /afs/cern.ch
< set AFS = /heeusers/acosta
---
> set AFS = /afs/cern.ch
18,20c17,18
< set INC1 = $AFS/cms/cmsim/cmsim/$CMS_VER/src
< #set INC2 = $AFS/asis/share/cern/pro/src
< set INC2 = $AFS/cern/$CMS_SYS/pro/src
---
> set INC1 = $AFS/cms/cmsim/$CMS_VER/src
> set INC2 = $AFS/asis/share/cern/pro/src
108,109c106
< # set ext = "-static -fpe4"
< set ext = "-align records -align dcommons -static
-assume backslash -non_shared -taso -fpe2 -pad_source -Wl,-taso -non_shared"
---
> set ext = "-static -fpe4"
136d132
< echo "$F77 $FFLAGS $list -o $BUILDDIR/$CMS_VER${in}.exe "
144d139
< #-lgeant321 -ljetset -lpawlib -lgraflib -lgrafX11 -lX11 -ldnet_stub
-lpacklib -lmathlib -lkernlib \
***************
setenv CMS_PATH /heeusers/acosta/cms/cmsim/ source $CMS_PATH/setup/cshrc setenv CMS_BIN $CMS_PATH/cmsim/cms112/bin/$CMS_SYS
CERN=/heeusers/acosta/cern/alpha_osf32 CERN_LEVEL=pro CERN_ROOT=/heeusers/acosta/cern/alpha_osf32/pro CMS_BIN=/heeusers/acosta/cms/cmsim/cmsim/cms112/bin/alpha_osf32 CMS_DB=/heeusers/acosta/cms/cmsim/cmsim/cmdb CMS_LEVEL=new CMS_LIBPATH=-L./ -L/heeusers/acosta/cms/cmsim/cmsim/new/lib/alpha_osf32/ -L/heeusers/acosta/cern/alpha_osf32/pro/lib/ -L/usr/lib/ CMS_LIBS=/heeusers/acosta/cms/cmsim/cmsim/new/lib/alpha_osf32 CMS_PATH=/heeusers/acosta/cms/cmsim CMS_SYS=alpha_osf32 CMS_VER=cms112 CMS_X11LIBS=/usr/lib CMZ=/heeusers/acosta/cms/cmsim/cmsim/pro/cmz CMZSYS=/heeusers/acosta/cms/cmsim/cmsim/etc/cmzsys.kumac DATA=/heeusers/acosta/cms/cmsim/cmsim/data GROUP_DIR=/heeusers/acosta/cms/cmsim/setup MAGNET=/heeusers/acosta/cms/cmsim/cms/magnet SCRATCH=/heeusers/acosta/tmp SRC=/heeusers/acosta/cms/cmsim/cmsim/new/src
cd cms/cmsim/cmsim/cms112/src/muon/ libbuild -L $CMS_LIBS
Note: I found a bug in one of the scripts for the Sun version. As you un-tar the files, two directories created will be ..../sun4x_55/. However, the script $CMS_PATH/utils/fake-sys thinks the directory should be ..../sun4m_54/. The easiest way to fix that is to change the line
echo sun4m_54echo sun4x_55Note: I had to make a few additional changes to get CMSIM to work. Some are because I used CMSIM 113 and Darin used CMSIM 112, some are because I have a Sun (and in Chris Williams' words, "You are suffering from a nasty case of non-standard C++ compiler as are most Suns").
#define CccCmd CC#define CccCmd g++$CMS_PATH/utils/config/System.def.#define CMSCXXstl $(SRC)/stl/sgiimg#define CMSCXXstl $(SRC)/stl/sgi2.03$CMS_PATH/utils/config/sun.cf. I did that by trial and
error-- you may need a different one.ln -s
<from> <to>):dev -> cms113/
new -> cms113/
old -> cms112/
pro -> cms113/
in the directory $CMS_PATH/cmsim/. This can be done using the
script $CMS_PATH/setup/setlevel but I did it by hand.cmdb -> ../cmdb/
cmsim -> src/
in the directory $CMS_PATH/cmsim/cms113/.