Personal tools
You are here: Home Documentation Compiling CMSSW code on 64-bit Opterons
Document Actions

Compiling CMSSW code on 64-bit Opterons

by Aaron Dominguez last modified 2006-05-10 05:21
I finally figured out how to compile CMS code (in CMSSW) on our 64-bit cluster, red.unl.edu. Previously, this wasn't possible; we could only RUN CMSSW applications on red, not compile. Compiling always had to be performed on native 32-bit nodes. Thanks to some help from Thomas Speer, this can now be done!

The solution is a bit hacky right now, but at least it is a solution. Other Tier-2 users might be interested in this though. What you need to do is the following two steps:

  1. Check out and setup your CMSSW area:
    scramv1 project CMSSW CMSSW_0_6_0
    cd CMSSW_0_6_0/src
    cvs co WhateverPackageYouWantToCompile
    
  2. Then you need to replace a magic file used by SCRAM. Replace the file in your CMSSW_0_6_0/config/BuildFile with the stuff below:
    # -*-toolbox-*-
    
    CXXFLAGS := -m32 -Wa,--32 -pthread
    LDFLAGS:=-m32
    MODULEFLAGS:=-m32
    CSharedFlags:=-m32
    CXXSharedFlags:=-m32 -Wa,--32 -pthread
    
    <Architecture name=slc3_ia32_gcc323>
    <Flags CXXFLAGS="-m32 -Wa,--32 -pthread">
    <Flags LDFLAGS="-m32">
    <Flags MODULEFLAGS="-m32">
    <Flags CSharedFlags="-m32">
    <Flags CXXSharedFlags="-m32 -Wa,--32 -pthread">
    <Flags CXXSHAREDOBJECTFLAGS="-m32 -Wa,--32 -pthread">
    <makefile>
    F77compiler:=g77
    CCcompiler:=gcc3
    CXXFLAGS:=-m32
    LDFLAGS:=-m32
    MODULEFLAGS:=-m32
    CSharedFlags:=-m32
    CXXSharedFlags:=-m32
    </makefile>
    </Architecture>
    
    <Architecture name=slc3_amd64_gcc323>
    <makefile>
    F77compiler:=g77
    CCcompiler:=gcc3
    CXXFLAGS:=-m32
    LDFLAGS:=-m32
    MODULEFLAGS:=-m32
    CSharedFlags:=-m32
    CXXSharedFlags:=-m32
    </makefile>
    </Architecture>
    
    <Architecture name=slc3_ia32_gcc323_dbg>
    <Flags CXXFLAGS="-O0 -g -DDEBUG">
    <makefile>
    F77compiler:=g77
    CCcompiler:=gcc3
    CXXFLAGS:=$(patsubst -O2,,$(CXXFLAGS))
    CXXFLAGS:=-m32
    LDFLAGS:=-m32
    MODULEFLAGS:=-m32
    CSharedFlags:=-m32
    CXXSharedFlags:=-m32
    </makefile>
    </Architecture>
    
    <Architecture name=slc3_ia32_gcc344>
    <makefile>
    F77compiler:=g77
    CCcompiler:=gcc3
    </makefile>
    </Architecture>
    
    <Architecture name=slc3_ia32_gcc344_dbg>
    <Flags CXXFLAGS="-O0 -g -DDEBUG">
    <makefile>
    F77compiler:=g77
    CCcompiler:=gcc3
    CXXFLAGS := $(patsubst -O2,,$(CXXFLAGS))
    </makefile>
    </Architecture>
    
    # Storage locations:
    <ProductStore name=lib type=arch swap=true>
    <ProductStore name=bin type=arch swap=true>
    <ProductStore name=test type=arch swap=true>
    <ProductStore name=logs type=arch swap=true>
    <ProductStore name=doc>
    <ProductStore name=module type=arch swap=true>
    
    # ClassPaths:
    <ClassPath path=+Project/+SubSystem/+Package/scripts+scripts>
    <ClassPath path=+Project/Documentation+Documentation/+doc>
    <ClassPath path=+Project/+SubSystem/+Package/src+library>
    <ClassPath path=+Project/+SubSystem/+Package/bin+binary>
    <ClassPath path=+Project/+SubSystem/+Package/test+test>
    <ClassPath path=+Project/+SubSystem/+Package/data+data_install>
    
    # Add use for SCRAM-managed projects we're going to use 
    # (this ensures that we end up with LIBDIR and INCLUDE from each):
    <use name=lcgaa>
    <use name=coral>
    <use name=pool>
    <use name=seal>
    
    # Choose a compiler:
    <use name=cxxcompiler>
    
  3. Then you need to tell SCRAM to reset its caches and compile your code:
    cd ~/CMSSW_0_6_0/src
    scramv1 b -r
    

Powered by Plone, the Open Source Content Management System