{"action":"created","issue":{"url":"https://api.github.com/repos/jcuda/jcuda-main/issues/6","repository_url":"https://api.github.com/repos/jcuda/jcuda-main","labels_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/6/comments","events_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/6/events","html_url":"https://github.com/jcuda/jcuda-main/issues/6","id":149675257,"number":6,"title":"Compiling for ppc64le","user":{"login":"SaMnCo","id":2324599,"avatar_url":"https://avatars.githubusercontent.com/u/2324599?v=3","gravatar_id":"","url":"https://api.github.com/users/SaMnCo","html_url":"https://github.com/SaMnCo","followers_url":"https://api.github.com/users/SaMnCo/followers","following_url":"https://api.github.com/users/SaMnCo/following{/other_user}","gists_url":"https://api.github.com/users/SaMnCo/gists{/gist_id}","starred_url":"https://api.github.com/users/SaMnCo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaMnCo/subscriptions","organizations_url":"https://api.github.com/users/SaMnCo/orgs","repos_url":"https://api.github.com/users/SaMnCo/repos","events_url":"https://api.github.com/users/SaMnCo/events{/privacy}","received_events_url":"https://api.github.com/users/SaMnCo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-20T06:47:37Z","updated_at":"2016-04-20T14:13:00Z","closed_at":null,"body":"Hi, \r\nPretty new to this, and in a rush to get it working on Power. \r\n\r\nI am doing the following: \r\n\r\n```\r\n$ cd /mnt\r\n$ mkdir jcuda\r\n$ cd jcuda\r\n# Cloning all project for CUDA 7.5\r\n$ for project in jcuda-common jcuda-main jcuda jcublas jcufft jcusparse jcurand jcusolver; do git clone https://github.com/jcuda/${project}.git; cd ${project}; git checkout tags/version-0.7.5b; cd /mnt/jcuda; done\r\n# Cmake\r\n$ cmake ./jcuda-main\r\n-- The C compiler identification is GNU 4.8.4\r\n-- The CXX compiler identification is GNU 4.8.4\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Looking for pthread.h\r\n-- Looking for pthread.h - found\r\n-- Looking for pthread_create\r\n-- Looking for pthread_create - not found\r\n-- Looking for pthread_create in pthreads\r\n-- Looking for pthread_create in pthreads - not found\r\n-- Looking for pthread_create in pthread\r\n-- Looking for pthread_create in pthread - found\r\n-- Found Threads: TRUE  \r\n-- Found CUDA: /usr/local/cuda/bin/nvcc\r\n-- Found JNI: /usr/lib/jvm/default-java/jre/lib/ppc64le/libjawt.so  \r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /mnt/jcuda\r\n$ make\r\nScanning dependencies of target JCudaCommonJNI\r\n[  4%] Building CXX object jcuda/JCudaDriverJNI/bin/bin/CMakeFiles/JCudaCommonJNI.dir/src/JNIUtils.cpp.o\r\n[  8%] Building CXX object jcuda/JCudaDriverJNI/bin/bin/CMakeFiles/JCudaCommonJNI.dir/src/Logger.cpp.o\r\n[ 13%] Building CXX object jcuda/JCudaDriverJNI/bin/bin/CMakeFiles/JCudaCommonJNI.dir/src/PointerUtils.cpp.o\r\n[ 17%] Linking CXX static library ../../../../lib/libJCudaCommonJNI.a\r\n[ 17%] Built target JCudaCommonJNI\r\nScanning dependencies of target JCudaDriver\r\n[ 21%] Building CXX object jcuda/JCudaDriverJNI/bin/CMakeFiles/JCudaDriver.dir/src/JCudaDriver.cpp.o\r\n/mnt/jcuda/jcuda/JCudaDriverJNI/src/JCudaDriver.cpp: In function ‘bool getOptionValue(JNIEnv*, jobject, CUjit_option, void*&)’:\r\n/mnt/jcuda/jcuda/JCudaDriverJNI/src/JCudaDriver.cpp:1072:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]\r\n             value = (void*)v;\r\n                            ^\r\n/mnt/jcuda/jcuda/JCudaDriverJNI/src/JCudaDriver.cpp:1084:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]\r\n             value = (void*)iv;\r\n                            ^\r\n/mnt/jcuda/jcuda/JCudaDriverJNI/src/JCudaDriver.cpp: In function ‘jint Java_jcuda_driver_JCudaDriver_cuIpcOpenMemHandleNative(JNIEnv*, jclass, jobject, jobject, jint)’:\r\n/mnt/jcuda/jcuda/JCudaDriverJNI/src/JCudaDriver.cpp:2840:31: warning: converting to non-pointer type ‘CUdeviceptr {aka long long unsigned int}’ from NULL [-Wconversion-null]\r\n     CUdeviceptr nativePdptr = NULL;\r\n                               ^\r\n[ 26%] Linking CXX shared library ../nativeLibrary/libJCudaDriver-linux-ppc_64.so\r\n[ 26%] Built target JCudaDriver\r\nScanning dependencies of target JCudaRuntime\r\n[ 30%] Building CXX object jcuda/JCudaRuntimeJNI/bin/CMakeFiles/JCudaRuntime.dir/src/JCudaRuntime.cpp.o\r\n[ 34%] Linking CXX shared library ../nativeLibrary/libJCudaRuntime-linux-ppc_64.so\r\n[ 34%] Built target JCudaRuntime\r\nScanning dependencies of target JCublas\r\n[ 39%] Building CXX object jcublas/JCublasJNI/bin/CMakeFiles/JCublas.dir/src/JCublas.cpp.o\r\n[ 43%] Linking CXX shared library ../nativeLibrary/libJCublas-linux-ppc_64.so\r\n[ 43%] Built target JCublas\r\nScanning dependencies of target JCublas2\r\n[ 47%] Building CXX object jcublas/JCublas2JNI/bin/CMakeFiles/JCublas2.dir/src/JCublas2.cpp.o\r\n[ 52%] Linking CXX shared library ../nativeLibrary/libJCublas2-linux-ppc_64.so\r\n[ 52%] Built target JCublas2\r\nScanning dependencies of target JCufft\r\n[ 56%] Building CXX object jcufft/JCufftJNI/bin/CMakeFiles/JCufft.dir/src/JCufft.cpp.o\r\n[ 60%] Linking CXX shared library ../nativeLibrary/libJCufft-linux-ppc_64.so\r\n[ 60%] Built target JCufft\r\nScanning dependencies of target JCurand\r\n[ 65%] Building CXX object jcurand/JCurandJNI/bin/CMakeFiles/JCurand.dir/src/JCurand.cpp.o\r\n[ 69%] Linking CXX shared library ../nativeLibrary/libJCurand-linux-ppc_64.so\r\n[ 69%] Built target JCurand\r\nScanning dependencies of target JCusparse\r\n[ 73%] Building CXX object jcusparse/JCusparseJNI/bin/CMakeFiles/JCusparse.dir/src/JCusparse.cpp.o\r\n[ 78%] Linking CXX shared library ../nativeLibrary/libJCusparse-linux-ppc_64.so\r\n[ 78%] Built target JCusparse\r\nScanning dependencies of target JCusolver\r\n[ 82%] Building CXX object jcusolver/JCusolverJNI/bin/CMakeFiles/JCusolver.dir/src/JCusolver.cpp.o\r\n[ 86%] Building CXX object jcusolver/JCusolverJNI/bin/CMakeFiles/JCusolver.dir/src/JCusolverDn.cpp.o\r\n[ 91%] Building CXX object jcusolver/JCusolverJNI/bin/CMakeFiles/JCusolver.dir/src/JCusolverRf.cpp.o\r\n[ 95%] Building CXX object jcusolver/JCusolverJNI/bin/CMakeFiles/JCusolver.dir/src/JCusolverSp.cpp.o\r\n[100%] Linking CXX shared library ../nativeLibrary/libJCusolver-linux-ppc_64.so\r\n[100%] Built target JCusolver\r\n```\r\n\r\nSo far so good. But now, when I do \r\n\r\n```\r\n$ JAVA_HOME=\"/usr/lib/jvm/java-8-openjdk-ppc64el\" mvn clean install \r\n[INFO] Scanning for projects...\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Reactor Build Order:\r\n[INFO] \r\n[INFO] JCudaRuntime-native\r\n[INFO] JCudaDriver-native\r\n[INFO] jcuda\r\n[INFO] JCublas-native\r\n[INFO] JCublas2-native\r\n[INFO] jcublas\r\n[INFO] JCufft-native\r\n[INFO] jcufft\r\n[INFO] JCurand-native\r\n[INFO] jcurand\r\n[INFO] JCusparse-native\r\n[INFO] jcusparse\r\n[INFO] JCusolver-native\r\n[INFO] jcusolver\r\n[INFO] jcuda-main\r\n[INFO]                                                                         \r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Building JCudaRuntime-native 0.7.5b\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] \r\n[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ JCudaRuntime-native ---\r\n[INFO] \r\n[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ JCudaRuntime-native ---\r\n[INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n[INFO] skip non existing resourceDirectory /mnt/jcuda/jcuda/JCudaRuntimeJNI/src/main/resources\r\n[INFO] \r\n[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ JCudaRuntime-native ---\r\n[INFO] No sources to compile\r\n[INFO] \r\n[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ JCudaRuntime-native ---\r\n[INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n[INFO] skip non existing resourceDirectory /mnt/jcuda/jcuda/JCudaRuntimeJNI/src/test/resources\r\n[INFO] \r\n[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ JCudaRuntime-native ---\r\n[INFO] No sources to compile\r\n[INFO] \r\n[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ JCudaRuntime-native ---\r\n[INFO] No tests to run.\r\n[INFO] \r\n[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ JCudaRuntime-native ---\r\n[WARNING] JAR will be empty - no content was marked for inclusion!\r\n[INFO] Building jar: /mnt/jcuda/jcuda/JCudaRuntimeJNI/target/JCudaRuntime-native-0.7.5b.jar\r\n[INFO] \r\n[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) > generate-sources @ JCudaRuntime-native >>>\r\n[INFO] \r\n[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) < generate-sources @ JCudaRuntime-native <<<\r\n[INFO] \r\n[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ JCudaRuntime-native ---\r\n[INFO] No sources in project. Archive not created.\r\n[INFO] \r\n[INFO] --- maven-javadoc-plugin:2.10.1:jar (attach-javadocs) @ JCudaRuntime-native ---\r\n[INFO] \r\n[INFO] --- build-helper-maven-plugin:1.9.1:attach-artifact (attach-artifacts) @ JCudaRuntime-native ---\r\n[INFO] \r\n[INFO] --- maven-install-plugin:2.4:install (default-install) @ JCudaRuntime-native ---\r\n[INFO] Installing /mnt/jcuda/jcuda/JCudaRuntimeJNI/target/JCudaRuntime-native-0.7.5b.jar to /root/.m2/repository/org/jcuda/JCudaRuntime-native/0.7.5b/JCudaRuntime-native-0.7.5b.jar\r\n[INFO] Installing /mnt/jcuda/jcuda/JCudaRuntimeJNI/pom.xml to /root/.m2/repository/org/jcuda/JCudaRuntime-native/0.7.5b/JCudaRuntime-native-0.7.5b.pom\r\n[INFO] Installing /mnt/jcuda/jcuda/JCudaRuntimeJNI/nativeLibrary/${jcuda.prefix}JCudaRuntime-${jcuda.os}-${jcuda.arch}.${jcuda.ext} to /root/.m2/repository/org/jcuda/JCudaRuntime-native/0.7.5b/JCudaRuntime-native-0.7.5b-${jcuda.os}-${jcuda.arch}.jar\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Reactor Summary:\r\n[INFO] \r\n[INFO] JCudaRuntime-native ................................ FAILURE [  2.156 s]\r\n[INFO] JCudaDriver-native ................................. SKIPPED\r\n[INFO] jcuda .............................................. SKIPPED\r\n[INFO] JCublas-native ..................................... SKIPPED\r\n[INFO] JCublas2-native .................................... SKIPPED\r\n[INFO] jcublas ............................................ SKIPPED\r\n[INFO] JCufft-native ...................................... SKIPPED\r\n[INFO] jcufft ............................................. SKIPPED\r\n[INFO] JCurand-native ..................................... SKIPPED\r\n[INFO] jcurand ............................................ SKIPPED\r\n[INFO] JCusparse-native ................................... SKIPPED\r\n[INFO] jcusparse .......................................... SKIPPED\r\n[INFO] JCusolver-native ................................... SKIPPED\r\n[INFO] jcusolver .......................................... SKIPPED\r\n[INFO] jcuda-main ......................................... SKIPPED\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD FAILURE\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 2.514 s\r\n[INFO] Finished at: 2016-04-20T06:35:27+00:00\r\n[INFO] Final Memory: 23M/179M\r\n[INFO] ------------------------------------------------------------------------\r\n[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project JCudaRuntime-native: Failed to install artifact org.jcuda:JCudaRuntime-native:jar:${jcuda.os}-${jcuda.arch}:0.7.5b: /mnt/jcuda/jcuda/JCudaRuntimeJNI/nativeLibrary/${jcuda.prefix}JCudaRuntime-${jcuda.os}-${jcuda.arch}.${jcuda.ext} (No such file or directory) -> [Help 1]\r\n[ERROR] \r\n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\r\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\r\n[ERROR] \r\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\r\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException\r\n```\r\n\r\nWhat am I missing? I guess there is a step I am doing wrong, but can't know which one. \r\n\r\nMany thanks,\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jcuda/jcuda-main/issues/comments/212442252","html_url":"https://github.com/jcuda/jcuda-main/issues/6#issuecomment-212442252","issue_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/6","id":212442252,"user":{"login":"SaMnCo","id":2324599,"avatar_url":"https://avatars.githubusercontent.com/u/2324599?v=3","gravatar_id":"","url":"https://api.github.com/users/SaMnCo","html_url":"https://github.com/SaMnCo","followers_url":"https://api.github.com/users/SaMnCo/followers","following_url":"https://api.github.com/users/SaMnCo/following{/other_user}","gists_url":"https://api.github.com/users/SaMnCo/gists{/gist_id}","starred_url":"https://api.github.com/users/SaMnCo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaMnCo/subscriptions","organizations_url":"https://api.github.com/users/SaMnCo/orgs","repos_url":"https://api.github.com/users/SaMnCo/repos","events_url":"https://api.github.com/users/SaMnCo/events{/privacy}","received_events_url":"https://api.github.com/users/SaMnCo/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T14:13:00Z","updated_at":"2016-04-20T14:13:00Z","body":"Many thanks for your answer. \r\n\r\n* Initially, this didn't work. \r\n* But after I looked at the source for mavenized-jcuda, I realized the architecture is actually power8, so ppc64le. Therefore I slightly modified your snippet into\r\n\r\n```\r\n        <profile>\r\n            <id>linux-ppc64le</id>\r\n            <activation>\r\n                <os>\r\n                    <family>unix</family>\r\n                    <arch>ppc64le</arch>\r\n                </os>\r\n            </activation>\r\n            <properties>\r\n                <jcuda.os>linux</jcuda.os>\r\n                <jcuda.arch>ppc_64</jcuda.arch>\r\n                <jcuda.ext>so</jcuda.ext>\r\n                <jcuda.prefix>lib</jcuda.prefix>\r\n            </properties>\r\n        </profile>\r\n```\r\n\r\nThen, \r\n\r\n* Using openjdk-7, no luck and failure because of some pandoc not passing tests. \r\n* with\r\n\r\n```\r\nJAVA_HOME=\"/usr/lib/jvm/java-8-openjdk-ppc64el\" mvn clean install\r\n```\r\nI got lucky: \r\n\r\n```\r\n[INFO] --- maven-install-plugin:2.4:install (default-install) @ jcuda-main ---\r\n[INFO] Installing /mnt/jcuda/jcuda-main/pom.xml to /root/.m2/repository/org/jcuda/jcuda-main/0.7.5b/jcuda-main-0.7.5b.pom\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Reactor Summary:\r\n[INFO] \r\n[INFO] JCudaRuntime-native ................................ SUCCESS [  2.174 s]\r\n[INFO] JCudaDriver-native ................................. SUCCESS [  0.036 s]\r\n[INFO] jcuda .............................................. SUCCESS [  9.539 s]\r\n[INFO] JCublas-native ..................................... SUCCESS [  0.027 s]\r\n[INFO] JCublas2-native .................................... SUCCESS [  0.026 s]\r\n[INFO] jcublas ............................................ SUCCESS [  6.260 s]\r\n[INFO] JCufft-native ...................................... SUCCESS [  0.025 s]\r\n[INFO] jcufft ............................................. SUCCESS [  3.280 s]\r\n[INFO] JCurand-native ..................................... SUCCESS [  0.029 s]\r\n[INFO] jcurand ............................................ SUCCESS [  2.761 s]\r\n[INFO] JCusparse-native ................................... SUCCESS [  0.025 s]\r\n[INFO] jcusparse .......................................... SUCCESS [  8.439 s]\r\n[INFO] JCusolver-native ................................... SUCCESS [  0.027 s]\r\n[INFO] jcusolver .......................................... SUCCESS [  4.225 s]\r\n[INFO] jcuda-main ......................................... SUCCESS [  0.021 s]\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 37.241 s\r\n[INFO] Finished at: 2016-04-20T14:03:13+00:00\r\n[INFO] Final Memory: 67M/404M\r\n[INFO] ------------------------------------------------------------------------\r\n```\r\n\r\nIn the attached zip file you'll find the whole folder, with the native libraries and the jar files. This was done on an Ubuntu 14.04, with OpenJDK 8. Not everyone can access Power machines, so if there is a good way to share them, feel free to release them :)\r\n\r\n[jcuda_openjdk8_ppc64le.zip](https://github.com/jcuda/jcuda-main/files/228056/jcuda_openjdk8_ppc64le.zip)\r\n\r\n\r\nThanks a lot, \r\nAll the best,"}}