Conversion to Gaudi Version 11
and the GlastRelease system

Current status: 01/17/2003 10:19:06 -0800

 Then, in a folder which is in the CMTPATH, (see glastpack help on setting that up), enter the commands

cmt co -R GlastRelease
cd Gleam/v*/cmt
cmt broadcast gmake
source setup.sh
../$CMTCONFIG/test_Gleam.exe
Note that this gets the HEAD of GlastRelease, and all TAGGED packages that it and IExternal reference. To get a particular version of GlastRelease, put " -r v0r3" in the cmt co command.

TODO:


Chronological log follows:

17 Nov 2002, T. Burnett

Gaudi installation

After a study of the new Gaudi v11r1 release I decided to initially deal with only the subset of packages that we currently use:

ExternalLibs v4r0p1
ROOT v2r30309p0
CLHEP v2r1800p0
HTL v2r1311p0
AIDA v3r22p0
GaudiPolicy v5r7
GaudiKernel v13r1
RootHistCnv v8r1p1
GaudiTools v6r1
GaudiAlg v6r3
GaudiAud v6r1
GaudiSvc v10r0p1

Where Gaudi is a container package, AIDA, CLHEP, HTL, and ROOT are  external interface packages. None of these packages depend on ROOT, but will use this one for our code as well.

Gaudi package notes:

I've put the current test version source into a zip file, mingaudi_v11r1.zip, for temporary safe-keeping. [Added later: just get source from Gaudi.]  It is not clear that we should maintain this code as separate packages in our repository. The external libs, including ROOT, but not G4 or Xerces, are in another zip file for windows: extlib_win32_v11.zip .

Gleam migration

Initially, updates of Glast packages under development (like CalRecon, TkrRecon, etc.) to the repository should be backward compatible, so as to not disturb current development which assumes Gaudi v9.

18 Nov 2002, T. Burnett

Gleam, cont.

21 Nov 2002, T. Burnett

package IExternal

# container package for external interface packages

use AIDA v3r22p0 IExternal
use CLHEP v2r1800p0 IExternal
use HTL v2r1311p0 IExternal
use ROOT v2r30309p0 IExternal

use ExternalLibs v4r0p1 IExternal

This puts the external interface packages just below this package. There are then two modes to access these packages:

  1. Via IExternal, assuming it is in the CMT path, via "use AIDA * IExternal" for example.
  2. Directly if the CMT path includes IExternal itself: this allow us to build Gaudi without modifying the Gaudi requirements files, and to make a gradual transition.
 
package GaudiInterface

macro GaudiInterface_native_version v11r1
# test interface package for Gaudi 11 external

# note that the root is above the version id
macro gaudi_root "$(GAUDIINTERFACEROOT)/.."

use GlastPolicy

# clients need access to the shareables defined by these guys
use HTL * IExternal
use CLHEP * IExternal

### GaudiKernel ####
include_dirs "$(gaudi_root)/GaudiKernel/v13r1"

macro GaudiKernel_linkopts "$(gaudi_root)/GaudiKernel/v13r1/$(BINDIR)/GaudiKernel.lib"
macro GaudiInterface_linkopts  "$(GaudiKernel_linkopts)"

path_append LD_LIBRARY_PATH "$(gaudi_root)/GaudiKernel\v13r1\$(BINDIR)"


### GaudiSvc ######

set GaudiSvcShr '$(gaudi_root)\GaudiSvc\v10r0p1/$(BINDIR)/GaudiSvc'

### GaudiAud ######
set GaudiAudShr '$(gaudi_root)\GaudiAud\v6r1/$(BINDIR)/GaudiAud'


### GaudiAlg ######

path_append LD_LIBRARY_PATH '$(gaudi_root)\GaudiAlg\v6r3/$(BINDIR)'

Note that it is at the moment only supporting Windows.

Also note the initial macro gaudi_root that provides a pointer to the actual location of the Gaudi packages, in this case just below GaudiInterface. This would be a convenient way to distribute the code, I think. Again there are two possibilites:

  1. Access to Gaudi via GaudiInterface: it is in the CMTPATH,  and a simple use is sufficient to provide access to the parts of Gaudi that we currently use. Of the Gleam set of packages, only GuiSvc and Event really need to specify the connection to Gaudi: all others use one or the other.
  2. Direct access, if CMTPATH includes GaudiInterface itself. This allows inclusion and rebuilding of the Gaudi packages.

