用于 Boost MPI 的 Autoconf 宏?
我正在搜索要在检查 Boost MPI 的 configure.ac
中使用的 autoconf 宏。
在互联网上不难找到其中的几个,但我尝试过的没有一个按预期工作。
您使用什么ax_boost_mpi.m4
?
编辑:我会更好地解释我的要求。我需要宏来告诉我 Boost MPI 是否可用(定义 HAVE_BOOST_MPI
),以将编译器和链接器标志存储在某处,并将编译器从普通的 c++ 编译器切换到可用的 mpiCC 或 mpic++。
如果未找到 Boost MPI,我希望能够选择是要因错误而停止配置过程,还是继续使用 g++而不定义 HAVE_BOOST_MPI。
作为一个优点,它应该定义一个 MPIRUN 变量以允许运行一些检查。
I'm searching an autoconf macro to use in my configure.ac
that checks for Boost MPI.
It's not hard to find a couple of them on the Internet but none of the one I tried worked as expected.
What ax_boost_mpi.m4
do you use?
EDIT: I'll explain my requirement better. I need the macro to tell me if Boost MPI is available or not (defining HAVE_BOOST_MPI
) to store the compiler and linker flags somewhere and to switch the compiler from the nornal c++ compiler to an available mpiCC or mpic++.
If the Boost MPI is not found I'd like to be able to choose if I want to stop the configuration process with an error or continue using g++ without HAVE_BOOST_MPI defined.
As a plus it should define an MPIRUN variable to allow running some checks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道这里有交钥匙解决方案,但这并不意味着不可用。
通过一些工作,您可能可以适应 http://www.gnu。 org/software/autoconf-archive/ax_mpi.html#ax_mpi 和 http://github。 com/tsuna/boost.m4 来做你想做的事。前者挖掘 MPI 编译器,后者检查 Boost MPI。您必须向 boost.m4 添加 Boost MPI 检查,因为它没有。您必须添加自己的 MPIRUN 搜索机制。
如果您找到解决方案和/或推出自己的解决方案,请分享。
I'm unaware of a turnkey solution here, but that doesn't mean one's unavailable.
With some work, you could probably adapt http://www.gnu.org/software/autoconf-archive/ax_mpi.html#ax_mpi and http://github.com/tsuna/boost.m4 to do what you want. The former digging up the MPI compiler and the latter checking for Boost MPI. You'd have to add a Boost MPI check to boost.m4 as it doesn't have one. You'd have to add your own MPIRUN-searching mechanism.
If you find a solution and/or roll your own, please do share.
这个评论有点晚了,但我会在这里添加它,以便搜索相同主题的其他人可以找到它。我个人一直在寻找一个集成到 boost.m4 中的函数,该函数定义了与其他 boost 库(BOOST_MPI_LDFLAGS、BOOST_MPI_LIBS)类似的变量。我终于添加了一个并在此处提交了拉取请求:
https://github.com/tsuna /boost.m4/pull/50
如果已定义(通过 ax_mpi.m4、acx_mpi.m4 等),则使用 CXX/CXXCPP 的 MPICXX 变量,否则使用现有的 CXX/CXXCPP。
This comment is a bit late, but I will add it here so that others searching for the same topic can find it. I had personally been looking for a function integrated into boost.m4 that defined similar variables as the other boost libraries (BOOST_MPI_LDFLAGS, BOOST_MPI_LIBS). I finally just added one and submitted a pull request here:
https://github.com/tsuna/boost.m4/pull/50
This uses the MPICXX variable for CXX/CXXCPP if it is already defined (by ax_mpi.m4, acx_mpi.m4, etc), otherwise it uses the existing CXX/CXXCPP.