presto系列软件的安装与使用
fftw
安装
1 | # float |
环境变量配置
1 | export PATH=/es01/yeesuan/yeesuan003/software/fftw/bin${PATH:+:${PATH}} |
测试fftw
1 |
|
编译运行
1 | [yeesuan003@spack test]$ gcc -o fftwtest fftwtest.c -I/es01/yeesuan/yeesuan003/software/fftw/include -I/es01/yeesuan/yeesuan003/software/fftw3d/include -L/es01/yeesuan/yeesuan003/software/fftw/lib -L/es01/yeesuan/yeesuan003/software/fftw3d/lib -lfftw3 -lfftw3f |
pgplot
修改drivers.list
(去掉一些注释)
1 | 17 ! GCDRIV 0 /GENICOM Genicom 4410 dot-matrix printer, landscape |
将driver.list拷贝到安装目录下
1 | cp drivers.list ~/software/pgplot/ |
1 | # manual |
测试,执行./pgdemo1
出现下图
tempo2
1 | ./configure --prefix=/es01/yeesuan/yeesuan003/software/tempo2 |
环境变量
1 | export TEMPO2=/es01/yeesuan/yeesuan003/software/tempo2 |
libffi
1 | ./configure --prefix=/es01/yeesuan/yeesuan003/software/libffi |
1 | export LIBFFI=/es01/yeesuan/yeesuan003/software/libffi |
glib
1 | xz -d glib-2.48.1.tar.xz |
1 | cp /es01/yeesuan/yeesuan003/software/glib/lib/glib-2.0/include/glibconfig.h /es01/yeesuan/yeesuan003/software/glib/include/glib-2.0 |
测试
1 | //glibtest.c |
1 | gcc -o glibtest glibtest.c -I/es01/yeesuan/yeesuan003/software/glib/include/glib-2.0 -L/es01/yeesuan/yeesuan003/software/glib/lib -lglib-2.0 |
curl
1 | ./configure --prefix=/es01/yeesuan/yeesuan003/software/curl |
1 | export PATH=/es01/yeesuan/yeesuan003/software/curl/bin${PATH:+:${PATH}} |
cfitsio
1 | ./configure --prefix=/es01/yeesuan/yeesuan003/software/cfitsio |
1 | export CFITSIO=/es01/yeesuan/yeesuan003/software/cfitsio |
1 | // cfitsiotest.cpp |
1 | g++ -o cfitsiotest cfitsiotest.cpp -L/es01/yeesuan/yeesuan003/software/cfitsio/lib -L/es01/yeesuan/yeesuan003/software/curl/lib -I/es01/yeesuan/yeesuan003/software/cfitsio/include -lm -lcfitsio -lcurl |
zlib
1 | ./configure --prefix=/es01/yeesuan/yeesuan003/software/zlib |
1 | export ZLIB=/es01/yeesuan/yeesuan003/software/zlib |
libpng
1 | ./configure --prefix=/es01/yeesuan/yeesuan003/software/libpng LDFLAGS="-L/es01/yeesuan/yeesuan003/software/zlib/lib -lz" |
1 | export LIBPNG=/es01/yeesuan/yeesuan003/software/libpng |
X11
1 >./configure --prefix=/es01/yeesuan/yeesuan003/software/X11报错缺少pixman
1
2 >>wget https://gitlab.freedesktop.org/pixman/pixman/-/archive/master/pixman-master.tar.gz
>>./configure --prefix=/es01/yeesuan/yeesuan003/software/pixman报错缺少autoconf
1
2
3 >>>wget http://mirrors.kernel.org/gnu/autoconf/autoconf-latest.tar.gz
>>>./configure --prefix=/es01/yeesuan/yeesuan003/software/autoconf
>>>export PATH=/es01/yeesuan/yeesuan003/software/autoconf/bin${PATH:+:${PATH}}最后的解决办法:
在另一台电脑上yum install x11,然后把/usr/lib64/X11文件打包拷贝过来
presto-c
配置环境变量
1 | export PRESTO=/es01/yeesuan/yeesuan003/source/presto-4.0 |
libpgplot.so:undefined
1 | # 尝试更换PGPLOTINC与PGPLOTLINK,使用源码编译安装或spack安装 |
slalib 报错(未解决,但是编译成功了)
1 | tps2c.f(1): remark #15009: sla_tps2c_ has been targeted for automatic cpu dispatch |
undefined reference to ‘cpg***’ && undefined reference to `XSync’(未解决)
1 | mpif90 -g -fPIC -Wl,-rpath,/es01/yeesuan/yeesuan003/source/presto-4.0/lib -fopenmp -o /es01/yeesuan/yeesuan003/source/presto-4.0/bin/psrorbit powerplot.o xyline.o psrorbit.o -L/es01/yeesuan/yeesuan003/software/cfitsio/lib -L/es01/yeesuan/yeesuan003/software/curl/lib -lm -lcfitsio -lcurl -L/es01/yeesuan/yeesuan003/source/presto-4.0/lib -lpresto -L/es01/yeesuan/yeesuan003/software/fftw/lib -L/es01/yeesuan/yeesuan003/software/fftw3d/lib -lfftw3f -lfftw3 -L/es01/yeesuan/yeesuan003/software/pgplot/lib -lpgplot -L/usr/lib64/X11 -L/es01/yeesuan/yeesuan003/software/libpng/lib -lm |
- 尝试使用spack load pgplot,无效
- 尝试更换pgplot版本(原版本pgplot5.2),更换为552版本,无效
- 尝试从源码编译x11,无效,找不到
X11/Xos.h
测试
1 | (base) [yeesuan003@spack bin]$ ./readfile |
Anaconda
1 | wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh |
pySLALIB
1 | wget https://files.pythonhosted.org/packages/3e/e1/e731f0b69d9145faa2aa321a82ff27d6da1d929ac02d7206ca5ae6ec23e3/pySLALIB-1.0.4.tar.gz |
presto-python
修改setup.py
1 | ppgplot_libraries = ["gfortran", "cpgplot", "pgplot", "X11", "png", "m"] |
执行以下命令安装
1 | CC='gcc -std=c99' python3 setup.py install --home=${PRESTO} |
环境变量配置
1 | export export PYTHONPATH=/es01/yeesuan/yeesuan003/source/presto-4.0/lib/python/presto-4.0-py3.9-linux-x86_64.egg |
测试
1 | (base) [yeesuan003@spack presto-4.0]$ cd bin/ |
fitsio
地址:https://github.com/esheldon/fitsio
解压并进入cfitsio3490
目录,执行./configure
,make
,make install
进入上层目录,执行python3 setup.py install
mpi4py
安装
1 | pip3 install mpi4py |
测试
1 | # mpi_helloworld.py |
1 | mpiexec -n 3 python3 test.py |
presto-c的spack安装代码
1 | from spack import * |