gpu / JOCLBlast

JOCLBlast - Java bindings for CLBlast
Other
14 stars 4 forks source link

Constants changed in CLBlast - JOCLBlast needs update #5

Closed blueberry closed 8 years ago

blueberry commented 8 years ago

Newest development branch of CLBlast has changed the constants in Layout etc. to be consistent with cblas. Corresponding classes in JOCLBlast need to be updated.

blueberry commented 8 years ago

In addition to this, Cedric added a new method for clearing the cache, which might be impotrant in relation to this issue that might be caused by ClojureCL or JOCL, since he couldn't reproduce it: https://github.com/CNugteren/CLBlast/issues/47

gpu commented 8 years ago

This has been updated, based on the latest CLBlast development state, in 6902f2e3fce1400d1e583d50a5f9eb56ee8683c8

gpu commented 8 years ago

The CLBlastClearCompiledProgramCache function has been renamed to CLBlastClearCache in https://github.com/gpu/JOCLBlast/commit/901ca7d318cc9bc410010ebf5433551f4aae6e8d , based on the change in https://github.com/CNugteren/CLBlast/commit/d9b21d7f4920b115d3fe7f2e3cce1f89eb762c10

blueberry commented 8 years ago

Can you also refresh CLBlast class to include sum and imax methods that were added 2 days ago?

gpu commented 8 years ago

OK, I should have expected it to strike back when I manually edited the function names of the otherwise auto-generated code: It was named ClearCache instead of CLBlastClearCache in the previous version.

However, in https://github.com/gpu/JOCLBlast/commit/1a3cb47fbb8c99d3bb608fa949898194dc21d5c5 I have updated it based on the latest "development" state of CLBlast.

blueberry commented 8 years ago

I hate to bug you again, but in the meantime Cedric adeded the fillcache function, so there is a need for another update.

CNugteren commented 8 years ago

Isn't it better to wait for the next 0.7 release or so? This is all very much in development, so things keep on changing. From version 1.0 the API will remain stable for a while.

blueberry commented 8 years ago

The update is needed for testing the library. Fortunately, Marco has a code generator for it :) @CNugteren BTW, when do you expect to release 0.7? @gpu Maybe that would be a good target for the release 0.0.1 of JOCLBlast?

blueberry commented 8 years ago

@gpu and another thought on versioning: how about jumping JOCLBlast version to 0.7.0, and keeping that in sync with CLBlast versions?

gpu commented 8 years ago

I think that both of you are right: On the one hand, it may be painful for follow each and every update of the development branch - but on the other hand, it is necessary, as it would not benefit anyone to wait for a ""stable"" 1.0 release that then requires several fixes in form of 1.0.X versions. (Admittedly (maybe luckily?) the application case involving the chain of OpenCL -> CLBlast -> JOCLBlast -> Neanderthal is somewhat exotic, so it can be considered as some sort of stress test ;-))

The versioning of JOCL and JOCLBlast is still not entrirely settled, but as discussed recently: Letting JOCL follow the OpenCL version seems reasonable, and so JOCLBlast could do the same. So probably, with CLBlast 0.7, I'd create a JOCLBlast 0.7.0 (SNAPSHOT until tested), and from that on, follow the versioning of CLBlast.

