Offload error

Offload error

Dear all, I'm a novice for MIC programming and I encountered a offload error when I want to run an example code on the host and offload part of the code to MIC cores for multithread-computing based on OpenMP. The offload error is: cannot offload to MIC - device is not available Out cluster has 8 mic nodes with the naming convention of nodeXX-mic0 (XX = 09~16). I think if I want to run the code, I have to specify which node to use, right? How can I do it? I searched for the internet and I didn't find an applicable answer. It would be great if I could get your help. For your convenience, part of the sample code is attached. Thanks very much. #include #include #include #include #include #include #define FLOPS_ARRAY_SIZE (1024*512) #define MAXFLOPS_ITERS 100000000 #define LOOP_COUNT 128 // Floating pt ops per inner loop iteration #define FLOPSPERCALC 2 // define some arrays - 64 byte aligned for fast cache access __declspec (target (mic)) float fa[FLOPS_ARRAY_SIZE] __attribute__((align(64))); __declspec (target (mic)) float fb[FLOPS_ARRAY_SIZE] __attribute__((align(64))); // int main(int argc, char *argv[] ) { ....... // // initialize the compute arrays // #pragma offload target (mic) #pragma omp parallel #pragma omp master numthreads = omp_get_num_threads(); printf("Initializing\r\n"); #pragma omp parallel for for(i=0; i

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

The error you encountered occurs because by default the program is built with “mandatory” offload; meaning, when no coprocessor is available for offload, the program issues the error you received and exits. So, for whatever the reason (coprocessors were not booted? or were not properly acquired?) there was no coprocessor available to your program when run and therefore it failed to offload.

The #pragma offload does not require specifying a specific coprocessor (i.e. target-number) in the target() clause.  It does afford the ability to provide a target-number which is an integer expression whose value is interpreted as described in the User Guide under the offload pragma description here. This value specified has no relation to coprocessor network (host) name, like the naming convention that you described is used for your cluster.

You should check with your sys-administrator or other users on how to acquire or reserve a specific coprocessor within your cluster for use with offloading. Once you determine how to do that, you should be able to run your offload program.

Just to be sure, you are also running this program on a cluster node with Xeon Phi installed on it (one of the nodeXX-mic machines?).  On those machines, "mic0" usually stands for the first Xeon Phi card installed on that machine, "mic1" for the second, etc.  You can't offload from one machine to a Xeon Phi card on another machine, which is what Kevin is getting at above.

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui