Software Archive
Read-only legacy content
17061 Discussions

Seismic Unix Package compilation for MIC

Abhishek_S_7
Beginner
967 Views

I am trying to compile Seismic Unix Pakage from CWP but while compiling it generates mic executable which is not executed on Xeon. Do anyone have have experience for Seismic Unix compilation for MIC. Any help will be appriciated.

Regards,

Abhishek S.

0 Kudos
6 Replies
Gregg_S_Intel
Employee
967 Views

So do I understand correctly, you cross-compiled with Intel compiler "-mmic" option and now you're ready to run?  If so, NFS mount your installation on the coprocessor, and launch it from the coprocessor.

Gregg Skinner

0 Kudos
Frances_R_Intel
Employee
967 Views

I think we need more information to understand better what you are trying to do.

Are you trying to generate a library that can be linked with both Intel(r) Xeon(r) processor code and with Intel(r) Xeon Phi(tm) coprocessor code? Or are you trying to use a library that you intentionally generated to run with coprocessor code only?   Or are you trying to generate a library that will offload some of the work to the coprocessor and do some of the work on the host processor?

If your question is about trying to make a library that can be used with either host or coprocessor code, you will want to create two separate libraries, one compiled with -mmic and one compiled without -mmic.

If you are trying to use a library that you intentionally generated to run with the coprocessor code then you can either NFS mount the directory containing the library onto the coprocessor, as Gregg suggests - the preferred solution in general, or, if you do not have administrative priviledges or don't want to do the NFS mount, you can copy the library over to the coprocessor with scp and then set your LD_LIBRARY_PATH on the coprocessor to point to that location.

If you are trying to create a library that will offload some of the work to the coprocessor and leave some of the work on the host, that is yet another thing and takes more explanation than goes here.

I would recommend some documentation to you - 

Programming and Compiling for Intel® Many Integrated Core Architecture http://software.intel.com/en-us/articles/programming-and-compiling-for-intel-many-integrated-core-architecture

Intel® Xeon Phi™ Coprocessor Developer's Quick Start Guide http://software.intel.com/en-us/articles/intel-xeon-phi-coprocessor-developers-quick-start-guide

0 Kudos
Gregg_S_Intel
Employee
967 Views

Ah, I see now the issue is with executables which run during the cross-compile, such as ./mkheader. 

What worked for me was editing src/su/include/Makefile to build an executable for the host, without -mmic. 

That is, I defined CC to be "icc -mmic" globally in Makefile.config, and changed "$(CC)" to "icc" in src/su/include/Makefile.

0 Kudos
Gregg_S_Intel
Employee
967 Views

Another, perhaps better, way to handle this is adding "/opt/intel/mic/bin/micnativeloadex" before each of the four executions in su/include/Makefile.

That is, for example,

/opt/intel/mic/bin/micnativeloadex ./mkheader >header.h

0 Kudos
Abhishek_S_7
Beginner
967 Views

Thanks Gregg for understanding my problem :) and your solution worked for me.

0 Kudos
James_C_Intel2
Employee
967 Views

It seems to me that you are asking exactly the question that is described and answered at "Problem building for MIC as build process needs to execute binaries".  

0 Kudos
Reply