[1041] | 1 | ========================== Mgr Module =========================
|
---|
| 2 | ========== Code Management scripts for Planck DPC-L2 ==========
|
---|
| 3 | ===============================================================
|
---|
[283] | 4 |
|
---|
[1041] | 5 | List of modules:
|
---|
| 6 | ==================
|
---|
[283] | 7 |
|
---|
[1041] | 8 | * Mgr/ Scripts for code management and makefiles
|
---|
[1604] | 9 | * BaseTools/ General architecture support classes
|
---|
| 10 | * SysTools/ Interface to various services provided by the operating system
|
---|
[1609] | 11 | * SUtils/ Utility classes and functions
|
---|
[1041] | 12 | * TArray/ Template numerical arrays, vectors and matrices
|
---|
| 13 | * SkyMap/ Local and full sky maps
|
---|
| 14 | * SkyT/ Spectral emission and detector frequency response modelling
|
---|
| 15 | * Samba/ Miscellaneous classes (TOD analysis, Spherical Harmonics, ...)
|
---|
| 16 | * NTools/ Some standard numerical analysis tools
|
---|
| 17 | * HiStats/ Histogram-ming and data set handling classes
|
---|
[283] | 18 |
|
---|
[1041] | 19 | Modules using external library
|
---|
| 20 | * FitsIOServer/ FITS format file I/O (interface with cfitsio library)
|
---|
| 21 | * LinAlg/ Interface with Lapack linear algebra package
|
---|
| 22 | * IFFTW/ Interface with FFTW package
|
---|
[1455] | 23 | * XAstroPack/ Interface with astronomy library (XEphem)
|
---|
| 24 | Code is into the SOPHYA module XephemAstroLib
|
---|
[283] | 25 |
|
---|
[1041] | 26 |
|
---|
| 27 | * Tests/ Simple test programs
|
---|
| 28 |
|
---|
| 29 | * PMixer/ skymixer and utility main programs
|
---|
| 30 |
|
---|
[1336] | 31 | * PrgUtil/ Utility main programs
|
---|
| 32 |
|
---|
[1604] | 33 | * PrgMap/ Utility main programs for sky map manipulation
|
---|
[1336] | 34 |
|
---|
[1604] | 35 |
|
---|
[1041] | 36 | * PI/ GUI class library
|
---|
| 37 | * PIext/ specific GUI objects for SOPHYA classes and piapp framework
|
---|
| 38 | * ProgPI/ interactive analysis tool using SOPHYA, PI and PIext
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 | Compilation and software installation:
|
---|
| 42 | ======================================
|
---|
| 43 |
|
---|
| 44 | The build procedure for the present version of SOPHYA has been
|
---|
| 45 | tested on :
|
---|
| 46 |
|
---|
| 47 | Operating system Compiler
|
---|
| 48 | ......................................................................
|
---|
[1604] | 49 | Compaq/DEC OSF 4.0 cxx 6.x (shared-library only)
|
---|
[1041] | 50 | Compaq/DEC OSF 4.0 g++ 2.95 (shared-library only)
|
---|
| 51 | SGI CC 7.30 ( " " " )
|
---|
| 52 | Linux KCC 3.4 ( " " " )
|
---|
| 53 | Linux g++ 2.91 (static and shared library)
|
---|
| 54 | Linux g++ 2.95 (static and shared library)
|
---|
| 55 |
|
---|
| 56 |
|
---|
| 57 | The environment variables DPCDEVREP EXTLIBDIR EROSCXX must be defined
|
---|
| 58 | for building and installing the libraries.
|
---|
| 59 |
|
---|
| 60 | $EROSCXX is the name of C++ compiler being used.
|
---|
| 61 | $DPCDEVREP is the path to where the libraries and executables will be put.
|
---|
| 62 | $DPCDEVREP/Include : header files
|
---|
| 63 | The libraries and binaries will be put in subdirectories containing
|
---|
| 64 | the operating system name and the compiler name: `uname`-$EROSCXX
|
---|
| 65 | For example, on a Linux system, using the GNU compiler:
|
---|
| 66 |
|
---|
| 67 | $DPCDEVREP/Linux-g++/Libs archive librarires
|
---|
| 68 | $DPCDEVREP/Linux-g++/ShLibs shared libraries
|
---|
| 69 | $DPCDEVREP/Linux-g++/Exec binaries
|
---|
| 70 |
|
---|
| 71 | The build procedure expects to find the include files and the libraries
|
---|
| 72 | for cfitsio in :
|
---|
| 73 | $EXTLIBDIR/Include/FitsIO
|
---|
| 74 | $EXTLIBDIR/`uname`-$EROSCXX/Libs
|
---|
| 75 | This would translate to Linux-g++ on a Linux system, using g++.
|
---|
| 76 | $EXTLIBDIR/Linux-g++/Libs
|
---|
| 77 |
|
---|
| 78 | Example of c-shell commands to build the libraries:
|
---|
| 79 | The use of GNU make program is mandatory
|
---|
| 80 |
|
---|
| 81 | # We select our C++ compiler
|
---|
| 82 | csh> setenv EROSCXX g++
|
---|
| 83 | # Setup the build directory
|
---|
| 84 | csh> mkdir /usr/local/Sophya/
|
---|
[1336] | 85 | csh> setenv DPCDEVREP /usr/local/Sophya/
|
---|
| 86 | csh> setenv DPCBASEREP /usr/local/Sophya/
|
---|
| 87 | csh> setenv EXTLIBDIR /usr/local/ExtLibs/
|
---|
[1041] | 88 |
|
---|
| 89 | # Use the top level makefile in Mgr/
|
---|
| 90 | csh> cd $SRC
|
---|
| 91 | csh> cp Mgr/Makefile Makefile
|
---|
| 92 | # Step 1: Create the directory tree and copy the include files (.h)
|
---|
| 93 | csh> make depend
|
---|
| 94 | # Step 2: Compile the modules without external library reference
|
---|
| 95 | csh> make libs
|
---|
| 96 | # Step 3: Compile the modules WITH external library reference (optional)
|
---|
| 97 | csh> make extlibs
|
---|
| 98 | # Step 4: Build libsophya.so
|
---|
| 99 | csh> make slb
|
---|
| 100 | # Step 5: Build libextsophya.so
|
---|
| 101 | csh> make slbext
|
---|
| 102 | # Step 6: Compile the PI and PIext modules (optional)
|
---|
| 103 | csh> make PI
|
---|
| 104 | # Step 7: Build the corresponding shared library libPI.so (optional)
|
---|
| 105 | csh> make slbpi
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | To compile all modules and build the shared libraries, it is possible to use:
|
---|
| 109 |
|
---|
| 110 | # Step 2,3,6
|
---|
| 111 | csh> make all
|
---|
| 112 | # Step 4,5,7
|
---|
| 113 | csh> make slball
|
---|
| 114 |
|
---|
| 115 | The building of shared libraries on SGI can be also done using the script
|
---|
| 116 | mkslbsgi.csh in Mgr/
|
---|
| 117 |
|
---|
| 118 | csh> cp Mgr/mkslbsgi.csh .
|
---|
| 119 | csh> mkslbsgi.csh slball
|
---|
| 120 |
|
---|
| 121 | # To compile test programs
|
---|
| 122 | csh> cd Tests
|
---|
| 123 | csh> make arrt ...
|
---|
| 124 | csh> cd ..
|
---|
| 125 | # To compile other programs, for example from the PMixer module
|
---|
| 126 | csh> cd PMixer
|
---|
| 127 | csh> make
|
---|
| 128 | csh> cd ..
|
---|
| 129 | # To build (s)piapp (libPI.so is needed)
|
---|
| 130 | csh> cd ProgPI
|
---|
| 131 | csh> make
|
---|
| 132 | csh> cd ..
|
---|
| 133 |
|
---|
| 134 | Notes:
|
---|
| 135 | ======
|
---|
| 136 | 1) We had to build the shared libraries on our SGI system using the
|
---|
| 137 | script (mkslbsgi.csh). The corresponding CC command was not performing
|
---|
| 138 | correctly when issued by the GNU make program
|
---|
| 139 | 2) The top level Makefile should be modified if one wishes to use
|
---|
| 140 | static libraries, except for g++. The compiler driver has to be
|
---|
| 141 | invoked for building archive libraries, in order to include
|
---|
| 142 | template instanciation into the archive.
|
---|
| 143 |
|
---|
| 144 |
|
---|
| 145 |
|
---|
| 146 | Scripts in Mgr/ module :
|
---|
| 147 | ========================
|
---|
| 148 |
|
---|
| 149 | * chk_cvs.csh : Compares/updates modules using CVS
|
---|
| 150 | Usage: chk_cvs.csh [-a] [-all] [-nos] [-u] [r]
|
---|
| 151 | chk_cvs.csh -h for help
|
---|
| 152 | Example :
|
---|
| 153 | Cmd> Mgr/chk_cvs.csh -u
|
---|
| 154 | Updates all modules
|
---|
| 155 |
|
---|
| 156 | * crerep_sophya
|
---|
| 157 | Creates the directory tree structure :
|
---|
| 158 | $DEV/BASEREP/Include
|
---|
[283] | 159 | /OSF1-cxx/
|
---|
| 160 | /OSF1-cxx/Objs
|
---|
| 161 | /OSF1-cxx/Libs
|
---|
| 162 | /OSF1-cxx/ShLibs
|
---|
| 163 | /OSF1-cxx/Exec/
|
---|
| 164 | ....
|
---|
[1041] | 165 | Usage: crerep_sophya <nom des repertoires> [nom_machine-compilateur]
|
---|
| 166 | Example :
|
---|
| 167 | Cmd> crerep_sophya $DPCDEVREP OSF1-cxx
|
---|
| 168 | Cmd> crerep_sophya ~/Work/ Linux-g++
|
---|
[283] | 169 |
|
---|
[1041] | 170 | * install_sophya
|
---|
| 171 | Install SOPHYA libraries/include files from dev directory ($DPCDEVREP)
|
---|
| 172 | to the install ($DPCBASEREP) directory
|
---|
| 173 | Copy files Include/*.h Libs/*.a ShLibs/*.so Exec/*
|
---|
[283] | 174 |
|
---|
[1041] | 175 | Usage: install_sophya <-s repertoire source> <-d repertoire destination>
|
---|
[283] | 176 | [-m nom_machine-compilateur]
|
---|
[1041] | 177 | Example
|
---|
| 178 | Cmd> install_peida -s ~/Work /exp/Planck/DPC
|
---|
[283] | 179 |
|
---|
| 180 | * mkmf
|
---|
[1041] | 181 | Creates a GNUmakefile in each library module and the global
|
---|
| 182 | GNUmakefile at top level
|
---|
[283] | 183 |
|
---|
[1041] | 184 | Steps :
|
---|
| 185 | - mkmflien : Creates symbolic links for all header files in $DPCDEVREP/Include
|
---|
[283] | 186 |
|
---|
[1041] | 187 | - mkmflib : Creation of a GNUmakefile in each library module
|
---|
[283] | 188 |
|
---|
[1041] | 189 | - mkmfPI : Creation of a GNUmakefile for PI and PIext module
|
---|
[283] | 190 |
|
---|
[1041] | 191 | - Top level makefile creation
|
---|
[283] | 192 |
|
---|
| 193 |
|
---|
[1041] | 194 | * mkmflib
|
---|
| 195 | Creation of the GNUmakefile for a library module
|
---|
| 196 | The file exclude in the module directory may contain the
|
---|
| 197 | list of source files (.cc .c) not to be compiled.
|
---|
| 198 | Usage: mkmflib ModuleName
|
---|
| 199 |
|
---|
| 200 | * mkmfprog
|
---|
| 201 | Creation of the GNUmakefile for a module containing
|
---|
| 202 | the main programs
|
---|
| 203 | Usage: mkmfprog ProgModuleName
|
---|
[283] | 204 |
|
---|
| 205 |
|
---|
| 206 |
|
---|