Members/chinone/覚書

HEALPix C++


make

C++ ver

Healpix v2.01をicc(intel compiler)でmakeする。

cd /make/HEALPix/HEALPix-2.01/Healpix_2.01/src/cxx

必要な物: 「cfitsio2510.tar.gz」。でも中身は「cfitsio3030.tar.gz」。 これを、「./libcfitsio」に置く。

ls ./libcfitsio
cfitsio2510.tar.gz  planck.make

iccでコンパイルする場合は、

make HEALPIX_TARGET=linux_icc

を実行。通常のgccでコンパイルする場合は

make HEALPIX_TARGET=generic_gcc

を実行。

追記1
コンパイラの最適化:(今の所)どんな効果があるか怖いので、「config.linux_ixx」はいじらない。 最適化は「プログラム本体」で行なう。
追記2
環境によっては「cxxsupport/fitshandle.cc」の「strncpy」まわりでエラーが出る場合がある。その場合は「cxxsupport/fitshandle.cc」に「#include <cstring>」追記し、回避する。

「./linux_icc」or「./generic_gcc」以下にファイルが作成される(以降は「./linux_icc」の場合のみ表記)。

  • 実行形式(C_l計算、スムージングとか。ここ参照)
    ls ./linux_icc/bin/
    alm2map_cxx  anafast_cxx  calc_powspec  hotspots_cxx  hpxtest  map2tga  median_filter  mult_alm  rotalm_cxx  smoothing_cxx syn_alm_cxx  udgrade_cxx
  • ヘッダー
    ls ./linux_icc/include/
    alm.h                arr.h        cxxutils.h    eval_defs.h        fitshandle.h  group.h            healpix_map.h
    message_error.h   pointing.h        ricecomp.h   trafos.h
    alm_fitsio.h         cfortran.h   datatypes.h   eval_tab.h         fitsio.h      grparser.h         healpix_map_fitsio.h
    openmp_support.h  powspec.h         rotmatrix.h  vec3.h
    alm_map_tools.h      compress.h   drvrgsiftp.h  f77_wrap.h         fitsio2.h     healpix_base.h     longnam.h       
    paramfile.h       powspec_fitsio.h  simparams.h  xcomplex.h
    alm_powspec_tools.h  constants.h  drvrsmem.h    fftpack_support.h  geom_utils.h  healpix_data_io.h  ls_fft.h        
    planck_rng.h      region.h          tga_image.h  ylmgen.h
  • ライブラリ
    ls ./linux_icc/lib/
    libcfitsio.a  libcxxsupport.a  libfftpack.a  libhealpix_cxx.a

これを適当な場所に置いて、インストール終了。

cp -r linux_icc /usr/local/HEALPix/HEALPix_2.01

IDL, C and Fortran ver

此方

取り敢えず動かす

Makefile

  • fileMakefile
    # This is a -*- Makefile -*- 
    
    # HEALPIX
    HEALPIX = /home/chinoney/opt/healpix_intel
    HPIX_INC = -I$(HEALPIX)/include
    HPIX_LIB = -L$(HEALPIX)/lib -lhealpix_cxx -lcxxsupport -lcfitsio -lfftpack -lchealpix
    
    
    CXX = icpc
    CXXFLAGS = -ansi -ansi_alias -align -w1 -prec-div -axWP -inline-level=2 -O3 -ip -openmp -parallel
    CPPFLAGS = -I. $(HPIX_INC)
    LDFLAGS  = -L. $(HPIX_LIB)
    
    BINFILES = test_window
    
    .cc.o:
    	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
    
    all:	$(BINFILES)
    
    test_window:	test_window.o
    	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
    
    clean:
    	rm -rf *.o $(BINFILES)