This system including both packages and those below it, can be downloaded as a zip file  from my web site:

http://d0.phys.washington.edu/~burnett/glast/gaudi_v11


November 23, 2002

Following comments from Michael Kuss

Ok, we are converging.  Gleam compiles and links, but doesn't run
(yet).  But chronological:

I checked out Gleam v4.

I downloaded your zip and extracted it into the packages root dir.

I removed all previous Gaudi, external libs packages, and the EXTLIB.  I
also removed XMLEXT (see later).

In the requirements, in packages which need an extlib, I included "use
IExternal", in packages which need an (old) Gaudi package, I included a
"use GaudiInterface".

Exception: in GlastPolicy, I replaced "use GaudiPolicy" by "use
GaudiPolicy * GaudiInterfaces" .  If I would haved used GaudiInterface
directly, I would have had a circular reference, because GaudiInterface
references GlastPolicy.  Is that intended, or should it be GaudiPolicy?

Before, I also tried e.g. "use ROOT * IExternal", but then some needed env
variables are not defined.  I don't know if it is intended or not, but it
makes sense and forces the user not to worry about which lib he actually
needs.
For IExternal/ROOT, I had to add ROOT_libs in the linkopts, and also more
libs (I usually use root-config and add all of them, cannot hurt).

I thought it makes sense, so I added to IExternal the XERCES package of
Gaudi.  Nothing else to do but to add it to the IExternal requirements.  I
also put "use ExternalLibs" first for a cleaner build (and show uses).  We
also should consider to add Geant4 here, I didn't do it, but more later.

Several packages of us still require patches, most of them minor. 
However, we got new ones, i.e. CalUtil and GlastDigi (from the Bari digi
alg).  It's not important now, I will summarize monday and notify the
package owners (after checking against the HEAD).  Btw, Joanne always
immediately updated xmlUtil, and we now have v2r8p6, but you still have
v2r8p3 in Gleam v4.

And I just remember, Gleam also doesn't build with egcs, because Tracy
blew something in Event.  Separate mail.

In GlastPolicy, I added -DG4USE_STD_NAMESPACE, otherwise Geant4 doesn't
build.  Also -DDEFECT_STRING_STREAM (or similar) got removed.

Ok, with these changes one can essentially go.  Some programs don't link,
because they don't find
GaudiInterface/v0/../GaudiKernel/v13r1/Linux-i686/GaudiKernel.lib .  I
haven't understood what should happen here.  Should be there a link to the
installed Gaudi lib?

I made this link by hand, to the shared lib (I had the static one before,
and wondered for 3 hours why FluxDisplayTest.exe, and also Gleam, didn't
link).

After a while, there is Gleam.  If I try to run it, I get:

[kuss@pcglast00 cmt]$ ../Linux-i686/Gleam.exe
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: no such template iterator<iterator_traits<unsigned
int*>::iterator_category,iterator_traits<unsigned
int*>::value_type,iterator_traits<unsigned
int*>::difference_type,iterator_traits<unsigned
int*>::pointer,iterator_traits<unsigned int*>::reference> FILE: LINE:0
Error: no such template iterator<iterator_traits<unsigned
int*>::iterator_category,iterator_traits<unsigned
int*>::value_type,iterator_traits<unsigned
int*>::difference_type,iterator_traits<unsigned
int*>::pointer,iterator_traits<unsigned int*>::reference> FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Error: class,struct,union or type __gnu_cxx not defined  FILE: LINE:0
Starting Glast-Gaudi job with job options file
/data00b/users/kuss/myGlast/packages/gcc32/Gleam/v100/Gleam/v4/src/jobOptions.tx
t
/data00b/users/kuss/myGlast/packages/gcc32/Gleam/v100/GaudiInterface/v0/..\Gaudi
Svc\v10r0p1/Linux-i686/GaudiSvc.so:
cannot open shared object file: No such file or directory
Gaudi::Bootstrap: Not found DLL GaudiSvc

Well, same weird stuff as I have seen before.  The GaudiSvc, of course, is
trivial, I just fix the path and make a link to the lib.  But I'm tired
now.


Some comments:

It's not could to define the path to the external Geant4 two times. 
IExternal should also contain geant4, and runtime and the other reference
this one and get the env variables.

