200 likes | 325 Views
The packaging of glastsim (with CMT). This is an update from a talk I gave 2 weeks ago (Even more) Help and suggestions from Traudl and Sawyer New emphasis on adoption of CMT. Objectives. Reorganize the current glastsim code into packages Make them shared libraries
E N D
The packaging of glastsim(with CMT) This is an update from a talk I gave 2 weeks ago (Even more) Help and suggestions from Traudl and Sawyer New emphasis on adoption of CMT CMT
Objectives • Reorganize the current glastsim code into packages • Make them shared libraries • Define a package-oriented development environment that generates MSVC++ project files and unix make files from a common description CMT
Example disk structure root has package name Version name: root for clients Documentation Public header files contains requirements file; All build files Source files CMT
Before: simul_recon root directory CLHEP/ configure* gheisha/ nt.out CVS/ configure.bat* gismo/ ntmake.bat* Intermediate/ configure.in glastmedia/ prodchain.sh* Makefile.app console.dep glastsim.xml prodfilter.sh* Makefile.common.in console.dsp glastsoftware.mdl prodrun.sh* Makefile.in console.mak glastsoftware.prc randseeds.sh Makefile.lib.in control/ glastsoftware.prp readout/ NT_test.mak cygwin/ graphics/ reconstruction/ PEGS4/ data/ gsim.exe.core simul_recon.dsw README doc/ gui.dsp simul_recon.ncb Release/ egcs-1.1.aix.out gui.plg simul_recon.opt analysis/ egcs-1.1.linux.out hpux.out simul_recon.shared ao_glastsim.xml egcs-1.1.osf4.out instrument/ source_library.xml application/ egcs-1.1.solaris.out insure.out test.bat* arve/ egs/ level2/ user_tuple.xml batch/ expat/ makedepend* wingui/ config/ facilities/ merit/ config.h flux/ merit.dsw config.h.in geometry/ motifgui/ CMT
After: packages root • Root directory has only package roots • Special package “glast_settings” has over-all build instructions analysis/ geometry/ glastmedia/ readout/ application/ geomrep/ graphics/ reconstruction/ data/ gismo/ instrument/ xml/ facilities/ glast_settings/ level2/ flux/ glastflux/ merit/ CMT
Some changes • gismo • Contains: egs, gheisha, and PEGS4 • graphics • Contains: windows, motif, batch, control • facilities • New xml split off CMT
The uses tree (partial) application glastflux reconstruction flux level2 data readout instrument analysis CMT geometry
A lot to do • reconstruction and instrument still need splitting apart • application is top-heavy • need to rethink user interface stuff CMT
Status ( 6 Jan 2000) • Glastsim (gui and console versions) and merit both function as before • Unix make works with cygwin – (just console) • CMT needs GLAST-specific tools and documentation CMT
Continuation: 20 Jan 2000 • Some To-dos still to do! • Set of packages (v1) almost ready to checkout • Many of Traudl’s suggestions implemented • Interface classes weaned • Javadoc comments set for several packages (and tested with Doxygen). • seehttp://glast.phys.washington.edu/~burnett/gismo/html/ • Extensive development of Visual Studio fragments CMT
The package model: a tree server server server server “uses”, or depends on Joe package provides services for client client client client CMT
So what does “uses” mean? • Version modifier • Compile time dependencies • include paths • preprocessor defines • Link time dependencies • Library paths, lib names • (so package must create its binaries, or constituents ) • Execution time dependencies • Shareable paths, names • Environment variable definitions, e.g., to data files • Alias names CMT
About CMT (Configuration Management Tool) • Special folder mgr contains two primary files: • requirements: complete description of interface • Makefile: standard + user-added targets • Executable cmt: a parser of this file allowing: • query • building other files • make • DevStudio • any “document” • References • http://www.lal.in2p3.fr/SI/CMT/CMTDoc.html • http://lhcb.cern.ch/computing/Support/html/cmt.htm CMT
Package name;“used” packages Anatomy of a requirements file package geomrep use geometry v0 use graphics v0 macro geomrep_linkopts "-L ${GEOMREPROOT}/${CMTCONFIG} -lgeomrep"\ VisualC "geomrep.lib" private library geomrep *.cxx ../geomrep/*.h application testgeom -windows ../test/testgeom.cxx\ ${GRAPHICSROOT}/windows/wingui.rc Define a make macro:will be used by client links Two “constituents”:a library and an executable CMT
CMT query example • cmt show uses # use geometry v0 # use glast_settings v0 # use CLHEP v1r4 # use graphics v0 # use glast_settings v0 # use CLHEP v1r4 # # Selection : use CMT v1r3 /packages use CLHEP v1r4 /packages/ use glast_settings v0 /packages/ use graphics v0 /packages/ use geometry v0 /packages/ CMT
Creating a Visual Studio project • cmt build msdev CMT
Creating unix make files • make han:/packages/geomrep/v0/mgr[36]$make /packages/CMT/v1r3/src/Makefile.header:61: cmt_path.make: No such file or directory /packages/CMT/v1r3/src/Makefile.header:66: setup.make: No such file or directory /packages/CMT/v1r3/src/constituents.make:5: constituents.make: No such file or directory /packages/CMT/v1r3/mgr/cmt build make_setup -tag=i586 setup.make:42: i586.make: No such file or directory constituents.make:9: geomrep.make: No such file or directory constituents.make:15: testgeom.make: No such file or directory Now rebuilding testgeom.make Application testgeom Now rebuilding geomrep.make Library geomrep Now rebuilding i586.make geomrep.make:35: geomrep_dependencies.make: No such file or directory testgeom.make:25: testgeom_dependencies.make: No such file or directory Now rebuilding testgeom_dependencies.make Now rebuilding geomrep_dependencies.make echo ""; i586.make ok geomrep : library ok geomrep ok cd ../i586/; g++ -o testgeom.exe.new ../i586/testgeom.o -L /packages/geomrep/v0/i586 -lgeomrep -L /packages//geometry/ v0/i586 -lgeometry -L /packages//graphics/v0/i586 -lgraphics -L /packages//CLHEP/v1r4/CLHEP -lCLHEP ; mv -f testgeom. exe.new testgeom.exe CMT
The result CMT
Status and Plans • Packages are currently in cvs under cmt • Plan to move to packages for development release, in next few days • Will include a setup script that now exists • Implements sharable libraries (dll’s) • BUT: • Release strategy not clear • Unix not ready… CMT
Unix plans • cygwin success is a proof of principle • No special modification! • Linux does not yet work (cursory look) • Surprising, since VC++ and cygwin worked immediately • Need someone to … • Understand principles • Formulate & implement policies CMT