Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3324 closed defect (fixed)

ParModelica: OCLRuntimeUtil.cl not found

Reported by: Gustaf Thorslund Owned by: Mahder Alemseged Gebremedhin
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 by Gustaf Thorslund, 10 years ago

Summary: OCLRuntimeUtil.cl not foundParModelica: OCLRuntimeUtil.cl not found

comment:2 by Mahder Alemseged Gebremedhin, 9 years ago

Resolution: fixed
Status: newclosed

comment:3 by Dietmar Winkler, 9 years ago

Milestone: Future1.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 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.