如何导出计算节点的路径,并行编程
我在使用 ifort 时遇到问题。我用 ifort/mpich1 编译了一个代码,但每当我尝试在多个节点上运行它时,代码都会到达某个点并因错误而挂起:
symbol lookup error ... undefined symbol __svml_round2
在四处寻找时,我很确定这是由于 ifortvars shell 脚本而不是在计算节点上获取(如果我尝试在一个节点上连续触发代码,但没有获取 ifort 变量,我会得到完全相同的错误)。
绕过这个问题的最佳方法是什么?通过 mpirun 运行时,我的“.bashrc”文件似乎没有执行,因为我在 .bashrc 文件中有“source ...”命令。我还尝试将该行添加到 /etc/bash.bashrc 文件中,但没有成功。另外,我认为编译时的静态链接可能会解决问题,因此我
-i-static
-static
在使用 ifort 编译时包含了该问题,但无济于事,我仍然收到错误。
有谁知道如何绕过这个问题,本质上是如何使用 ifort 进行编译,以便在运行编译的程序时不需要“源 ifortvars”(更理想的解决方案),或者如何推出我的路径,或者如何通过 MPI 调用获取变量?谢谢。
I have a problem using ifort. I compiled a code with ifort/mpich1 but whenever I try to run it across several nodes the code gets to a certain point and hangs with an error:
symbol lookup error ... undefined symbol __svml_round2
In poking around, I'm pretty sure this is due to to the ifortvars shell script not being sourced on the compute nodes (if I try to fire the code serially on one node, but haven't sourced the ifort vars I get the same exact error).
What is the best way to bypass this problem? It seems my ".bashrc" file isn't executed when running through mpirun, since I have the "source ..." command in the .bashrc file. I also tried adding the line to the /etc/bash.bashrc file but got no luck. Alternatively I thought perhaps static linking when I compile would solve the problem so I included
-i-static
-static
when compiling with ifort but to no avail, I still get the error.
Does anyone know how to bypass this problem, essentially either how to compile with ifort so as not not need to "source ifortvars" when running a compiled program (a more desirable solution), or how to push out either my path, or how to source the vars through an MPI call? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将环境变量作为 mpirun/mpirun_rsh 命令的一部分提供。
例如
导出 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib;mpirun_rsh -ssh -host -np 2 -hostfile hostlist /home/usr1/app.exe -x /home/usr1/config/appconfig.xml
You can give environmental variables as part of the mpirun/mpirun_rsh command.
e.g.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib;mpirun_rsh -ssh -host -np 2 -hostfile hostlist /home/usr1/app.exe -x /home/usr1/config/appconfig.xml