在Windows R中使用openmp,rtools是否支持openmp? [英] using openmp in windows R, does rtools support openmp?
本文介绍了在Windows R中使用openmp,rtools是否支持openmp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当尝试在C ++代码中使用openmp在Windows 7上构建我的R包时,我收到很多错误消息:
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.text+0x19): undefined reference to `_imp__pthread_getspecific'
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.text+0x7a): undefined reference to `_imp__pthread_mutex_lock'
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(env.o):(.text+0x510): undefined reference to `_imp__pthread_mutex_init'
...
Rtools是否不支持openmp? 有谁知道如何在Windows R软件包中使用openmp?
解决方案
否,根据 Rcpp开发列表中. >
R本身在Windows上不使用OpenMP,因此Rtools不支持.在其他操作系统上,R当然也具有OpenMP支持.
I got lots of error messages when trying to use openmp in a c++ code for building my R package on windows 7:
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.text+0x19): undefined reference to `_imp__pthread_getspecific'
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.text+0x7a): undefined reference to `_imp__pthread_mutex_lock'
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(env.o):(.text+0x510): undefined reference to `_imp__pthread_mutex_init'
...
Is Rtools not supporting openmp? Does anyone know how to use openmp in windows R packages please?
解决方案
No, per discussions on the R-devel mailing list. It also came up on the Rcpp-devel list.
R itself does not use OpenMP on Windows, so there is not support in Rtools. On other OSs R does of course have OpenMP support.
这篇关于在Windows R中使用openmp,rtools是否支持openmp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文