This guide is intended to help current HPCC users get better benchmark performance by utilizing Intel® Math Kernel Library (Intel® MKL).
HPCC stands for High Performance Computing Challenge benchmark and is actually a suite of benchmarks that measure performance of the CPU, memory subsystem and interconnect. It consists of 7 benchmark tests - HPL (High Performance LINPACK), DGEMM (Double-precision GEneral Matrix-Matrix multiply), STREAM, PTRANS (Parallel TRANSpose, Random Access, FFT (Fast Fourier Tranform and communication bandwidth/latency.
This application note was created to help users who benchmark clusters using HPCC to make use of the latest versions of Intel MKL on Linux platforms on Xeon systems. Please note that previous versions of MKL may require other steps to successfully compile and link with HPCC.
Use the following commands to extract the HPCC tar files from the downloaded hpcc-x.x.x.tar.gz.
[shell]$gunzip hpcc-x.x.x.tar.gz $tar -xvf hpcc-x.x.x.tar [/shell] The above will create a directory named hpcc-x.x.x
Make sure that MPI, C++ and FORTRAN compilers are installed and they are in PATH. Also set LD_LIBRARY_PATH to your compiler (C++ and FORTRAN), MPI, and MKL libraries.
Step 4 - Building HPCC
• Build MPI MKL FFTW library.
Change the directory to <your MKL installation>/interfaces/fftw2x_cdft.
From the fftw2x_cdft directory, run the following command:
[shell]$make libintel64 PRECISION=MKL_DOUBLE interface=ilp64[/shell] Here we are building for Intel64 architecture with Intel MPI (default for Makefile, you may use a different mpi), with Intel compilers, DOUBLE precision and ilp64 interface. This will create the MKL MPI FFTW interface library libfftw2x_cdft_DOUBLE_ilp64.a in lib/intel64 directory.
Note: Please note that by setting the interface parameter to ilp64 we require to build the FFTW MPI wrappers which admit 64-bit parameters in their interface to match the calls from HPCC. These 64-bit aware wrappers are not to be used with usual applications complying with traditional FFTW interfaces. Please execute $make to see the full set of options.
• Build FFTW C wrapper library
Change the directory to <your MKL installation>/interfaces/fftw2xc.
Then build the FFTWC wrapper by running the command as below
[shell]$make libintel64 PRECISION=MKL_DOUBLE[/shell] This will create libfftw2xc_intel.a library in <your mkl installation>/lib/intel64 directory
• Build HPCC
Change directory to hpcc-x.x.x/hpl
Create a Makefile from the existing one, for e.g. Make.intel. You can reuse one from the hpl/setup directory.
Edit Make.intel as follows: modify the LAdir, LAlib lines as below to point to MKL libraries. [shell]LAdir = /opt/intel/mkl/lib/intel64
LAlib = -Wl,--start-group $(LAdir)/libfftw2x_cdft_DOUBLE_lp64.a $(LAdir)/libfftw2xc_intel.a $(LAdir)/libmkl_intel_lp64.a $(LAdir)/libmkl_intel_thread.a $(LAdir)/libmkl_core.a $(LAdir)/libmkl_blacs_intelmpi_lp64.a $(LAdir)/libmkl_cdft_core.a -Wl, --end-group -lpthread -lm [/shell] Please make sure to following compiler options on the compile line:
[shell]-DUSING_FFTW -DMKL_INT=long -DLONG_IS_64BITS[/shell] Build HPCC by using
[shell]$make all arch=intel[/shell] This will create an executable with name hpcc in the hpcc-x.x.x directory and a file _hpccinf.txt which is a template input file for hpcc. Rename the file to hpccinf.txt.
Step 5 - Running HPCC
Modify the configuration parameters in hpccinf.txt file.
Run hpcc by executing the following command.
[shell]$mpirun -np 4 hpcc[/shell] hpccinf.txt is the same as standard hpl input file with a few additional lines. Please refer our HPL application note on tuning parameters in the configuration file.
Appendix A - Performance Results
Below are the hpcc benchmark results of Intel Endeavor cluster which can also be found in hpcc website*.
Hi, when i link with intel mkl fft, hpcc can not work when begin StarFFT session..., How can I resolve it.
------------my LAlib------------------
LAlib = -Wl,--start-group $(LAdir)/libmkl_intel_lp64.a $(LAdir)/libmkl_sequential.a $(LAdir)/libmkl_core.a $(LAdir)/libmkl_bl
acs_intelmpi_lp64.a $(LAdir)/libfftw2x_cdft_DOUBLE_ilp64.a $(LAdir)/libfftw2xc_intel.a $(LAdir)/libmkl_cdft_core.a -Wl,--end-group $(LAdi
r)/libiomp5.a -lpthread -lm
------------------------------
HPL_OPTS = -DUSING_FFTW -DMKL_ILP64 -DLONG_IS_64BITS
------------------------------
CCFLAGS = $(HPL_DEFS) $(MKLINCDIR) -O2 -xSSE4.2 -ansi-alias -ip
We have modified this KB to work around for a bug, the memory is allocated with malloc() and de-allocation with fftw_free() in HPCC 1.3.1 and provided the patch to fix the same. Please download and apply the patch and follow the steps in "Build FFTW C wrapper library".
As a side note, the performance figures of STREAM can be increased in Intel architecture by explicitly using the '-opt-streaming-stores always' option of the Intel C Compiler when compiling the STREAM source.
I am using Intel compiler 11.1.072 and corresponding MKL in the compiler directory.
Also MPI is 4.0.0.028.
I tried both HPCC1.4.1 and 1.3.1 with same error
I tried to build HPCC with MKL and msmpi on Windows. I'm using Intel Composer 2011.1.127 and MKL 10.3.1.127 in VS2010. I successfully built fftw2x_cdft_DOUBLE_ilp64.lib and fftw2xc_intel.lib for ilp64 interface.
When I use just two compiler flags /DUSING_FFTW /DMKL_ILP64, everything seems to work fine (the only thing that annoys me that StarFFT gets very memory-consuming). I cannot use /DMKL_INT=long /DLONG_IS_64BITS flags, when I build with these flags the code wouldn't start and the output message I get from HPCC is "No 64-bit integer type available". How do I fix it? And will the solution help me with memory consuming issues?
you build fftw_cdft ilp64, but in the link section you pull in lp64 (not ilp64) for everything.
Could you update the instructions for the 12.0 compilers, intel mpi 4.0.1.007.
could you also include the LAinc parameter and CCFLAGS, etc. Maybe you could post your hpl/Make.intel file.
Thanks,
Roger
Comments
Hi, when i link with intel mkl fft, hpcc can not work when begin StarFFT session..., How can I resolve it.
------------my LAlib------------------
LAlib = -Wl,--start-group $(LAdir)/libmkl_intel_lp64.a $(LAdir)/libmkl_sequential.a $(LAdir)/libmkl_core.a $(LAdir)/libmkl_bl
acs_intelmpi_lp64.a $(LAdir)/libfftw2x_cdft_DOUBLE_ilp64.a $(LAdir)/libfftw2xc_intel.a $(LAdir)/libmkl_cdft_core.a -Wl,--end-group $(LAdi
r)/libiomp5.a -lpthread -lm
------------------------------
HPL_OPTS = -DUSING_FFTW -DMKL_ILP64 -DLONG_IS_64BITS
------------------------------
CCFLAGS = $(HPL_DEFS) $(MKLINCDIR) -O2 -xSSE4.2 -ansi-alias -ip
------------------------------
*** glibc detected *** ./hpcc: double free or corruption (out): 0x00002b81f80007d0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x387e271ce2]
/lib64/libc.so.6(cfree+0x8c)[0x387e27590c]
*** glibc detected *** ./hpcc: double free or corruption (out): 0x00002b409c000700 ***
======= Backtrace: =========
/lib64/libc.so.6[0x387e271ce2]
./hpcc[0x4bfdba]
./hpcc[0x46d636]
./hpcc[0x46d036]
./hpcc[0x46d698]
./hpcc[0x46d04d]
/lib64/libc.so.6(cfree+0x8c)[0x387e27590c]
./hpcc[0x4bfdba]
./hpcc[0x46d636]
*** glibc detected *** ./hpcc: double free or corruption (out): 0x00002b95f8000790 ***
We have modified this KB to work around for a bug, the memory is allocated with malloc() and de-allocation with fftw_free() in HPCC 1.3.1 and provided the patch to fix the same. Please download and apply the patch and follow the steps in "Build FFTW C wrapper library".
--Vipin
Thank you very much!
As a side note, the performance figures of STREAM can be increased in Intel architecture by explicitly using the '-opt-streaming-stores always' option of the Intel C Compiler when compiling the STREAM source.
Hello,
I tested as guided including "Build FFTW C wrapper library" part.
But I still got error as following:
*** glibc detected *** ./hpcc: free(): invalid pointer: 0x0000003ce8352d48 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3ce80722ef]
/lib64/libc.so.6(cfree+0x4b)[0x3ce807273b]
./hpcc[0x4cbb0a]
I am using Intel compiler 11.1.072 and corresponding MKL in the compiler directory.
Also MPI is 4.0.0.028.
I tried both HPCC1.4.1 and 1.3.1 with same error
Thanks
I tried to build HPCC with MKL and msmpi on Windows. I'm using Intel Composer 2011.1.127 and MKL 10.3.1.127 in VS2010. I successfully built fftw2x_cdft_DOUBLE_ilp64.lib and fftw2xc_intel.lib for ilp64 interface.
I link HPCC with
msmpi.lib
fftw2x_cdft_DOUBLE_ilp64.lib
fftw2xc_intel.lib
mkl_blacs_msmpi_ilp64.lib
mkl_cdft_core.lib
mkl_core.lib
mkl_intel_ilp64.lib
mkl_intel_thread.lib
When I use just two compiler flags /DUSING_FFTW /DMKL_ILP64, everything seems to work fine (the only thing that annoys me that StarFFT gets very memory-consuming). I cannot use /DMKL_INT=long /DLONG_IS_64BITS flags, when I build with these flags the code wouldn't start and the output message I get from HPCC is "No 64-bit integer type available". How do I fix it? And will the solution help me with memory consuming issues?
you build fftw_cdft ilp64, but in the link section you pull in lp64 (not ilp64) for everything.
Could you update the instructions for the 12.0 compilers, intel mpi 4.0.1.007.
could you also include the LAinc parameter and CCFLAGS, etc. Maybe you could post your hpl/Make.intel file.
Thanks,
Roger
Would you have the kindness to send me the parameters file used for the test reported in this paga, please?
Thanks in advance
Hi Roger,
The Make.intel is attached in the article attachments section above.
The LAinc and CCLAGS are
LAdir = $(MKL)
LAinc = -I$(MKL)/include
CCFLAGS = $(HPL_DEFS) -DASYOUGO -O2 -xSSE4.2 -ip -ansi-alias -fno-alias -DUSING_FFTW -DMKL_INT=long -L$MKL/lib/intel64 -I$MKL/include/fftw -L$MPI/lib64 -DLONG_IS_64BITS -DRA_SANDIA_OPT2 -DHPCC_FFT_235
We are in the process of updating this article to the latest version of Intel MKL, Compilers and MPI.
Thanks,
Vipin
Hi Anna,
May be this article can be of some help.
http://software.intel.com/en-us/articles/64-bit-int-support-on-win64-mkl/
--Vipin
Pages