2013-04-23 91 views
0

免责声明:这不是我的领域,我不知道的行话。提供图书馆的路径

我想编译和运行计算服务器上的一些代码。机器上安装了intel编译器。当我尝试编译代码时使用

ifort src.f -o mem 

一切正常。如果我尝试优化的事情:

ifort -fast src.f. -o mem 

我先得到消息:

ipo: remark #11001: performing single-file optimizations 
ipo: remark #11006: generating object file /tmp/ipo_ifortYepD4m.o 

这似乎合乎逻辑的。当我运行了文件,我得到一个错误:

./mem: error while loading shared libraries: libgfortran.so.1: cannot open shared object file: No such file or directory 

我搜索libgfortran

[email protected]:~/prog/mn270.161> locate libgfortran 
/home/MATLAB/R2011b/sys/os/glnxa64/libgfortran.so.3 
/home/MATLAB/R2011b/sys/os/glnxa64/libgfortran.so.3.0.0 
/opt/matlab/r2012b/sys/os/glnxa64/libgfortran.so.3 
/opt/matlab/r2012b/sys/os/glnxa64/libgfortran.so.3.0.0 
/usr/lib64/gcc/x86_64-suse-linux/4.3/libgfortran.a 
/usr/lib64/gcc/x86_64-suse-linux/4.3/libgfortran.so 
/usr/lib64/gcc/x86_64-suse-linux/4.3/libgfortranbegin.a 
/usr/lib64/libgfortran.so.3 
/usr/lib64/libgfortran.so.3.0.0 

有没有办法告诉ifort可用libgfort库?

+1

这真的很奇怪。 Ifort不应该依赖于libgfortran而不是它的旧版本。你确定你确实在这里复制了汇编吗?为什么你在'src.f.'中有另一个点? – 2013-04-23 14:52:00

+0

在调试运行时链接问题时,通常很有启发意义,在其输出中使用ldd工具和peer。 – 2013-04-23 18:14:14

+0

@VladimirF额外的点是我发布问题时的一种类型。当我尝试运行输出(bin?)文件(这是一个队列系统)时,输出由计算服务器打印,而不是由编译代码的机器打印。 – Yotam 2013-04-23 19:52:04

回答

1

我同意弗拉基米尔,它是一个奇怪的依赖gfortran & ifort。但是,似乎ifort正在寻找libgfortran.so。 ,你有libgfortran.so。那里列出了。您应该能够通过ln -s [target] [shortcut]将前者链接到后者。也就是,

ln -s /usr/lib64/libgfortran.so.3 /usr/lib64/libgfortran.so.1 
+0

如何在没有root权限的情况下执行此操作? – Yotam 2013-04-23 19:45:57

+0

通过询问具有超级用户权限的人员:集群的IT帮助台。 – 2013-04-23 20:39:40

+0

我曾希望避免这种情况。 – Yotam 2013-04-24 06:37:35