Difference between revisions of "DF JLab Software Install Instructions"

From New IAC Wiki
Jump to navigation Jump to search
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
These instructions are for installing the software on Ubuntu 16.04. It is assumed that you start in a directory named JLabSoftware which contains the directories CED, COATJAVA, DB, and GEMC
 
These instructions are for installing the software on Ubuntu 16.04. It is assumed that you start in a directory named JLabSoftware which contains the directories CED, COATJAVA, DB, and GEMC
=CE 2.2=
+
=CE=
These instructions set up the common environment so that you may then install GEMC. Skip if you don't intend on installing GEMC.
+
These instructions set up the common environment and GEMC with it. Skip if you don't intend on installing GEMC.
  
 
The CE is dependent on the following packages which can be easily installed by <code>sudo apt-get install <package></code>:
 
The CE is dependent on the following packages which can be easily installed by <code>sudo apt-get install <package></code>:
Line 11: Line 11:
 
*libglu1-mesa-dev
 
*libglu1-mesa-dev
 
*libxt-dev
 
*libxt-dev
 +
*libxpm-dev
 
*libxmu-dev
 
*libxmu-dev
 
*libxrender-dev
 
*libxrender-dev
Line 35: Line 36:
 
export JLAB_ROOT=/path/to/JLabSoftware/GEMC
 
export JLAB_ROOT=/path/to/JLabSoftware/GEMC
 
export JLAB_VERSION=2.2
 
export JLAB_VERSION=2.2
source $JLAB_ROOT/JLAB_VERSION/ce/jlab.sh
+
source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.sh
 
</pre>
 
</pre>
  
Line 55: Line 56:
 
!! Attention:  XERCESC  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/xercesc/3.2.0/lib  not found
 
!! Attention:  XERCESC  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/xercesc/3.2.0/lib  not found
 
</pre>
 
</pre>
 +
 +