test_window.cc

  • filetest_map.fits
  • filetest_window.cc
  • filepixel_window_n0512.fits
    /////////////////////////////////////
    #include <iostream>
    #include <iomanip>
    #include <cstdio>
    #include <fstream>
    #include <string>
    #include <sstream>
    #include <vector>
    #include <omp.h>
    /////////////////////////////////////
    #include <xcomplex.h>
    #include <cxxutils.h>
    #include <paramfile.h>
    #include <simparams.h>
    #include <planck_rng.h>
    #include <alm.h>
    #include <alm_fitsio.h>
    #include <alm_map_tools.h>
    #include <alm_powspec_tools.h>
    #include <fitshandle.h>
    #include <powspec.h>
    #include <powspec_fitsio.h>
    #include <healpix_map.h>
    #include <healpix_data_io.h>
    #include <healpix_map_fitsio.h>
    ///////////////////////////////////
    using namespace std ;
    
    #define NUM_ITER   (1)
    #define FWHM_AMIN  (10.0)
    
    
    int main(int argc,char **argv)
    {
      const char *infile = argv[1] ;
      Healpix_Map<double> map ;
      read_Healpix_map_from_fits( infile, map, 1, 2) ;
      int nside = map.Nside() ;
      int nlmax = 2*nside ;
      int nmmax = nlmax ;
    
      arr<double> weight_T ;
      weight_T.alloc(2*nside) ;
      weight_T.fill(1) ;
    
      Alm<xcomplex<double> > alm( nlmax, nmmax) ;
      if( map.Scheme()==NEST ) map.swap_scheme() ;
      map2alm_iter( map, alm, NUM_ITER, weight_T) ;
    
      PowSpec Cl ;
      extract_powspec( alm, Cl) ;
    
      PowSpec wCl = Cl ;
      for( int i=0; i<=nlmax; i++)
        wCl.tt(i) = 1 ;
      wCl.Smooth_with_Gauss(FWHM_AMIN/60.0*degr2rad) ;
    
      PowSpec pCl ;
      read_powspec_from_fits( argv[2], pCl, 1, nlmax) ;
    
      ofstream fout ;
      const char *outfile = argv[3] ;
      fout.open( outfile, ios::out) ;
      for( int i=2; i<=nlmax; i++)
        fout << i << "   " << i*(i+1)*Cl.tt(i)*inv_twopi << "   "
             << i*(i+1)*Cl.tt(i)/wCl.tt(i)*inv_twopi  << "   "
             << i*(i+1)*Cl.tt(i)/wCl.tt(i)/pCl.tt(i)/pCl.tt(i)*inv_twopi << endl ;
      fout.close() ;
    
    
      return 0 ;
    }

results

map.png
window_effect.png

make改

tar zxvf Healpix_2.01_2005Nov05.tar.gz
mv Healpix_2.01 2.01_00
cd 2.01_00

Installing the F90 package

./configure
you seem to be running Linux
enter name of your F90 compiler (): f95
  Note: your Fortran compiler is gfortran compiler
  compiled Healpix products will be:
BINDIR =  ./bin[suffix]
INCDIR =  ./include[suffix]
LIBDIR =  ./lib[suffix]
 and the Makefile will be copied into Makefile[suffix]
enter suffix for directories ():
 compiled Healpix products will be:
BINDIR =  ./bin
INCDIR =  ./include
LIBDIR =  ./lib
Warning: The following directories could not be found:
./bin
./include
./lib
Should I attempt to create these directories (Y|n)?
 enter compilation flags for f95 compiler (-I$(INCDIR) -DGFORTRAN -fno-second-underscore):
enter optimisation flags for f95 compiler (-O3):
  Fortran code will be compiled with f95 -O3 -I$(INCDIR) -DGFORTRAN -fno-second-underscore
enter name of your C compiler (gcc):
enter compilation/optimisation flags for C compiler (-O):
  C subroutines will be compiled with gcc -O
enter command for library archiving (ar rv):
enter full name of cfitsio library (libcfitsio.a):
enter location of cfitsio library (/usr/local/lib): /home/usrname/opt/cfitsio/lib
 The Spherical Harmonics Transform routines used by synfast/anafast/smoothing/plmgen
and some routines used by ud_grade and alteralm respectively
have a parallel implementation (based on OpenMP).
 It has currently been tested on IBM/xlf and Linux/ifc systems/compilers
Do you want to use :
 0) the standard scalar implementation ?
 1) the parallel implementation (slightly slower in single CPU usage with some compilers)
Enter choice                                      (0):

The following line should be inserted into your shell profile
(/home/usrname/.profile):

  . /home/usrname/make/healpix/2.01/2.01_03/bin/profile.HEALPix

profile.HEALPix contains the following commands:

# bash configuration for HEALPix
HEALPIX=/home/usrname/make/healpix/2.01/2.01_03
HEXE=/home/usrname/make/healpix/2.01/2.01_03/bin
PATH="${PATH}:${HEXE}"
export HEALPIX HEXE PATH
alias hidl="idl /home/usrname/make/healpix/2.01/2.01_03/src/idl/HEALPix_startup"
alias hidlde="idlde /home/usrname/make/healpix/2.01/2.01_03/src/idl/HEALPix_startup"

Do you want this modification to be done (y|N)?
Configuration finished.
Now run "(GNU)make" to build the package,
    and "(GNU)make test" to test it.
You can configure the IDL previewer by running ./config_preview
make
make test

環境変数 for IDL:

# bash configuration for HEALPix
HEALPIX=/home/usrname/make/healpix/2.01/2.01_00
HEXE=/home/usrname/make/healpix/2.01/2.01_00/bin
PATH="${PATH}:${HEXE}"
export HEALPIX HEXE PATH
alias hidl="idl /home/usrname/make/healpix/2.01/2.01_00/src/idl/HEALPix_startup"
alias hidlde="idlde /home/usrname/make/healpix/2.01/2.01_00/src/idl/HEALPix_startup"

Installing the C package

cd src/C
./doinstall
enter full name of cfitsio library (libcfitsio.a):
enter location of cfitsio library (/usr/local/lib): /home/usrname/opt/cfitsio/lib
enter location of cfitsio header cfitsio.h (/usr/local/include): /home/usrname/opt/cfitsio/include

Now trying compilation
make CFITSIO_INCDIR=/home/usrname/opt/cfitsio/include CFITSIO_LIBDIR=/home/usrname/opt/cfitsio/lib
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o ang2pix_nest.o ang2pix_nest.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o ang2pix_ring.o ang2pix_ring.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o pix2ang_nest.o pix2ang_nest.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o pix2ang_ring.o pix2ang_ring.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o nest2ring.o nest2ring.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o ring2nest.o ring2nest.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o mk_pix2xy.o mk_pix2xy.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o mk_xy2pix.o mk_xy2pix.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o nside2npix.o nside2npix.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o npix2nside.o npix2nside.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o ang2vec.o ang2vec.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o vec2ang.o vec2ang.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o pix2vec_nest.o pix2vec_nest.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o pix2vec_ring.o pix2vec_ring.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o vec2pix_nest.o vec2pix_nest.c -I/home/usrname/opt/cfitsio/include
vec2pix_nest.c: In function 'vec2pix_nest':
vec2pix_nest.c:56: 警告: unused variable 'pi'
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o vec2pix_ring.o vec2pix_ring.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o printerror.o printerror.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o get_fits_size.o get_fits_size.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o write_healpix_map.o write_healpix_map.c -I/home/usrname/opt/cfitsio/include
gcc -D__USE_FIXED_PROTOTYPES__ -Wall -c -o read_healpix_map.o read_healpix_map.c -I/home/usrname/opt/cfitsio/include
ar -r libchealpix.a ang2pix_nest.o ang2pix_ring.o pix2ang_nest.o pix2ang_ring.o nest2ring.o ring2nest.o mk_pix2xy.o mk_xy2pix.o nside2npix.o npix2nside.o ang2vec.o vec2ang.o pix2vec_nest.o pix2vec_ring.o vec2pix_nest.o vec2pix_ring.o printerror.o get_fits_size.o write_healpix_map.o read_healpix_map.o
ar: creating libchealpix.a

Will install the library (libchealpix.a) in /home/usrname/make/healpix/2.01/2.01_03/lib
 and the header file (chealpix.h) in /home/usrname/make/healpix/2.01/2.01_03/include
make install INCDIR=/home/usrname/make/healpix/2.01/2.01_03/include LIBDIR=/home/usrname/make/healpix/2.01/2.01_03/lib
cp libchealpix.a /home/usrname/make/healpix/2.01/2.01_03/lib/.
ranlib  /home/usrname/make/healpix/2.01/2.01_03/lib/libchealpix.a
cp chealpix.h /home/usrname/make/healpix/2.01/2.01_03/include/.

