User Tools

Site Tools


<< back

Installation of ProMC

If you use Scientific-Linux 6 (x64), use pre-built ProMC binary files:

tar -zvxf ProMC-1.5-x86_64-slc6-gcc447-opt.tgz
source promc/

If you use CERN's lxplus and gcc4.8, setup PROMC as:

source /afs/
source /afs/
source /afs/

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/
alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/'
localSetupGcc gcc481_x86_64_slc6
localSetupPython 2.7.4-x86_64-slc6-gcc48

For the ATLAS grid sites:

source /cvmfs/


source /share/sl6/

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 -O ProMC.tgz
tar -zvxf ProMC.tgz
cd ProMC
./                  # build all source files
./ [promc_dir]    # install into some directory
source [promc_dir]/  # make it available

The script “” 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:

./ /usr/local
source /usr/local/  # make it available

requires administrator's write permission, while the user “home” directory does not:

./ $HOME
source [promc_dir]/  # 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

./ [promc_dir] [hepmc_dir]
source [promc_dir]/  # make it available


./  /usr/local  /user/local/HEPMC
source [promc_dir]/  # 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
./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:

wget -O ProMC.tgz
tar -zvxf ProMC.tgz
cd ProMC
./                   # build all source files
./ [promc_dir]     # install into [promc_dir] directory
source [promc_dir]/  # 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
./writer # write random data to out/
./reader # read random data from out/

You can download a compiled ProMC library (MacOS 10.10.1) from Thanks to Larry Nodulman for verifying this installation.

Removing the installed ProMC

Run the script:


it removes all libraries from the $PROMC area. To remove the build files, run:

Tested on SL5, SL6, Ubuntu 12.04. The protocol buffer library comes with the package.

Download and SVN

ProMC can be downloaded from here. The SVN repository of the package is here

Possible problems

Make sure that zlib-dev library is installed. Check it as:

yum install zlib-devel


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)

If you read ProMC files with sizes more than 1 GB, you may see an error generated by “zipios FCollException'what()”. This is related a bug in the zlib library. Please patch zlib library from

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 “”:

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 Then change the location of these libraries in “” 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 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 ”./“

If you have chosen protobuf-2.4.1, you will need some modification to ProMC browser since it is based on protobuf-2.5.

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:

  1. Remove the directory “protobuf” inside the ProMC package
  2. Copy all Protocol Buffers libraries and header files, and “protoc” binary file to the “share” directory of ProMC
  3. Comment out the line where Protocol Buffers is compiled inside the “” script.

Then proceed exactly as before, i.e. run “” and then “”.

Sergei Chekanov 2013/03/11 21:45Sergei Chekanov 2013/05/03 12:58

asc/promc/installation.txt · Last modified: 2015/03/20 01:08 by asc