Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3201 closed defect (invalid)

ParModelica cannot parse kernel functions

Reported by: Gustaf Thorslund Owned by: Mahder Alemseged Gebremedhin
Priority: high Milestone: never
Component: ParModelica Version: trunk
Keywords: ParModelica Cc:

Description

A fairly small kernel function:

kernel function KernelTestNull
end KernelTestNull;

Will result in a slightly bigger parsing failure:

$ omc -g=ParModelica KernelTestNull.mo
Error processing file: KernelTestNull.mo
Failed to parse file: KernelTestNull.mo!

[.../KernelTestNull.mo:1:0-1:6:writable] Error: Parser error: Unexpected token near: kernel (IDENT)

# Error encountered! Exiting...
# Please check the error message and the flags.
Failed to parse file: KernelTestNull.mo!

Execution failed!

Trying a bigger example like:

package KernelTest
  parallel function multiply
    input Integer a;
    input Integer b;
    output Integer c;
  algorithm
    c := a * b;
  end multiply;
	 
  kernel function arrayElemWiseMultiply
    input Integer m;
    input Integer A[m];
    input Integer B[m];
    output Integer C[m];
  protected
    Integer id;
  algorithm
    id := ocl_get_global_id(0);
    C[id] := multiply(A[id],B[id]);
  end arrayElemWiseMultiply;
end KernelTest;

Will give a similar (but slightly different) parsing error:

$ omc -g=ParModelica KernelTest.mo Error processing file: KernelTest.mo
Failed to parse file: KernelTest.mo!

[.../KernelTest.mo:10:3-10:9:writable] Error: No viable alternative near token: kernel

# Error encountered! Exiting...
# Please check the error message and the flags.
Failed to parse file: KernelTest.mo!

Execution failed!

$ omc --version
1.9.2+dev (r24991)

Change History (3)

comment:1 by Gustaf Thorslund, 10 years ago

Reading the presentation linked in #3199 -> s/kernel/parkernel/
...so this is one more (user reading wrong) documentation issue.

comment:2 by Mahder Alemseged Gebremedhin, 9 years ago

Resolution: invalid
Status: newclosed

Documentation issue.

comment:3 by Dietmar Winkler, 9 years ago

Milestone: Futurenever

Sorting away the closed as invalid, won't fix and duplicate tickets from Future.

Note: See TracTickets for help on using tickets.