浏览代码

Catch more cases of calling the supposed-to-be-renamed main function

Samuel Thibault 5 年之前
父节点
当前提交
f8a1f786b5
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/core/simgrid.c

+ 6 - 1
src/core/simgrid.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2016,2017                                Inria
  * Copyright (C) 2012,2013,2015-2019                      CNRS
- * Copyright (C) 2012-2019                                Université de Bordeaux
+ * Copyright (C) 2012-2020                                Université de Bordeaux
  * Copyright (C) 2013                                     Thibaut Lambert
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -316,6 +316,11 @@ int do_starpu_main(int argc, char *argv[])
 	/* FIXME: Ugly work-around for bug in simgrid: the MPI context is not properly set at MSG process startup */
 	starpu_sleep(0.000001);
 
+	if (!starpu_main)
+	{
+		_STARPU_ERROR("In simgrid mode, the file containing the main() function of this application needs to be compiled with starpu.h or starpu_simgrid_wrap.h included, to properly rename it into starpu_main\n");
+	}
+
 	main_ret = starpu_main(argc, argv);
 	return main_ret;
 }