Example of installation of PIMA Prerequisites: ============== Processor architecture: x86_64 Operating system: Linux, kernel 4.1.1 1) gfortran, gcc 5.1.0 installed in /opt64 directory 2) tcsh 6.18.01 is installed in /bin 3) Directories /dist /incoming /opt64 /scr are created and permission mask allows to read/write for a user 4) CPU frequency scaling is disabled. Directories: /incoming # used for keeping tar-balls with distributions /dist # used for keeping uncompressed distributions and for building /opt64 # used as an installation directory /scr/pima # used as a scratch area for PIMA These two environment variables are defined: PATH=/home/lpetrov/bin:/opt64/bin:/sbin:/bin:/usr/bin:/usr/local/bin LD_LIBRARY_PATH=/opt64/lib:/opt64/lib64 Installation: ============= 1) Installed ncurses-5.9 cd /incoming wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz cd /dist tar -zxvf /incoming/ncurses-5.9.tar.gz cd ncurses-5.9 ./configure --prefix=/opt64 \ --with-shared \ --without-debug \ --without-ada \ --enable-overwrite make -j 5 make install 2) Installed readline-6.2 cd /incoming wget ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz cd /dist tar -zxvf /incoming/readline-6.3.tar.gz cd readline-6.3 ./configure --prefix=/opt64 \ --libdir=/opt64/lib make -j 5 make install 3) Installed fftw-3.3.4 cd /incoming http://www.fftw.org/fftw-3.3.4.tar.gz cd /dist tar -zxvf /incoming/fftw-3.3.4.tar.gz cd fftw-3.3.4 # NB: I have a 20-core computer, that is why I use "-j 21" in configuration. # adjust according to your needs # for single precision ./configure --prefix=/opt64 \ --enable-single \ --enable-sse \ --enable-threads \ --with-combined-threads \ --enable-shared \ CC="/opt64/bin/gcc" \ CFLAGS="-m64 -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -fno-stack-protector -march=native" \ F77="/opt64/bin/gfortran" \ FFLAGS="-m64 -fno-underscoring -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -fno-stack-protector -march=native" make -j 21 make install # # for double precision make distclean ./configure --prefix=/opt64 \ --enable-sse2 \ --enable-threads \ --with-combined-threads \ --enable-shared \ CC="/opt64/bin/gcc" \ CFLAGS="-m64 -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -fno-stack-protector -march=native" \ F77="/opt64/bin/gfortran" \ FFLAGS="-m64 -fno-underscoring -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -fno-stack-protector -march=native" make -j 21 make install 4) Install Pyhton-3.5.1 https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz CXX="/opt64/bin/g++" ./configure --prefix=/opt64 \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --without-ensurepip sed -i "s@OPT= -DNDEBUG /opt64@OPT= -DNDEBUG@g" Makefile make make install 5) Installed atlas 3.11.38 cd /incoming wget -O altas_3.11.38.tar.bz2 'http://downloads.sourceforge.net/project/math-atlas/Developer%20%28unstable%29/3.11.29/atlas3.11.29.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmath-atlas%2Ffiles%2FDeveloper%2520%2528unstable%2529%2F3.11.29%2F&ts=1418915953&use_mirror=superb-dca3' wget http://www.netlib.org/lapack/lapack-3.6.0.tgz cd /dist tar -jxvf /incoming/altas_3.11.29.tar.bz2 mv ATLAS atlas-3.11.38 cd atlas-3.11.38 # NB: I have a 20-core computer, that is why I use "-t 20" in configuration. # adjust according to your needs cd build_64 ../configure \ --prefix=/opt64 \ --shared \ --with-netlib-lapack-tarfile=/incoming/lapack-3.6.0.tgz \ -Si latune 1 \ -t 20 \ -b 64 \ -Fa alg -fPIC \ -F ic "-DNoChange" \ -F gc "-DNoChange" \ -C ic /usr/bin/gcc \ -C if /usr/bin/gfortran \ -F if "-ffixed-form -fno-underscoring -fPIC -O3" \ -v 2 \ >& configure.log sed -i 's@soname $(LIBINSTdir)/@soname @g' lib/Makefile date > make_log.txt; make >>& make_log.txt; date >> make_log.txt date > check_log.txt; make check >>& check_log.txt; date >> check_log.txt date > ptcheck_log.txt; make ptcheck >>& ptcheck_log.txt; date >> ptcheck_log.txt date > time_log.txt; make time >>& time_log.txt; date >> time_log.txt cd lib make shared >>& ../make_log.txt make ptshared >>& ../make_log.txt cd ../ make install >& install.log rm /tmp/file* # NB: atlas installation can take from 15 minutes to 18 hours even # at a fast computer. ATLAS not only builds the library, but tunes # it by checkinig many combinations of blocking parameters. 6) Installed cfitsio-3.37 ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3370.tar.gz http://astrogeo.org/pet_inc/cfitsio-3.26.patch mv cfitsio cfitsio-3.37 cd cfitsio-3.37 patch -Np0 -i /inlcude/cfitsio-3.26.patch ./configure --prefix=/opt64 \ --enable-reentrant \ --enable-ssse3 \ CC=gcc \ FC=gfortran \ CFORTRANFLAGS="-fno-underscoring" \ CFLAGS="-DNoUnderscoreAppend -DGNU -m64" make -j 21 make install gcc -shared -Wl,--whole-archive -Wl,-soname,libcfitsio.so.1 -o /opt64/lib/libcfitsio.so.1.0 /opt64/lib/libcfitsio.a -Wl,-no-whole-archive rm /opt64/lib/libcfitsio.so ln -sf /opt64/lib/libcfitsio.so.1.0 /opt64/lib/libcfitsio.so.1 ln -sf /opt64/lib/libcfitsio.so.1.0 /opt64/lib/libcfitsio.so 7) Installed petools-20150812 cd /incoming wget http://astrogeo.org/petools/petools-20150812.tar.bz2 cd /dist tar -jxvf /incoming/petools-20150812.tar.bz2 cd petools-20150812 ./configure --prefix=/opt64 \ --with-blas="-L/opt64/lib -lsatlas" \ --with-ncurses=/opt64 \ --with-readline=/opt64 \ --bits=64 \ FC=/opt64/bin/gfortran make make install source /opt64/bin/petools_vas Added the line above to my $HOME/.cshrc file. NB: you have to execute source /opt64/bin/petools_vas in order to continue the installation process. You also need it if you woujld like to upgrade PIMA and its dependencies in the future. 8) Installed fourpack-20140404 cd /incoming wget http://astrogeo.org/fourpack/fourpack-20140404.tar.bz2 cd /dist tar -jxvf /incoming/fourpack-20140404.tar.bz2 cd fourpack_20140404 ./configure --prefix=/opt64 \ --with-petools=/opt64 \ --with-fftw=/opt64 \ --without-mkl make make install 9) Installed spd_client-20150430 cd /incoming wget http://astrogeo.org/vtd/spd_client-20150430.tar.bz2 cd /dist tar -jxvf /incoming/spd_client-20150430.tar.bz2 cd spd_client_20150430 ./configure --prefix=/opt64 \ --with-petools=/opt64 make make install 10) Installed vtd-20150808 cd /incoming wget http://astrogeo.org/vtd/vtd-20150808.tar.bz2 cd /dist tar -jxvf /incoming/vtd-20150808.tar.bz2 cd vtd_20150808 ./configure --prefix=/opt64 \ --with-petools=/opt64 \ --with-cfitsio=/opt64 \ --with-spd_client=/opt64 \ --data=/opt64/share/vtd make make install 11) Installed gvh-20140404 cd /incoming wget http://astrogeo.org/gvh/gvh-20140404.tar.bz2 cd /dist tar -jxvf /incoming/gvh-20140404.tar.bz2 cd gvh_20140404 ./configure --prefix=/opt64 \ --with-petools=/opt64 \ --with-vtd=/opt64 make make install 12) Installed pima-20160124 cd /incoming wget http://astrogeo.org/pima/pima-20160124.tar.bz2 cd /dist tar -jxvf /incoming/pima-20160124.tar.bz2 cd pima_20160124 ./configure --prefix=/opt64 \ --with-petools=/opt64 \ --with-spd_client=/opt64 \ --with-cfitsio=/opt64 \ --with-vtd=/opt64 \ --with-fast_fft=/opt64 \ --with-gvh=/opt64 \ --pima-fits=/scr/pima/r1447 \ --mk5-dir=/mk5 \ --pima-scratch=/scr/pima make make install Downloaded example in directory: /scr/pima/r1447 cd /scr/pima/r1447 wget http://astrogeo.org/s0/corr_fits/r1447/2010_09_07_r1447_01.fits NB: VTD/Solve has already be4en installed in directory /mk5