MDRUN segfaults on Intel64 platform due to using wrong data type in MKL FFT
I faced segfault in MDRUN on Intel64 platform with MKL FFT.
I think why it crashes is MKL FFT expects "long" as some arguments while Gromacs passes "int" as arguments.
On 32bit Linux machine, Both "int" and "long" are 32bit and it will run without problem. But 64bit Linux machine often defines "int" as 32bit while "long" as 64bit.
I fixed gmx_fft_mkl.c file and attached it.
I tested this fix with MKL 9.0 and MKL 10.0.
MKL10.0 defines "MKL_LONG" datatype in include file to support ILP64 mode of MKL.
In ILP64 mode MKL_LONG is defined as 64bit int. In LP64 mode (MKL default) it is defined as long.
In MKL 9.0 or lower version, "MKL_LONG" is not defined. So I defined MKL_LONG as long in gms_fft_mkl.c if MKL_LONG is not defined.
The file may violate coding rule of Gromacs, So it need to be reviewed and to be rewritten.