소스 검색

bcsr test: Fix skip shutdown

Samuel Thibault 5 년 전
부모
커밋
6cc4a12e0f
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      tests/datawizard/bcsr.c

+ 6 - 1
tests/datawizard/bcsr.c

@@ -113,9 +113,14 @@ int main(int argc, char **argv)
 	struct starpu_conf conf;
 	starpu_conf_init(&conf);
 
-	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV || starpu_cpu_worker_get_count() == 0 || starpu_memory_nodes_get_count() > 1)
+	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV)
 		return STARPU_TEST_SKIPPED;
 
+	if (starpu_cpu_worker_get_count() == 0 || starpu_memory_nodes_get_count() > 1) {
+		starpu_shutdown()
+		return STARPU_TEST_SKIPPED;
+	}
+
 	starpu_bcsr_data_register(&bcsr_handle,
 				  STARPU_MAIN_RAM,
 				  NNZ_BLOCKS,