nerscadmin / IPM

Integrated Performance Monitoring for High Performance Computing
http://ipm-hpc.org
GNU Lesser General Public License v2.1
86 stars 36 forks source link

Cross-compilation #17

Closed ghost closed 8 years ago

ghost commented 8 years ago

Dear Scott, Could you, please, be so kind to help me with cross-compilation of IPM to host Intel Xeon Phi 7120?

./configure --prefix=/home/user14/inst/IPM1 --build=MIC --host=MIC --enable-shared CXXFLAGS='-mmic' CPPFLAGS='-mmic' CXX=icpc CC=icc MPICC=mpiicc MPIF77=mpif77 MPIFC=mpiifort FC=ifort FCFLAGS='-mmic' CPP=icc checking build system type... Invalid configuration MIC': machineMIC' not recognized configure: error: /bin/sh ./config.sub MIC failed

thank you...)

swfrench commented 8 years ago

Hi Ordi,

I would recommend following a procedure similar to that described here. Further, it might be best to at least start with disabling shared libraries (i.e. build static only).

Specifically, after running the bootstrap.sh script, run configure with --host set to a dummy argument and specifying placeholder CC, MPICC, and MPIFC variables as follows:

./configure --disable-shared --host=x86_64-unknown-linux-gnu CC="icc -DMIC" MPICC="mpiicc -DMIC" MPIFC="mpiifort -DMIC" 

Then, replace all instances of the no-op -DMIC in the generated Makefiles, like so:

grep -lR DMIC * | xargs sed -i 's/-DMIC/-mmic/g'

After you do this, you should be able to run make and make install as usual. If you find odd behavior with the resulting libraries, you might want to try using some more restrictive optimization flags at build time (via CFLAGS).

Cheers, Scott

ghost commented 8 years ago

Dear Scott, Thank you so much for this instruction! I'll try it as soon, as I can.

Sorry, I'm somehow missed you reply. :(

Best regards, Ordi