Compiling MUMPS with g95 and MS Visual C

When g95 is ready to use with cl, see:

then it is possible to use it to compile MUMPS. In addition to what is written in

it was necessary to change in Makefile.ini

LIBOTHERS = libf95.lib libgcc.lib -link -LIBPATH:$(LMETISDIR)
OPTF = -O -i4 -fno-underscoring -fcase-upper

The first line give the name the libraries on which g95 depends, the second forces g95 to use no underscores and to write symbols in upper case. On Windows C code in MUMPS expects upper case for Fortran routines.

Then in the makefiles in src, libseq and examples the option -Fo$*.o is unnessary for the g95. Additionally I have not found a way to link with cl, when the main program is written in Fortran. It is also impossible to use g95 as a linker in this case. So, I compile only c_example. This went just fine.

There were warnings during compile

Warning (155): Inconsistent types (REAL(8)/INTEGER(4)) in actual argument lists at (1) and (2)
dmumps_struc_def.o : warning LNK4221: Es wurden keine öffentlichen Symbole gefunden. Zugriff auf archivierten Member wird nicht möglich sein.

but it seems that one can ignore them.

The modified makefiles are in

Comments are closed.