I have looked through the mlnx_add_kernel_support.sh and mlnxofedinstall to try get this to install properly. So far I have been unsuccessful.
I have successfully installed ofed on the following kernel:
4.1.12-32.1.2.el7uek.x86_64
This is the kernel that gets the magic number issue and I don't have control over changing this number format.
4.1.12-32.el7uek-axnp.debug.070000.009400
mlx_compat: version magic '4.1.12-32.el7uek-axnp.debug SMP mod_unload ' should be '4.1.12-32.el7uek-axnp.debug.070000.009400 SMP mod_unload '
It looks like "mlnx_add_kernel_support.sh" has a kernel name format requirement. Can you point to the area of the script that does this. I found the uname portion, but it just reads in the kernel number and uses it. It doesn't manipulate it.