Set-up#
The main modalities which we will use to execute the examples presented in this session, as well as to do the exercises assigned will be the use of a CMSSW enviornment in the CMS-LPC cluster, and a local compiler. Use whichever one is most convenient for you to use. If, however, you find that neither of these work for you in time for the session, as a last resort, you can also use the C++ Shell website. This options has its limitations in that it cannot make use of user made header files, but it will suffice for most of the material presented.
CMS-LPC Cluster#
Add the following to your ~/.ssh/config
file
Host cmslpc-*.fnal.gov
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
and log into the LPC cluster. Once there, run the following commands
mkdir nobackup/PURSUE-CPP
cd nobackup/PURSUE-CPP
cmsrel CMSSW_12_4_19
cd CMSSW_12_4_19/src/
cmsenv
git clone git@github.com:roy-cruz/PURSUE-cpp.git
cd PURSUE-cpp
To test that everything is working, compile and run helloworld.cpp
.
cd examples_cpp
g++ helloworld.cpp -o helloworld
./helloworld
If you get the following output, you are ready to go!
Hello World
Local#
Your machine should already have the CPP compiler. To make sure that this is the case, run g++
. If it complains about the command not being found, run the following to install it (assuming you are using AlmaLinux9):
sudo yum install gcc-c++
Next, clone this repository
git clone git@github.com:roy-cruz/PURSUE-cpp.git
cd PURSUE-cpp
and test that everything is working by compiling and running helloworld.cpp
.
cd examples_cpp
g++ helloworld.cpp -o helloworld
./helloworld
If you get the following output, you are ready to go!
Hello World