0

分析を実行している間 (OPAL ソース コードの CHADemo など)、常に次のような警告が表示されます。

[warn][OPAL] the property org.opalj.threads.CPUBoundTasks is unspecified

前の質問で、 /src/main/resources/reference.conf の下の Common プロジェクトの構成ファイルを提案しました。そのため、次の行をファイルに追加しようとしましたが、それでも同じ警告が表示されました。

org.opalj.threads{
    CPUBoundTasks = "8"
    IOBoundTasks = "8"
}

また、OPAL をプロジェクトのライブラリとしてインポートし、プロジェクトの "/src/main/resources/" に reference.conf を作成しようとしています。私は同じ問題を抱えています。

4

1 に答える 1

0

これらの値は、プロジェクトのコンパイル時に考慮される構成値で構成されます。必要なファイルは、OPAL のルート ディレクトリにあります。ファイルを開くlocal.sbt.templateと、次のように表示されます。

//
// 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 を削除し、必要に応じて値を調整してください。次に、OPAL を再構築する必要があります。

于 2017-01-11T13:16:57.460 に答える