README 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. //
  2. // Copyright 2010 Intel Corporation
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. //
  17. Welcome to RCCE, a communication environment for the SCC processor
  18. ------------------------------------------------------------------
  19. RCCE is designed to run on a variety of platforms including:
  20. * Baremetal on the SCC chip,
  21. * Linux on the SCC chip,
  22. * A functional emulator running on top of OpenMP.
  23. ============ test line ============
  24. This particular release has been validated only for Linux and the
  25. OpenMP emulator (a baremetal build option is available, but has
  26. not been tested). It may seem a bit cumbersome to work with, but
  27. that's so we can replicate the "features" of the SCC chip ... i.e.
  28. once a program runs on the emulator, it's likely to work on real
  29. hardware.
  30. There are several versions of the RCCE library that can be
  31. built with this release. They expose different options ...
  32. * The "gory" interface ... this is the low level interface. It
  33. makes the programmer responsible for declaring and managing
  34. synchronization flags and for managing the on-chip message
  35. passing buffer. This mode gives access to the low level
  36. get/put routines, as well as to the higher level two-sided
  37. send/receive interface.
  38. * The "nongory" interface ... a higher level interface that
  39. hides the particulars of the message passing buffers and
  40. inter-core synchronization from the programmer, including the
  41. management of synchronization flags. This interface does not
  42. give access to the low level put/get routines.
  43. * Big Flags ... each flag used to coordinate interaction
  44. between units of execution (UE) takes up a byte in a single cacheline.
  45. This has lower latency but wastes memory.
  46. * Small flags ... flags are stored in a single bit; many are
  47. packed into a single cache line. A slight hit on latency but
  48. consumes less message passing buffer memory.
  49. * With or without software controlled power management. POWER
  50. MANAGEMENT IS AN EXPERIMENTAL FEATURE THAT HAS NOT BEEN TESTED
  51. AS THOROUGHLY AS THE REST OF THE LIBRARY. FOLLOW THE SPECIAL
  52. INSTRUCTIONS BELOW TO CONFIGURE THE "makeall" SCRIPT TO BUILD
  53. VERSIONS OF THE LIBRARY THAT INCLUDE THE POWER MANAGEMENT API.
  54. You can build all versions of the library supported with this
  55. release, as follows:
  56. 1. Type "./configure <PLATFORM>". This creates file common/symbols
  57. from file common/symbols.in, inserting the proper root of the
  58. directory tree, and also inserting the proper platform (SCC_LINUX,
  59. SCC_BAREMETAL, or emulator). Any existing file common/symbols
  60. will be overwritten, so do not update that file by hand. Instead,
  61. specify details of your build environment in common/symbols.in
  62. The configure utility also specializes the rccerun command (see
  63. below) for the target platform. You may need to make the configure
  64. script executable (type "chmod u+x configure").
  65. To enable RCCE's power management API, you must specify the string
  66. "ADD_POWER_API" as the second parameter on the command line when
  67. you execute the configure script. Because this is an experimental
  68. feature, it is not built by default. See above.
  69. 2. Type "./makeall" to build all libraries. Alternatively you
  70. can build individual libraries by calling make directly.
  71. Type "make usage" to discover the libraries you can build.
  72. The libraries generated by this procedure will be put in the directory
  73. bin/<PLATFORM>
  74. An easy way to test correct operation of the platform is to build and
  75. run a prepackaged RCCE stress test after building the RCCE library:
  76. "./build_stress_test; ./run_stress_test <size>"
  77. where size is -S (small), -M (medium), or -L (large).
  78. A number of applications are included with this release in the
  79. "apps" directory. These include:
  80. * PINGPONG: bounces messages between a pair of UEs
  81. * SHIFT: passes messages around a logical ring of UEs
  82. * STENCIL: solves a simple PDE with a basic stencil code
  83. * SHARE: tests the off-chip shared memory access
  84. * NPB: NAS Parallel Benchmarks, LU and BT
  85. * XHPL: the Linpack benchmark
  86. To build an application, go to the corresponding subdirectory of "apps"
  87. and type "make". It will return a list of options for building
  88. versions of an application. It may be necessary to edit the Makefile
  89. in an application directory if parts of the original RCCE code tree
  90. got moved with respect to each other.
  91. We suggest that you start with PINGPONG, SHIFT, SHARE, and STENCIL and
  92. save the more complex NPB and XHPL for later. The STENCIl directory
  93. contains a few simple variations of the base code that exercise RCCE's
  94. experimental power management API.
  95. See the apps/XHPL directory for instructions on how to build and run
  96. Linpack.
  97. To run an application, you must use the rccerun command. This command
  98. is used to launch Linux jobs on SCC or on the emulator. To run application
  99. APP with P cores, type
  100. "rccerun -nue P -f HOSTFILE APP [application parameters]"
  101. where HOSTFILE contains the list of physical core IDs to be used.
  102. By default, the host file "./hosts/rc.hosts" should be used.
  103. You can see an example of the use of rccerun in the run_stencil and
  104. run_stencil_synch shell scripts in the "apps/STENCIL" directory.
  105. If my_script is a shell script that contains the actual RCCE executable
  106. RCCE_X (which may take application parameters), make sure to execute it as
  107. follows inside the script: "/path_to_RCCE_X/RCCE_X $@" This is necessary
  108. so that all the parameters to the program, including those added by
  109. rccerun, are supplied to the executable.
  110. Example:
  111. Shell script my_script contains executable RCCE_X that expects two
  112. parameters, n and m. Write the script as:
  113. ----------start of my_script---------
  114. line 1
  115. line 2
  116. line ...
  117. ./RCCE_X $@
  118. line ...
  119. ----------end of my_script-----------
  120. To run the code on P cores of the SCC, type
  121. "rccerun -nue P -f HOSTFILE my_script m n"
  122. MANPAGES
  123. This release of RCCE has manpages. To access those manpages, add a path to
  124. your MANPATH as follows:
  125. export MANPATH="<path to where you installed RCCE>/man:${MANPATH}"