Installing the C++ package

cd ../cxx

libcfitsioにcfitsio2510.tar.gz を配置:

ls libcfitsio
cfitsio2510.tar.gz  planck.make

(実は中身はcfitsio3030.tar.gz、リネームしているだけ。)

ls config
config.aix64        config.generic_gcc  config.irix64       config.linux_icc    config.osx          config.solaris_gcc

generic_gccターゲットでコンパイル:

make HEALPIX_TARGET=generic_gcc
make test HEALPIX_TARGET=generic_gcc
cd generic_gcc/bin
mv median_filter median_filter_cxx

Installing bin, lib and include

cd ../../../../
mkdir -p /home/usrname/opt/pkgs/healpix_2.01
cp -r bin lib include /home/usrname/opt/pkgs/healpix_2.01/
cp -r src/cxx/generic_gcc/* /home/usrname/opt/pkgs/healpix_2.01/
ln -s /home/usrname/opt/pkgs/healpix_2.01 /home/usrname/opt/healpix

make 2.11c (preliminary)

tar zxvf Healpix_2.11c_2009Feb19.tar.gz
mv Healpix_2.11c Healpix_2.11c_00
cd Healpix_2.11c_00

各言語(C,C++,IDL,JAVA)用のライブラリ、実行ファイル、設定ファイルを作成する手順以下の通り:

./configure [-L]
make
make test

例えばCの場合:

./configure [-L]
make c-all
make c-test

となる。但し、この方法ではパッケージを展開したディレクトリ以下にライブラリ、実行ファイル、設定ファイルが展開される。 特定の場所にライブラリを起きたい場合は、make終了後適切な作業を行なう必要がある。詳細は此方で。

Making the F90 package

cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00$ ./configure -L

Note: the configuration directory will be /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux


*************************
 Welcome to Healpix 2.11c
*************************

This script takes care of the configuration and compilation
of the C, C++, F90 and IDL packages of the Healpix distribution.


Do you want to:
(0): exit
(1): configure Healpix IDL package
(2): configure Healpix C package, and edit Makefile
(3): configure Healpix F90 package, and edit Makefile
(4): configure Healpix C++ package, and edit Makefile
(5): see what configuration files have been created so far
(6): edit your shell configuration file to have easier access to Healpix codes
(-1): reset
     (will *REMOVE* the Makefile and configuration files, and exit)
(0): exit

Enter your choice (configuration of packages can be done in any order): 3
you seem to be running Linux
enter name of your F90 compiler (): f95
  Note: your Fortran compiler is gfortran compiler
  compiled Healpix products will be:
F90_BINDIR =  ./bin[suffix]
F90_INCDIR =  ./include[suffix]
F90_LIBDIR =  ./lib[suffix]
enter suffix for directories ():
 compiled Healpix products will be:
F90_BINDIR =  ./bin
F90_INCDIR =  ./include
F90_LIBDIR =  ./lib
Warning: The following directories could not be found:
./bin
./include
./lib
Should I attempt to create these directories (Y|n)?
 enter compilation flags for f95 compiler (-I$(F90_INCDIR) -DGFORTRAN -fno-second-underscore):
enter optimisation flags for f95 compiler (-O3):
  Fortran code will be compiled with f95 -O3 -I$(F90_INCDIR) -DGFORTRAN -fno-second-underscore
enter name of your C compiler (gcc):
enter compilation/optimisation flags for C compiler (-O):
  C subroutines will be compiled with gcc -O
enter command for library archiving (ar -rsv):
enter full name of cfitsio library (libcfitsio.a):
enter location of cfitsio library (/usr/local/lib): /home/cmbadm/opt/cfitsio/lib
  The generator of non-gaussian CMB maps (ng_sims) can optionally
produce plots of the maps Prob. Dens. Function using PGPLOT.
Do you want to enable this option ?
(this assumes that PGPLOT is already installed on your computer) (y|N)

 The Spherical Harmonics Transform routines used by synfast/anafast/smoothing/plmgen
and some routines used by ud_grade and alteralm respectively
have a parallel implementation (based on OpenMP).
 It has currently been tested on IBM/xlf, Linux/ifort & Linux/gcc systems/compilers
Do you want to use :
 0) the standard serial implementation ?
 1) the parallel implementation (slightly slower in single CPU usage with some compilers)
Enter choice                                      (0):
Generating /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/f90.sh
Editing top Makefile for F90 ... done.

The following line should be inserted into your home shell profile (/home/cmbadm/.profile):

  [ -r /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config ] && . /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config

 Where the file /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config contains:
# configuration for Healpix 2.11c
HEALPIX=/home/cmbadm/make/healpix/Healpix_2.11c_00 ; export HEALPIX
HPX_CONF_DIR=/home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux
if [ -r ${HPX_CONF_DIR}/idl.sh ] ; then . ${HPX_CONF_DIR}/idl.sh ; fi
if [ -r ${HPX_CONF_DIR}/f90.sh ] ; then . ${HPX_CONF_DIR}/f90.sh ; fi
if [ -r ${HPX_CONF_DIR}/cpp.sh ] ; then . ${HPX_CONF_DIR}/cpp.sh ; fi
if [ -r ${HPX_CONF_DIR}/c.sh ] ;   then . ${HPX_CONF_DIR}/c.sh ;   fi

Do you want this modification to be done (y|N)?
make f90-all && make f90-test

Making the C package

cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00$ ./configure -L

Note: the configuration directory will be /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux


*************************
 Welcome to Healpix 2.11c
*************************

This script takes care of the configuration and compilation
of the C, C++, F90 and IDL packages of the Healpix distribution.


Do you want to:
(0): exit
(1): configure Healpix IDL package
(2): configure Healpix C package, and edit Makefile
(3): configure Healpix F90 package, and edit Makefile
(4): configure Healpix C++ package, and edit Makefile
(5): see what configuration files have been created so far
(6): edit your shell configuration file to have easier access to Healpix codes
(-1): reset
     (will *REMOVE* the Makefile and configuration files, and exit)
(0): exit

Enter your choice (configuration of packages can be done in any order): 2
enter C compiler you want to use (gcc):
enter options for C compiler (-O2 -Wall):
enter archive creation (and indexing) command (ar -rsv):
enter full name of cfitsio library (libcfitsio.a):
enter location of cfitsio library (/usr/local/lib): /home/cmbadm/opt/cfitsio/lib
enter location of cfitsio header fitsio.h (/usr/local/include): /home/cmbadm/opt/cfitsio/include
A static library is produced by default. Do you also want a shared library ?(y|N) y
Editing top Makefile  for C ... done.

The following line should be inserted into your home shell profile (/home/cmbadm/.profile):

  [ -r /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config ] && . /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config

 Where the file /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config contains:
# configuration for Healpix 2.11c
HEALPIX=/home/cmbadm/make/healpix/Healpix_2.11c_00 ; export HEALPIX
HPX_CONF_DIR=/home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux
if [ -r ${HPX_CONF_DIR}/idl.sh ] ; then . ${HPX_CONF_DIR}/idl.sh ; fi
if [ -r ${HPX_CONF_DIR}/f90.sh ] ; then . ${HPX_CONF_DIR}/f90.sh ; fi
if [ -r ${HPX_CONF_DIR}/cpp.sh ] ; then . ${HPX_CONF_DIR}/cpp.sh ; fi
if [ -r ${HPX_CONF_DIR}/c.sh ] ;   then . ${HPX_CONF_DIR}/c.sh ;   fi

Do you want this modification to be done (y|N)?
make c-all && LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/cmbadm/make/healpix/Healpix_2.11c_00/lib make c-test

Making the C++ package

cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00$ ./configure -L

Note: the configuration directory will be /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux


*************************
 Welcome to Healpix 2.11c
*************************

This script takes care of the configuration and compilation
of the C, C++, F90 and IDL packages of the Healpix distribution.


Do you want to:
(0): exit
(1): configure Healpix IDL package
(2): configure Healpix C package, and edit Makefile
(3): configure Healpix F90 package, and edit Makefile
(4): configure Healpix C++ package, and edit Makefile
(5): see what configuration files have been created so far
(6): edit your shell configuration file to have easier access to Healpix codes
(-1): reset
     (will *REMOVE* the Makefile and configuration files, and exit)
(0): exit

Enter your choice (configuration of packages can be done in any order): 4
enter the name of the cfitsio .tar.gz package (with full path): /home/cmbadm/make/cfitsio/cfitsio3030.tar.gz
editing /home/cmbadm/make/healpix/Healpix_2.11c_00/src/cxx/libcfitsio/planck.make to use correct CFITSIO package
Available configurations for C++ compilation are:
   1: aix64
   2: generic_gcc
   3: irix64
   4: linux_icc
   5: osx
   0: None of the above (will send you back to main menu).
   You can create your own C++ configuration in /home/cmbadm/make/healpix/Healpix_2.11c_00/src/cxx/config/config.*
Choose one number: 2
will compile with generic_gcc configuration
Generating /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/cpp.sh
edit top Makefile for C++ ... done.

The following line should be inserted into your home shell profile (/home/cmbadm/.profile):

  [ -r /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config ] && . /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config

 Where the file /home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux/config contains:
# configuration for Healpix 2.11c
HEALPIX=/home/cmbadm/make/healpix/Healpix_2.11c_00 ; export HEALPIX
HPX_CONF_DIR=/home/cmbadm/make/healpix/Healpix_2.11c_00/confdir/2_11c_Linux
if [ -r ${HPX_CONF_DIR}/idl.sh ] ; then . ${HPX_CONF_DIR}/idl.sh ; fi
if [ -r ${HPX_CONF_DIR}/f90.sh ] ; then . ${HPX_CONF_DIR}/f90.sh ; fi
if [ -r ${HPX_CONF_DIR}/cpp.sh ] ; then . ${HPX_CONF_DIR}/cpp.sh ; fi
if [ -r ${HPX_CONF_DIR}/c.sh ] ;   then . ${HPX_CONF_DIR}/c.sh ;   fi

Do you want this modification to be done (y|N)?
make cpp-all && make cpp-test

Installing bin, include and lib

C++ package

 cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00$ pwd
/home/cmbadm/make/healpix/Healpix_2.11c_00
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00$ ls src/cxx/generic_gcc/*
src/cxx/generic_gcc/bin:
alice2      alm2map_cxx  calc_powspec     hotspots_cxx  map2tga        mult_alm    smoothing_cxx  testMollweideSkyMap   testSoSSkyMap
alice_test  anafast_cxx  generateTexture  hpxtest       median_filter  rotalm_cxx  syn_alm_cxx    testOrthogonalSkyMap  udgrade_cxx

src/cxx/generic_gcc/include:
alm.h                arr.h              fitsio.h           healpix_map.h         message_error.h   powspec.h         trafos.h
alm_fitsio.h         cxxutils.h         geom_utils.h       healpix_map_fitsio.h  openmp_support.h  powspec_fitsio.h  vec3.h
alm_healpix_tools.h  datatypes.h        healpix_base.h     longnam.h             paramfile.h       rotmatrix.h       xcomplex.h
alm_map_tools.h      fftpack_support.h  healpix_base2.h    ls_fft.h              planck_rng.h      simparams.h       ylmgen.h
alm_powspec_tools.h  fitshandle.h       healpix_data_io.h  lsconstants.h         pointing.h        tga_image.h

src/cxx/generic_gcc/lib:
libcfitsio.a  libcxxsupport.a  libfftpack.a  libhealpix_cxx.a
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00$ cd src/cxx/generic_gcc/
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src/cxx/generic_gcc$ cp -rf bin include lib /home/cmbadm/opt/pkgs/healpix_2.11c/

C package

cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src/cxx/generic_gcc$ cd ../../
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src$ cd C/subs/
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src/C/subs$ ls
Makefile          chealpix.h         mk_xy2pix.d.o   nside2npix.d.o    pix2vec_nest.s.o      ring2nest.c        test_cio.o        vec2pix_ring.s.o
ang2pix_nest.c    get_fits_size.c    mk_xy2pix.s.o   nside2npix.s.o    pix2vec_ring.c        ring2nest.d.o      test_output.fits  write_healpix_map.c
ang2pix_nest.d.o  get_fits_size.d.o  my_test.c       pix2ang_nest.c    pix2vec_ring.d.o      ring2nest.s.o      vec2ang.c         write_healpix_map.d.o
ang2pix_nest.s.o  get_fits_size.s.o  nest2ring.c     pix2ang_nest.d.o  pix2vec_ring.s.o      test_chealpix.c    vec2ang.d.o       write_healpix_map.s.o
ang2pix_ring.c    libchealpix.a      nest2ring.d.o   pix2ang_nest.s.o  printerror.c          test_chealpix.pro  vec2ang.s.o
ang2pix_ring.d.o  libchealpix.so     nest2ring.s.o   pix2ang_ring.c    printerror.d.o        test_chealpix2     vec2pix_nest.c
ang2pix_ring.s.o  mk_pix2xy.c        npix2nside.c    pix2ang_ring.d.o  printerror.s.o        test_chealpix2.c   vec2pix_nest.d.o
ang2vec.c         mk_pix2xy.d.o      npix2nside.d.o  pix2ang_ring.s.o  read_healpix_map.c    test_chealpix2.o   vec2pix_nest.s.o
ang2vec.d.o       mk_pix2xy.s.o      npix2nside.s.o  pix2vec_nest.c    read_healpix_map.d.o  test_cio           vec2pix_ring.c
ang2vec.s.o       mk_xy2pix.c        nside2npix.c    pix2vec_nest.d.o  read_healpix_map.s.o  test_cio.c         vec2pix_ring.d.o
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src/C/subs$ cp chealpix.h /home/cmbadm/opt/pkgs/healpix_2.11c/include/
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src/C/subs$ cp libchealpix.* /home/cmbadm/opt/pkgs/healpix_2.11c/lib/

F90 package

cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/src/C/subs$ cd ../../../bin
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/bin$ ls
alteralm  anafast  hotspot  map2gif  median_filter  plmgen  sky_ng_sim  smoothing  synfast  ud_grade
cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/bin$ cp -i alteralm anafast hotspot map2gif plmgen sky_ng_sim smoothing  synfast ud_grade /home/cmbadm/opt/pkgs/healpix_2.11c/bin/

cmbadm@CMBns:~/make/healpix/Healpix_2.11c_00/bin$ ls /home/cmbadm/opt/pkgs/healpix_2.11c/*
/home/cmbadm/opt/pkgs/healpix_2.11c/bin:
alice2       alteralm     calc_powspec     hotspots_cxx  map2tga        plmgen      smoothing      synfast               testSoSSkyMap
alice_test   anafast      generateTexture  hpxtest       median_filter  rotalm_cxx  smoothing_cxx  testMollweideSkyMap   ud_grade
alm2map_cxx  anafast_cxx  hotspot          map2gif       mult_alm       sky_ng_sim  syn_alm_cxx    testOrthogonalSkyMap  udgrade_cxx

/home/cmbadm/opt/pkgs/healpix_2.11c/include:
alm.h                arr.h              fitshandle.h     healpix_data_io.h     lsconstants.h     pointing.h        tga_image.h
alm_fitsio.h         chealpix.h         fitsio.h         healpix_map.h         message_error.h   powspec.h         trafos.h
alm_healpix_tools.h  cxxutils.h         geom_utils.h     healpix_map_fitsio.h  openmp_support.h  powspec_fitsio.h  vec3.h
alm_map_tools.h      datatypes.h        healpix_base.h   longnam.h             paramfile.h       rotmatrix.h       xcomplex.h
alm_powspec_tools.h  fftpack_support.h  healpix_base2.h  ls_fft.h              planck_rng.h      simparams.h       ylmgen.h

/home/cmbadm/opt/pkgs/healpix_2.11c/lib:
libcfitsio.a  libchealpix.a  libchealpix.so  libcxxsupport.a  libfftpack.a  libhealpix_cxx.a

parameters

npix.png
目安
20080808.png

添付ファイル: file20080808.png 797件 [詳細] fileMakefile 988件 [詳細] filetest_window.cc 796件 [詳細] filemap.png 817件 [詳細] filepixel_window_n0512.fits 730件 [詳細] filewindow_effect.png 869件 [詳細] filecalc_cl.cc 510件 [詳細] fileILC.png 673件 [詳細] fileILC_k2-9_l200.png 679件 [詳細]