Skip to content

Yingru/hic_HQ

Repository files navigation

hic_HQ

A framework of heavy quark evolution in heavy-ion collisions

0. Work locally (make sure you have root right, or have the all the dependencies)

prerequisites:

  • python3, numpy, scipy, hdf5, pip
  • C/C++/Fortran compilers ==> tested: GNU gcc/g++/gfortran 4.8.4 version
  • cmake (2.8+), boost (1.54+), HDF5 (1.8.11)

or you can install all the dependencies using install_software.sh (on a ubunut14.04 OS)

git clone https://github.com/Yingru/hic_HQ.git

cd hic_HQ/
bash install_software.sh  # returns a tar.gz file where contains all the modules


mkdir test
cp hic_HQ-osg/hic_HQ-osg.tar.gz test/
cd test/
tar -xzf hic_HQ-osg.tar.gz
cp -r ../workdir/ hic_HQ-osg
cd hic_HQ-osg/workdir


python3 python3 run-events_cD.py args.conf 0
# args.conf set up parameters ($\alpha_s, \hat{q}_{min}, \hat{q}_{slope}, \gamma$)
# parameter_df.dat are diffusion parameters (particle_ID, hydro_ID, HQ list ...)
# parameter_hd.dat are hadronization parameters (particle_ID ...)
# HQ_sample.conf are initially sample HQ list parameters
# vishnew.conf are hydro parameters (shear, bulk, edensity ...)
# 0 is jobID, useful when you run parallel jobs

1. Work with cloud computing system

Chameleon

# download the .pem key pair
chmod 600 yx59chameleonkey.pem
ssh-add yx59chameleonkey.pem
ssh cc@ip_address

1.1 Install Docker in Chameleon instance

ssh [email protected]

# check OS version
lsb_release -a

# install docker and its dependencies
# 1. you can use the default installation, such as apt-get to install from OS repository
# 2. install from source (17.03.2 version)

mkdir Install && cd Install
sudo apt-get install libsystemd-journal0
wget https://download.docker.com/linux/ubuntu/dists/trusty/pool/stable/amd64/docker-ce_17.03.2~ce-0~ubuntu-trusty_amd64.deb
sudo dpkg -i docker-ce_17.03.2~ce-0~ubuntu-trusty_amd64.deb

1.2a Build a Docker container from Dockerfile

# build the docker image
git clone https://github.com/Yingru/hic_HQ.git
cd hic_HQ/
sudo docker build -t hic_hq:v1 .

# check docker images
sudo docker images
cd workdir/

# to run the executable
# run-events_cD.py is the pipeline script
# args.conf changes the parameters ($alpha_s, \hat{q}_{min}, \hat{q}_{slope}, \gamma$
# 0 is the jobID (useful to run parallel events)
sudo docker run -v `pwd`:/var/hic_HQ-osg/results hic_hq:v1 python3 run-events_cD.py args.conf 0

1.2b Instead of 1.2a, pull a Docker image from dockerhub

# distinguish from previous case, dockerhub autimatically assign tag as latest
sudo docker pull yingruxu/hic_hq:latest
sudo docker images
cd workdir/
sudo docker run -v `pwd`:/var/hic_HQ-osg/results yingruxu/hic_hq:latest python3 run-events_cD.py args.conf 1

1.3 Install singularity in Chameleon instance

#singularity dependencies
sudo apt-get update
sudo apt-get install libarchive-dev python dh-autoreconf build-essential

# install the maste branch
git clone https://github.com/singularityware/singularity.git
cd singularity

# ERRRR, their master branch is not consistent with tutorial!
git checkout vault/release-2.5

./autogen.sh
./configure --prefix=/usr/local
make
sudo make install

1.3a Pull singularity container from dockerhub

# check version, better use 2.5.2 (for some reason, the older version 2.3 doesn't pull)
singularity --version

cd workdir/
sudo apt-get update && sudo apt-get install squashfs-tools 
singularity pull docker://yingruxu/hic_hq

# convert this to a writable container
singularity build --writable hic_hq_write.img hic_hq.simg

# or build from dockerhub (not sure what is the difference)
singularity build --writable hic_hq_write.img docker://yingruxu/hic_hq


# doesn't work? read-only filesystem? I am not able to write? -- fixed
# now the second question, not enough space
sudo singularity shell --writable -B $PWD:/var/hic_HQ-osg/results hic_hq_write.img
cd /var/hic_HQ-osg/results/
# for some reason need to set locale?
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8

python3 run-events_cD.py args.conf 0

1.3b Or instead 1.3a, build singularity image from recipe

# remember to build writable image
sudo singularity build --writable hic_hq.img Singularity

# to test singularity container interactively
sudo singularity shell --writable -B $PWD:/var/hic_HQ-osg/results hic_hq.img

<<<<<<< HEAD
# to run trento events
sudo singularity exec --writable -B $PWD:/var/hic_HQ-osg/results hic_hq.img  /var/hic_HQ-osg/bin/trento Pb Pb 10  --output initial.hdf5

# to run full events
sudo singularity exec --writable -B $PWD:/var/hic_HQ-osg/results hic_hq.img  python3 /var/hic_HQ-osg/results/run-events_cD.py /var/hic_HQ-osg/results/args.conf 0

2 Remaining issue (to be done)

  • Change the Dockerfile to add the locale information (it is fine with Docker container, but cause trouble when using singularity pull/build from Dockerhub
  • Right now I still need root privilege to be able to write in a singularity container filesystem (even though I already choose the --writable option, need to fix that
  • While running in a singularity container, the space limit is reached? (use --sandbox instead of --writable?) =======
>>>>>>> 6c170142da31ead53fd2857f8755f37b4a68a8be

About

Heavy quark evolution framework in heavy-ion collisions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published