Commit bd787ec5 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

Merge branch 'java_migration' into event_handling

parents ba8e4f92 bc498893
...@@ -35,6 +35,19 @@ ...@@ -35,6 +35,19 @@
</testResource> </testResource>
</testResources> </testResources>
<plugins> <plugins>
<plugin>
<groupId>com.nativelibs4java</groupId>
<artifactId>maven-javacl-plugin</artifactId>
<version>1.0.0-RC4</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
...@@ -105,6 +118,17 @@ ...@@ -105,6 +118,17 @@
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>nativelibs4java</id>
<name>nativelibs4java Maven2 Repository</name>
<url>http://nativelibs4java.sourceforge.net/maven</url>
</repository>
</repositories>
<properties>
<platform.dependency>windows-x86_64</platform.dependency>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
......
...@@ -38,9 +38,9 @@ public class VadereConsole { ...@@ -38,9 +38,9 @@ public class VadereConsole {
try { try {
StdOutErrLog.addStdOutErrToLog(); StdOutErrLog.addStdOutErrToLog();
if (!CLUtils.isOpenCLSupported()) { //if (!CLUtils.isOpenCLSupported()) {
System.out.println("Warning: OpenCL acceleration disabled, since no OpenCL support could be found!"); // System.out.println("Warning: OpenCL acceleration disabled, since no OpenCL support could be found!");
} //}
Namespace ns = parser.parseArgs(args); Namespace ns = parser.parseArgs(args);
SubCommandRunner sRunner = ns.get("func"); SubCommandRunner sRunner = ns.get("func");
sRunner.run(ns, parser); sRunner.run(ns, parser);
......
...@@ -86,9 +86,12 @@ public class CLUtils { ...@@ -86,9 +86,12 @@ public class CLUtils {
} }
} }
} }
}
}catch(Exception e){
log.warn("No OpenCL support: " + e.getMessage());
}
return supportedPlatforms; return supportedPlatforms;
} }
/** /**
...@@ -100,6 +103,7 @@ public class CLUtils { ...@@ -100,6 +103,7 @@ public class CLUtils {
* @return a pair of addresses (platform address, device address) * @return a pair of addresses (platform address, device address)
*/ */
public static Optional<Pair<Long, Long>> getFirstSupportedPlatformAndDevice(final int deviceType) { public static Optional<Pair<Long, Long>> getFirstSupportedPlatformAndDevice(final int deviceType) {
try (MemoryStack stack = stackPush()) { try (MemoryStack stack = stackPush()) {
IntBuffer pi = stack.mallocInt(1); IntBuffer pi = stack.mallocInt(1);
InfoUtils.checkCLError(clGetPlatformIDs(null, pi)); InfoUtils.checkCLError(clGetPlatformIDs(null, pi));
...@@ -124,7 +128,10 @@ public class CLUtils { ...@@ -124,7 +128,10 @@ public class CLUtils {
} }
} }
} }
} catch (Exception e) {
log.warn("No OpenCL device found: " + e.getMessage());
} }
return Optional.empty(); return Optional.empty();
} }
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version> <version>3.8.0</version>
<configuration> <configuration>
<!-- Workaround to avoid "java.lang.AssertionError: Visiting tree node before memberEnter". See: https://stackoverflow.com/a/52536499/5002766 -->
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<source>${maven-compiler.source.version}</source> <source>${maven-compiler.source.version}</source>
<target>${maven-compiler.target.version}</target> <target>${maven-compiler.target.version}</target>
<release>11</release> <release>11</release>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment