Browse Source

Added run script, fix for cpu cfd benchmark

Fixed the initialization of the OCL platform in order to take into
consideration the right one
Andrea Gussoni 8 years ago
parent
commit
44d1e5e83f
2 changed files with 17 additions and 2 deletions
  1. 2 2
      opencl/cfd/CLHelper.h
  2. 15 0
      opencl/cfd/run-cpu

+ 2 - 2
opencl/cfd/CLHelper.h

@@ -340,7 +340,7 @@ void _clInit(string device_type, int device_id)throw(string){
         throw (string("InitCL()::Error: Getting platform ids (clGetPlatformIDs)"));
 
     // Select the target platform. Default: first platform 
-    targetPlatform = allPlatforms[0];
+    targetPlatform = allPlatforms[1];
     for (int i = 0; i < numPlatforms; i++)
     {
         char pbuff[128];
@@ -352,7 +352,7 @@ void _clInit(string device_type, int device_id)throw(string){
         if (resultCL != CL_SUCCESS)
             throw (string("InitCL()::Error: Getting platform info (clGetPlatformInfo)"));
 
-		//printf("vedor is %s\n",pbuff);
+		printf("vedor is %s\n",pbuff);
 #ifdef	DEV_INFO
 	std::cout<<"--cambine: vedor is: "<<pbuff<<std::endl;
 #endif

+ 15 - 0
opencl/cfd/run-cpu

@@ -0,0 +1,15 @@
+#There are three datasets:
+
+#./euler3d ../../data/cfd/fvcorr.domn.097K   0
+#./euler3d ../../data/cfd/fvcorr.domn.193K   
+#./euler3d ../../data/cfd/missile.domn.0.2M  
+
+#replace euler3d with other CFD programs
+
+
+#for ((  i=1;  i<=1;  i++))
+#do
+#  ./euler3d ../../data/cfd/fvcorr.domn.097K -t cpu -d 0
+#  ./euler3d ../../data/cfd/fvcorr.domn.097K 1
+#done
+./euler3d ../../data/cfd/missile.domn.0.2M -t cpu -d 0