environment.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2014 INRIA
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #include <starpu.h>
  17. #include "../helper.h"
  18. #include <stdlib.h>
  19. #include <stdio.h>
  20. #if !defined(STARPU_OPENMP)
  21. int main(int argc, char **argv)
  22. {
  23. return STARPU_TEST_SKIPPED;
  24. }
  25. #else
  26. int
  27. main (int argc, char *argv[])
  28. {
  29. setenv("OMP_DYNAMIC","false", 1);
  30. setenv("OMP_NESTED","false", 1);
  31. setenv("OMP_SCHEDULE","auto", 1);
  32. setenv("OMP_STACKSIZE","2M", 1);
  33. setenv("OMP_WAIT_POLICY","passive", 1);
  34. setenv("OMP_THREAD_LIMIT","0", 1);
  35. setenv("OMP_MAX_ACTIVE_LEVELS","4", 1);
  36. setenv("OMP_CANCELLATION","false", 1);
  37. setenv("OMP_DEFAULT_DEVICE","0", 1);
  38. setenv("OMP_PROC_BIND","spread, spread, close", 1);
  39. setenv("OMP_NUM_THREADS","4, 16, 2", 1);
  40. setenv("OMP_PLACES","{1,2,3,4},{5,6,7,8}", 1);
  41. setenv("OMP_DISPLAY_ENV","verbose", 1);
  42. int ret = starpu_omp_init();
  43. STARPU_CHECK_RETURN_VALUE(ret, "starpu_omp_init");
  44. starpu_omp_shutdown();
  45. return 0;
  46. }
  47. #endif