Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  printf("%s: Hello World from '%s', MIC-card#%d out of %d !! The # of threads = %d and count = %d\n",
         argv[0], hostname, devnum, numdevs, maxth, count);
} 

Compilation & linking sequence is as follows :

module purge
module load intel/14.0.1 mkl/11.1.1 intelmpi/4.1.3
module list
set -xe
mpiicc -openmp hello4.c -o hello4_offload.x
ldd ./hello4_offload.x

And typival output looks something like this :

Currently Loaded Modules:
  1) intel/14.0.1    2) mkl/11.1.1    3) intelmpi/4.1.3
+ mpiicc -openmp hello4.c -o hello4_offload.x
+ ldd ./hello4_offload.x
        linux-vdso.so.1 =>  (0x00007fff775ee000)
        libmpigf.so.4 => /appl/opt/cluster_studio_xe2013/impi/4.1.3.045/intel64/lib/libmpigf.so.4 (0x00007fa3bab59000)
        libmpi_mt.so.4 => /appl/opt/cluster_studio_xe2013/impi/4.1.3.045/intel64/lib/libmpi_mt.so.4 (0x00007fa3ba4db000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fa3ba2c7000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fa3ba0bf000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa3b9ea1000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fa3b9c1d000)
        libiomp5.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libiomp5.so (0x00007fa3b9902000)
        liboffload.so.5 => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/liboffload.so.5 (0x00007fa3b96d0000)
        libcilkrts.so.5 => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libcilkrts.so.5 (0x00007fa3b9492000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa3b918c000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa3b8f75000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fa3b8be1000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa3bad8b000)
        libimf.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libimf.so (0x00007fa3b8719000)
        libsvml.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libsvml.so (0x00007fa3b7b22000)
        libirng.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libirng.so (0x00007fa3b791b000)
        libintlc.so.5 => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libintlc.so.5 (0x00007fa3b76c4000) 

3.4.3.2 OpenMP4.0 offload version of Fortran DAXPY

...

  deallocate(x,y)

end program main

 

The following sequence of command will compile this Fortran program :

module purge
module load intel/14.0.1 mkl/11.1.1 intelmpi/4.1.3
module list
set -xe
mpif90 -openmp daxpy.F90 -o daxpy.x.omp4
ldd ./daxpy.x.omp4

With typical output being :

Currently Loaded Modules:
  1) intel/14.0.1    2) mkl/11.1.1    3) intelmpi/4.1.3
+ mpif90 -openmp daxpy.F90 -o daxpy.x.omp4
+ ldd ./daxpy.x.omp4
        linux-vdso.so.1 =>  (0x00007fffdaca0000)
        libmpigf.so.4 => /appl/opt/cluster_studio_xe2013/impi/4.1.3.045/intel64/lib/libmpigf.so.4 (0x00007f6dd3b47000)
        libmpi_mt.so.4 => /appl/opt/cluster_studio_xe2013/impi/4.1.3.045/intel64/lib/libmpi_mt.so.4 (0x00007f6dd34c9000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f6dd32b5000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f6dd30ad000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6dd2e8f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f6dd2c0b000)
        libiomp5.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libiomp5.so (0x00007f6dd28f0000)
        liboffload.so.5 => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/liboffload.so.5 (0x00007f6dd26be000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f6dd232a000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6dd2114000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f6dd1e0d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6dd3d79000)
        libimf.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libimf.so (0x00007f6dd1946000)
        libsvml.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libsvml.so (0x00007f6dd0d4e000)
        libirng.so => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libirng.so (0x00007f6dd0b47000)
        libintlc.so.5 => /appl/opt/cluster_studio_xe2013/composer_xe_2013_sp1.1.106/compiler/lib/intel64/libintlc.so.5 (0x00007f6dd08f1000)

3.4.3.3 Important remark on building host CPU offload versions

...

mpiicc -c -openmp main.c foo.c bar.c
xiar -crv libiar.a main.o mainMIC.o foo.o fooMIC.o bar.o barMIC.o # or just: xiar -crv libiar.a *.o
mpiicc main.o -L. -liar -o main_offload.x
ldd main_offload.x