- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm tring to compile supersonic(an opensource in-memory database of google) on Xeon Phi with an Makefile:
CC = icc
CFLAGS= -Wall -O2 -g -DNDEBUG -mmic
but after executing "make", yield the following error:
/tmp/iccDgxoGdas_.s: Assembler messages: /tmp/iccDgxoGdas_.s:2189: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:2403: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:3345: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:3559: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:3634: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:3848: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:4284: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:4498: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:4573: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:4787: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:28235: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:28438: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:42077: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:42337: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:42560: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:42820: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:43096: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:43310: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:44296: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:44554: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:44638: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:44852: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:46414: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:46674: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:46758: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:46972: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:47561: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:47821: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:47905: Error: `lfence' is not supported on `k1om' /tmp/iccDgxoGdas_.s:48119: Error: `lfence' is not supported on `k1om' make: *** [../supersonic/base/infrastructure/projector.o] Error 1
but when I compile it with G++ and without option -mmic, it worked.
anybody can explain to me why the errors happens and how to fix them?
and are there any options that are similar to '-mmic' in G++ so that I can compile supersonic with G++ instead of icc?
Thank you very much for any help!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm afraid using a different compiler won't help. I didn't know this before but I just checked it in the Intel® Xeon Phi™ Coprocessor Instruction Set Architecture Reference Manual to be sure - there is no LFENCE instruction on the coprocessor. I think if you tried compiling the code for the host instead of the coprocessor (if you took the -mmic off the command line) you would find that the code would compiler the same as it did using g++. If you tried compiling with g++ for the coprocessor (there is a cross-compiler in /usr/linux-k1om-4.7/bin/ on the host) you will find yourself having the same problem as you did with 'icc -mmic'.
As to what you can do about this - it will really depend on where that lfence is coming from and if the source code provides an alternative. I am kind of suspicious that the assembly code is not being generated correctly - that it isn't really coprocessor code. Perhaps the -mmic is getting lost somewhere?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
quick analysis:
- supersonic depends on Google's glog, gflags and protobuf.
- glog and gflags build for the Xeon Phi
- However, the "lfence" instruction is present as inline assembly in the protobuf code
- The "configure" script for protobuf does not recognize the k1om architecture and detects x86_64 instead - which triggers the inline assembly code
Solution:
- port 'protobuf' to the mic: I am not sure what is needed for this (modify the config.sub code? specify an architecture flag?)
- then recompile the supersonic code again, and override the location of the glog, gflags and protobuf libraries using the appropriate environment variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, yes. Thank you, Jan Just K., for pointing out that this code uses a configure script. Perhaps this comment, describing how to modify your environment and 'gnu-configurize' the script.will help - https://software.intel.com/en-us/forums/topic/401046#comment-1786509.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan Just K. wrote:
quick analysis:
- supersonic depends on Google's glog, gflags and protobuf.
- glog and gflags build for the Xeon Phi
- However, the "lfence" instruction is present as inline assembly in the protobuf code
- The "configure" script for protobuf does not recognize the k1om architecture and detects x86_64 instead - which triggers the inline assembly code
Solution:
- port 'protobuf' to the mic: I am not sure what is needed for this (modify the config.sub code? specify an architecture flag?)
- then recompile the supersonic code again, and override the location of the glog, gflags and protobuf libraries using the appropriate environment variables.
Thanks very much for your reply, your solution sounds reasonable, I will try and see whether it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Frances Roth (Intel) wrote:
Ah, yes. Thank you, Jan Just K., for pointing out that this code uses a configure script. Perhaps this comment, describing how to modify your environment and 'gnu-configurize' the script.will help - https://software.intel.com/en-us/forums/topic/401046#comment-1786509.
Okey, Thank you very much Frances, I will try whether it help.
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page