0%

CentOS 安装 DiFX

如何在CentOS上安装DiFX

如果只是使用,那么可以使用下面一个命令来获取DiFX的运行环境(需要安装docker):

1
$ docker run -it shaoguangleo/centos-difx

如果希望运行图形界面,运行下述命令:

1
$ docker run -it -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix shaoguangleo/centos-difx

如果希望体验一下DiFX的安装,那就开始吧。

最简单的安装方法可以参考一步安装DiFX,star或者follow后提供比较大的压缩包。

操作系统

  • CentOS 6.3
  • CentOS-7.0
  • CentOS-8.0

DiFX版本

  • DiFX-2.1
  • DiFX-2.4
  • DiFX-2.5.1
  • DiFX-2.6.2
  • DiFX-2.7.0
  • DiFX-2.8.1

前提配置:

首先更新系统;

1
2
$ yum update
$ yum upgrade

安装依赖软件包

1
2
3
4
5
6
7
$ yum install pkgconfig bison  
$ yum install fftw-devel openmpi-dev openmpi-bin
$ yum install openmpi gcc-gfortran libgfortan libgfortan-static expat expat-devel expat-static
$ yum install subversion doxygen
$ yum install automake autoconf
$ yum install libtool* flex*
$ yum install libfftw3-dev libopenmpi-dev libexpat1-dev

安装步骤:

(一)、安装 Intel.Integrated.Performance.Primitives(IPP)

一路默认安装就可以了,默认安装到/opt/intel/ipp中(假设安装的路径为:/opt/intel/ipp/5.3/ia32/)。
添加环境变量:

如果是以前的版本,需要自己指定IPPROOT及相应信息,如下所示:

1
export IPPROOT=/opt/intel/ipp/5.3/ia32

对于比较新的版本,可以只指定

1
export IPPROOT=/opt/intel/

剩下的交给DiFX去处理。

(二)、pgplot5.2.tar.gz的安装.

参考 Ubuntu/Debain/Fedora/Mac/CentOS 安装PGPLOT

添加环境变量:

1
2
$ export  PGPLOT_DIR=/usr/local/pgplot/
$ export PGPLOT_DEV=/xwindow

(三)、mpich的安装

1
2
3
$./configure --prefix=/usr/local/mpich 2>&1 | tee c.txt
$ make 2>&1 | tee m.txt
$ make install 2>&1 | tee mi.txt

添加环境变量:

1
2
PATH=/usr/local/mpich/bin:$PATH; export PATH
export MPICXX=/usr/local/mpich/bin/mpicxx

(四)、 fftw的的安装

1
2
3
4
5
6
7
8
9
10
11
12
13
$ ./configure --enable-shared --enable-threads --enable-float
$ make -j 2
$ make install
$ make clean
$ ./configure --enable-shared --enable-threads --enable-long-double
$ make -j 4
$ make install
$ make clean
$ ./configure --enable-sse2
$ make -j 4
$ make install
$ make clean
$ updatedb

(五)、 DiFX‐2.4.1的安装

执行./genipppc

修改setup.bash文件的如下部分(深红的部分)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
####### DIFX VERSION ########################
export DIFX_VERSION=DiFX-2.1.1

####### ROOT PATHS ##########################
export DIFXROOT=/usr/local/difx
export DIFX_PREFIX=$DIFXROOT
export PGPLOTDIR=/usr/local/pgplot
export IPPROOT=/opt/intel/ipp/5.3/ia32

####### COMPILER ############################
export MPICXX=/usr/local/mpich/bin/mpicxx

####### USE GFORTRAN IN PREFERENCE TO G77? ##
####### Comment out if not desired ##########

$ mkdir /usr/local/difx
$ Source setup.bash
$ ./install-difx
$ ./install-difx --withhops
$ ./install-difx --withfb
1
$ cp init.d/calcserver  /etc/init.d

注:若不能运行成功则应向:DiFX-2.1/mpifxcorr/src/fxmanager.cppDiFX-2.1/mpifxcorr/utils/dedisperse_difx.cpp 中添加语句 #include <cstring> 若还不能成功运行则可根据错误提示安装相应的软件。

(六)、最后安装 portmap 程序包以启动rpc (yum install portmap 、yum install rpc)

(七)、总结如下:

DiFX的安装顺序如下:

  • difxio
  • difxmessage
  • mark5access
  • vdifio
  • mpifxcorr
  • calcserver
  • calcif2
  • difx2fits
  • vex2difx
  • difx2mark4
  • pulsar/difx2profile
  • misc
  • vsi2screen

OUTPUT

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
\u@\h DiFX-2.4.1 \W> source setup.bash
DiFX version DiFX-2.4.1 is selected
\u@\h DiFX-2.4.1 \W> ./install-difx
************************************
Getting environmental variables

************************************
Setting up directories

/home/AstroSoft/DiFX2.4.1/lib/pkgconfig/ipp.pc already exists



************************************
Building difxio/

libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
difxio/Makefile.am:43: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
tests/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
utils/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Computing dependencies between directories...
Generating citations page...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating docs for file src/alert.cpp...
Generating docs for file src/alert.h...
Generating docs for file src/architecture.h...
Generating docs for file src/configuration.cpp...
Generating docs for file src/configuration.h...
Generating docs for file src/core.cpp...
Generating docs for file src/core.h...
Generating docs for file src/datamuxer.cpp...
Generating docs for file src/datamuxer.h...
Generating docs for file src/datastream.cpp...
Generating docs for file src/datastream.h...
Generating docs for file src/fxmanager.cpp...
Generating docs for file src/fxmanager.h...
Generating docs for file src/mark5bfile.cpp...
Generating docs for file src/mark5bfile.h...
Generating docs for file src/mark5bmark5.cpp...
Generating docs for file src/mark5bmark5.h...
Generating docs for file src/mark5bmark5_stubs.cpp...
Generating docs for file src/mark5dir.cpp...
Generating docs for file src/mark5dir.h...
Generating docs for file src/mark5directorystructs.cpp...
Generating docs for file src/mark5directorystructs.h...
Generating docs for file src/mark5utils.cpp...
Generating docs for file src/mark5utils.h...
Generating docs for file src/mk5.cpp...
Generating docs for file src/mk5.h...
Generating docs for file src/mk5mode.cpp...
Generating docs for file src/mk5mode.h...
Generating docs for file src/mode.cpp...
Generating docs for file src/mode.h...
Generating docs for file src/model.cpp...
Generating docs for file src/model.h...
Generating docs for file src/mpifxcorr.cpp...
Generating docs for file src/mpifxcorr.h...
Generating docs for file src/nativemk5.cpp...
Generating docs for file src/nativemk5.h...
Generating docs for file src/nativemk5_stubs.cpp...
Generating docs for file src/pcal.cpp...
Generating docs for file src/pcal.h...
Generating docs for file src/pcal_impl.h...
Generating docs for file src/polyco.cpp...
Generating docs for file src/polyco.h...
Generating docs for file src/pthreadbarrier.h...
Generating docs for file src/switchedpower.cpp...
Generating docs for file src/switchedpower.h...
Generating docs for file src/vdiffake.cpp...
Generating docs for file src/vdiffake.h...
Generating docs for file src/vdiffile.cpp...
Generating docs for file src/vdiffile.h...
Generating docs for file src/vdifmark5.cpp...
Generating docs for file src/vdifmark5.h...
Generating docs for file src/vdifmark5_stubs.cpp...
Generating docs for file src/vdifnetwork.cpp...
Generating docs for file src/vdifnetwork.h...
Generating docs for file src/visibility.cpp...
Generating docs for file src/visibility.h...
Generating docs for file src/watchdog.cpp...
Generating docs for file src/watchdog.h...
Generating page documentation...
Generating group documentation...
Generating class documentation...
Generating docs for compound Alert...
Generating docs for compound Configuration...
Generating docs for nested compound Configuration::baselinedata...
Generating docs for nested compound Configuration::configdata...
Generating docs for nested compound Configuration::datastreamdata...
Generating docs for nested compound Configuration::freqdata...
Generating docs for nested compound Configuration::ruledata...
Generating docs for nested compound Configuration::telescopedata...
Generating docs for compound Core...
Generating docs for nested compound Core::processslot...
Generating docs for nested compound Core::processthreadinfo...
Generating docs for nested compound Core::threadscratchspace...
Generating docs for compound DataMuxer...
Generating docs for compound DataStream...
Generating docs for nested compound DataStream::readinfo...
Generating docs for compound DriveInformation...
Generating docs for compound FxManager...
Generating docs for compound LBA16BitMode...
Generating docs for compound LBA8BitMode...
Generating docs for compound LBAMode...
Generating docs for compound Mark5BDataStream...
Generating docs for compound Mark5BMark5DataStream...
Generating docs for compound Mark5DirectoryHeaderVer1...
Generating docs for compound Mark5DirectoryInfo...
Generating docs for compound Mark5DirectoryLegacyBodyVer1...
Generating docs for compound Mark5DirectoryScanHeaderVer1...
Generating docs for compound Mark5DirectoryVDIFBodyVer1...
Generating docs for compound Mark5LegacyDirectory...
Generating docs for compound Mark5Module...
Generating docs for compound Mark5NeoLegacyDirectory...
Generating docs for compound Mark5Scan...
Generating docs for compound Mk5DataStream...
Generating docs for compound Mk5Mode...
/home/leo/Downloads/DiFX_Install/DiFX-2.4.1/mpifxcorr/src/mk5mode.h:36: warning: The following parameters of Mk5Mode::Mk5Mode(Configuration *conf, int confindex, int dsindex, int recordedbandchan, int chanstoavg, int bpersend, int gsamples, int nrecordedfreqs, double recordedbw, double *recordedfreqclkoffs, double *recordedfreqclkoffsdelta, double *recordedfreqphaseoffs, double *recordedfreqlooffs, int nrecordedbands, int nzoombands, int nbits, Configuration::datasampling sampling, Configuration::complextype tcomplex, bool fbank, bool linear2circular, int fringerotorder, int arraystridelen, bool cacorrs, int framebytes, int framesamples, Configuration::dataformat format) are not documented:
parameter 'recordedfreqclkoffsdelta'
parameter 'recordedfreqphaseoffs'
Generating docs for compound Mode...
Generating docs for compound Model...
Generating docs for nested compound Model::eop...
Generating docs for nested compound Model::scan...
Generating docs for nested compound Model::source...
Generating docs for nested compound Model::spacecraft...
Generating docs for nested compound Model::station...
Generating docs for compound NativeMk5DataStream...
Generating docs for compound PCal...
/home/leo/Downloads/DiFX_Install/DiFX-2.4.1/mpifxcorr/src/pcal.cpp:252: warning: argument 'pcalout' of command @param is not found in the argument list of PCal::extractAndIntegrate_reference(f32 const *data, const size_t len, cf32 *out, const uint64_t sampleoffset)
Generating docs for compound pcal_config_pimpl...
Generating docs for compound PCalExtractorComplex...
Generating docs for compound PCalExtractorDummy...
/home/leo/Downloads/DiFX_Install/DiFX-2.4.1/mpifxcorr/src/pcal.cpp:1248: warning: argument 'pointer' of command @param is not found in the argument list of PCalExtractorDummy::getFinalPCal(cf32 *out)
Generating docs for compound PCalExtractorImplicitShift...
Generating docs for compound PCalExtractorShifting...
Generating docs for compound PCalExtractorTrivial...
Generating docs for compound Polyco...
Generating docs for compound pthread_barrier_t...
Generating docs for compound SwitchedPower...
Generating docs for compound VDIFDataStream...
Generating docs for compound VDIFFakeDataStream...
Generating docs for compound VDIFMark5DataStream...
Generating docs for compound VDIFMuxer...
Generating docs for compound VDIFNetworkDataStream...
Generating docs for compound Visibility...
Generating namespace index...
Generating docs for namespace fxcorr
Generating graph info page...
Generating directory documentation...
Generating index page...
Generating page index...
Generating module index...
Generating namespace index...
Generating namespace member index...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
lookup cache used 2381/65536 hits=8086 misses=2456
finished...
Done!
处无为之事,行不言之教;作而弗始,生而弗有,为而弗恃,功成不居!

欢迎关注我的其它发布渠道

Powered By Valine
v1.5.2