Now <code>cd $JLAB_ROOT/2.2/ce</code> and open settings.xcconfig in a text editor. Change the geant4 version to whatever is the latest version from [https://www.jlab.org/12gev_phys/packages/sources/geant4/ here]. Do the same with the file versions.env.
 +
 +
You should now be able to run the <code>go_<package></code> scripts in $JLAB_VERSION/install. It is recommended that you open the <code>go_all</code> script and manually run each individual script in the order found there. Watch for further instructions in the terminal output. Remember to also run <code>./$JLAB_ROOT/$JLAB_VERSION/install/qt-opensource-linux-x64-<version number>.run</code>
 +
 +
The common environment should now be installed. Ensure that the message that displays when opening a new terminal reflects that.
 +
 +
Should you experience any segfault errors while attempting to build, ensure that awk is set to gawk:
 +
<pre>
 +
sudo update-alternatives --config awk
 +
</pre>
 +
 
=GEMC=
 
=GEMC=
 +
These instructions setup GEMC and the clas12Tags repository so that you may easily start simulating clas12 runs.
 +
 +
If you haven't already, first complete the CE install above, then:
 +
<pre>
 +
cd $JLAB_ROOT
 +
git clone https://github.com/gemc/clas12Tags
 +
cd clas12Tags/4a.2.3/source/physics
 +
</pre>
 +
Here you are going to open PhysicsList.cc and uncomment the line <code>auto theParticleIterator = GetParticleIterator();</code>. Then:
 +
<pre>
 +
cd ../..
 +
scons -j4 OPT=1
 +
</pre>
 +
This should result in an exectuable file simply called gemc in the directory 4a.2.3/source. When running GEMC, you will be wanting to run this file. So, either always use the full path to target this executable, or set the environmental variable $GEMC to the absolute path to it.
 +
 
=COATJAVA=
 
=COATJAVA=
 +
All of these assume that you start in the JLabSoftware/COATJAVA directory.
 +
==Release Versions==
 +
Download the desired version from [https://github.com/JeffersonLab/clas12-offline-software/releases here].
 +
<pre>
 +
cp ~/Downloads/clas12-offline-software-<version>.tar.gz .
 +
tar -xzf clas12-offline-software-<version>.tar.gz
 +
cd clas12-offline-software-<version>
 +
bash build-coatjava.sh
 +
</pre>
 +
The tools should be in the directory ./coatjava/bin
 +
 +
Note: While this appears to build correctly, it would seem that I must use <code>bash</code> instead of <code>./</code> to run any of the executables in bin.
 +
==Official Github Version==
 +
<pre>
 +
mkdir clas12-offline-software-official
 +
git clone -b master https://github.com/JeffersonLab/clas12-offline-software.git clas12-offline-software-official
 +
cd clas12-offline-software-official
 +
./build-coatjava.sh
 +
</pre>
 +
 +
==Forking Your Own Version==
 +
First, create a Github account if you don't already have one. Then go to [https://github.com/JeffersonLab/clas12-offline-software JeffersonLab/clas12-offline-software] and hit the fork button. You should now have a repository at <code>github.com/<your-username>/clas12-offline-software</code>.
 +
<pre>
 +
git clone -b master https://github.com/<your-username>/clas12-offline-software
 +
cd clas-12-offline-software
 +
./build-coatjava.sh
 +
</pre>
 +
 +
The upstream repository (JLab's) can be added as follows:
 +
<pre>
 +
git remote add upstream https://github.com/JeffersonLab/clas12-offline-software.git
 +
</pre>
 +
To update your development build with the Jlab updates:
 +
<pre>
 +
git fetch upstream
 +
git checkout master
 +
git merge upstream/master
 +
</pre>
 +
 +
And to push your local repository to your github repo:
 +
<pre>
 +
git push
 +
</pre>
 +
 +
When you want to push your changes to JLab's repo, you need to go to your github page and push the "pull request" button.
 +
 +
==Netbeans Setup Instructions==
 +
Can be found [[DF_NetBeans_IDE_Setup|here]].
 
=CED=
 
=CED=
 +
Starting from the directory JLabSoftware:
 +
<pre>
 +
cd CED
 +
wget https://userweb.jlab.org/~heddle/ced/builds/ced.<version number>.tar.gz
 +
tar -xzf ced.<version number>.tar.gz
 +
cd cedbuild
 +
sudo chmod 764 ced.sh
 +
</pre>
 +
You should now be able to run CED by using <code>./ced.sh</code>
 +
 +
Note: For some reason I don't appear to have the full functionality I would expect (e.g. magnification doesn't seem to work).
 +
 
=DB=
 
=DB=
 +
The purpose of setting up a local database is so that you may run simulations without having to rely on JLab's database. This gives you a constant setup that won't be changed without your knowledge.
 +
==Procuring the Database==
 +
To get the official versions, you must have a JLab account and have access to the clas12 software. Assuming that that isn't the case, copies of several iterations of the database can be found on lds3. The instructions for getting the database onto a local machine are as follows:
 +
<pre>
 +
cd /path/to/JLabSoftware/DB
 +
ssh daq@daq1.physics.isu.edu
 +
scp lds@lds3.physics.isu.edu:/home/lds/src/CLAS/DB/clas12.sqlite.<date> .
 +
exit
 +
scp daq@daq1.physics.isu.edu:/home/daq/clas12.sqlite.<date> .
 +
</pre>
 +
==Setup for Running Via Command Line==
 +
The environmental variables CCDB_CONNECTION and CCDB_DATABASE must be defined and must point to the right spot. Before running a program which relies on the database (such as COATJAVA or GEMC), you must export (or setenv or what-have-you) the following in some fashion:
 +
<pre>
 +
CCDB_CONNECTION=sqlite:///path/to/clas12.sqlite.<date>
 +
CCDB_DATABASE=/path/to/clas12.sqlite.<date>
 +
</pre>
 +
Note the <code>sqlite:///chupa</code> is a relative path and <code>sqlite:////thingy</code> is an absolute path.
 +
==Setup for Running Via NetBeans==
 +
Assuming that your IDE is setup such that the working directory is <code>/path/to/JLabSoftware/COATJAVA/clas12-offline-software</code>:
 +
*In the projects tab, right click on "clas12detector-dc" -> Properties
 +
**In the Actions section:
 +
***Add the environmental variable CCDB_CONNECTION=sqlite:///../../DB/clas12.sqlite.<date>
 +
***Add the environmental variable CCDB_DATABASE=../../DB/clas12.sqlite.<date>
 +
 +
=Main Page=
 +
[[User:Friadavi]]

Latest revision as of 00:04, 11 December 2018

These instructions are for installing the software on Ubuntu 16.04. It is assumed that you start in a directory named JLabSoftware which contains the directories CED, COATJAVA, DB, and GEMC

CE

These instructions set up the common environment and GEMC with it. Skip if you don't intend on installing GEMC.

The CE is dependent on the following packages which can be easily installed by sudo apt-get install <package>:

  • g++
  • mysql-client
  • libmysqlclient-dev
  • libx11-dev
  • libxext-dev
  • libglu1-mesa-dev
  • libxt-dev
  • libxpm-dev
  • libxmu-dev
  • libxrender-dev
  • libexpat1-dev
  • libxft-dev
  • tcsh
  • cmake
  • git
  • libafterimage-dev
  • scons
  • gawk

Now, assuming you're in the JLabSoftware directory:

cd GEMC
mkdir 2.2
wget http://www.jlab.org/12gev_phys/packages/sources/ceInstall/ceInstall_2.2.tar.gz
tar -zxpf ceInstall_2.2.tar.gz --strip-components 1 -C 2.2

Go to the home directory and open .bashrc in your preferred text editor. Add the following to the bottom of the file:

export JLAB_ROOT=/path/to/JLabSoftware/GEMC
export JLAB_VERSION=2.2
source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.sh

Now close the terminal and open a fresh one. You should see something like:

!! Attention:  BANKS  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/banks/1.4/bin  not found
!! Attention:  CCDB  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/ccdb/ccdb-1.06.02/lib  not found
!! Attention:  CLHEP  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/clhep/2.3.4.5/lib  not found
!! Attention:  EVIO  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/evio/5.1/bin  not found
!! Attention:  GEANT4  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/geant4/4.10.03.p02/bin  not found
!! Attention:  GEMC  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/gemc/2.7/gemc  not found
!! Attention:  JANA  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/jana/0.7.7p1/bin/jana  not found
!! Attention:  MLIBRARY  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/mlibrary/1.2/lib  not found
!! Attention:  MYSQL  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/mysql/lib  not found
!! Attention:  QT    installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/qt/5.9.1/5.9.1/clang_64/lib  not found
!! Attention:  ROOT  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/root/6.12.06/bin/root-config  not found
!! Attention:  SCONS  installation check /opt/jlab_software/2.2/scons_bm/1.6/site_tools  not found
!! Attention:  XERCESC  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/xercesc/3.2.0/lib  not found

Now cd $JLAB_ROOT/2.2/ce and open settings.xcconfig in a text editor. Change the geant4 version to whatever is the latest version from here. Do the same with the file versions.env.

You should now be able to run the go_<package> scripts in $JLAB_VERSION/install. It is recommended that you open the go_all script and manually run each individual script in the order found there. Watch for further instructions in the terminal output. Remember to also run ./$JLAB_ROOT/$JLAB_VERSION/install/qt-opensource-linux-x64-<version number>.run

The common environment should now be installed. Ensure that the message that displays when opening a new terminal reflects that.

Should you experience any segfault errors while attempting to build, ensure that awk is set to gawk:

sudo update-alternatives --config awk

GEMC

These instructions setup GEMC and the clas12Tags repository so that you may easily start simulating clas12 runs.

If you haven't already, first complete the CE install above, then:

cd $JLAB_ROOT
git clone https://github.com/gemc/clas12Tags
cd clas12Tags/4a.2.3/source/physics

Here you are going to open PhysicsList.cc and uncomment the line auto theParticleIterator = GetParticleIterator();. Then:

cd ../..
scons -j4 OPT=1

This should result in an exectuable file simply called gemc in the directory 4a.2.3/source. When running GEMC, you will be wanting to run this file. So, either always use the full path to target this executable, or set the environmental variable $GEMC to the absolute path to it.

COATJAVA

All of these assume that you start in the JLabSoftware/COATJAVA directory.

Release Versions

Download the desired version from here.

cp ~/Downloads/clas12-offline-software-<version>.tar.gz .
tar -xzf clas12-offline-software-<version>.tar.gz
cd clas12-offline-software-<version>
bash build-coatjava.sh

The tools should be in the directory ./coatjava/bin

Note: While this appears to build correctly, it would seem that I must use bash instead of ./ to run any of the executables in bin.

Official Github Version

mkdir clas12-offline-software-official
git clone -b master https://github.com/JeffersonLab/clas12-offline-software.git clas12-offline-software-official
cd clas12-offline-software-official
./build-coatjava.sh

Forking Your Own Version

First, create a Github account if you don't already have one. Then go to JeffersonLab/clas12-offline-software and hit the fork button. You should now have a repository at github.com/<your-username>/clas12-offline-software.

git clone -b master https://github.com/<your-username>/clas12-offline-software
cd clas-12-offline-software
./build-coatjava.sh

The upstream repository (JLab's) can be added as follows:

git remote add upstream https://github.com/JeffersonLab/clas12-offline-software.git

To update your development build with the Jlab updates:

git fetch upstream
git checkout master
git merge upstream/master

And to push your local repository to your github repo:

git push

When you want to push your changes to JLab's repo, you need to go to your github page and push the "pull request" button.

Netbeans Setup Instructions

Can be found here.

CED

Starting from the directory JLabSoftware:

cd CED
wget https://userweb.jlab.org/~heddle/ced/builds/ced.<version number>.tar.gz
tar -xzf ced.<version number>.tar.gz
cd cedbuild
sudo chmod 764 ced.sh

You should now be able to run CED by using ./ced.sh

Note: For some reason I don't appear to have the full functionality I would expect (e.g. magnification doesn't seem to work).

DB

The purpose of setting up a local database is so that you may run simulations without having to rely on JLab's database. This gives you a constant setup that won't be changed without your knowledge.

Procuring the Database

To get the official versions, you must have a JLab account and have access to the clas12 software. Assuming that that isn't the case, copies of several iterations of the database can be found on lds3. The instructions for getting the database onto a local machine are as follows:

cd /path/to/JLabSoftware/DB
ssh daq@daq1.physics.isu.edu
scp lds@lds3.physics.isu.edu:/home/lds/src/CLAS/DB/clas12.sqlite.<date> .
exit
scp daq@daq1.physics.isu.edu:/home/daq/clas12.sqlite.<date> .

Setup for Running Via Command Line

The environmental variables CCDB_CONNECTION and CCDB_DATABASE must be defined and must point to the right spot. Before running a program which relies on the database (such as COATJAVA or GEMC), you must export (or setenv or what-have-you) the following in some fashion:

CCDB_CONNECTION=sqlite:///path/to/clas12.sqlite.<date>
CCDB_DATABASE=/path/to/clas12.sqlite.<date>

Note the sqlite:///chupa is a relative path and sqlite:////thingy is an absolute path.

Setup for Running Via NetBeans

Assuming that your IDE is setup such that the working directory is /path/to/JLabSoftware/COATJAVA/clas12-offline-software:

  • In the projects tab, right click on "clas12detector-dc" -> Properties
    • In the Actions section:
      • Add the environmental variable CCDB_CONNECTION=sqlite:///../../DB/clas12.sqlite.<date>
      • Add the environmental variable CCDB_DATABASE=../../DB/clas12.sqlite.<date>

Main Page

User:Friadavi