Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3324 closed defect (fixed)

ParModelica: OCLRuntimeUtil.cl not found

Reported by: gustaf Owned by: mahge930
Priority: high Milestone: 1.9.4
Component: ParModelica Version: trunk
Keywords: Cc:

Description

When trying to run ParModelica-code, it fails with:

2 CL_DEVICE_NAME :    Intel(R) HD Graphics Haswell M
2 CL_DRIVER_VERSION : 0.8.0
2 CL_DEVICE_MAX_COMPUTE_UNITS : 64
2 CL_DEVICE_MAX_CLOCK_FREQUENCY : 1000
2 CL_DEVICE_LOCAL_MEM_SIZE :                                                                64 KB
2 CL_DEVICE_GLOBAL_MEM_SIZE:                                                              128 MB
2 CL_DEVICE_MAX_MEM_ALLOC_SIZE:                                                              128 MB
2 CL_DEVICE_MAX_PARAMETER_SIZE: 1024 MB
2 CL_DEVICE_MAX_WORK_GROUP_SIZE: 512 
2 CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE  : 0


- Select your device:      2
Error building program:
CL_BUILD_PROGRAM_FAILURE 
Build failed: Errors detected in compilation of OpenCL code:
CL_PROGRAM_BUILD_LOG:  
/tmp/7OHC0m.cl:1:10: fatal error: 'ParModelica/explicit/openclrt/OCLRuntimeUtil.cl' file not found

I've been told this does not happen with NVIDIA. The ugly workaround for me have been:

  • Compiler/Template/CodegenC.tpl

    diff --git a/Compiler/Template/CodegenC.tpl b/Compiler/Template/CodegenC.tpl
    index 366cb6f..dd45777 100644
    a b template simulationParModelicaKernelsFile(String filePrefix, list<Function> func 
    41794179  let()= System.tmpTickResetIndex(0,20) /* parfor index */
    41804180
    41814181  <<
    4182   #include <ParModelica/explicit/openclrt/OCLRuntimeUtil.cl>
     4182  #include "ParModelica/explicit/openclrt/OCLRuntimeUtil.cl"
    41834183
    41844184  // ParModelica Parallel Function headers.
    41854185  <%functionHeadersParModelica(filePrefix, functions)%>
    template functionsParModelicaKernelsFile(String filePrefix, Option<Function> mai 
    42014201  let()= System.tmpTickResetIndex(0,20) /* parfor index */
    42024202
    42034203  <<
    4204   #include <ParModelica/explicit/openclrt/OCLRuntimeUtil.cl>
     4204  #include "ParModelica/explicit/openclrt/OCLRuntimeUtil.cl"
    42054205
    42064206  // ParModelica Parallel Function headers.
    42074207  <%functionHeadersParModelica(filePrefix, functions)%>

Then I add a symlink from the place where the generated OpenCL-code is (/tmp)

gustaf@ulmus:/tmp$ ln -s /home/gustaf/src/OpenModelica/build/include/omc/c/ParModelica .

This is no perfect solution, but let me carry on until I hit other bugs.

Change History (5)

comment:1 Changed 9 years ago by gustaf

  • Summary changed from OCLRuntimeUtil.cl not found to ParModelica: OCLRuntimeUtil.cl not found

comment:2 Changed 9 years ago by mahge930

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 9 years ago by dietmarw

  • Milestone changed from Future to 1.9.4

Sorting these closed tickets away from "Future". Since they were closed after the last 1.9.3 release, it's very likely that they should have been part of the 1.9.4 release.

comment:4 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:5 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.