﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3324	ParModelica: OCLRuntimeUtil.cl not found	Gustaf Thorslund	Mahder Alemseged Gebremedhin	"When trying to run ParModelica-code, it fails with:
{{{#!bash
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:
{{{#!diff
diff --git a/Compiler/Template/CodegenC.tpl b/Compiler/Template/CodegenC.tpl
index 366cb6f..dd45777 100644
--- a/Compiler/Template/CodegenC.tpl
+++ b/Compiler/Template/CodegenC.tpl
@@ -4179,7 +4179,7 @@ template simulationParModelicaKernelsFile(String filePrefix, list<Function> func
   let()= System.tmpTickResetIndex(0,20) /* parfor index */
 
   <<
-  #include <ParModelica/explicit/openclrt/OCLRuntimeUtil.cl>
+  #include ""ParModelica/explicit/openclrt/OCLRuntimeUtil.cl""
 
   // ParModelica Parallel Function headers.
   <%functionHeadersParModelica(filePrefix, functions)%>
@@ -4201,7 +4201,7 @@ template functionsParModelicaKernelsFile(String filePrefix, Option<Function> mai
   let()= System.tmpTickResetIndex(0,20) /* parfor index */
 
   <<
-  #include <ParModelica/explicit/openclrt/OCLRuntimeUtil.cl>
+  #include ""ParModelica/explicit/openclrt/OCLRuntimeUtil.cl""
 
   // ParModelica Parallel Function headers.
   <%functionHeadersParModelica(filePrefix, functions)%>
}}}

Then I add a symlink from the place where the generated OpenCL-code is (/tmp)
{{{#!bash
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."	defect	closed	high	1.9.4	ParModelica	trunk	fixed		
