InvalidArgumentIndexComputeException()

Help
2010-08-07
2012-12-21
  • ozkan kayhan

    ozkan kayhan - 2010-08-07

    i changed my program to use doubles instead of floats to increase accuracy.
    using double2 instead of float2 gives this exception.

    I use…
        Kernel.SetValueArgument(3, new Vector2D(-1.5, -1.5));

    and this line gives invalid argument index exception.

    this worked fine with my float2 vector type Vector2F.

    **// enables double types ?
    #pragma OPENCL EXTENSION cl_khr_fp64 : enable

    __kernel void GridUpdate
    (
    __global double2 * position,
    __global int * particles,
    double gridCellSize,
            double2 domainMin,
    int gridCellCountx
    )
    {
    size_t i = get_global_id(0);
    int2 cell = (int2)((position_  - domainMin) / gridCellSize);
    particles = cell.x + gridCellCountx * cell.y;
    }_**

     
  • nythrix

    nythrix - 2010-08-25

    Darn, I must have missed your post. I'm sorry.

    Does your GPU support doubles?

     
  • ozkan kayhan

    ozkan kayhan - 2010-08-25

    I run this code on CPU instead of GPU during development. And my CPU supports doubles.

    The error is only for "double2" typed arguments. "double" or "double2*" typed arguments works fine.

     
  • nythrix

    nythrix - 2010-08-26

    I can't compile your kernel at all. Problem is, I'm stuck with an old notebook for a couple of days.
    What is your platform?

     
  • ozkan kayhan

    ozkan kayhan - 2010-08-26

    Sorry there is a typing error in that code.

    __kernel void GridUpdate
    (
          __global double2 * position,
          __global int * particles,
         double gridCellSize,
         double2 domainMin,
         int gridCellCountx
    )
    {
    size_t i = get_global_id(0);
    int2 cell = (int2)((position_ - domainMin) / gridCellSize);
    particles = cell.x + gridCellCountx * cell.y;
    }_

     
  • ozkan kayhan

    ozkan kayhan - 2010-08-26

    i cant seem to write "position_" to forums_

     
  • ozkan kayhan

    ozkan kayhan - 2010-08-26

    there is an index in position and that doesnt  show on forums.

     
  • nythrix

    nythrix - 2010-08-27

    Yes, and I believe particles has one too. Anyway, I added the missing indices (which normally get converted to italic font tags) and enabled cl_amd_fp64 since I don't have support for the _khr_ one.  Other than that the code should be the same.
    I compiled the program, created the kernel and tried setting the fourth argument with a two-double struct but couldn't reproduce the issue.
    Any other info on this problem?

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks