Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-2752

Enhance build for cross compilation for the Intel(R) Xeon Phi(TM) card

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.4.0
    • Lustre 2.4.0
    • None
    • 6682

    Description

      Current Lustre build is not support cross compilation for the
      Intel(R) Xeon Phi(TM) card. So, producing binaries
      for MIC card is not trivial now and required manual changes of
      sources. It would be very beneficial to provide an easy way to
      produce client binaries for the Intel(R) Xeon Phi(TM) card
      directly from GIT repository just specifying appropriate
      --host and --build option for ./configure script.

      For example, to produce Lustre binaries for MIC card just execute
      the following:

      ./configure --host=x86_64-k1om-linux --build=x86_64-pc-linux

      Attachments

        1. config.log
          33 kB
          Dmitry Eremin

        Issue Links

          Activity

            [LU-2752] Enhance build for cross compilation for the Intel(R) Xeon Phi(TM) card

            This patch is required for 2.4 because of assembly code with is not supported by Xeon Phi. Actually tag 2.3.65 also contain the patch. Therefore you can build it without problem. For earlier 2.3 versions most probably you will have a problem with configure. But if you be able to compile this path is not required for functionality.

            dmiter Dmitry Eremin (Inactive) added a comment - This patch is required for 2.4 because of assembly code with is not supported by Xeon Phi. Actually tag 2.3.65 also contain the patch. Therefore you can build it without problem. For earlier 2.3 versions most probably you will have a problem with configure. But if you be able to compile this path is not required for functionality.

            I meant to ask if the solution provided by this LU patch is needed even if I build in a chroot environment populated with those intel-mic-ofed rpms.

            I built lustre-2.3.0 this way before I was aware of this LU ticket. If there was no lustre code changed, my build should be OK, right? The lustre client module was loaded OK.

            jaylan Jay Lan (Inactive) added a comment - I meant to ask if the solution provided by this LU patch is needed even if I build in a chroot environment populated with those intel-mic-ofed rpms. I built lustre-2.3.0 this way before I was aware of this LU ticket. If there was no lustre code changed, my build should be OK, right? The lustre client module was loaded OK.

            Jay, you will note that this patch has been marked as fixed in the 2.4.0 release, so no patch is necessary for that version.

            adilger Andreas Dilger added a comment - Jay, you will note that this patch has been marked as fixed in the 2.4.0 release, so no patch is necessary for that version.

            If I have a chroot environment with
            intel-mic-ofed-kmod-devel
            intel-mic-ofed-libibscif-devel
            and other supportive intel-mic-ofed rpms installed,
            and specify " --with-o2ib=/usr/src/intel-mic-ofed-kmod" as a configure parameter, do I still need this patch? I built a lustre client this way it seemed to build OK.

            jaylan Jay Lan (Inactive) added a comment - If I have a chroot environment with intel-mic-ofed-kmod-devel intel-mic-ofed-libibscif-devel and other supportive intel-mic-ofed rpms installed, and specify " --with-o2ib=/usr/src/intel-mic-ofed-kmod" as a configure parameter, do I still need this patch? I built a lustre client this way it seemed to build OK.

            The config.log of the following command is attached (w/o the patch):

            ./configure --with-linux=/opt/intel/mic/src/card/kernel \
                --disable-server --without-o2ib \
                --host=x86_64-k1om-linux --build=x86_64-pc-linux
            
            dmiter Dmitry Eremin (Inactive) added a comment - The config.log of the following command is attached (w/o the patch): ./configure --with-linux=/opt/intel/mic/src/card/kernel \ --disable-server --without-o2ib \ --host=x86_64-k1om-linux --build=x86_64-pc-linux

            Without http://review.whamcloud.com/5273 patch it doesn't work.

            dmiter Dmitry Eremin (Inactive) added a comment - Without http://review.whamcloud.com/5273 patch it doesn't work.
            adilger Andreas Dilger added a comment - - edited

            Is there actually something that needs to be changed in the Lustre build environment for this to work, or is it working properly with the current --host and --build configure options?

            adilger Andreas Dilger added a comment - - edited Is there actually something that needs to be changed in the Lustre build environment for this to work, or is it working properly with the current --host and --build configure options?
            rread Robert Read added a comment -

            Ah, my mistake: --target is only used when building a cross compiler - it's the architecture that the cross compiler will produce.

            rread Robert Read added a comment - Ah, my mistake: --target is only used when building a cross compiler - it's the architecture that the cross compiler will produce.
            dmiter Dmitry Eremin (Inactive) added a comment - - edited

            You can specify --target option also the same as --host but the --host should be specified to avoid using cross compiler for tests during ./configure script execution.

            dmiter Dmitry Eremin (Inactive) added a comment - - edited You can specify --target option also the same as --host but the --host should be specified to avoid using cross compiler for tests during ./configure script execution.

            I used description from http://www.gnu.org/software/autoconf/manual/automake.html

            2.2.8 Cross-Compilation

            To cross-compile is to build on one platform a binary that will run on another platform. When speaking of cross-compilation, it is important to distinguish between the build platform on which the compilation is performed, and the host platform on which the resulting executable is expected to run. The following configure options are used to specify each of them:

            --build=build
            The system on which the package is built.

            --host=host
            The system where built programs and libraries will run.

            When the --host is used, configure will search for the cross-compiling suite for this platform. Cross-compilation tools commonly have their target architecture as prefix of their name. For instance my cross-compiler for MinGW32 has its binaries called i586-mingw32msvc-gcc, i586-mingw32msvc-ld, i586-mingw32msvc-as, etc.

            dmiter Dmitry Eremin (Inactive) added a comment - I used description from http://www.gnu.org/software/autoconf/manual/automake.html 2.2.8 Cross-Compilation To cross-compile is to build on one platform a binary that will run on another platform. When speaking of cross-compilation, it is important to distinguish between the build platform on which the compilation is performed, and the host platform on which the resulting executable is expected to run. The following configure options are used to specify each of them: --build=build The system on which the package is built. --host=host The system where built programs and libraries will run. When the --host is used, configure will search for the cross-compiling suite for this platform. Cross-compilation tools commonly have their target architecture as prefix of their name. For instance my cross-compiler for MinGW32 has its binaries called i586-mingw32msvc-gcc, i586-mingw32msvc-ld, i586-mingw32msvc-as, etc.

            People

              dmiter Dmitry Eremin (Inactive)
              dmiter Dmitry Eremin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: