I am having a C code that compiles and runs properly locally on my machine. But when I am trying to compile with the icc and the -mmic flag and test it on Intel Xeon Phi, I am getting the following message:
/cm/local/apps/sge/current/spool/node079/job_scripts/5438755: line 14: ./sequential.mic: cannot execute binary file
I run all my tests in a cluster which uses SGE job submission system.
My makefile contains these lines:
sequential: Makefile
icc -mmic -o sequential.mic sequential.c
qsub sequential.job
The job file for submitting the job is:
#!/bin/sh
#$ -S /bin/sh
#$ -l h_rt=00:10:00
#$ -j y
#$ -l fat,accel=XeoPhi
#$ -cwd
. /etc/bashrc
module load intel/compiler/64/13.3/2013.3.163
./sequential.mic
Notes:
Any suggestions are more than welcome.
As the code needs to run natively on the Intel Xeon Phi, the binary also need t be loaded on the machine ahead of execution.
Therefore, the simplest way to do that is with the following command which loads the binary and then executes.
/usr/bin/micnativeloadex ./sequential.mic