Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Compiling OpenMPI for Intel Xeon Phi/MIC
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2014-06-26 16:44:31


Here's what I used to build 1.8.1 with Intel 13.5 recently:

module load compiler/13.5.192
export PATH=/usr/linux-k1om-4.7/bin/:$PATH
../configure --prefix=/path/to/your/ompi/install \
  CC="icc -mmic" CXX="icpc -mmic" \
  --build=x86_64-unknown-linux-gnu --host=x86_64-k1om-linux \
   AR=x86_64-k1om-linux-ar RANLIB=x86_64-k1om-linux-ranlib \
   LD=x86_64-k1om-linux-ld \
   --enable-mpirun-prefix-by-default --disable-io-romio \
   --disable-vt --disable-mpi-fortran \
   --enable-mca-no-build=btl-usnic,btl-openib,common-verbs
make
make install

Problem with this is that you get a mpicc that must run on MIC, while
you want a host-mpicc that generates MIC code.

$ ssh mic0
$ <put your icc compiler stuff in the environment>
$ /path/to/your/ompi/install/bin/mpicc --show
icc -mmic -I/home/goglin/mic/openmpi-1.7.4/build-mic/install/include \
  -pthread -Wl,-rpath -Wl,/home/goglin/mic/openmpi-1.7.4/build-mic/install/lib \
  -Wl,--enable-new-dtags -L/home/goglin/mic/openmpi-1.7.4/build-mic/install/lib \
  -lmpi

Now use the above line as mpicc on the host to build for the MIC. But I
had to append this:

  -Wl,-rpath -Wl,/opt/cluster/intel/composer_xe_2013.5.192/compiler/lib/mic/ \
  -L/opt/cluster/intel/composer_xe_2013.5.192/compiler/lib/mic/

I hoped WRAPPER_* configure variables would help solving all this, but I
couldn't make them work.

Brice

Le 26/06/2014 22:31, Adam Jundt a écrit :
> I'm currently working towards setting up a single node system with a
> xeon phi card. We have intel compilers (v.13.1.3) installed and I was
> able to get the standard openmpi (v1.6.5) to install.
>
> Right now, I am just hoping to run codes natively on the xeon phi.
> When trying to compile a hello world code via "mpicc -mmic hello.c" it
> results in the error:
>
> x86_64-k1om-linux-ld: skipping incompatible
> /ssd/apps/openmpi-intel/lib/libmpi.so when searching for -lmpi
> x86_64-k1om-linux-ld: cannot find -lmpi
>
>
> I'm guessing this is due to not having compiled openmpi with the
> "-mmic" option. Although, attempting to configure openmpi with -mmic
> will fail instantly as the configure attempts to test basic codes with
> "-mmic" on the host processor.
>
> In a couple of threads it was mentioned that people have been able to
> get this to work, but not much detail on how they built openmpi to
> achieve this. Any help is appreciated.
>
> -Adam
> _______________________________________________
> users mailing list
> users_at_[hidden]
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post: http://www.open-mpi.org/community/lists/users/2014/06/24709.php