A.5 A 30-Second Introduction to SCRAMv1
Complete:
Detailed Review status
SCRAM (Source Configuration, Release, And Management tool) is the CMS build program. It is responsible for building framework applications and also making sure that all the necessary shared libraries are available. There are two versions of SCRAM. SCRAM v0.2 is used for the LCG projects SEAL and POOL and early versions of ORCA, while SCRAM v1 is used for the newer CMSSW. We will only talk about SCRAM v1 here.
Main Commands
There are a few main commands:
1. To build subdirectories of the current directory:
$ scram build
$ scram build MyAnalysis
2. To setup your runtime environment (for cmsRun for example). Do a
cd
to your project directory.
$ cmsenv
3. To make a new work area
$ scram project CMSSW [version]
4. To rebuild, clean up (needed sometimes)
$ scram build
$ scram build clean
Useful Options
There are other build command options which are useful (these options can be used in combination):
-
scram b -f
- Skip reading the cache; useful for when you know that no BuildFiles or source files have been modified, added or removed. Seems that modified source file (under src/) are no problem, as they are build as expected.
-
scram b -v
- Verbose mode: show the full compilation/linking commands.
-
scram b -k
- Continue building after any errors from
Make
-
scram b -j [n]
- For building in parallel using [n] processes (same as -j of
GMake
)
For more detail on SCRAM please read
SWGuideScram
For more detail on SCRAM Buildfiles please read the
WorkBookBuildFilesIntro.
Review status
Responsible: ShahzadMuzaffar
Last reviewed by:
ShahzadMuzaffar - 17 Nov 2009