Browse Source

Don't abort if DRAM energy measurement is not available

Samuel Thibault 4 years ago
parent
commit
62e59e7e41
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/core/perfmodel/energy_model.c

+ 6 - 0
src/core/perfmodel/energy_model.c

@@ -266,6 +266,12 @@ static int add_event(int eventSet, int socket)
 		retval = PAPI_add_named_event(eventSet, buf);
 		if (retval != PAPI_OK)
 		{
+			if (!strcmp(event_names[i], "rapl::RAPL_ENERGY_DRAM:cpu=%d"))
+			{
+				/* Ok, too bad */
+				_STARPU_DISP("Note: DRAM energy measurement not available\n");
+				return PAPI_OK;
+			}
 			_STARPU_DISP("cannot add event '%s': %d\n", buf, retval);
 			return retval;
 		}