Tobias Ellinghaus wrote:

> Am Freitag, 18. Oktober 2013, 02:02:23 schrieb Tobias Ellinghaus:
> > Am Donnerstag, 17. Oktober 2013, 23:46:19 schrieb Wolfgang Goetz:
...
> > > [opencl_init] malformed entry in programs.conf
> > > `demosaic_ppg.cl     0'; ignoring it! ...
> > > [opencl_create_kernel] could not create kernel `zero'! (-44)
...
> > Tobias, hoping that he didn't break too much :D
> 
> Might be fixed now. Please check. Sorry for the inconvenience.

Partly solved, but you pointed me to the correct place..
looks like the tokenizer of g_strsplit_set () doesn't sum up the
whitespaces.

patch attached: quick/dirty fix is to limit the token count from 3 to 2.
(consumes one whitespace and assembles the remaining string to last token)

the string 'programnumber' has leading spaces, doesnt affect the strtol.




printf("WG %s..%s..%d\n",programname,programnumber,prog);

$darktable 
WG demosaic_ppg.cl..    0..0
WG atrous.cl..          1..1
WG basic.cl..           2..2
WG blendop.cl..         3..3
WG highpass.cl..        4..4
WG nlmeans.cl..         5..5
WG gaussian.cl..        6..6
WG sharpen.cl..         7..7
WG extended.cl..        8..8
WG soften.cl..          9..9
WG bilateral.cl..       10..10
WG denoiseprofile.cl..  11..11
Lua enabled



kind regards
Wolfgang


maybe calling g_strfreev (tokens), but its only allocated once
and discarded at end of program...

i have it locally in my fork, but i'm not sure to push it and issue a
pull request, last time i messed up something... (the snapfix-patch)

diff --git a/src/common/opencl.c b/src/common/opencl.c
index 51496e0..a1f52a1 100644
--- a/src/common/opencl.c
+++ b/src/common/opencl.c
@@ -350,7 +350,7 @@ void dt_opencl_init(dt_opencl_t *cl, const int argc, char *argv[])
         if(confentry[0] == '\0') continue;
 
         const char *programname = NULL, *programnumber = NULL;
