Software Archive
Read-only legacy content
17060 Discussions

Compiling mpss-3.4.3 from source code on Linux kernel 3.14 and above

Xuhao_C_
Beginner
720 Views

Hello all,

I downloaded mpss-3.4.3 source code from http://registrationcenter.intel.com/irc_nas/6253/mpss-src-3.4.3.tar 

My Linux kernel version is 3.14 and above, so I got compilation errors when compiling the modules.

 

    from /root/mpss-3,4,3/src/mpss-modules-3.4.3/host/linux.c:38:

include/linux/sysfs.h:458:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'

static inline void sysfs_put(struct kernfs_node *kn)

 

There are a bunch of packages in this tarball, and I have no idea in which order I should compile these code and how to install MPSS and setup MIC.

My guess is to compile and install mpss-modules first, and then libscif, and then mpss-coi. After installing these libraries, I would be able to use COI APIs to offload kernel onto MIC. Am I right? 

Thank you.

Best regards,

Xuhao

0 Kudos
5 Replies
Xuhao_C_
Beginner
720 Views

BTW, I do want to install MPSS from the source code version, instead of the build version.

0 Kudos
Frances_R_Intel
Employee
720 Views

When using the prebuilt rpm files, the basic install process is to copy those files from the modules directory that match your kernel version up to the top level directory and then install all the rpms in the top level directory, letting yum or zypper work out the dependencies.

If you want to rebuild from the files in src, you should know that some of the tar files in the src directory build rpms that are not part of the basic install, some of the rpm files required by the basic install contain code that must be built using a cross compiler which isn't available until the MPSS has been installed and some of the rpm files required by the basic install cannot be rebuilt from the files in the src directory because they contain proprietary code.

I could send you a log file from a basic install which would tell you the order in which yum installed the rpm files but if you really want to rebuild as much as possible from src, I would, instead, rebuild the mpss-modules-<version>.rpm and mpss-modules-dev-<version>.rpm files then rebuild all the other rpm files in the top level directory that do not contain cross-compiled or proprietary code, put those files in the top level directory and use yum or zypper to install all the rpm files in that top level directory. Actually, I would recommend against rebuilding everything from scratch but if you are willing to go to all that work, you must have a compelling reason for doing so.

0 Kudos
Xuhao_C_
Beginner
720 Views

Thank you so much for your reply.

Please send me the log.

I also got some questions:

1) which src tar files are required by the basic install, since src tar files may not be one-to-one mapped to rpm files?

2) which parts need a cross compiler to compile? which parts contain proprietary code?

3) Is it possible to port the basic install version onto other OS, e.g. Ubuntu? If possible, how much effort do you think I would pay to make it work?

Frances Roth (Intel) wrote:

When using the prebuilt rpm files, the basic install process is to copy those files from the modules directory that match your kernel version up to the top level directory and then install all the rpms in the top level directory, letting yum or zypper work out the dependencies.

If you want to rebuild from the files in src, you should know that some of the tar files in the src directory build rpms that are not part of the basic install, some of the rpm files required by the basic install contain code that must be built using a cross compiler which isn't available until the MPSS has been installed and some of the rpm files required by the basic install cannot be rebuilt from the files in the src directory because they contain proprietary code.

I could send you a log file from a basic install which would tell you the order in which yum installed the rpm files but if you really want to rebuild as much as possible from src, I would, instead, rebuild the mpss-modules-<version>.rpm and mpss-modules-dev-<version>.rpm files then rebuild all the other rpm files in the top level directory that do not contain cross-compiled or proprietary code, put those files in the top level directory and use yum or zypper to install all the rpm files in that top level directory. Actually, I would recommend against rebuilding everything from scratch but if you are willing to go to all that work, you must have a compelling reason for doing so.

0 Kudos
Xuhao_C_
Beginner
720 Views

My Linux kernel version is 3.14 and above, so I got compilation errors when compiling the modules.

 

    from /root/mpss-3,4,3/src/mpss-modules-3.4.3/host/linux.c:38:

include/linux/sysfs.h:458:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'

static inline void sysfs_put(struct kernfs_node *kn)

0 Kudos
Anselm_B_
Beginner
720 Views

Hello Xuhao,

it is possible and mostly not very complicated to compile the MPSS for another planform then RHEL or SLES. I have ported it for Gentoo and you can maybe use this as a starting point to port it to Ubuntu since the Gentoo build system is very "expressive" and therefore a good way to understand how it works. You can find my work on GitHub: https://github.com/abusse/xeon-phi-overlay

As for the kernel module problem: you can also find a patch in my git repository https://github.com/abusse/xeon-phi-overlay/tree/master/sys-kernel/mpss-modules/files , however I haven't tested it so far because I have not upgraded above kernel 3.9. The main reason for this is that the block device hand trough is not working from kernel version 3.10 and above. So be aware of this, if you intend to use block device hand through you might want to wait until I have sorted out this issue or Intel updates the module.

 

0 Kudos
Reply