annotate libcilkrts/README @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 Intel(R) Cilk(TM) Plus Runtime Library
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 Index:
kono
parents:
diff changeset
4 1. BUILDING WITH AUTOMAKE
kono
parents:
diff changeset
5 2. BUILDING WITH CMAKE
kono
parents:
diff changeset
6 3. INSTALLING TO VXWORKS
kono
parents:
diff changeset
7 4. USING
kono
parents:
diff changeset
8 5. DOXYGEN DOCUMENTATION
kono
parents:
diff changeset
9 6. QUESTIONS OR BUGS
kono
parents:
diff changeset
10 7. CONTRIBUTIONS
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 #
kono
parents:
diff changeset
13 # 1. BUILDING WITH AUTOMAKE:
kono
parents:
diff changeset
14 #
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 To distribute applications that use the Intel Cilk Plus language
kono
parents:
diff changeset
17 extensions to non-development systems, you need to build the Intel
kono
parents:
diff changeset
18 Cilk Plus runtime library and distribute it with your application.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 To build the libcilkrts.so runtime library component, you need the
kono
parents:
diff changeset
21 autoconf and automake packages, which are available through your
kono
parents:
diff changeset
22 favorite package manager. You also need a C/C++ compiler that
kono
parents:
diff changeset
23 supports the Intel Cilk Plus language extensions, since the runtime
kono
parents:
diff changeset
24 uses Intel Cilk Plus features internally. Use either the Intel(R)
kono
parents:
diff changeset
25 C++ Compiler (icc command) v12.1 or later, or in GCC 4.9 or later
kono
parents:
diff changeset
26 (gcc command).
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 Once you have the necessary prerequisites installed, you can use the
kono
parents:
diff changeset
29 following commands to create the library:
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 % libtoolize
kono
parents:
diff changeset
32 % aclocal
kono
parents:
diff changeset
33 % automake --add-missing
kono
parents:
diff changeset
34 % autoconf
kono
parents:
diff changeset
35 % ./configure
kono
parents:
diff changeset
36 % make
kono
parents:
diff changeset
37 % make install
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 This will produce the libcilkrts.so shared object. To install the
kono
parents:
diff changeset
40 library in a custom location, set the prefix while running the
kono
parents:
diff changeset
41 configure script:
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 % ./configure --prefix=/your/path/to/lib
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 #
kono
parents:
diff changeset
46 # 2. BUILDING WITH CMAKE:
kono
parents:
diff changeset
47 #
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 To distribute applications that use the Intel Cilk Plus language
kono
parents:
diff changeset
50 extensions to non-development systems, you need to build the Intel
kono
parents:
diff changeset
51 Cilk Plus runtime library and distribute it with your application.
kono
parents:
diff changeset
52 This instruction describes the build process using CMake*, which
kono
parents:
diff changeset
53 supports Linux*, Windows*, and OS X*. It is fine to use this process
kono
parents:
diff changeset
54 to build a Linux library, but it is highly recommended to use the
kono
parents:
diff changeset
55 more mature build process described above when building on Linux.
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 You need the CMake tool and a C/C++ compiler that supports the Intel
kono
parents:
diff changeset
58 Cilk Plus language extensions, and the requirements for each operating
kono
parents:
diff changeset
59 systems are:
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 Common:
kono
parents:
diff changeset
62 CMake 3.0.0 or later
kono
parents:
diff changeset
63 Make tools such as make (Linux, OS X) or nmake (Windows)
kono
parents:
diff changeset
64 Linux:
kono
parents:
diff changeset
65 GCC* 4.9.2 or later, or Intel(R) C++ Compiler v12.1 or later
kono
parents:
diff changeset
66 Windows:
kono
parents:
diff changeset
67 Intel C++ Compiler v12.1 or later
kono
parents:
diff changeset
68 Visual Studio* 2010 or later
kono
parents:
diff changeset
69 OS X:
kono
parents:
diff changeset
70 Cilk-enabled branch of Clang*/LLVM* (http://cilkplus.github.io),
kono
parents:
diff changeset
71 or Intel C++ Compiler v12.1 or later
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 The common steps to build the libraries are 1) invoke cmake with
kono
parents:
diff changeset
74 appropriate options, 2) invoke a make tool available on the system.
kono
parents:
diff changeset
75 The following examples show build processes on OS X and Windows.
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 OS X:
kono
parents:
diff changeset
78 % mkdir ./build && cd ./build
kono
parents:
diff changeset
79 % cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
kono
parents:
diff changeset
80 -DCMAKE_INSTALL_PREFIX=./install ..
kono
parents:
diff changeset
81 % make && make install
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 Windows:
kono
parents:
diff changeset
84 % mkdir .\build && cd .\build
kono
parents:
diff changeset
85 % cmake -G "NMake Makefiles" -DCMAKE_C_COMPILER=icl \
kono
parents:
diff changeset
86 -DCMAKE_CXX_COMPILER=icl -DCMAKE_INSTALL_PREFIX=.\install ..
kono
parents:
diff changeset
87 % nmake && nmake install
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 #
kono
parents:
diff changeset
90 # 3. INSTALLING TO VXWORKS OS
kono
parents:
diff changeset
91 #
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 For Windows host, run VxWorks_Install.bat.
kono
parents:
diff changeset
94 For Linux host, run VxWorks_Install.sh.
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 You may need to give environment variable WIND_BASE to indicate VxWorks
kono
parents:
diff changeset
97 installation path.
kono
parents:
diff changeset
98
kono
parents:
diff changeset
99 Create a VSB project, and you will see a layer named "CILKPLUS_KERNEL".
kono
parents:
diff changeset
100 Enable it and build the project.
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 Create a VIP project with ICC and add component INCLUDE_CILKPLUS, then you
kono
parents:
diff changeset
103 will get support of Intel Cilk Plus features in VxWorks.
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 #
kono
parents:
diff changeset
106 # 4. USING:
kono
parents:
diff changeset
107 #
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 The Intel(R) C++ Compiler will automatically try to bring in the
kono
parents:
diff changeset
110 Intel Cilk Plus runtime in any program that uses the relevant
kono
parents:
diff changeset
111 features. GCC and Clang requires an explicit compiler option,
kono
parents:
diff changeset
112 -fcilkplus, to enable Intel Cilk Plus language extensions.
kono
parents:
diff changeset
113 For example,
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 % gcc -fcilkplus -o foo.exe foo.c
kono
parents:
diff changeset
116 % clang -fcilkplus -o foo.exe foo.c
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 Older GCC versions (e.g., 4.8 cilkplus branch) requires explicit linking
kono
parents:
diff changeset
119 of both the library and its dependencies (libpthread, libdl).
kono
parents:
diff changeset
120 For example:
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 % gcc foo.c -lcilkrts -lpthread -ldl
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 #
kono
parents:
diff changeset
125 # 5. DOXYGEN DOCUMENTATION:
kono
parents:
diff changeset
126 #
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 The library source has Doxygen markup. Generate HTML documentation
kono
parents:
diff changeset
129 based on the markup by changing directory into runtime and running:
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 % doxygen doxygen.cfg
kono
parents:
diff changeset
132
kono
parents:
diff changeset
133 #
kono
parents:
diff changeset
134 # 6. QUESTIONS OR BUGS:
kono
parents:
diff changeset
135 #
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 Issues with the Intel Cilk Plus runtime can be addressed in the Intel
kono
parents:
diff changeset
138 Cilk Plus forums:
kono
parents:
diff changeset
139 http://software.intel.com/en-us/forums/intel-cilk-plus/
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 #
kono
parents:
diff changeset
142 # 7. CONTRIBUTIONS:
kono
parents:
diff changeset
143 #
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 The Intel Cilk Plus runtime library is dual licensed. The upstream copy
kono
parents:
diff changeset
146 of the library is maintained via the BSD-licensed version available at:
kono
parents:
diff changeset
147 http://cilkplus.org/
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 Changes to the Intel Cilk Plus runtime are welcome and should be
kono
parents:
diff changeset
150 contributed to the upstream version via http://cilkplus.org/.
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 Thanks to Tobias Burnus for showing us the magic to make gcc and g++
kono
parents:
diff changeset
153 automatically include the Cilk Plus runtime.
kono
parents:
diff changeset
154
kono
parents:
diff changeset
155 Thanks to Eric Olson for sharing his patch for Raspberry Pi* with us.
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 Thanks to Rainer Orth for submitting patches for exception handling and
kono
parents:
diff changeset
158 enabling Cilk Plus on the SPARC* architecture.
kono
parents:
diff changeset
159
kono
parents:
diff changeset
160 ------------------------
kono
parents:
diff changeset
161 Intel and Cilk are trademarks of Intel Corporation in the U.S. and/or
kono
parents:
diff changeset
162 other countries.
kono
parents:
diff changeset
163
kono
parents:
diff changeset
164 *Other names and brands may be claimed as the property of others.