[1041] | 1 | ========================== Mgr Module =========================
|
---|
[2279] | 2 | ============= Code Management scripts for SOPHYA ==============
|
---|
[1041] | 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)
|
---|
[2279] | 24 | The XEphem library code is in the SOPHYA module XephemAstroLib
|
---|
[283] | 25 |
|
---|
[2279] | 26 | * XephemAstroLib/ The code of the external XEphem astronomy library, extracted from XEphem
|
---|
[1041] | 27 |
|
---|
[2279] | 28 | Modules with main programs
|
---|
[1041] | 29 | * Tests/ Simple test programs
|
---|
| 30 |
|
---|
| 31 | * PMixer/ skymixer and utility main programs
|
---|
| 32 |
|
---|
[1336] | 33 | * PrgUtil/ Utility main programs
|
---|
| 34 |
|
---|
[1604] | 35 | * PrgMap/ Utility main programs for sky map manipulation
|
---|
[1336] | 36 |
|
---|
[2279] | 37 | PI/piapp GUI and interactive analysis framework
|
---|
[1604] | 38 |
|
---|
[2279] | 39 | * PI/ GUI class library and application framework
|
---|
| 40 | * PIGcont/ PI contour drawer
|
---|
[1041] | 41 | * PIext/ specific GUI objects for SOPHYA classes and piapp framework
|
---|
[2279] | 42 | * ProgPI/ interactive analysis tool using SOPHYA, PI PIGCont and PIext
|
---|
[1041] | 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 | ......................................................................
|
---|
[2279] | 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)
|
---|
[1041] | 57 | Linux g++ 2.95 (static and shared library)
|
---|
[2279] | 58 | MacOSX/Darwin 10.1 c++/gcc 2.95 (shared-library only)
|
---|
[1041] | 59 |
|
---|
[2437] | 60 | The environment variables SOPHYADEVREP EXTLIBDIR SOPHYACXX must be defined
|
---|
[1041] | 61 | for building and installing the libraries.
|
---|
| 62 |
|
---|
[2437] | 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
|
---|
[1041] | 66 | The libraries and binaries will be put in subdirectories containing
|
---|
[2437] | 67 | the operating system name and the compiler name: `uname`-$SOPHYACXX
|
---|
[1041] | 68 | For example, on a Linux system, using the GNU compiler:
|
---|
| 69 |
|
---|
[2437] | 70 | $SOPHYADEVREP/Linux-g++/Libs archive librarires
|
---|
| 71 | $SOPHYADEVREP/Linux-g++/ShLibs shared libraries
|
---|
| 72 | $SOPHYADEVREP/Linux-g++/Exec binaries
|
---|
[1041] | 73 |
|
---|
| 74 | The build procedure expects to find the include files and the libraries
|
---|
| 75 | for cfitsio in :
|
---|
| 76 | $EXTLIBDIR/Include/FitsIO
|
---|
[2437] | 77 | $EXTLIBDIR/`uname`-$SOPHYACXX/Libs
|
---|
[1041] | 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
|
---|
[2437] | 85 | csh> setenv SOPHYACXX g++
|
---|
[1041] | 86 | # Setup the build directory
|
---|
| 87 | csh> mkdir /usr/local/Sophya/
|
---|
[2437] | 88 | csh> setenv SOPHYADEVREP /usr/local/Sophya/
|
---|
| 89 | csh> setenv SOPHYABASEREP /usr/local/Sophya/
|
---|
[1336] | 90 | csh> setenv EXTLIBDIR /usr/local/ExtLibs/
|
---|
[1041] | 91 |
|
---|
[2284] | 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 |
|
---|
[1041] | 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
|
---|
[283] | 168 | /OSF1-cxx/
|
---|
| 169 | /OSF1-cxx/Objs
|
---|
| 170 | /OSF1-cxx/Libs
|
---|
| 171 | /OSF1-cxx/ShLibs
|
---|
| 172 | /OSF1-cxx/Exec/
|
---|
| 173 | ....
|
---|
[1041] | 174 | Usage: crerep_sophya <nom des repertoires> [nom_machine-compilateur]
|
---|
| 175 | Example :
|
---|
[2437] | 176 | Cmd> crerep_sophya $SOPHYADEVREP OSF1-cxx
|
---|
[1041] | 177 | Cmd> crerep_sophya ~/Work/ Linux-g++
|
---|
[283] | 178 |
|
---|
[1041] | 179 | * install_sophya
|
---|
[2437] | 180 | Install SOPHYA libraries/include files from dev directory ($SOPHYADEVREP)
|
---|
| 181 | to the install ($SOPHYABASEREP) directory
|
---|
[1041] | 182 | Copy files Include/*.h Libs/*.a ShLibs/*.so Exec/*
|
---|
[283] | 183 |
|
---|
[1041] | 184 | Usage: install_sophya <-s repertoire source> <-d repertoire destination>
|
---|
[283] | 185 | [-m nom_machine-compilateur]
|
---|
[1041] | 186 | Example
|
---|
| 187 | Cmd> install_peida -s ~/Work /exp/Planck/DPC
|
---|
[283] | 188 |
|
---|
| 189 | * mkmf
|
---|
[1041] | 190 | Creates a GNUmakefile in each library module and the global
|
---|
| 191 | GNUmakefile at top level
|
---|
[283] | 192 |
|
---|
[1041] | 193 | Steps :
|
---|
[2437] | 194 | - mkmflien : Creates symbolic links for all header files in $SOPHYADEVREP/Include
|
---|
[283] | 195 |
|
---|
[1041] | 196 | - mkmflib : Creation of a GNUmakefile in each library module
|
---|
[283] | 197 |
|
---|
[1041] | 198 | - mkmfPI : Creation of a GNUmakefile for PI and PIext module
|
---|
[283] | 199 |
|
---|
[1041] | 200 | - Top level makefile creation
|
---|
[283] | 201 |
|
---|
| 202 |
|
---|
[1041] | 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
|
---|
[283] | 213 |
|
---|
| 214 |
|
---|
| 215 |
|
---|