mic_scc_support.doxy 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \page MICSCCSupport MIC/SCC Support
  9. \section Compilation Compilation
  10. SCC support just needs the presence of the RCCE library.
  11. MIC support actually needs two compilations of StarPU, one for the host and one for
  12. the device. The script <c>mic-configure</c> can be used to achieve this: it basically
  13. calls <c>configure</c> as appropriate from two new directories: <c>build_mic</c> and
  14. <c>build_host</c>. <c>make</c> and <c>make install</c> can then be used as usual and will
  15. recurse into both directories.
  16. \internal
  17. TODO: move to configuration section?
  18. \endinternal
  19. It can be parameterized with the environment variables \ref
  20. STARPU_MIC_HOST, \ref STARPU_MIC_CC_PATH and \ref STARPU_COI_DIR.
  21. \section PortingApplicationsToMICSCC Porting Applications To MIC/SCC
  22. The simplest way to port an application to MIC/SCC is to set the field
  23. starpu_codelet::cpu_funcs_name, to provide StarPU with the function
  24. name of the CPU implementation. StarPU will thus simply use the
  25. existing CPU implementation (cross-rebuilt in the MIC case). The
  26. functions have to be globally-visible (i.e. not <c>static</c>) for
  27. StarPU to be able to look them up.
  28. For SCC execution, the function starpu_initialize() also has to be
  29. used instead of starpu_init(), so as to pass <c>argc</c> and
  30. <c>argv</c>.
  31. \section LaunchingPrograms Launching Programs
  32. SCC programs are started through RCCE.
  33. MIC programs are started from the host. StarPU automatically
  34. starts the same program on MIC devices. It however needs to get
  35. the MIC-cross-built binary. It will look for the file given by the
  36. environment variable \ref STARPU_MIC_SINK_PROGRAM_NAME or in the
  37. directory given by the environment variable \ref
  38. STARPU_MIC_SINK_PROGRAM_PATH, or in the field
  39. starpu_config::mic_sink_program_path. It will also look in the current
  40. directory for the same binary name plus the suffix <c>-mic</c> or
  41. <c>_mic</c>.
  42. */