Difference: CernlibFlorianUhlig (1 vs. 4)

Revision 4
27 Aug 2013 - Main.FlorianUhlig
Line: 1 to 1
 
META TOPICPARENT name="HomepageFlorianUhlig"

Installation of CERN software

Line: 304 to 304
  mv magboltz $CERN_ROOT/bin
Added:
>
>

Finalize

After all the installations are done, you can remove the temporary directory.
 

-- FlorianUhlig - 26 Aug 2013
Revision 3
27 Aug 2013 - Main.FlorianUhlig
Line: 1 to 1
 
META TOPICPARENT name="HomepageFlorianUhlig"

Installation of CERN software

Line: 127 to 127
 

To compile and install patchy one needs a running version of ypatchy, so we have to bootstarp it.
Changed:
<
<
>
>
>
  mkdir nypatchy cd nypatchy gfortran -c $CVSCOSRC/p5boot/p5lib/*.f
Line: 135 to 135
  gfortran -o nypatchy $CVSCOSRC/p5boot/nypatchy.f libp5.a $CERN_LIBDIR/libkernlib.a cp nypatchy $CERN_BINDIR ln -s $CERN_BINDIR/nypatchy $CERN_BINDIR/ypatchy
Changed:
<
<
>
>
 

Unfortunately the build process did not install all the nneded binaries and scripts. So we have to do this step by hand.
Line: 159 to 159
  Now we have a complete Cernlib installation and we can go on with the installation of garfield and magboltz which will be described in the following.
Changed:
<
<

Installation of garfield

>
>

Installation of Garfield

 

The installation procedure is described in detail here and here.
Line: 208 to 208
 

# remove the explicit directory from the call of ypatchy sed 's#/cern/pro/bin/##g' -i'' patchy_step
Changed:
<
<
>
>
 

Open now a new terminal and setup the correct cern environment which point to your installation directory by executing the following script
Line: 244 to 244
  LF= `cernlib graflib/X11,kernlib,mathlib,packlib` -BINDIR=.@sys -BEMDIR = /afs/cern.ch/user/r/rjd/Garfield/Files/neBEM/V1.8.12
Changed:
<
<
+BINDIR=$CERN_ROOT/bin
>
>
+BINDIR=$(CERN_ROOT)/bin
  +BEMDIR = ./nebem/V1.8.13/ FF = -O3 -fbounds-check -fbackslash # -Wuninitialized

Line: 280 to 280
  rm *.f
Added:
>
>
The patch is applied and the code is compiled using the following commands.
 
#!/bin/bash

patch -p0 < garfield.patch
make -f makefile_linux garfield-9
Deleted:
<
<
make -f makefile_linux garfield-8 make -f makefile_linux garfield-7
 
Added:
>
>

Installation of Magboltz

Information about Magboltz can be found here and installation instructions here

First create a directory and get the source code and then compile simply one file. In the end move the executable to the binary directory.

  cd /tmp/cern
  mkdir magboltz
  cd magboltz
  wget http://magboltz.web.cern.ch/magboltz/magboltz-10.0.1.f
  gfortran -o magboltz magboltz-10.0.1.f -L$(CERN_ROOT)/lib -lpacklib -lmathlib -lkernlib
  mv magboltz $CERN_ROOT/bin
  -- FlorianUhlig - 26 Aug 2013

META FILEATTACHMENT attr="" comment="Patches for Cernlib" date="1377516593" name="cernlib_patches.tar.gz" path="cernlib_patches.tar.gz" size="31619" user="FlorianUhlig" version="1.1"
Revision 2
26 Aug 2013 - Main.FlorianUhlig
Line: 1 to 1
 
META TOPICPARENT name="HomepageFlorianUhlig"

Installation of CERN software

Line: 159 to 159
  Now we have a complete Cernlib installation and we can go on with the installation of garfield and magboltz which will be described in the following.
Added:
>
>

Installation of garfield

The installation procedure is described in detail here and here.

Get all the necessary source files which are lnked from the cern garfield webpage.

#!/bin/bash

cd /tmp/cern
mkdir garfield
cd garfield

wget http://cern.ch/rjd/Garfield/garfield-7.car

wget http://cern.ch/rjd/Garfield/heed101garf.car

wget http://cern.ch/rjd/Garfield/magboltz-2.car
wget http://cern.ch/rjd/Garfield/magboltz-3.car
wget http://cern.ch/rjd/Garfield/magboltz-7.car

wget http://nebem.web.cern.ch/nebem/files/neBEMV1.8.13.tgz

wget http://cern.ch/rjd/Garfield/garfield-7_linux.cra
mv garfield-7_linux.cra garfield-7.cra

wget http://cern.ch/rjd/Garfield/garfield-8_linux.cra
mv garfield-8_linux.cra garfield-8.cra

wget http://cern.ch/rjd/Garfield/garfield-9_linux.cra
mv garfield-9_linux.cra garfield-9.cra

wget http://cern.ch/rjd/Garfield/garfadd-7_linux.cra
mv garfadd-7_linux.cra garfadd-7.cra

wget http://cern.ch/rjd/Garfield/garfadd-8_linux.cra
mv garfadd-8_linux.cra garfadd-8.cra

wget http://cern.ch/rjd/Garfield/garfadd-9_linux.cra
mv garfadd-9_linux.cra garfadd-9.cra


wget http://cern.ch/rjd/Garfield/interface_amd64_linux26.cra
wget http://cern.ch/rjd/Garfield/makefile_linux
wget http://cern.ch/rjd/Garfield/patchy_step
chmod +x patchy_step

# remove the explicit directory from the call of ypatchy
sed 's#/cern/pro/bin/##g' -i'' patchy_step
<verbatim>

Open now a new terminal and setup the correct cern environment which point to your installation directory by executing the following script


<verbatim>
#!/bin/bash
export CERN=<Installation_directory>
export CERN_LEVEL=2006
export CERN_ROOT=$CERN/$CERN_LEVEL

export PATH=$CERN_ROOT/bin:$PATH
</verbatim>

The first step is to install the nneeded nebem libraries.

<verbatim>
  mkdir nebem
  mv neBEMV1.8.13.tgz nebem
  cd nebem
  tar -xzvf neBEMV1.8.13.tgz
  cd V1.8.13
  make
</verbatim>

Change the Makefile to find the needed libraries. This can be done by using the following patch

<verbatim>
--- makefile_linux   2013-08-11 13:50:13.000000000 +0200
+++ makefile_linux_new   2013-08-26 17:57:11.374820194 +0200</verbatim>
<nop>
Line: 10 to 10
Added:
>
>
# ---- FC = gfortran LF= `cernlib graflib/X11,kernlib,mathlib,packlib` -BINDIR=.@sys -BEMDIR = /afs/cern.ch/user/r/rjd/Garfield/Files/neBEM/V1.8.12 +BINDIR=$CERN_ROOT/bin +BEMDIR = ./nebem/V1.8.13/ FF = -O3 -fbounds-check -fbackslash # -Wuninitialized

relink-9: $(BEMDIR)/obj/neBEM.o
Line: 26 to 26
Added:
>
>
new-9: $(BEMDIR)/obj/neBEM.o -rm *.f ./patchy_step garfadd-9 - /cern/pro/bin/fcasplit garfadd-9.f + fcasplit garfadd-9.f -rm garfadd-9.f garfadd-9.mkfca garfadd-9.shfca y.lis $(FC) -c $(FF) *.f rm *.f
Line: 53 to 53
Added:
>
>
rm *.f

main-9.f: garfield-9.f - /cern/pro/bin/fcasplit garfield-9.f - /cern/pro/bin/fcasplit garfadd-9.f + fcasplit garfield-9.f + fcasplit garfadd-9.f -rm garfield-9.f garfield-9.mkfca garfield-9.shfca y.lis -rm garfadd-9.f garfadd-9.mkfca garfadd-9.shfca y.lis mv main.f main-9.f
Line: 67 to 67
Added:
>
>
garfboinc-9: garfield-7.car magboltz-7.car heed101garf.car -rm *.f *.o ./patchy_step garfboinc-9 - /cern/pro/bin/fcasplit garfboinc-9.f + fcasplit garfboinc-9.f -rm garfboinc-9.f garfboinc-9.mkfca garfboinc-9.shfca y.lis $(FC) -c $(FF) -fno-second-underscore *.f rm *.f

#!/bin/bash

patch -p0 < garfield.patch
make -f makefile_linux garfield-9
make -f makefile_linux garfield-8
make -f makefile_linux garfield-7
  -- FlorianUhlig - 26 Aug 2013

META FILEATTACHMENT attr="" comment="Patches for Cernlib" date="1377516593" name="cernlib_patches.tar.gz" path="cernlib_patches.tar.gz" size="31619" user="FlorianUhlig" version="1.1"
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CBM Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)