THIS IS UPDATED TO REFLECT SCIENTIFIC LINUX 4
Prelude
You first starting point should be the
CMSWorkBook,
especially chapters 1-3 with emphasis on the
setup.
(If you can't access the CMS twiki, make sure you have read and followed
AccountSetup).
Initial setup of environment
Now to get started on
cgate.mit.edu,
you need set your environment for using the CMSSW software:
- For bash do (or put into .bashrc)
export SCRAM_ARCH=slc4_ia32_gcc345
source /osg/app/cmssoft/cms/cmsset_default.sh #grid installation (recommended default)
or
source /app/cms-soft/cmsset_default.sh # local version (for pre-release work only)
- For c-shell do (or put into .cshr)
setenv SCRAM_ARCH slc4_ia32_gcc345
source /osg/app/cmssoft/cms/cmsset_default.csh #grid installation (recommended default)
or
source /app/cms-soft/cmsset_default.csh # local version (for pre-release work only)
- Then you can use scramv1 to manage your project area. SCRAM is the tool that will help you managing and compiling your code, so it is a good idea to get familiar with it.
Initial setup of project area
You need now to checkout a CMSSW version. For a list of tags available
at our Tier-2/3, do
scramv1 list | grep CMSSW. You can look
here
or check the
release schedule
to get an idea which one to use. But generally it is a good idea to ask co-workers
of what is a meaningful release for a given task and a given time.
To check-out a given tag, lets say
CMSSW_x_y_z, into a given
directoy, lets say
mycmssw_x_y_z, do
scramv1 project -n mycmssw_x_y_z CMSSW CMSSW_x_y_z.
For a given project area (tag) you will have to do this only once.
Typically you will want to pull into your work area patches to the
existing code. Therefore you will have to make sure that the
CVSROOT points to the right place (change "export" to "setenv" and "=" to blank space for c-shell)
export CVSROOT=:pserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
(or you can use the -d option in cvs command).
Setup of runtime environment
Every time you want to use a specific project area you have to make sure
that the runtime is set properly. Assuming that your project area
is in
mycmssw_x_y_z, go into the
src directory, via
For bash do,
-
eval `scramv1 runtime -sh`,
for c-shell do
-
eval `scramv1 runtime -csh`.
Compiling Your Modules
To build use
scramv1 b -v.
Note Since we are now working with SL4 you can compile your own code everywhere (there is no need to use a 32bit machine anymore for this).
The -v flag gives you lots of output describing what is being done.
If you have only edited code (.h or .cc files), and not changed anything in the configuration and build files, using the -f flag will make the build run faster.
If you are recompiling and rebuilding a LOT of code, you can use the flag "-j n" where n is an integer to run multiple processes.
Setting up Your Own UserCode Area
This is a location where you can archive and work on your own stuff.
The documentation is
here (click to view the most recent version).
Postlude
Now you are ready to read the "advanced" chapters in the
CMSWorkBook and
do some of the tutorials examples provided there.
--
ConstantinLoizides - 21 Feb 2007 - back to
MITHIG