Compiling MUMPS 4.10.0 Large Memory on Windows

Below I have documented the compilation of MUMPS 4.10.0 with 8 Byte integers on 64-bit Windows. One may need 8 Byte integers in the case of the serial version of MUMPS when the number of entries in the factor is more than 2^32.

METIS

For ordering, I employ METIS and it must be compatible with 8 Byte integers in MUMPS. The description on how to compile such a version of METIS 4.0.3:

Compiling METIS 4 for 64-bit computing with long int

Please note that in Microsoft Visual Studio C++ sizeof(int) == sizeof(long) == 4. Thereafter in order to declare an 8 Byte integer, one has to use __int64 instead of long.

MUMPS Makefile.inc

MUMPS 4.10.0 has file Make.inc/Makefile.WIN.MS-Intel.SEQ that defines on how to compile MUMPS with Visual Studio C++ and Intel Fortran under GNU make. I needed just to make a couple of change in it. I assume that cl and ifort that compile the 64-bit code are already on the path.

Copy Make.inc/Makefile.WIN.MS-Intel.SEQ in the root directory of MUMPS under the name Makefile.inc.

Comment PORD out:

#LPORDDIR = $(topdir)/PORD/lib/
#IPORD = -I$(topdir)/PORD/include/
#PATHPORD = -LIBPATH:$(LPORDDIR)
#LPORD = libpord.lib

Define the METIS library

LMETIS = ../../bin/libmetislm.lib

Define 64-bit MKL libraries

LIBBLAS = mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib

Add -i8 to the Fortran options

OPTF    = -O1 -MD -i8 -Dintel_ -DALLOW_NON_INIT -fpp

8 Byte integers in the C-code

-i8 forces the Fortran compiler to employ 8-Byte integers. Additionally it is also necessary to use 8 Byte integers in the C-code. To this end, change MUMPS_INT in include/mumps_c_types.h to

#define MUMPS_INT __int64

Additionally it was necessary to edit mumps_c.c to change the definition of three variables. They have been defined as int but actually they should have been MUMPS_INT:

__int64 ooc_tmpdirlen;
__int64 ooc_prefixlen;
__int64 write_problemlen;

Compiling

With changes above, make in the root MUMPS directory have successfully build the MUMPS libraries.

23.06.13 Attention: I have a model when MUMPS compiled above crashes. More tests are necessary but I do not have time now.


Comments are closed.