24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1836  |  回复: 12
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

yjhqdm

金虫 (小有名气)

[求助] 安装fftw时bin文件不见了,求助

只要提出有帮助意见我就散金了。。
我在安装fftw时,先安装了fftw3,方法如下:
$ cd /usr/local/src
$ sudo tar xzvf ~/Downloads/fftw-3.3.3.tar.gz
$ cd fftw-3.3.3
$ sudo ./configure --prefix=/usr/local/fftw3 --enable-float
$ sudo make
$ sudo make install
后来发现fftw3有些问题,就有按照上述方法安装了fftw2.1.5
安装fftw2
$ cd /usr/local/src
$ sudo tar xzvf ~/Downloads/fftw-2.1.5.tar.gz
$ cd fftw-2.1.5
$ sudo ./configure --prefix=/usr/local/fftw2 --enable-float
$ sudo make
$ sudo make install
但是装完后,发现在/usr/local/fftw3/里面有bin
但是在/usr/local/fftw2/下面没有bin
然后参考网上方法,删除了fftw2、fftw3文件夹,重新安装了fftw2,还是没有bin
求助啊!怎么回事~~
新手装lammps第一步就出问题。。。。
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yjhqdm

金虫 (小有名气)

引用回帖:
9楼: Originally posted by qphll at 2013-05-03 00:39:54
因为你前面自定义了FFTW的安装路径,所以肯定就不能在系统的库文件夹/usr/lib找到FFTW对应的lib文件,比如你这里提到的libfftw.so

有两个解决办法:

(1) 像你对mpi的操作那样,在你的.bashrc文件里面加入其他 ...

.bashrc 最后面加入:
export PATH=/usr/local/openmpi/bin:$PATH  # 将新路径添加到现有的$PATH中
然后
$ mpic++  -Wall cnt_correlation_t200.cpp  -L/usr/local/fftw2/lib -lfftw  -llmp_gentoo  -o  myCode
反馈如下:
cnt_correlation_t200.cpp: 在函数‘int main(int, char**)’中:
cnt_correlation_t200.cpp:258:52: 警告: 格式字符串尾有可疑的‘%’ [-Wformat]
cnt_correlation_t200.cpp:266:52: 警告: 格式字符串尾有可疑的‘%’ [-Wformat]
cnt_correlation_t200.cpp:274:52: 警告: 格式字符串尾有可疑的‘%’ [-Wformat]
cnt_correlation_t200.cpp:282:52: 警告: 格式字符串尾有可疑的‘%’ [-Wformat]
cnt_correlation_t200.cpp:290:52: 警告: 格式字符串尾有可疑的‘%’ [-Wformat]
cnt_correlation_t200.cpp:130:18: 警告: 未使用的变量‘n’ [-Wunused-variable]
/lib/../lib/liblmp_gentoo.a(fft3d.o): In function `fft_1d_only(fftw_complex*, int, int, fft_plan_3d*)':
fft3d.cpp:(.text+0x215): undefined reference to `fftw'
fft3d.cpp:(.text+0x25c): undefined reference to `fftw'
fft3d.cpp:(.text+0x2a5): undefined reference to `fftw'
fft3d.cpp:(.text+0x4f4): undefined reference to `fftw'
fft3d.cpp:(.text+0x53b): undefined reference to `fftw'
/lib/../lib/liblmp_gentoo.a(fft3d.o):fft3d.cpp:(.text+0x584): more undefined references to `fftw' follow
/lib/../lib/liblmp_gentoo.a(fft3d.o): In function `fft_3d_destroy_plan(fft_plan_3d*)':
fft3d.cpp:(.text+0x836): undefined reference to `fftw_destroy_plan'
fft3d.cpp:(.text+0x841): undefined reference to `fftw_destroy_plan'
fft3d.cpp:(.text+0x853): undefined reference to `fftw_destroy_plan'
fft3d.cpp:(.text+0x85e): undefined reference to `fftw_destroy_plan'
fft3d.cpp:(.text+0x869): undefined reference to `fftw_destroy_plan'
/lib/../lib/liblmp_gentoo.a(fft3d.o):fft3d.cpp:(.text+0x874): more undefined references to `fftw_destroy_plan' follow
/lib/../lib/liblmp_gentoo.a(fft3d.o): In function `fft_3d(fftw_complex*, fftw_complex*, int, fft_plan_3d*)':
fft3d.cpp:(.text+0x916): undefined reference to `fftw'
fft3d.cpp:(.text+0x98b): undefined reference to `fftw'
fft3d.cpp:(.text+0xa00): undefined reference to `fftw'
fft3d.cpp:(.text+0xc62): undefined reference to `fftw'
fft3d.cpp:(.text+0xcaa): undefined reference to `fftw'
/lib/../lib/liblmp_gentoo.a(fft3d.o):fft3d.cpp:(.text+0xcf2): more undefined references to `fftw' follow
/lib/../lib/liblmp_gentoo.a(fft3d.o): In function `fft_3d_create_plan(ompi_communicator_t*, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int*)':
fft3d.cpp:(.text+0x1540): undefined reference to `fftw_create_plan'
fft3d.cpp:(.text+0x1561): undefined reference to `fftw_create_plan'
fft3d.cpp:(.text+0x15b3): undefined reference to `fftw_create_plan'
fft3d.cpp:(.text+0x15d4): undefined reference to `fftw_create_plan'
fft3d.cpp:(.text+0x1707): undefined reference to `fftw_create_plan'
/lib/../lib/liblmp_gentoo.a(fft3d.o):fft3d.cpp:(.text+0x1728): more undefined references to `fftw_create_plan' follow
collect2: ld 返回 1

这个问题是不是你谁的lmp_gentoo的问题还是fftw的问题?
10楼2013-05-03 14:26:06
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 13 个回答

Bessel

木虫 (正式写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
yjhqdm: 金币+10, 有帮助, 希望在支持~帮忙一下 2013-04-29 20:09:39
zh1987hs: 金币+3, 谢谢 2013-04-30 11:05:01
这个装好之后是库文件, 应该在lib文件里面,

~/usr/include/fftw3.h
~/usr/include/fftw3.f
~/usr/lib/libfftw3.a
~/usr/lib/libfftw3.la
~/usr/lib/libfftw3.so

看看这个链接吧

http://micro.stanford.edu/wiki/Install_FFTW3
2楼2013-04-29 00:44:11
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yjhqdm

金虫 (小有名气)

引用回帖:
2楼: Originally posted by Bessel at 2013-04-29 00:44:11
这个装好之后是库文件, 应该在lib文件里面,

~/usr/include/fftw3.h
~/usr/include/fftw3.f
~/usr/lib/libfftw3.a
~/usr/lib/libfftw3.la
~/usr/lib/libfftw3.so

看看这个链接吧

http://micro.s ...

按照现在的状态,我重新安装fftw3的话,在指定文件夹下面会出现bin文件夹的。fftw3是我第一次安装的fftw的时候安装的。现在的问题是再安装fftw2的时候没有bin文件夹。那么没有bin文件夹,如何设置环境变量呢?
3楼2013-04-29 20:09:03
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

Bessel

木虫 (正式写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
zh1987hs: 金币+2, 谢谢 2013-04-30 11:05:19
yjhqdm: 金币+40, ★★★很有帮助 2013-05-02 15:02:48
引用回帖:
3楼: Originally posted by yjhqdm at 2013-04-29 14:09:03
按照现在的状态,我重新安装fftw3的话,在指定文件夹下面会出现bin文件夹的。fftw3是我第一次安装的fftw的时候安装的。现在的问题是再安装fftw2的时候没有bin文件夹。那么没有bin文件夹,如何设置环境变量呢?...

都说了,你要的库文件在lib文件架里,不在bin文件夹里。有没有bin无所谓,只要指明lib在哪就可以了。你看看你的安装路径里有没有lib文件夹。

环境变量指向lib就可以。
4楼2013-04-29 21:45:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见