Makefile.inc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #
  2. # This file is part of MUMPS 5.1.2, released
  3. # on Mon Oct 2 07:37:01 UTC 2017
  4. #
  5. ################################################################################
  6. #
  7. # Makefile.inc.generic
  8. #
  9. # This defines some parameters dependent on your platform; you should
  10. # look for the approriate file in the directory ./Make.inc/ and copy it
  11. # into a file called Makefile.inc. For example, from the MUMPS root
  12. # directory, use
  13. # "cp Make.inc/Makefile.inc.generic ./Makefile.inc"
  14. # (see the main README file for details)
  15. #
  16. # If you do not find any suitable Makefile in Makefile.inc, use this file:
  17. # "cp Make.inc/Makefile.inc.generic ./Makefile.inc" and modify it according
  18. # to the comments given below. If you manage to build MUMPS on a new platform,
  19. # and think that this could be useful to others, you may want to send us
  20. # the corresponding Makefile.inc file.
  21. #
  22. ################################################################################
  23. ########################################################################
  24. #Begin orderings
  25. #
  26. # NOTE that PORD is distributed within MUMPS by default. It is recommended to
  27. # install other orderings. For that, you need to obtain the corresponding package
  28. # and modify the variables below accordingly.
  29. # For example, to have Metis available within MUMPS:
  30. # 1/ download Metis and compile it
  31. # 2/ uncomment (suppress # in first column) lines
  32. # starting with LMETISDIR, LMETIS
  33. # 3/ add -Dmetis in line ORDERINGSF
  34. # ORDERINGSF = -Dpord -Dmetis
  35. # 4/ Compile and install MUMPS
  36. # make clean; make (to clean up previous installation)
  37. #
  38. # Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 6.0 and later) orderings are recommended.
  39. #
  40. SCOTCHDIR = /usr
  41. ISCOTCH = -I$(SCOTCHDIR)/include/scotch
  42. #
  43. # You have to choose one among the following two lines depending on
  44. # the type of analysis you want to perform. If you want to perform only
  45. # sequential analysis choose the first (remember to add -Dscotch in the ORDERINGSF
  46. # variable below); for both parallel and sequential analysis choose the second
  47. # line (remember to add -Dptscotch in the ORDERINGSF variable below)
  48. LSCOTCH = -L$(SCOTCHDIR)/lib -lesmumps -lbz2 -lz -lscotch -lscotcherr
  49. #LSCOTCH = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr
  50. LPORDDIR = $(topdir)/PORD/lib/
  51. IPORD = -I$(topdir)/PORD/include/
  52. LPORD = -L$(LPORDDIR) -lpord
  53. LMETISDIR = /usr/lib
  54. IMETIS = -I/usr/include/metis
  55. # You have to choose one among the following two lines depending on
  56. # the type of analysis you want to perform. If you want to perform only
  57. # sequential analysis choose the first (remember to add -Dmetis in the ORDERINGSF
  58. # variable below); for both parallel and sequential analysis choose the second
  59. # line (remember to add -Dparmetis in the ORDERINGSF variable below)
  60. LMETIS = -L$(LMETISDIR) -lmetis
  61. #LMETIS = -L$(LMETISDIR) -lparmetis -lmetis
  62. # The following variables will be used in the compilation process.
  63. # Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
  64. # If you want to use Metis 4.X or an older version, you should use -Dmetis4 instead of -Dmetis
  65. # or in addition with -Dparmetis (if you are using parmetis 3.X or older).
  66. #ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
  67. ORDERINGSF = -Dscotch -Dmetis -Dpord
  68. ORDERINGSC = $(ORDERINGSF)
  69. LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
  70. IORDERINGSF = $(ISCOTCH)
  71. IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
  72. #End orderings
  73. ########################################################################
  74. ########################################################################
  75. # DEFINE HERE SOME COMMON COMMANDS, THE COMPILER NAMES, ETC...
  76. # PLAT : use it to add a default suffix to the generated libraries
  77. PLAT =
  78. # Library extension, + C and Fortran "-o" option
  79. # may be different under Windows
  80. LIBEXT = .so
  81. OUTC = -o
  82. OUTF = -o
  83. # RM : remove files
  84. RM = /bin/rm -f
  85. # CC : C compiler
  86. CC = mpicc
  87. # FC : Fortran 90 compiler
  88. FC = mpif90
  89. # FL : Fortran linker
  90. FL = mpif90
  91. # AR : Archive object in a library
  92. # keep a space at the end if options have to be separated from lib name
  93. AR = $(CC) -shared $(OPTC) -o
  94. # RANLIB : generate index of an archive file
  95. # (optionnal use "RANLIB = echo" in case of problem)
  96. # RANLIB = ranlib
  97. RANLIB = echo
  98. # DEFINE HERE YOUR LAPACK LIBRARY
  99. #LAPACK = -llapack
  100. # SCALAP should define the SCALAPACK and BLACS libraries.
  101. SCALAP = -lscalapack -llapack
  102. # INCLUDE DIRECTORY FOR MPI
  103. INCPAR = -I/usr/include/openmpi
  104. # LIBRARIES USED BY THE PARALLEL VERSION OF MUMPS: $(SCALAP) and MPI
  105. LIBPAR = $(SCALAP) -L/usr/lib/openmpi -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
  106. # The parallel version is not concerned by the next two lines.
  107. # They are related to the sequential library provided by MUMPS,
  108. # to use instead of ScaLAPACK and MPI.
  109. INCSEQ = -I$(topdir)/libseq
  110. LIBSEQ = -L$(topdir)/libseq -lmpiseq
  111. # DEFINE HERE YOUR BLAS LIBRARY
  112. LIBBLAS = -lblas
  113. # DEFINE YOUR PTHREAD LIBRARY
  114. LIBOTHERS = -lpthread
  115. # FORTRAN/C COMPATIBILITY:
  116. # Use:
  117. # -DAdd_ if your Fortran compiler adds an underscore at the end
  118. # of symbols,
  119. # -DAdd__ if your Fortran compiler adds 2 underscores,
  120. #
  121. # -DUPPER if your Fortran compiler uses uppercase symbols
  122. #
  123. # leave empty if your Fortran compiler does not change the symbols.
  124. #
  125. CDEFS = -DAdd_
  126. #COMPILER OPTIONS
  127. OPTF = -DALLOW_NON_INIT ${CFLAGS} -fPIC -fallow-argument-mismatch
  128. OPTC = ${CFLAGS} -fPIC
  129. OPTL = ${CFLAGS} -fPIC
  130. # CHOOSE BETWEEN USING THE SEQUENTIAL OR THE PARALLEL VERSION.
  131. #Sequential:
  132. #INCS = $(INCSEQ)
  133. #LIBS = $(LIBSEQ)
  134. #LIBSEQNEEDED = libseqneeded
  135. #Parallel:
  136. INCS = $(INCPAR)
  137. LIBS = $(LIBPAR)
  138. LIBSEQNEEDED =