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