Page 1 of 1

Getting rid of superfluous output

PostPosted: Thu Dec 11, 2014 10:48 am
by naslundx
I've written my own OpenCL program, and when I run it, besides my own output, I always get something like:

Code: Select all
coprthr-1.6.0 (Freewill)
[25372] clmesg info: cmdsched.c(86): cmdqx1: run
[25372] clmesg info: cmdsched.c(86): cmdqx1: run
[25372] clmesg WARNING: command_queue.c(39): __do_create_command_queue_1: cmdq exists
[25372] clmesg WARNING: command_queue.c(39): __do_create_command_queue_1: cmdq exists
[25372] clmesg info: e32pth_engine_needham.c(100): e32_engine_startup: engine is path-through
[25372] clmesg WARNING: e32pth_engine_needham.c(361): hardcoded to devnum=0
[25372] clmesg info: cmdsched.c(181): cmdqx1: shutdown


Is there a way to suppress this clmesg output? I want to automate a couple of runs of this program and save the output without this "noise". The program works as it should.

Re: Getting rid of superfluous output

PostPosted: Sun Jan 17, 2016 10:33 am
by pharaoh
$ COPRTHR_CLMESG_LEVEL=3 ./executable

levels defined in coprthr/include/printcl.h:

#define CL_EMERG "<0>" /* system is unusable */
#define CL_ALERT "<1>" /* action must be taken immediately */
#define CL_CRIT "<2>" /* critical conditions */
#define CL_ERR "<3>" /* error conditions */
#define CL_WARNING "<4>" /* warning conditions */
#define CL_NOTICE "<5"> /* normal but significant condition */
#define CL_INFO "<6>" /* informational */
#define CL_DEBUG "<7>" /* debug-level messages */

or build copthr with appropiate options:

$ ./configure --enable-silent

or

$ ./configure --with-default-clmesg-level=LEVEL