linux mint启动eclipse,让OpenMP 4.0在eclipse中运行的问题(Linux Mint)(problems getting OpenMP 4.0 to run in ecli...

让OpenMP 4.0在eclipse中运行的问题(Linux Mint)(problems getting OpenMP 4.0 to run in eclipse (Linux Mint))

eclipse中的错误消息:

[我的程序]:/usr/lib/x86_64-linux-gnu/libgomp.so.1:找不到版本`GOMP_4.0'([我的程序]要求)

从其他帖子我读到需要更新版本的gcc来启用OpenMP 4.0支持(是的,我真的需要它)所以我在我的Linux Mint机器上下载并构建了gcc 6.1。 gcc --version现在吐出6.1。 安装完成后,“#pragma omp simd”的警告消息消失,所以我认为安装成功。 但是只要我将“#pragma omp parallel for”插入到我的代码中,我就会收到错误消息。 代码是正确的,它在Visual Studio中运行(没有simd pragma)。

我需要安装其他东西吗?

还有别的我做错了吗?

(如果有人知道在Windows平台上使用OpenMP 4.0的简单方法,这也很不错(最好使用Visual Studio))

The error message in eclipse:

[my program]: /usr/lib/x86_64-linux-gnu/libgomp.so.1: version `GOMP_4.0' not found (required by [my program])

From other posts I read that a newer version of gcc is required to enable OpenMP 4.0 support (yes, I really need it) so I downloaded and built gcc 6.1 on my Linux Mint machine. gcc --version now spits out 6.1. After the installation, the warning message at "#pragma omp simd" disappeared, so I assume the installation was successful. But as soon as I insert "#pragma omp parallel for" into my code I get the error message. The code is correct, it runs in Visual Studio (withoutthe simd pragma).

Do I need to install something else?

Is there something else I did wrong?

(If someone knows an easy way to use OpenMP 4.0 on the Windows platform, this would be nice, too (preferably with Visual Studio))

原文:https://stackoverflow.com/questions/37862583

更新时间:2019-12-14 20:13

最满意答案

自GCC 4.9.1以来完全支持OpenMP 4.0,如以下链接所示。 所以你可能不需要建立自己的GCC。

另一方面,如果您构建自己的GCC,则应尝试不使用系统默认版本的OpenMP库libgomp.so如错误消息所示。 您可以使用链接选项-L/path/to/new/libgomp和-lgomp来指定新库的位置。

根据以上链接,MSVC ++仅支持OpenMP 2.0,直到2015版。

OpenMP 4.0 is fully supported since GCC 4.9.1 as shown in the following link. So you may not need to build your own GCC.

On the other hand, if you build your own GCC, you should try not use the system default version of OpenMP library libgomp.so as indicated by the error message. You could use the linking option -L/path/to/new/libgomp and -lgomp to specify the location of the new library.

According to the above link, MSVC++ supports OpenMP 2.0 only until version 2015.

2016-06-16

相关问答

问题1 : 这意味着task3依赖于task2。 对? 根据depend条款的OpenMP 4.0标准(重点是我的): 任务依赖性来自于depend子句及其列表项的依赖类型,其中依赖类型是以下之一: 依赖型。 生成的任务将是所有先前生成的兄弟任务的从属任务,其引用out或inout依赖类型列表中的至少一个列表项。 out和inout依赖类型。 生成的任务将是所有先前生成的兄弟任务的从属任务,其引用入口,出口或入口依赖类型列表中的至少一个列表项。 从以下描述: 子句depend(in:x)将生成一个

...

经过一番徘徊,祈祷这个问题消失了几个小时,几天。 我找到了解决方案......我并不完全理解为什么链接如此困难。 我所做的只是尝试不同的链接库选项,这个命令对我有用: -lglfw3 -lGL -lGLU -lX11 -Xxf86vm -lXrandr -lpthread -lXi -lm 希望这有助于其他人。 After some tickering around and praying for this problem to go away for a couple hours, and da

...

自GCC 4.9.1以来完全支持OpenMP 4.0,如以下链接所示。 所以你可能不需要建立自己的GCC。 http://openmp.org/wp/openmp-compilers/ 另一方面,如果您构建自己的GCC,则应尝试不使用系统默认版本的OpenMP库libgomp.so如错误消息所示。 您可以使用链接选项-L/path/to/new/libgomp和-lgomp来指定新库的位置。 根据以上链接,MSVC ++仅支持OpenMP 2.0,直到2015版。 OpenMP 4.0 is fu

...

在Eclipse中,您需要在项目配置中设置以下参数: C/C++ Build -> Settings -> Includes: add gomp

C/C++ Build -> Settings -> Miscellaneous -> Other Flags: add -fopenmp

您还需要为MinGW安装openmp二进制文件: TDM-GCC In Eclipse you need to set up the following parameters in your project

...

这不是错误,而是一个警告。 您没有启用内置分析器,因此您可以获得CPU和内存使用等诊断信息,这对IntelliJ无响应或缓慢时非常有用。 别担心; 如果你没有遇到很多创业痛苦,那么这并不重要。 如果确实需要启用分析器,则可以按照此处的说明将适当的运行时标志添加到可执行文件中。 It's not an error, it's a warning. You don't have the built-in profiler enabled so that you can get diagnostics

...

嗨最简单的方法来做到这一点 omp_set_num_threads(m_iUseableProcessors);

其中m_iUseableProcessors是要分割计算的处理器数量。 我不知道如何在没有OpenMP功能的情况下做到这一点。 你可以#ifdef他们,但是这会让你在编译时关闭OpenMP。 Hi the easiest way to do this is omp_set_num_threads(m_iUseableProcessors);

where m_iUseableProc

...

最初的问题是我使用内置的软件管理器安装了eclipse,在从管理器卸载了与eclipse相关的所有内容后,STS正常工作。 分面表单的问题在于它没有在项目浏览器视图中显示它,它在我打开包浏览器视图时起作用。 我的另一个问题是内置服务器。 如果您删除它们但使用相同的旧工作空间位置,STS将不会再次添加它们,除非您使用新的工作空间(new,neve-before-used-as-workspace文件夹)。 这很烦人,但最终还是有效的。 The initial problem was that I i

...

由于您有多个GCC编译器安装(4.3和4.9),因此您可能因为使用GCC 4.9(支持OpenMP 4.0)编译而出现问题,但在运行时OS加载程序使用GCC 4.3库(不支持OpenMP) 4.0)。 有一些替代方法可以避免此问题: 在链接时使用-static静态编译二进制文件。 使O / S搜索适当的库而不是旧库。 您可以使用该命令 find / name -name libgomp.so.1

列出系统中可用的libgomp库,然后将存储它的目录添加到LD_LIBRARY_PATH环境变量中。

...

您需要转到Build > Settings > Miscellaneous > All options并添加-fopenmp 。 You need to go to Build > Settings > Miscellaneous > All options and add -fopenmp.

旧的FORTRAN界面似乎不支持OpenMP ...我建议你采用新的Fortran 2003界面。 请注意fftw_init_threads()是一个函数! 您还需要包含ISO_C_binding模块: program trial

use,intrinsic :: ISO_C_binding

use omp_lib

implicit none

include "fftw3.f03"

integer :: id, nthreads, void

in

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值