Why are some extlibs duplicate in GaudiInterface and IExternal?  I
understand the notion of not messing with Gaudi to much.  I hope it is
clear to the user that the extlibs within GaudiInterface are not to be
used by other stuff.
But there might be conflicts.  E.g., I had to modify the ROOT_libs in
IExternal/ROOT.  What happens if I use both GaudiInterface and IExternal,
which ROOT wins?  I think we shoud try to remove the extlibs from
GaudiInterface.  We could rename IExternal into ExternalLibs, then maybe
editing is minimal.

I haven't understood why the sources/includes have to be in the packages. 
I tought we plan to treat Gaudi like any other extlib.  I.e., in a
multiuser environment the system manager has to install the Gaudi stuff
into GLAST_EXT, like any other stuff.  I thought purpose of the packages
contained by GaudiInterface is to supply other packages with the env
variables to access the libs and includes.

I'm puzzled about the rh61_gcc2952 tag.  Though completely wrong, I like
it, because it says (if right) on which system you are using which
compiler.  Moreover, with afs up, my PC is i386_linux24, without
Linux-i686.  What for sure doesn't help is to redefine the tag in
GlastPolicy, so I prefer to have it removed there.  Now, that we might run
with two different compilers for a while (also on windows), it would be
best to convince cmt to create a tag representing the compiler.  To make
it fail proof, this would have to be at run time.  In contrast to now,
where you define it once for your session.  If you think it's worth the
trouble, I volunteer to look into it.
 

Toby's comments:


29 November 2002

IExternal

Added Geant4, Geant4Interface, and XMLEXT to IExternal.  The req. file is now:

package IExternal

# $Header: /nfs/slac/g/glast/ground/cvs/IExternal/cmt/requirements,v 1.4 2002/11/29 21:25:26 burnett Exp $

# container package for external interface packages

use AIDA v3r22p0 IExternal
use CLHEP v2r1800p0 IExternal
use HTL v2r1311p0 IExternal
use ROOT v2r30309p0 IExternal

use ExternalLibs v4r0p1 IExternal

use GaudiInterface v0r111p0 IExternal

use GaudiPolicy v5r7 IExternal

# Glast Geant stuff
use Geant4 v2r41p0 IExternal
use Geant4Runtime v2r41p0 IExternal

# Glast path to xerces
use XMLEXT v3r152p0 IExternal

 
GlastRelease

After a lot of pain trying to maintain a zip file with modified versions of all the packages, for myself and especially Michael and Johann, I decided that it was foolish not use use cvs. Thus we now have, as of ~11AM PST on 28 November,  temporary copies of all the packages needed by Gleam, namely

AcdDigi/ CalUtil/ FluxSvc/ Gleam/ RootPolicy/ astro/ facilities/ idents/ xml/
AcdRecon/  G4Generator/ GuiSvc/ TkrDigi/ cmt/ geometry/ mcRootData/ xmlGeoDbs/
CalDigi/ Event/ GlastPolicy/ Recon/ TkrRecon/ detModel/ geomrep/ merit/ xmlUtil/
CalRecon/ FluxDisplay/ GlastSvc/ RootIo/ Trigger/ digiRootData/ gui/ reconRootData/

in a new folder GlastRelease.  The intention would be to copy them back, or have package authors merge the changes, when the dust has settled. For now, GlastRelease can serve as a container, perhaps a prototype for the eventual release package.

They have now been modified to take external packages into account, specifically Geant4 and Xerces.

After a lot of effort, I have all the above copies tagged.

To check out the lot: in a folder that is in the CMTPATH:

cmt co -R IExternal
cmt co -R GlastRelease

This gets the head versions of IExternal and GlastRelease, but tagged, sticky-tag versions of the referenced packages. At the moment, all these are the head, and (mostly) only differ in the requirements files from when they were copied over. To modify such a package, remember to "cvs update -A" before checking in.

Another thing to be very careful about: applying a rtag *must* give the cvs path, that is,  GlastRelease/<package>..

Finally, do not apply cvs commands directly to the container package. No rtag, no checkout! Those can be applied only to the cmt folder.


14 December 2002 - Toby

 


21 December 2002 - Toby

An update on the SLAC situation: thanks to Alex, there is a new set of externals at

    GLAST_EXT=/afs/slac.stanford.edu/g/glast/ground/externalPackages/rh72_gcc2952

including Gaudi v11r4, but needing Linux-i686 for binary path. Thus I've updated GaudiInterface to include the following macro definition:

macro GaudiInterface_tag "$(tag)" \
      SLAC_UNIX "Linux-i686"  

The consequence is that the setup env vars are expected to be:

CMTBASE=/afs/slac.stanford.edu/g/glast/applications/CMT
CMTBIN=Linux

CMTCONFIG=rh72_gcc2952
CMTEXTRATAGS=
CMTROOT=/afs/slac.stanford.edu/g/glast/applications/CMT/v1r12p20020606
CMTSITE=SLAC_UNIX
CMTVERSION=v1r12p20020606
GLAST_EXT=/afs/slac.stanford.edu/g/glast/ground/externalPackages/rh72_gcc2952

The boldface ones need to be set explicitly by the user: the others are set by the line, 

source ${GLASTROOT}/ground/scripts/group.cshrc

In a user's .cshrc.

And the resulting CMT tags, on a noric are:

Linux (from uname)
i386-linux (from HOSTTYPE)
rh72_gcc2952 (from CMTCONFIG) package GaudiPolicy implies [Linux redhat72 gcc-2.95.2]
SLAC_UNIX (from CMTSITE)
Default (from Default)
gcc-2.95.2 (from package GaudiPolicy)
redhat72 (from package GaudiPolicy)
 

Note that the tag gcc-2.95.2 does not seem to be used anywhere. We actually use g++ to perform compilation, which, at a noric at least, is at /usr/bin, and invokes version  gcc version 2.95.3 20010315 (release).

A demonstration is available: I wrote a script somewhat equivalent to glastpack, doit.bash.  Like the overnight builds, the idea was to start with a clean slate, define everything explicitly, check out fresh copies of everything.  But in addition, it tries to document the status of everything. The output is here.
 


07 January 2003 - Toby

Alex has updated the compiler, modifications for tags checked into IExternal/GaudiPolicy. Verify this with new

doit.bash and log file.

11 January 2003 - Toby

Discovered that CMT v1r12p20021129 is not yet installed at SLAC. Hope that we don't depend on the patches.

SLAC build fails here:

      In file included from ../src/CalCalibMap.h:7,
                 from ../src/CalPedMap.cxx:1:
../src/CalXtalCalib.h:41: default argument given for parameter 2 of `const CalibData * CalXtalCalib::getRangeCalib(short unsigned int, idents::CalXtalId::XtalFace = idents::CalXtalId::POS) const'
../src/CalXtalCalib.h:20: after previous specification in `const CalibData * CalXtalCalib::getRangeCalib(short unsigned int, idents::CalXtalId::XtalFace = idents::CalXtalId::POS) const'
../src/CalXtalCalib.h:67: default argument given for parameter 3 of `void CalXtalCalib::addElement(CalibElement *, unsigned int, idents::CalXtalId::XtalFace = idents::CalXtalId::POS)'
../src/CalXtalCalib.h:26: after previous specification in `void CalXtalCalib::addElement(CalibElement *, unsigned int, idents::CalXtalId::XtalFace = idents::CalXtalId::POS)'
In file included from ../src/CalPedMap.cxx:1:
../src/CalCalibMap.h:63: default argument given for parameter 4 of `void CalCalibMap::addElement(CalibElement *, idents::CalXtalId, unsigned int, idents::CalXtalId::XtalFace = idents::CalXtalId::POS)'
../src/CalCalibMap.h:27: after previous specification in `void CalCalibMap::addElement(CalibElement *, idents::CalXtalId, unsigned int, idents::CalXtalId::XtalFace = idents::CalXtalId::POS)'
gmake[3]: *** [../rh72_gcc2953/CalPedMap.o] Error 1
gmake[2]: *** [CalRecon] Error 2
gmake[1]: *** [common_target] Error 2
gmake: *** [all] Error 2

This would be fixed by not specifying the default parameters in the function definitions, I think.

Windows vc6 builds ok, but fails execution of test_Gleam:

ToolSvc ERROR Factory for Tool LinearConvertAdc not found
CalDigiAlg ERROR Unable to create LinearConvertAdc
Digitization ERROR Unable to initialize Algorithm CalDigiAlg

This is fixed by specifying CalUtil in the list of DLL's in the default job options.


Last Updated: 2003-01-17 10:19:06 -0800