Skip to content
Kenneth Long edited this page Feb 28, 2015 · 1 revision

Troubleshooting

A summary of frequently encountered errors and their solutions.

Step ZERO

If something doesn't work, try running cmsenv, and source FinalStateAnalysis/environment.sh and then try again.

Contents

General CMSSW problems

ERROR: Unable to find release area

You have the wrong SCRAM_ARCH set. You need to do:

export SCRAM_ARCH=slc5_amd64_gcc434

for CMSSW_4_X_Y and:

export SCRAM_ARCH=slc5_amd64_gcc462

for CMSSW_5_X_Y. Note these will change for future CMSSW versions!

Getting the code (git problems)

These are generally problems that happen when you are trying to checkout or update the code (git pull origin master).

fatal: Not a git repository

This error occurs when you try to git pull outside of the FinalStateAnalysis directory (which is the "root" of the git repository). Solution is to run the command in that directory.

error: Your local changes to the following files would be overwritten by merge

This means that you have files changed in your working area that are also changed in the code update you are trying to pull. You can see locally modified files by running git status.

You have two options:

  • Commit your changes git add [the files], git commit -m "my commit message", and then pull again.
  • Reset (lose/throw away/discard) your changes (danger!) git checkout -- [files]
  • "Stash" your changes (advanced) git stash

Permission denied (publickey).

You need to create a github.com account, and generate a SSH key pair. Instructions to do this are at Generating SSH keys:

Runtime Errors

First, always make sure that you did:

source environment.sh

in the FinalStateAnalysis directory to setup your environment.

ImportError: No module named ...

Generally this means that you have either not setup your environment, or not compiled the area (scram b -j 6 in the src/ directory). Make sure that scram b compiled the code successfully, without errors!

In CMSSW_7_X_X, the default compiler flags include some "tight" flags which cause coding errors that are typically treated as warnings by the compiler, such as unused variables or comparison between signed and unsigned data types, to be treated as errors, causing unsuccessful compilation if these are encountered. It is necessary to relax these, which can be done by setting USER_CXXFLAGS. The necessary flags are set in environment.sh, so you should not encounter this if you have set your environment correctly.

ImportError: No module named rootpy

This is a special case, generally only needed for plotting - rootpy is an external package that needs to be downloaded and installed:

cd $CMSSW_BASE/src/FinalStateAnalysis/recipe/external/src
git clone [email protected]:ekfriis/rootpy.git
cd $CMSSW_BASE/src/FinalStateAnalysis/recipe
./install_python.sh

Compiletime Errors

Unused Variable Error

When upgrading to SLC6, you may encounter an error similar to this when compiling:

...
/afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc5_amd64_gcc472/external/clhep/2.1.3.1-cms2/include/CLHEP/Units/PhysicalConstants.h:80:21: error: 'CLHEP::electron_charge' defined but not used [-Werror=unused-variable]
cc1plus: some warnings being treated as errors
gmake: ***[tmp/slc5_amd64_gcc472/src/FastSimulation/ShowerDevelopment/src/FastSimulationShowerDevelopment/HDShower.o] Error 1

To switch off the -Werror=unused-variable flag, run scram with:

USER_CXXFLAGS="-Wno-delete-non-virtual-dtor -Wno-error=unused-but-set-variable -Wno-error=unused-variable" scram b