Table of Contents
Installation of ProMC
If you use Scientific-Linux 6 (x64), use pre-built ProMC binary files:
wget http://atlaswww.hep.anl.gov/asc/promc/download/ProMC-1.5-x86_64-slc6-gcc447-opt.tgz tar -zvxf ProMC-1.5-x86_64-slc6-gcc447-opt.tgz source promc/setup.sh
If you use CERN's lxplus and gcc4.8, setup PROMC as:
source /afs/cern.ch/sw/lcg/contrib/gcc/4.8/x86_64-slc6/setup.sh source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.21/x86_64-slc6-gcc48-opt/root/bin/thisroot.sh source /afs/cern.ch/atlas/offline/external/promc/setup.sh
which is built for x86_64-slc6-gcc48-opt and can be used on ScientificLinux 6.X. Note: setting up ROOT is only needed for a few ProMC examples. ROOT is not required to run ProMC.
Note for ATLAS: you can setup the needed gcc4X compiler and Python as:
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh' setupATLAS localSetupGcc gcc481_x86_64_slc6 localSetupPython 2.7.4-x86_64-slc6-gcc48
For the ATLAS grid sites:
source /cvmfs/atlas.cern.ch/repo/sw/external/promc/x86_64-slc6-gcc48-opt/1.5/setup.sh
For ANL (ATLAS):
source /share/sl6/set_asc.sh
Installation from the source (Linux)
ProMC is self-contained package and has a minimum requirements. Before installing on Linux (RHEL, UBuntu etc), make sure that the following packages, in addition to the GNU compiles, are installed:
yum install python-pip python-setuptools zlib1g-dev zlib-devel
Then get the current ProMC release from Download page. You can also use ProMC github. Below we show how to download and compile the most recent ProMC package (i.e. ProMC-1.5.tgz):
wget http://atlaswww.hep.anl.gov/asc/promc/download/current.php -O ProMC.tgz tar -zvxf ProMC.tgz cd ProMC ./build.sh # build all source files ./install.sh [promc_dir] # install into some directory source [promc_dir]/setup.sh # make it available
The script “install.sh” moves all libraries and header files to a permanent location, given by the directory [directory]. You should have write permissions. Do not forget to setup ProMC (the last line) For example:
./install.sh /usr/local source /usr/local/setup.sh # make it available
requires administrator's write permission, while the user “home” directory does not:
./install.sh $HOME source [promc_dir]/setup.sh # make it available
If you need to install a HEPMC converter which converts HEPMC files to ProMC files (“hepmc2promc), specify a second argument which points to the HEPMC installation
./install.sh [promc_dir] [hepmc_dir] source [promc_dir]/setup.sh # make it available
Example:
./install.sh /usr/local /user/local/HEPMC source [promc_dir]/setup.sh # set PROMC env variable
As a check, make sure
echo $PROMC
returns the installation ProMC directory. Now you can remove the original build directory “ProMC”. To test the installation, go to the example directory and run the example that write and reads random numbers in a file:
cd $PROMC/examples/random make ./writer # write random data to out/ ./reader # read random data from out/
Installation from the source (Mac OS)
For MacOS (Darwin), first install these libraries: pkgconfig, wget, gcc. You can can use Xcode and Fink and to install such dev libraries. If you do not use “Fink”, you should use XCode and MacPort:
- Xcode and the Xcode Command Line Tools. Then agree to Xcode license in Terminal: “sudo xcodebuild -license”
- MacPorts for your version of OS X: 10.10 and then “sudo port install pkgconfig wget”
The current installation was tested with Xcode/Fink or using Xcode/MacPorts. Next we assume that you are using the “bash” terminal. Then repeat the same steps as for Linux:
bash wget http://atlaswww.hep.anl.gov/asc/promc/download/current.php -O ProMC.tgz tar -zvxf ProMC.tgz cd ProMC ./build.sh # build all source files ./install.sh [promc_dir] # install into [promc_dir] directory source [promc_dir]/setup.sh # set PROMC env variable.
To test the installation, go to the example directory and run the example that writes and reads random numbers in/from a file:
cd $PROMC/examples/random make ./writer # write random data to out/ ./reader # read random data from out/
You can download a compiled ProMC library (MacOS 10.10.1) from http://atlaswww.hep.anl.gov/asc/promc/download/promc1.5_macOS_10.10.1.tgz. Thanks to Larry Nodulman for verifying this installation.
Removing the installed ProMC
Run the script:
./uninstall.sh
it removes all libraries from the $PROMC area. To remove the build files, run:
./clear.sh
Download and SVN
Possible problems
Make sure that zlib-dev library is installed. Check it as:
yum install zlib-devel
or
sudo apt-get install zlib1g-dev
for Ubuntu.
Another possible problem is tha you may have already protocol buffers installed. Please remove it as
sudo apt-get remove libprotoc-dev protobuf-compiler
(for ubuntu)
To run ProMC with Python, you should install these packages:
yum install python-pip python-setuptools
Installation on IBM BlueGene/Q
(contributed by Ed May and William Scullin)
ProMC can be installed on IBM Blue Gene/Q (for example, on Mira at Argonne Leadership Computing Facility). First, you should define compilers before running “build.sh”:
export F77=mpif77 export FC=mpif90 export CC=mpicc export CPP=mpicxx export CXX=mpicxx
Installing zlib
Next, compile the ZLIB library using the above compiles. Download ZLIB from http://www.zlib.net/. Then change the location of these libraries in “build.sh” file. The ZLIB library is used by “cbook” package, so modify “cbook/Makefile”:
- Point “CPP_INCLUDEDIRS4” to the ZLIB header file
- Point the compiler to “libz.a” of your ZLIB installation and
For example, you can do it as:
LIBDIR = + [ZLIB location]/zlib/lib CPP_INCLUDEDIRS4 = -I${DIR_CURRENT}/cbook/inc/CBook -I/home/chakanau/bgheplib/bghep/utils/zlib/include/
then add to “CPP_INCLUDEDIRS4” the line:
-I[ZLIB location]/zlib/include/
and change the last lines in the Makefile to:
lib$(MODULE)$(ext).a: objects ar -rv ${DIR_SHARE}/lib/lib$(MODULE)$(ext).a $(LIBOBJS) ranlib $(DIR_SHARE)/lib/lib$(MODULE)$(ext).a
Installing ProtoBuff 2.4.1
Next, step is to deploy Protocol Buffers library. You may choose the ProtocolBuffers library “protobuf-2.4.1” which should be installed without much problems. When installing it, use:
configure --prefix=$DIR_INS --enable-shared=yes --enable-static=yes \ --host=powerpc-bgp-linux --target=powerpc-bgp-linux --build=powerpc64-linux-gnu make make install
where $DIR_INS is the installation location. Note that the linkage can fail at the step “make install”. In this case modify “protobuf/src/Makefile” by adding ”-all-static“ to all lines that have LDFLAGS (after –mode option). Then you can install ProMC by typing ”./install.sh“
Installing ProtoBuff 2.5
The current version of ProMC 1.2 is based on protobuf-2.5, so it is recommended to deploy this version instead of protobuf-2.4.1. protobuf-2.5 can be deployed after some changes in the source code.
ProMC 1.2 with Protocol Buffers2.5 was deployed on Mira (IBM Blue Gene/Q) at Argonne Leadership Computing Facility.
(we will extend this description soon)
Alternative installations
If you do not like the version of Protocol Buffer library shipped with ProMC, you can replace it. If you happen to have a custom-made Protocol Buffer library, you can rebuild ProMC using these steps:
- Remove the directory “protobuf” inside the ProMC package
- Copy all Protocol Buffers libraries and header files, and “protoc” binary file to the “share” directory of ProMC
- Comment out the line where Protocol Buffers is compiled inside the “build.sh” script.
Then proceed exactly as before, i.e. run “build.sh” and then “install.sh”.
— Sergei Chekanov 2013/03/11 21:45 — Sergei Chekanov 2013/05/03 12:58