首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OPAL-如何配置项目的属性

OPAL-如何配置项目的属性
EN

Stack Overflow用户
提问于 2016-12-14 16:50:59
回答 1查看 75关注 0票数 0

当我运行分析( OPAL源代码中的eg.CHADemo)时,我总是收到警告

代码语言:javascript
复制
[warn][OPAL] the property org.opalj.threads.CPUBoundTasks is unspecified

former question中,它建议在/src/main/resources/ference.conf下的公共项目中的配置文件。因此,我尝试在文件中添加以下行,但仍然收到相同的警告。

代码语言:javascript
复制
org.opalj.threads{
    CPUBoundTasks = "8"
    IOBoundTasks = "8"
}

此外,在我的项目中导入OPAL作为库,并尝试在我的项目的“/src/main/ reference.conf /”中创建。我也遇到过同样的问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-11 13:16:57

这些值是在项目编译时考虑的配置值中配置的。您需要的文件位于OPALs根目录中。当您打开文件local.sbt.template时,您将看到以下内容:

代码语言:javascript
复制
//
// Optional configuration settings specific to each developers machine.
//

// If your CPU uses hyperthreading, it is recommended to specify the
// number of physical cores and the number of hyperthreaded cores;
// this will spead up the overall execution.
   javaOptions in ThisBuild ++= Seq(
 "-Dorg.opalj.threads.CPUBoundTasks=16", // Number of physical (not            hyperthreaded) cores/CPUs
 "-Dorg.opalj.threads.IOBoundTasks=32" // Number of (hyperthreaded) cores * 1,5
)

// If you want to disable assertions, uncomment the following line.
// Assertions are heavily used throughout OPAL and have a
// signifcant performance impact. However, at development time it is
// HIGHLY recommend to turn on assertions!
//scalacOptions in ThisBuild += "-Xdisable-assertions"

//
//scalacOptions in ThisBuild -= "-Ywarn-unused-import"
//scalacOptions in ThisBuild -= "-Ywarn-unused"

如果要配置已使用核心的数量,请从文件名中删除.template,并根据需要调整值。那你就得重建欧泊。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41147978

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档