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