-        gchar **tokens = g_strsplit_set(confentry, " \t", 3);
+        gchar **tokens = g_strsplit_set(confentry, " \t", 2);
         if(tokens)
         {
           programname = tokens[0];
@@ -359,6 +359,8 @@ void dt_opencl_init(dt_opencl_t *cl, const int argc, char *argv[])
 
         prog = programnumber ? strtol(programnumber, NULL, 10) : -1;
 
+        printf("WG %s..%s..%d\n",programname,programnumber,prog);
+
         if(!programname || programname[0] == '\0' || prog < 0)
         {
           dt_print(DT_DEBUG_OPENCL, "[opencl_init] malformed entry in programs.conf `%s'; ignoring it!\n", confentry);
[opencl_init] opencl related configuration options:
[opencl_init] 
[opencl_init] opencl: 1
[opencl_init] opencl_library: ''
[opencl_init] opencl_memory_requirement: 768
[opencl_init] opencl_memory_headroom: 300
[opencl_init] opencl_device_priority: '*/!0,*/*/*'
[opencl_init] opencl_size_roundup: 16
[opencl_init] opencl_async_pixelpipe: 0
[opencl_init] opencl_synch_cache: 0
[opencl_init] opencl_number_event_handles: 25
[opencl_init] opencl_micro_nap: 1000
[opencl_init] opencl_use_pinned_memory: 0
[opencl_init] opencl_avoid_atomics: 0
[opencl_init] opencl_omit_whitebalance: 0
[opencl_init] 
[opencl_init] trying to load opencl library: '<system default>'
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device
[opencl_init] device 0 `GeForce GTX 660' has sm_20 support.
[opencl_init] device 0 `GeForce GTX 660' supports image sizes of 32768 x 32768
[opencl_init] device 0 `GeForce GTX 660' allows GPU memory allocations of up to 511MB
[opencl_init] device 0: GeForce GTX 660 
     GLOBAL_MEM_SIZE:          2047MB
     MAX_WORK_GROUP_SIZE:      1024
     MAX_WORK_ITEM_DIMENSIONS: 3
     MAX_WORK_ITEM_SIZES:      [ 1024 1024 64 ]
     DRIVER_VERSION:           319.32
     DEVICE_VERSION:           OpenCL 1.1 CUDA
WG demosaic_ppg.cl..    0..0
[opencl_init] compiling program `demosaic_ppg.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/demosaic_ppg.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/demosaic_ppg.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG atrous.cl..          1..1
[opencl_init] compiling program `atrous.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/atrous.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/atrous.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG basic.cl..           2..2
[opencl_init] compiling program `basic.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/basic.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/basic.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG blendop.cl..         3..3
[opencl_init] compiling program `blendop.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/blendop.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/blendop.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG highpass.cl..        4..4
[opencl_init] compiling program `highpass.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/highpass.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/highpass.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG nlmeans.cl..         5..5
[opencl_init] compiling program `nlmeans.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/nlmeans.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/nlmeans.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG gaussian.cl..        6..6
[opencl_init] compiling program `gaussian.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/gaussian.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/gaussian.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG sharpen.cl..         7..7
[opencl_init] compiling program `sharpen.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/sharpen.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/sharpen.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG extended.cl..        8..8
[opencl_init] compiling program `extended.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/extended.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/extended.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG soften.cl..          9..9
[opencl_init] compiling program `soften.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/soften.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/soften.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG bilateral.cl..       10..10
[opencl_init] compiling program `bilateral.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/bilateral.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/bilateral.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
WG denoiseprofile.cl..  11..11
[opencl_init] compiling program `denoiseprofile.cl' ..
[opencl_fopen_stat] could not open file `/home/goetz/.cache/darktable/cached_kernels_for_GeForceGTX660/denoiseprofile.cl.bin'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `/opt/darktable/share/darktable/kernels/denoiseprofile.cl'
[opencl_build_program] successfully built program
[opencl_build_program] BUILD STATUS: 0
BUILD LOG:


[opencl_build_program] saving binary
[opencl_init] kernel loading time: 0.0305 
[opencl_init] OpenCL successfully initialized.
[opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
[opencl_init]		0	'GeForce GTX 660'
[opencl_init] these are your device priorities:
[opencl_init] 		image	preview	export	thumbnail
[opencl_init]		0	-1	0	0
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is ON.
[opencl_create_kernel] successfully loaded kernel `zero' (0) for device 0
[opencl_create_kernel] successfully loaded kernel `splat' (1) for device 0
[opencl_create_kernel] successfully loaded kernel `blur_line' (2) for device 0
[opencl_create_kernel] successfully loaded kernel `blur_line_z' (3) for device 0
[opencl_create_kernel] successfully loaded kernel `slice' (4) for device 0
[opencl_create_kernel] successfully loaded kernel `slice_to_output' (5) for device 0
[opencl_create_kernel] successfully loaded kernel `gaussian_column_1c' (6) for device 0
[opencl_create_kernel] successfully loaded kernel `gaussian_transpose_1c' (7) for device 0
[opencl_create_kernel] successfully loaded kernel `gaussian_column_4c' (8) for device 0
[opencl_create_kernel] successfully loaded kernel `gaussian_transpose_4c' (9) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_mask_Lab' (10) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_mask_RAW' (11) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_mask_rgb' (12) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_Lab' (13) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_RAW' (14) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_rgb' (15) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_copy_alpha' (16) for device 0
[opencl_create_kernel] successfully loaded kernel `blendop_set_mask' (17) for device 0
[opencl_create_kernel] successfully loaded kernel `lens_distort_bilinear' (18) for device 0
[opencl_create_kernel] successfully loaded kernel `lens_distort_bicubic' (19) for device 0
[opencl_create_kernel] successfully loaded kernel `lens_distort_lanczos2' (20) for device 0
[opencl_create_kernel] successfully loaded kernel `lens_distort_lanczos3' (21) for device 0
[opencl_create_kernel] successfully loaded kernel `lens_vignette' (22) for device 0
[opencl_create_kernel] successfully loaded kernel `clip_and_zoom_demosaic_half_size' (23) for device 0
[opencl_create_kernel] successfully loaded kernel `ppg_demosaic_green' (24) for device 0
[opencl_create_kernel] successfully loaded kernel `green_equilibration' (25) for device 0
[opencl_create_kernel] successfully loaded kernel `pre_median' (26) for device 0
[opencl_create_kernel] successfully loaded kernel `ppg_demosaic_green_median' (27) for device 0
[opencl_create_kernel] successfully loaded kernel `ppg_demosaic_redblue' (28) for device 0
[opencl_create_kernel] successfully loaded kernel `clip_and_zoom' (29) for device 0
[opencl_create_kernel] successfully loaded kernel `border_interpolate' (30) for device 0
[opencl_create_kernel] successfully loaded kernel `color_smoothing' (31) for device 0
[opencl_create_kernel] successfully loaded kernel `pixelmax_first' (32) for device 0
[opencl_create_kernel] successfully loaded kernel `pixelmax_second' (33) for device 0
[opencl_create_kernel] successfully loaded kernel `global_tonemap_reinhard' (34) for device 0
[opencl_create_kernel] successfully loaded kernel `global_tonemap_drago' (35) for device 0
[opencl_create_kernel] successfully loaded kernel `global_tonemap_filmic' (36) for device 0
[opencl_create_kernel] successfully loaded kernel `colorize' (37) for device 0
[opencl_create_kernel] successfully loaded kernel `colorbalance' (38) for device 0
[opencl_create_kernel] successfully loaded kernel `borders_fill' (39) for device 0
[opencl_create_kernel] successfully loaded kernel `overexposed' (40) for device 0
[opencl_create_kernel] successfully loaded kernel `exposure' (41) for device 0
[opencl_create_kernel] successfully loaded kernel `colormapping_histogram' (42) for device 0
[opencl_create_kernel] successfully loaded kernel `colormapping_mapping' (43) for device 0
[opencl_create_kernel] successfully loaded kernel `zonesystem' (44) for device 0
[opencl_create_kernel] successfully loaded kernel `flip' (45) for device 0
[opencl_create_kernel] successfully loaded kernel `levels' (46) for device 0
[opencl_create_kernel] successfully loaded kernel `nlmeans_init' (47) for device 0
[opencl_create_kernel] successfully loaded kernel `nlmeans_dist' (48) for device 0
[opencl_create_kernel] successfully loaded kernel `nlmeans_horiz' (49) for device 0
[opencl_create_kernel] successfully loaded kernel `nlmeans_vert' (50) for device 0
[opencl_create_kernel] successfully loaded kernel `nlmeans_accu' (51) for device 0
[opencl_create_kernel] successfully loaded kernel `nlmeans_finish' (52) for device 0
[opencl_create_kernel] successfully loaded kernel `tonecurve' (53) for device 0
[opencl_create_kernel] successfully loaded kernel `colorout' (54) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_precondition' (55) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_init' (56) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_dist' (57) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_horiz' (58) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_vert' (59) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_accu' (60) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_finish' (61) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_backtransform' (62) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_decompose' (63) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_synthesize' (64) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_reduce_first' (65) for device 0
[opencl_create_kernel] successfully loaded kernel `denoiseprofile_reduce_second' (66) for device 0
[opencl_create_kernel] successfully loaded kernel `lowlight' (67) for device 0
[opencl_create_kernel] successfully loaded kernel `whitebalance_1ui' (68) for device 0
[opencl_create_kernel] successfully loaded kernel `whitebalance_4f' (69) for device 0
[opencl_create_kernel] successfully loaded kernel `whitebalance_1f' (70) for device 0
[opencl_create_kernel] successfully loaded kernel `splittoning' (71) for device 0
[opencl_create_kernel] successfully loaded kernel `colorzones' (72) for device 0
[opencl_create_kernel] successfully loaded kernel `basecurve' (73) for device 0
[opencl_create_kernel] successfully loaded kernel `colorcorrection' (74) for device 0
[opencl_create_kernel] successfully loaded kernel `soften_overexposed' (75) for device 0
[opencl_create_kernel] successfully loaded kernel `soften_hblur' (76) for device 0
[opencl_create_kernel] successfully loaded kernel `soften_vblur' (77) for device 0
[opencl_create_kernel] successfully loaded kernel `soften_mix' (78) for device 0
[opencl_create_kernel] successfully loaded kernel `monochrome_filter' (79) for device 0
[opencl_create_kernel] successfully loaded kernel `monochrome' (80) for device 0
[opencl_create_kernel] successfully loaded kernel `colorin' (81) for device 0
[opencl_create_kernel] successfully loaded kernel `highlights_1f' (82) for device 0
[opencl_create_kernel] successfully loaded kernel `highlights_4f' (83) for device 0
[opencl_create_kernel] successfully loaded kernel `eaw_decompose' (84) for device 0
[opencl_create_kernel] successfully loaded kernel `eaw_synthesize' (85) for device 0
[opencl_create_kernel] successfully loaded kernel `shadows_highlights_mix' (86) for device 0
[opencl_create_kernel] successfully loaded kernel `relight' (87) for device 0
[opencl_create_kernel] successfully loaded kernel `lowpass_mix' (88) for device 0
[opencl_create_kernel] successfully loaded kernel `graduatedndp' (89) for device 0
[opencl_create_kernel] successfully loaded kernel `graduatedndm' (90) for device 0
[opencl_create_kernel] successfully loaded kernel `clip_rotate_bilinear' (91) for device 0
[opencl_create_kernel] successfully loaded kernel `clip_rotate_bicubic' (92) for device 0
[opencl_create_kernel] successfully loaded kernel `clip_rotate_lanczos2' (93) for device 0
[opencl_create_kernel] successfully loaded kernel `clip_rotate_lanczos3' (94) for device 0
[opencl_create_kernel] successfully loaded kernel `vignette' (95) for device 0
[opencl_create_kernel] successfully loaded kernel `colisa' (96) for device 0
[opencl_create_kernel] successfully loaded kernel `highpass_invert' (97) for device 0
[opencl_create_kernel] successfully loaded kernel `highpass_hblur' (98) for device 0
[opencl_create_kernel] successfully loaded kernel `highpass_vblur' (99) for device 0
[opencl_create_kernel] successfully loaded kernel `highpass_mix' (100) for device 0
[opencl_create_kernel] successfully loaded kernel `vibrance' (101) for device 0
[opencl_create_kernel] successfully loaded kernel `sharpen_hblur' (102) for device 0
[opencl_create_kernel] successfully loaded kernel `sharpen_vblur' (103) for device 0
[opencl_create_kernel] successfully loaded kernel `sharpen_mix' (104) for device 0
[opencl_create_kernel] successfully loaded kernel `colorcontrast' (105) for device 0
[opencl_create_kernel] successfully loaded kernel `channelmixer' (106) for device 0
[opencl_create_kernel] successfully loaded kernel `velvia' (107) for device 0

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to