diff --git a/Jenkinsfile b/Jenkinsfile
index 442596592fe166a9bf6c1d9b1969193100e7feb5..8facebba6af8f003ce5c60c4490fd8dd9d635655 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -9,7 +9,7 @@ parallel (
                     checkout scm
                     stage ('build_nyu')
                     {
-                      sh "./build.sh $WORKSPACE $NODE_NAME pdata"
+                      sh "./build.sh $WORKSPACE $NODE_NAME pdata env.BRANCH_NAME"
                     }
 
                     stage ('run_nyu')
@@ -34,7 +34,7 @@ parallel (
                     checkout scm
                     stage ('build_sb15')
                     {
-                      sh "./build.sh $WORKSPACE $NODE_NAME pdata"
+                      sh "./build.sh $WORKSPACE $NODE_NAME pdata env.BRANCH_NAME"
                     }
 
                     stage ('run_sb15')
@@ -61,7 +61,7 @@ parallel (
                     checkout scm
                     stage ('build_gin')
                     {
-                      sh "./build.sh $WORKSPACE $NODE_NAME pdata"
+                      sh "./build.sh $WORKSPACE $NODE_NAME pdata env.BRANCH_NAME"
                     }
 
                     stage ('run_gin')
diff --git a/build.sh b/build.sh
index 70c61712deec2d95b19cdd79ba689999caebfbbc..70c3040a7889601673e14e22ea8309afa3371f94 100755
--- a/build.sh
+++ b/build.sh
@@ -27,13 +27,14 @@ then
  echo "Compiling on gin\n"
  source ~/.bashrc
  module load gcc/4.9.2
+ mkdir $HOME/$5
  if [ x"$4" == x"full" ]; then
-  ./install -s -c "--prefix=/home/jenkins/openfpm_install"
+  ./install -i $HOME/$5  -s -c "--prefix=/home/jenkins/openfpm_install"
  elif [ x"$3" == x"numerics" ]; then
-  ./install -m -s -c "--prefix=/home/jenkins/openfpm_install"
+  ./install -i $HOME/$5  -m -s -c "--prefix=/home/jenkins/openfpm_install"
   make $3
  else
-  ./install -m -s -c "--prefix=/home/jenkins/openfpm_install --no-recursion"
+  ./install -i $HOME/$5  -m -s -c "--prefix=/home/jenkins/openfpm_install --no-recursion"
   make $3
  fi
  if [ $? -ne 0 ]; then
@@ -83,7 +84,8 @@ then
  
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/incard/PARMETIS/lib:/home/incard/METIS/lib:/home/incard/HDF5/lib"
 
- ./install -m -i "/scratch/p_ppm/" -s -c"CXX=mpic++ --no-recursion"
+ mkdir /scratch/p_ppm/$5
+ ./install -m -i "/scratch/p_ppm/$5" -s -c"CXX=mpic++ --no-recursion"
  make $3
 
  source $HOME/openfpm_vars
@@ -96,13 +98,14 @@ else
  echo "Compiling general"
  source ~/.bashrc
 
+ mkdir $HOME/$5
  if [ x"$4" == x"full" ]; then
-  ./install -s -c "--prefix=/Users/jenkins/openfpm_install"
+  ./install -i $HOME/$5  -s -c "--prefix=/Users/jenkins/openfpm_install"
  elif [ x"$3" == x"numerics" ]; then
-  ./install -m -s -c "--prefix=/home/jenkins/openfpm_install"
+  ./install -i $HOME/$5  -m -s -c "--prefix=/home/jenkins/openfpm_install"
   make $3
  else
-  ./install -m -s -c "--prefix=/Users/jenkins/openfpm_install --no-recursion"
+  ./install -i $HOME/$5 -m -s -c "--prefix=/Users/jenkins/openfpm_install --no-recursion"
   make $3
  fi
 
diff --git a/build_pdata.sh b/build_pdata.sh
index 14a46441e5f18bf0238fdff4b246c15b558c1e8f..abf1b4fcbf91eb890d9de5faaea703d281226cbd 100644
--- a/build_pdata.sh
+++ b/build_pdata.sh
@@ -27,7 +27,8 @@ then
  echo "Compiling on gin\n"
  source ~/.bashrc
  module load gcc/4.9.2
- ./install -s -c "--prefix=/home/jenkins/openfpm_install"
+ mkdir $HOME/$4
+ ./install -i $HOME/$4 -s -c "--prefix=/home/jenkins/openfpm_install"
  make
  if [ $? -ne 0 ]; then
    curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\"  , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$2 failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
@@ -200,7 +201,8 @@ then
  
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/incard/PARMETIS/lib:/home/incard/METIS/lib:/home/incard/HDF5/lib"
 
- ./install -i "/scratch/p_ppm/" -s -c"CXX=mpic++"
+ mkdir "/scratch/p_ppm/$4"
+ ./install -i "/scratch/p_ppm/$4" -s -c"CXX=mpic++"
  make
 
  source $HOME/openfpm_vars
@@ -242,7 +244,8 @@ then
 else
  echo "Compiling general"
  source ~/.bashrc
- ./install -s
+ mkdir $HOME/$4
+ ./install -i $HOME/$4 -s
  make
 
  if [ $? -ne 0 ]; then
@@ -264,7 +267,7 @@ else
  mpirun -np 2 ./src/pdata
  if [ $? -ne 0 ]; then 
    curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\"  , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$2 failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
-   exit 1 ; 
+   exit 1 ;
  fi
  mpirun -np 3 ./src/pdata
  if [ $? -ne 0 ]; then