- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I'll just let the code and output speak for itself:
// broken
#define DECLARE_OFFLOADED __attribute__ ((target (mic)))
// working
//#define DECLARE_OFFLOADED
typedef void (init_t) (void);
typedef void (args_t) (void);
typedef void (start_t) (void);
typedef void (eval_all_t) (void);
typedef void (eval_comp_t) (void);
typedef void (eval_rng_t) (void);
typedef void (init_solution_t) (void);
typedef void (jeval_t) (void);
DECLARE_OFFLOADED init_t init;
DECLARE_OFFLOADED args_t args;
DECLARE_OFFLOADED start_t start;
DECLARE_OFFLOADED eval_all_t eval_all;
DECLARE_OFFLOADED eval_comp_t eval_comp;
DECLARE_OFFLOADED eval_rng_t eval_rng;
DECLARE_OFFLOADED init_solution_t init_solution;
DECLARE_OFFLOADED jeval_t jeval;
int main(int argc, char **argv) {
return 0;
}
Compiling this with icc code.c results in several compiler errors:
stochs@pool15:~/src/broken> icc e2l.cc
e2l.cc(19): error: identifier "eval_all_t" is undefined
DECLARE_OFFLOADED eval_all_t eval_all;
^
e2l.cc(21): error: identifier "eval_rng_t" is undefined
DECLARE_OFFLOADED eval_rng_t eval_rng;
^
compilation aborted for e2l.cc (code 2)
... which change if you move the function declarations around, or rename them (or the typedefs).
Compiler version: Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.106 Build 20131008
Can anybody else confirm this? How do you suggest I proceed?
Thanks!
--Apo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is an interesting issue. I do not know what causes the compiler errors yet and submitted this to Development (see internal tracking id below) for further investigation/repair.
In the meantime, declaring them using the offload_attribute appears to work:
#pragma offload_attribute(push, target(mic)) init_t init; args_t args; start_t start; eval_all_t eval_all; eval_comp_t eval_comp; eval_rng_t eval_rng; init_solution_t init_solution; jeval_t jeval; #pragma offload_attribute(pop)
(Internal tracking id: DPD200358208)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
compiler may be undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
may i know the purpose of this program?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page