(I'll also consider dedicated development branches, this just makes the state of each branch clearer)

I can't do the update regarding the "file cache" right now, but maybe tomorrow (likely not later than monday)

gpu commented 8 years ago

I have updated based on the latest version of CLBlast in https://github.com/gpu/JOCLBlast/commit/e514ed90ef41126a5c095e0227e2ea01c2e54eba . Note that there is also a minor update in JOCLCommon that is required here: https://github.com/gpu/JOCLCommon/commit/9a2a44e7387531ccf859cb9da247900778348682

As a quick test, I used/ported the example that Cedric added as well:

package org.jocl.tests.blast;

import static org.jocl.CL.*;
import static org.jocl.blast.CLBlast.CLBlastClearCache;
import static org.jocl.blast.CLBlast.CLBlastFillCache;
import static org.jocl.blast.CLBlast.CLBlastSasum;

import org.jocl.*;
import org.jocl.blast.CLBlast;

// Mostly ported from the CLBlast cache test
public class JOCLBlastCacheTest
{
    /**
     * The entry point of this sample
     * 
     * @param args Not used
     */
    public static void main(String args[])
    {
        // Enable exceptions and subsequently omit error checks in this sample
        CL.setExceptionsEnabled(true);
        CLBlast.setExceptionsEnabled(true);

        // The platform, device type and device number
        // that will be used
        final int platformIndex = 0;
        final long deviceType = CL_DEVICE_TYPE_GPU;
        final int deviceIndex = 0;

        // Obtain the number of platforms
        int numPlatformsArray[] = new int[1];
        clGetPlatformIDs(0, null, numPlatformsArray);
        int numPlatforms = numPlatformsArray[0];

        // Obtain a platform ID
        cl_platform_id platforms[] = new cl_platform_id[numPlatforms];
        clGetPlatformIDs(platforms.length, platforms, null);
        cl_platform_id platform = platforms[platformIndex];

        // Initialize the context properties
        cl_context_properties contextProperties = new cl_context_properties();
        contextProperties.addProperty(CL_CONTEXT_PLATFORM, platform);

        // Obtain the number of devices for the platform
        int numDevicesArray[] = new int[1];
        clGetDeviceIDs(platform, deviceType, 0, null, numDevicesArray);
        int numDevices = numDevicesArray[0];

        // Obtain a device ID 
        cl_device_id devices[] = new cl_device_id[numDevices];
        clGetDeviceIDs(platform, deviceType, numDevices, devices, null);
        cl_device_id device = devices[deviceIndex];

        // Run the routine multiple times in a row: after the first time the 
        // binary is already in the cache and compilation is no longer needed.
        System.out.printf("Starting caching sample with an empty cache\n");
        run_example_routine(device);
        run_example_routine(device);
        run_example_routine(device);

        // Clearing the cache makes CLBlast re-compile the kernel once
        System.out.printf("Clearing cache\n");
        CLBlastClearCache();
        run_example_routine(device);
        run_example_routine(device);

        // When the cache is empty, it can be pre-initialized with compiled 
        // kernels for all routines by calling the CLBlastFillCache function, 
        // such that all other CLBlast calls can benefit from pre-compiled 
        // kernels and thus execute at maximum speed.
        System.out.printf("Clearing cache\n");
        CLBlastClearCache();
        System.out.printf("Filling cache (this might take a while)\n");
        CLBlastFillCache(device);
        run_example_routine(device);
    }

    // Runs an example routine and reports the time
    private static void run_example_routine(cl_device_id device) {

      // Example SASUM arguments
      int n = 1024*128;

      // Creates the OpenCL context, queue, and an event
      cl_context context = clCreateContext(
          null, 1, new cl_device_id[] { device }, null, null, null);
      cl_command_queue queue = clCreateCommandQueue(context, device, 0, null);
      cl_event event = new cl_event();

      // Populate host data structures with some example data
      float host_input[] = new float[n];
      float host_output[] = new float[n];
      for (int i=0; i<n; ++i) { host_input[i] = -1.5f; }
      for (int i=0; i<1; ++i) { host_output[i] = 0.0f; }

      // Copy the data-structures to the device
      cl_mem device_input = clCreateBuffer(
          context, CL_MEM_READ_WRITE, n*Sizeof.cl_float, null, null);
      cl_mem device_output = clCreateBuffer(
          context, CL_MEM_READ_WRITE, 1*Sizeof.cl_float, null, null);
      clEnqueueWriteBuffer(queue, device_input, CL_TRUE, 0, 
          n*Sizeof.cl_float, Pointer.to(host_input), 0, null, null);
      clEnqueueWriteBuffer(queue, device_output, CL_TRUE, 0, 
          1*Sizeof.cl_float, Pointer.to(host_output), 0, null, null);

      // Start the timer
      long startNs = System.nanoTime();

      // Calls an example routine
      int status = CLBlastSasum(n,
          device_output, 0,
          device_input, 0, 1,
          queue, event);

      // Wait for completion
      clWaitForEvents(1, new cl_event[] { event });

      // Retrieves the execution time
      long diffNs = System.nanoTime() - startNs;
      double time_ms = diffNs * 1e-6;

      // Routine completed. See "clblast_c.h" for status codes (0 -> success).
      System.out.printf(
          "Completed routine with status %d in %.3f ms\n", status, time_ms);

      // Clean-up
      clReleaseMemObject(device_input);
      clReleaseMemObject(device_output);
      clReleaseCommandQueue(queue);
      clReleaseContext(context);
    }    

}

It seems to work for the first quick test: It seems to re-create the cache as desired (on demand or via the call):

Starting caching sample with an empty cache
Completed routine with status 0 in 83,033 ms
Completed routine with status 0 in 5,067 ms
Completed routine with status 0 in 5,672 ms
Clearing cache
Completed routine with status 0 in 83,461 ms
Completed routine with status 0 in 5,556 ms
Clearing cache
Filling cache (this might take a while)
Completed routine with status 0 in 4,970 ms
blueberry commented 8 years ago

@gpu CLBlast compilation fails with the following error (I built and installed the latest development CLBlast, then deleted al JOCL projects, cloned from github and built them again. JOCL and JOCLCommon build fine):

JOCLBlast.build make
Scanning dependencies of target JOCLCommon
[ 12%] Building CXX object JOCLCommon/CMakeFiles/JOCLCommon.dir/src/main/native/Logger.cpp.o
[ 25%] Building CXX object JOCLCommon/CMakeFiles/JOCLCommon.dir/src/main/native/CLJNIUtils.cpp.o
[ 37%] Building CXX object JOCLCommon/CMakeFiles/JOCLCommon.dir/src/main/native/JNIUtils.cpp.o
[ 50%] Building CXX object JOCLCommon/CMakeFiles/JOCLCommon.dir/src/main/native/PointerUtils.cpp.o
[ 62%] Building CXX object JOCLCommon/CMakeFiles/JOCLCommon.dir/src/main/native/ConversionsCL.cpp.o
[ 75%] Linking CXX static library libJOCLCommon.a
[ 75%] Built target JOCLCommon
Scanning dependencies of target JOCLBlast_0_0_1-linux-x86_64
[ 87%] Building CXX object CMakeFiles/JOCLBlast_0_0_1-linux-x86_64.dir/src/main/native/JOCLBlast.cpp.o
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSrotgNative(JNIEnv*, jclass, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:161:218: error: ‘CLBlastSrotg’ was not declared in this scope
     StatusCode jniResult_native = CLBlastSrotg(sa_buffer_native, sa_offset_native, sb_buffer_native, sb_offset_native, sc_buffer_native, sc_offset_native, ss_buffer_native, ss_offset_native, queue_native, event_native);
                                                                                                                                                                                                                          ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDrotgNative(JNIEnv*, jclass, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:243:218: error: ‘CLBlastDrotg’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDrotg(sa_buffer_native, sa_offset_native, sb_buffer_native, sb_offset_native, sc_buffer_native, sc_offset_native, ss_buffer_native, ss_offset_native, queue_native, event_native);
                                                                                                                                                                                                                          ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSrotmgNative(JNIEnv*, jclass, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:336:271: error: ‘CLBlastSrotmg’ was not declared in this scope
 LBlastSrotmg(sd1_buffer_native, sd1_offset_native, sd2_buffer_native, sd2_offset_native, sx1_buffer_native, sx1_offset_native, sy1_buffer_native, sy1_offset_native, sparam_buffer_native, sparam_offset_native, queue_native, event_native);
                                                                                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDrotmgNative(JNIEnv*, jclass, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:430:271: error: ‘CLBlastDrotmg’ was not declared in this scope
 LBlastDrotmg(sd1_buffer_native, sd1_offset_native, sd2_buffer_native, sd2_offset_native, sx1_buffer_native, sx1_offset_native, sy1_buffer_native, sy1_offset_native, sparam_buffer_native, sparam_offset_native, queue_native, event_native);
                                                                                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSrotNative(JNIEnv*, jclass, jlong, jobject, jlong, jlong, jobject, jlong, jlong, jfloat, jfloat, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:510:203: error: ‘CLBlastSrot’ was not declared in this scope
     StatusCode jniResult_native = CLBlastSrot(n_native, x_buffer_native, x_offset_native, x_inc_native, y_buffer_native, y_offset_native, y_inc_native, cos_native, sin_native, queue_native, event_native);
                                                                                                                                                                                                           ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDrotNative(JNIEnv*, jclass, jlong, jobject, jlong, jlong, jobject, jlong, jlong, jdouble, jdouble, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:588:203: error: ‘CLBlastDrot’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDrot(n_native, x_buffer_native, x_offset_native, x_inc_native, y_buffer_native, y_offset_native, y_inc_native, cos_native, sin_native, queue_native, event_native);
                                                                                                                                                                                                           ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSrotmNative(JNIEnv*, jclass, jlong, jobject, jlong, jlong, jobject, jlong, jlong, jobject, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:671:224: error: ‘CLBlastSrotm’ was not declared in this scope
     StatusCode jniResult_native = CLBlastSrotm(n_native, x_buffer_native, x_offset_native, x_inc_native, y_buffer_native, y_offset_native, y_inc_native, sparam_buffer_native, sparam_offset_native, queue_native, event_native);
                                                                                                                                                                                                                                ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDrotmNative(JNIEnv*, jclass, jlong, jobject, jlong, jlong, jobject, jlong, jlong, jobject, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:753:224: error: ‘CLBlastDrotm’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDrotm(n_native, x_buffer_native, x_offset_native, x_inc_native, y_buffer_native, y_offset_native, y_inc_native, sparam_buffer_native, sparam_offset_native, queue_native, event_native);
                                                                                                                                                                                                                                ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSnrm2Native(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2426:172: error: ‘CLBlastSnrm2’ was not declared in this scope
     StatusCode jniResult_native = CLBlastSnrm2(n_native, nrm2_buffer_native, nrm2_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDnrm2Native(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2492:172: error: ‘CLBlastDnrm2’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDnrm2(n_native, nrm2_buffer_native, nrm2_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastScnrm2Native(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2558:173: error: ‘CLBlastScnrm2’ was not declared in this scope
     StatusCode jniResult_native = CLBlastScnrm2(n_native, nrm2_buffer_native, nrm2_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDznrm2Native(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2624:173: error: ‘CLBlastDznrm2’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDznrm2(n_native, nrm2_buffer_native, nrm2_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSasumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2691:172: error: ‘CLBlastSasum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastSasum(n_native, asum_buffer_native, asum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDasumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2757:172: error: ‘CLBlastDasum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDasum(n_native, asum_buffer_native, asum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastScasumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2823:173: error: ‘CLBlastScasum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastScasum(n_native, asum_buffer_native, asum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDzasumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2889:173: error: ‘CLBlastDzasum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDzasum(n_native, asum_buffer_native, asum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastSsumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:2956:169: error: ‘CLBlastSsum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastSsum(n_native, sum_buffer_native, sum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                         ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDsumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3022:169: error: ‘CLBlastDsum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDsum(n_native, sum_buffer_native, sum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                         ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastScsumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3088:170: error: ‘CLBlastScsum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastScsum(n_native, sum_buffer_native, sum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                          ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastDzsumNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3154:170: error: ‘CLBlastDzsum’ was not declared in this scope
     StatusCode jniResult_native = CLBlastDzsum(n_native, sum_buffer_native, sum_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                          ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiSamaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3221:173: error: ‘CLBlastiSamax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiSamax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiDamaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3287:173: error: ‘CLBlastiDamax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiDamax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiCamaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3353:173: error: ‘CLBlastiCamax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiCamax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiZamaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3419:173: error: ‘CLBlastiZamax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiZamax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                             ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiSmaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3486:172: error: ‘CLBlastiSmax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiSmax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiDmaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3552:172: error: ‘CLBlastiDmax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiDmax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiCmaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3618:172: error: ‘CLBlastiCmax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiCmax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiZmaxNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3684:172: error: ‘CLBlastiZmax’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiZmax(n_native, imax_buffer_native, imax_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiSminNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3751:172: error: ‘CLBlastiSmin’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiSmin(n_native, imin_buffer_native, imin_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiDminNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3817:172: error: ‘CLBlastiDmin’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiDmin(n_native, imin_buffer_native, imin_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiCminNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3883:172: error: ‘CLBlastiCmin’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiCmin(n_native, imin_buffer_native, imin_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastiZminNative(JNIEnv*, jclass, jlong, jobject, jlong, jobject, jlong, jlong, jobject, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:3949:172: error: ‘CLBlastiZmin’ was not declared in this scope
     StatusCode jniResult_native = CLBlastiZmin(n_native, imin_buffer_native, imin_offset_native, x_buffer_native, x_offset_native, x_inc_native, queue_native, event_native);
                                                                                                                                                                            ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastClearCacheNative(JNIEnv*, jclass)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:13519:53: error: ‘CLBlastClearCache’ was not declared in this scope
     StatusCode jniResult_native = CLBlastClearCache();
                                                     ^
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp: In function ‘jint Java_org_jocl_blast_CLBlast_CLBlastFillCacheNative(JNIEnv*, jclass, jobject)’:
/home/dragan/workspace/java/jocl/JOCLBlast/src/main/native/JOCLBlast.cpp:13548:65: error: ‘CLBlastFillCache’ was not declared in this scope
     StatusCode jniResult_native = CLBlastFillCache(device_native);
                                                                 ^
CMakeFiles/JOCLBlast_0_0_1-linux-x86_64.dir/build.make:62: recipe for target 'CMakeFiles/JOCLBlast_0_0_1-linux-x86_64.dir/src/main/native/JOCLBlast.cpp.o' failed
make[2]: *** [CMakeFiles/JOCLBlast_0_0_1-linux-x86_64.dir/src/main/native/JOCLBlast.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/JOCLBlast_0_0_1-linux-x86_64.dir/all' failed
make[1]: *** [CMakeFiles/JOCLBlast_0_0_1-linux-x86_64.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
blueberry commented 8 years ago

@gpu Ignore the last message. I somehow managed to build CLBlast master instead of development.

gpu commented 8 years ago

Although this "issue" is more like an "epic", the update that this issue referred to is done, so I'll close it for now