From 64106ee98dffa0b215531a02358dc15eca72cf15 Mon Sep 17 00:00:00 2001 From: Konstantinos Krommydas Date: Fri, 22 Nov 2013 13:49:11 -0500 Subject: [PATCH] Modifications to common parameters functionality and main README file. --- README | 7 +++++-- include/common_args.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README b/README index 92e3cbf..cd5651e 100755 --- a/README +++ b/README @@ -86,9 +86,12 @@ General format: ./ [-p -d | -t --] [app-s :integer ID of device in to use : device type to use (0:CPU, 1:GPU, 2:MIC, 3:FPGA) -Example1: ./astar -p 0 -d 0 -- -Example2: ./astar -t 0 -- +Example1: ./astar -p 0 -d 0 -- (selects device with device ID 0 on platform with platform ID 0) +Example2: ./astar -t 0 -- (selects CPU device type on default platform with platform ID 0, if available) +Notes: If no parameters are supplied, default platform ID is 0 and default device type is CPU. + If -t parameter is given, default platform ID 0 is searched for supplied device type . If not available, CPU device type selection will be attempted. + If device ID is unknown, a combination of -p and -t is available to search for device of selected on platform ID . Acknowledgements ---------------- diff --git a/include/common_args.c b/include/common_args.c index 0678ebe..730d4eb 100755 --- a/include/common_args.c +++ b/include/common_args.c @@ -1,6 +1,6 @@ #include "common_args.h" -ocd_options _settings = {0, -1, -1}; +ocd_options _settings = {0, -1, 0}; ocd_requirements _requirements = {0,0,0}; option* _options = NULL; @@ -136,7 +136,7 @@ cl_device_id _ocd_get_device(int platform, int device, cl_int dev_type) err = clGetDeviceIDs(platforms[platform], dev_type, 0, NULL, &nDevices); if(err == CL_DEVICE_NOT_FOUND) { - fprintf(stderr,"No Supported Device Found of Type %d. Falling back to CPU.\n",dev_type); + fprintf(stderr,"No supported device of requested type found. Falling back to CPU.\n"); dev_type = CL_DEVICE_TYPE_CPU; err = clGetDeviceIDs(platforms[platform], dev_type, 0, NULL, &nDevices); if(err == CL_DEVICE_NOT_FOUND){