MIC linking issues

MIC linking issues

I am getting the incompatibility error while linking a library using -mmic flag. I dont know how to make the piece of code compatible with native mic compilation.

x86_64-k1om-linux-ld: i386:x86-64 architecture of input file `libMisc.a(clock_time.o)' is incompatible with k1om output

//clock_time.c code

#include <time.h>

double MPI_Wtime(void);

double clock_time_()
{
  return MPI_Wtime();
}

 

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Best Reply

There may be more to resolving this since it appears you are using MPI, maybe in native mode, so I may not have all the answers here.
The error you received indicates libMisc.a was not compiled with -mmic but rather it was compiled for the host (x86-64). For the snippet of code you showed, if that is the extent of the libMisc.a, then you could build it for native as follows:

$ icc -V
Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.144 Build 20140120
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

$ icc -c -mmic clock_time.c
$ /usr/linux-k1om-4.7/bin/x86_64-k1om-linux-ar crv libMisc.a clock_time.o
a - clock_time.o

If your interest in using MPI on Xeon Phi™, then you might refer How to run Intel MPI on Xeon Phi. There is a specific the section on Running natively on the Xeon Phi coprocessor that may be of interest.

 

Thank you sir. That was very helpful. I am able to run my application natively on MIC.

I am always amazed about the fact on how fast Intel experts replies to forum queries. Kudos to your whole team of experts !

I am glad to hear that helped.
Thank you for those kind words. We appreciate hearing that!
 

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen