-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
154 lines (99 loc) · 5 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
SME-C compiler from SMECY project
=================================
smecc is a compiler for a C-based internal representation with #pragma
targeting various parallel embedded systems and accelerators.
There is some documentation on the GitHub wiki at
https://github.com/keryell/smecc/wiki
This is funded by the SMECY ARTEMIS European project http://smecy.eu
Ronan KERYELL at silkan DOT com and others
The main idea of this is to be human while be usable as an internal
representation for various tools.
The organization of the directories:
- code : the compiler
- doc : some documentation on the project, such as basic user guide and a
specification of the SME-C
- examples : few examples for testing and demos
- report : the MR1 report internship from Vincent Lanore
- ROSE : information about compiling ROSE Compiler for this project
- runtime : the function helpers to adapt to the various software and
hardware targets
OpenMP back-end:
================
This is an OpenMP emulation of the SME-C #pragma, for example with
parallel sections used to implement pipelined loop streaming.
MCA API back-end:
=================
The MCA API are used to map some SME-C remote computation nodes to MCA
nodes.
The data transfers between the different computing nodes are done by using
unidirectional connection-oriented packet channels between endpoints on
the different nodes.
Since it is impossible to infer the number of processes used by a generic
SME-C program, we rely on a list of node type and instance to be run.
For example
for (int i = 0; i < 10; i++) {
#pragma smecy map(PE,i)
...
will need PE #0 up to #9 to run.
A domain is used for PE, a node number for the instance number and group
of ports for a calling instance.
To test that the following implementation works, there are few example in
smecy/runtime/tests
Linux reference implementation of the MCA API:
----------------------------------------------
* Compiling and installing the Linux implementation of the MCA API:
Get the MCAPI_MRAPI_2.0.1_example/mca-2.0.1 from http://www.multicore-association.org/request_mcapi.php?what=MCAPI
To compile on Debian/unstable 64 bit x86, gcc version 4.7.2 (Debian 4.7.2-5):
Compared to the original source distribution, increase some hard-coded
limitations in mca-2.0.1/mrapi/src/mrapi_impl/mrapi_impl_spec.h:
#define MRAPI_MAX_SEMS 200
#define MRAPI_MAX_SHMEMS 200
#define MRAPI_MAX_RMEMS 200
#define MRAPI_MAX_LOCKS 200
#define MRAPI_MAX_SHARED_LOCKS 320
./configure --prefix=/usr/local/mca-api --enable-debug --with-max_domains=6 --with-max_nodes=32
(There are many other default parameters to tweak according to the
application to run. Look by running ./configure --help)
make CFLAGS="-ggdb -Wall"
This CFLAGS is used to remove -Werror to avoid this compilation error:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I ../../../.. -I../../../../common -I../../../../mrapi/include -I../../../../mrapi/src/mrapi_impl -I../../../../mrapi/src/mrapi_impl/sysvr4 -g -Wall -O3 -ggdb -Wall -Werror -MT mrapi.lo -MD -MP -MF .deps/mrapi.Tpo -c ../../mrapi.c -fPIC -DPIC -o .libs/mrapi.o
../../mrapi.c: In function ‘mrapi_resource_tree_free’:
../../mrapi.c:3166:19: error: variable ‘get_success’ set but not used [-Werror=unused-but-set-variable]
The --enable-debug is to be able to play with mcapi_set_debug_level()
make install
* Using the Linux implementation of the MCA API:
To use it, add the installation bin directory in your PATH, for example
with something like:
PATH=$PATH:/usr/local/mca-api/bin
This makes the mcapi-config command available to give information about
how to use the library for smecc.
The Linux implementation of the MCA API is based on shared memory and
semaphore IPC and is a little bit touchy when things go wrong, with
messages such as:
mrapi_initialize failed status=UNKNOWN ERROR
API call fails with error MCAPI_ERR_NODE_INITFAILED
Shared memory segments and semaphores may stay in a wrong state,
preventing the runtime to run again. These IPC objects can be displayed
with ipcs and from my experience are the ones with a non null key. Then
you can use
ipcrm -M ... -S ...
to remove the objects from their keys. It is more practical to use the
keys instead of the IDs since they keeps their value from one
run... errr... failure to the other one.
It looks like in the current MCA API Linux implementation if 2 different
processes communicates with MCAPI, one of the mcapi_finalize() tends to
fail.
ST/CEA STHORM (ex-P2012) implementation of the MCA API:
-------------------------------------------------------
Get the ST STHORM SDK: sthorm-sdk-2013.1-Linux-x86-Install
Get the CEA MCAPI for STHORM P2012-MCAPI-v0.5-2013.1 (21th February 2013)
at least: p12mcapi_V0.5_2013.1.tar.gz
Initialize the STHORM SDK environment, for example with:
export JAVA_HOME=/usr/lib/jvm/default-java
source ~/sthorm-sdk-2013.1/setup.sh
export P12MCAPI=<where you untar-ed p12mcapi_V0.5_2013.1.tar.gz>/P2012-MCAPI-v0.5-2013.1
# Some Emacs stuff:
### Local Variables:
### mode: flyspell
### ispell-local-dictionary: "american"
### End: