Skip to content
Snippets Groups Projects
Commit fdaa40f6 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

Merge branch 'MUMPS' into '2022'

MUMPS

See merge request hps-public/easybuild-repository!1125
parents 6bff35c7 e15469a6
No related branches found
No related tags found
No related merge requests found
name = 'MUMPS'
version = '5.4.1'
homepage = 'http://graal.ens-lyon.fr/MUMPS/'
description = """MUMPS, A parallel sparse direct solver has been installed as module in $EBROOTMUMPS
It contains all precisions and can use SCOTCH as well as ParMETIS.
"""
usage = """There are four MUMPS libraries for the four different precisions:
libsmumps.a for single precision real
libdmumps.a for double precision real
libcmumps.a for single precision complex
libzmumps.a for double precision complex.
"""
examples = """Examples can be found in $EBROOTMUMPS/examples."""
toolchain = {'name': 'gomkl', 'version': '2021b'}
toolchainopts = {'pic': True, 'usempi': True, 'openmp': True}
source_urls = ['http://mumps.enseeiht.fr/']
sources = ['%(name)s_%(version)s.tar.gz']
patches = [
'MUMPS-%(version)s_examples_mkl.patch',
'MUMPS-%(version)s_shared-pord.patch', # builds the shared libs of PORD
'MUMPS-%(version)s_shared-mumps.patch', # builds the shared libs of MUMPS
]
checksums = [
'aa1c53976279922853aaed70deb507b3339de187cc62f4c1d0fd0fadea38529f', # MUMPS_5.4.1.tar.gz
'58cda1412904416075ad11212be6c08f977b120237e0206331c7930763edbe84', # MUMPS-5.4.1_examples_mkl.patch
'5ff803839563190df5c582e60581e54e34475df5ea6fbad01e9f1b89a49836bd', # MUMPS-5.4.1_shared-pord.patch
'30f02a1eab570a0550175afacf7eca095c4a2c7862843fd846033045d401c6da', # MUMPS-5.4.1_shared-mumps.patch
]
dependencies = [
('SCOTCH', '6.1.2'),
('ParMETIS', '4.0.3'),
]
buildopts = 'all SONAME_VERSION="%(version)s"'
parallel = 1
# fix 'Type mismatch between actual argument' errors with GCC 10.x
prebuildopts = 'export FFLAGS="$FFLAGS -fallow-argument-mismatch" && '
modextravars = {
'MUMPS_ROOT': '%(installdir)s',
'MUMPSROOT': '%(installdir)s',
'MUMPS_INCLUDE': '%(installdir)s/include',
'MUMPS_LIB': '%(installdir)s/lib'
}
postinstallcmds = [
"cp -r %(builddir)s/MUMPS_%(version)s/examples %(installdir)s/examples",
"rm %(installdir)s/examples/*.o",
"mv %(installdir)s/examples/Makefile_installed_gnu %(installdir)s/examples/Makefile",
"rm %(installdir)s/examples/Makefile_installed*.orig",
"rm %(installdir)s/examples/Makefile_installed",
"rm %(installdir)s/examples/?simpletest",
"rm %(installdir)s/examples/?simpletest_save_restore",
"rm %(installdir)s/examples/c_example",
"rm %(installdir)s/examples/c_example_save_restore",
"chmod 644 %(installdir)s/examples/*",
]
moduleclass = 'math'
name = 'MUMPS'
version = '5.4.1'
homepage = 'http://graal.ens-lyon.fr/MUMPS/'
description = """MUMPS, A parallel sparse direct solver has been installed as module in $EBROOTMUMPS
It contains all precisions and can use SCOTCH as well as ParMETIS.
"""
usage = """There are four MUMPS libraries for the four different precisions:
libsmumps.a for single precision real
libdmumps.a for double precision real
libcmumps.a for single precision complex
libzmumps.a for double precision complex.
"""
examples = """Examples can be found in $EBROOTMUMPS/examples."""
toolchain = {'name': 'gpsmkl', 'version': '2021b'}
toolchainopts = {'pic': True, 'usempi': True, 'openmp': True}
source_urls = ['http://mumps.enseeiht.fr/']
sources = ['%(name)s_%(version)s.tar.gz']
patches = [
'MUMPS-%(version)s_examples_mkl.patch',
'MUMPS-%(version)s_shared-pord.patch', # builds the shared libs of PORD
'MUMPS-%(version)s_shared-mumps.patch', # builds the shared libs of MUMPS
]
checksums = [
'93034a1a9fe0876307136dcde7e98e9086e199de76f1c47da822e7d4de987fa8', # MUMPS_5.4.1.tar.gz
'58cda1412904416075ad11212be6c08f977b120237e0206331c7930763edbe84', # MUMPS-5.4.1_examples_mkl.patch
'5ff803839563190df5c582e60581e54e34475df5ea6fbad01e9f1b89a49836bd', # MUMPS-5.4.1_shared-pord.patch
'30f02a1eab570a0550175afacf7eca095c4a2c7862843fd846033045d401c6da', # MUMPS-5.4.1_shared-mumps.patch
]
dependencies = [
('SCOTCH', '6.1.2'),
('ParMETIS', '4.0.3'),
]
buildopts = 'all SONAME_VERSION="%(version)s"'
parallel = 1
# fix 'Type mismatch between actual argument' errors with GCC 10.x
prebuildopts = 'export FFLAGS="$FFLAGS -fallow-argument-mismatch" && '
modextravars = {
'MUMPS_ROOT': '%(installdir)s',
'MUMPSROOT': '%(installdir)s',
'MUMPS_INCLUDE': '%(installdir)s/include',
'MUMPS_LIB': '%(installdir)s/lib'
}
postinstallcmds = [
"cp -r %(builddir)s/MUMPS_%(version)s/examples %(installdir)s/examples",
"rm %(installdir)s/examples/*.o",
"mv %(installdir)s/examples/Makefile_installed_gnu %(installdir)s/examples/Makefile",
"rm %(installdir)s/examples/Makefile_installed*.orig",
"rm %(installdir)s/examples/Makefile_installed",
"rm %(installdir)s/examples/?simpletest",
"rm %(installdir)s/examples/?simpletest_save_restore",
"rm %(installdir)s/examples/c_example",
"rm %(installdir)s/examples/c_example_save_restore",
"chmod 644 %(installdir)s/examples/*",
]
moduleclass = 'math'
--- MUMPS_5.4.1/examples/Makefile 2021-08-03 11:49:48.000000000 +0200
+++ MUMPS_5.4.1_ok/examples/Makefile 2022-01-18 10:16:07.296717000 +0100
@@ -21,28 +21,28 @@
include $(topdir)/Makefile.inc
-LIBMUMPS_COMMON = $(libdir)/libmumps_common$(PLAT)$(LIBEXT)
+LIBMUMPS_COMMON = $(libdir)/libmumps_common$(PLAT).so
-LIBSMUMPS = $(libdir)/libsmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
+LIBSMUMPS = $(libdir)/libsmumps$(PLAT).so $(LIBMUMPS_COMMON)
ssimpletest: $(LIBSMUMPS) $$@.o
$(FL) -o $@ $(OPTL) ssimpletest.o $(LIBSMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
-LIBDMUMPS = $(libdir)/libdmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
+LIBDMUMPS = $(libdir)/libdmumps$(PLAT).so $(LIBMUMPS_COMMON)
dsimpletest: $(LIBDMUMPS) $$@.o
$(FL) -o $@ $(OPTL) dsimpletest.o $(LIBDMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
-LIBCMUMPS = $(libdir)/libcmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
+LIBCMUMPS = $(libdir)/libcmumps$(PLAT).so $(LIBMUMPS_COMMON)
csimpletest: $(LIBCMUMPS) $$@.o
$(FL) -o $@ $(OPTL) csimpletest.o $(LIBCMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
-LIBZMUMPS = $(libdir)/libzmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
+LIBZMUMPS = $(libdir)/libzmumps$(PLAT).so $(LIBMUMPS_COMMON)
zsimpletest: $(LIBZMUMPS) $$@.o
$(FL) -o $@ $(OPTL) zsimpletest.o $(LIBZMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
@@ -76,19 +76,19 @@
$(CC) $(OPTC) $(CDEFS) -I. -I$(topdir)/include -I$(topdir)/src $(INCS) -c $*.c $(OUTC)$*.o
-$(libdir)/libsmumps$(PLAT)$(LIBEXT):
+$(libdir)/libsmumps$(PLAT).so:
@echo 'Error: you should build the library' $@ 'first'
exit 1
-$(libdir)/libdmumps$(PLAT)$(LIBEXT):
+$(libdir)/libdmumps$(PLAT).so:
@echo 'Error: you should build the library' $@ 'first'
exit 1
-$(libdir)/libcmumps$(PLAT)$(LIBEXT):
+$(libdir)/libcmumps$(PLAT).so:
@echo 'Error: you should build the library' $@ 'first'
exit 1
-$(libdir)/libzmumps$(PLAT)$(LIBEXT):
+$(libdir)/libzmumps$(PLAT).so:
@echo 'Error: you should build the library' $@ 'first'
exit 1
--- MUMPS_5.4.1/examples/Makefile_installed 1970-01-01 01:00:00.000000000 +0100
+++ MUMPS_5.4.1_ok/examples/Makefile_installed 2022-01-18 10:17:16.204268000 +0100
@@ -0,0 +1,102 @@
+#
+# This file is part of MUMPS 5.3.4, released
+# on Mon Sep 28 07:16:41 UTC 2020
+#
+CC = mpicc
+FC = mpif77
+FL = mpif77
+
+LIBBLAS = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
+SCALAP = -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
+# OpenMPI
+# SCALAP = -lmkl_scalapack_lp64 $(MKLROOT)/lib/intel64/libmkl_blacs_openmpi_lp64.a
+LIBPAR = $(SCALAP) $(LIBBLAS)
+
+#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
+CDEFS = -DAdd_
+
+#Begin Optimized options
+OPTF = -O -nofor-main -qopenmp -Dintel_ -DALLOW_NON_INIT
+OPTL = -O -nofor-main -qopenmp
+OPTC = -O -qopenmp
+#End Optimized options
+
+
+default: d
+
+.PHONY: default all s d c z multi clean
+.SECONDEXPANSION:
+
+all: c z s d multi
+
+c: csimpletest csimpletest_save_restore
+z: zsimpletest zsimpletest_save_restore
+s: ssimpletest ssimpletest_save_restore
+d: dsimpletest dsimpletest_save_restore c_example_save_restore c_example
+multi: multiple_arithmetics_example
+
+
+SCOTCHDIR = $(EBROOTSCOTCH)
+LMETISDIR = $(EBROOTPARMETIS)
+LMETIS = -L$(EBROOTPARMETIS)/lib -lparmetis -lmetis
+LSCOTCH = -L$(EBROOTSCOTCH)/lib -lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr
+LPORD = -L$(MUMPS_LIB) -lpord
+
+LIBMUMPS_COMMON = -L$(MUMPS_LIB)/ -lmumps_common
+
+LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
+
+LIBSMUMPS = -L$(MUMPS_LIB) -lsmumps $(LIBMUMPS_COMMON)
+
+ssimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) ssimpletest.o $(LIBSMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+LIBDMUMPS = -L$(MUMPS_LIB) -ldmumps $(LIBMUMPS_COMMON)
+
+dsimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) dsimpletest.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+LIBCMUMPS = -L$(MUMPS_LIB) -lcmumps $(LIBMUMPS_COMMON)
+
+csimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) csimpletest.o $(LIBCMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+LIBZMUMPS = -L$(MUMPS_LIB) -lzmumps $(LIBMUMPS_COMMON)
+
+zsimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) zsimpletest.o $(LIBZMUMPS) $(LORDERINGS) $(LIBPAR)
+
+c_example: $$@.o
+ $(FL) -o $@ $(OPTL) $@.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+multiple_arithmetics_example: $$@.o
+ $(FL) -o $@ $(OPTL) $@.o $(LIBSMUMPS) $(LIBDMUMPS) $(LIBCMUMPS) $(LIBZMUMPS) $(LORDERINGS) $(LIBPAR)
+
+ssimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) ssimpletest_save_restore.o $(LIBSMUMPS) $(LORDERINGS) $(LIBPAR)
+
+dsimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) dsimpletest_save_restore.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+csimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) csimpletest_save_restore.o $(LIBCMUMPS) $(LORDERINGS) $(LIBPAR)
+
+zsimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) zsimpletest_save_restore.o $(LIBZMUMPS) $(LORDERINGS) $(LIBPAR)
+
+c_example_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) $@.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+.SUFFIXES: .c .F .o
+.F.o:
+ $(FC) $(OPTF) -I. -I$(MUMPS_INCLUDE) -c $*.F
+.c.o:
+ $(CC) $(OPTC) $(CDEFS) -I. -I$(MUMPS_INCLUDE) -c $*.c
+
+
+clean:
+ $(RM) *.o [sdcz]simpletest c_example multiple_arithmetics_example ssimpletest_save_restore dsimpletest_save_restore csimpletest_save_restore zsimpletest_save_restore c_example_save_restore
--- MUMPS_5.4.1/examples/Makefile_installed_gnu 1970-01-01 01:00:00.000000000 +0100
+++ MUMPS_5.4.1_ok/examples/Makefile_installed_gnu 2022-01-18 10:17:42.163557000 +0100
@@ -0,0 +1,102 @@
+#
+# This file is part of MUMPS 5.3.4, released
+# on Mon Sep 28 07:16:41 UTC 2020
+#
+CC = mpicc
+FC = mpif77
+FL = mpif77
+
+LIBBLAS = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
+SCALAP = -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
+# OpenMPI
+# SCALAP = -lmkl_scalapack_lp64 $(MKLROOT)/lib/intel64/libmkl_blacs_openmpi_lp64.a
+LIBPAR = $(SCALAP) $(LIBBLAS)
+
+#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
+CDEFS = -DAdd_
+
+#Begin Optimized options
+OPTF = -O -fopenmp -DALLOW_NON_INIT
+OPTL = -O -fopenmp
+OPTC = -O -fopenmp
+#End Optimized options
+
+
+default: d
+
+.PHONY: default all s d c z multi clean
+.SECONDEXPANSION:
+
+all: c z s d multi
+
+c: csimpletest csimpletest_save_restore
+z: zsimpletest zsimpletest_save_restore
+s: ssimpletest ssimpletest_save_restore
+d: dsimpletest dsimpletest_save_restore c_example_save_restore c_example
+multi: multiple_arithmetics_example
+
+
+SCOTCHDIR = $(EBROOTSCOTCH)
+LMETISDIR = $(EBROOTPARMETIS)
+LMETIS = -L$(EBROOTPARMETIS)/lib -lparmetis -lmetis
+LSCOTCH = -L$(EBROOTSCOTCH)/lib -lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr
+LPORD = -L$(MUMPS_LIB) -lpord
+
+LIBMUMPS_COMMON = -L$(MUMPS_LIB)/ -lmumps_common
+
+LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
+
+LIBSMUMPS = -L$(MUMPS_LIB) -lsmumps $(LIBMUMPS_COMMON)
+
+ssimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) ssimpletest.o $(LIBSMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+LIBDMUMPS = -L$(MUMPS_LIB) -ldmumps $(LIBMUMPS_COMMON)
+
+dsimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) dsimpletest.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+LIBCMUMPS = -L$(MUMPS_LIB) -lcmumps $(LIBMUMPS_COMMON)
+
+csimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) csimpletest.o $(LIBCMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+LIBZMUMPS = -L$(MUMPS_LIB) -lzmumps $(LIBMUMPS_COMMON)
+
+zsimpletest: $$@.o
+ $(FL) -o $@ $(OPTL) zsimpletest.o $(LIBZMUMPS) $(LORDERINGS) $(LIBPAR)
+
+c_example: $$@.o
+ $(FL) -o $@ $(OPTL) $@.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+
+multiple_arithmetics_example: $$@.o
+ $(FL) -o $@ $(OPTL) $@.o $(LIBSMUMPS) $(LIBDMUMPS) $(LIBCMUMPS) $(LIBZMUMPS) $(LORDERINGS) $(LIBPAR)
+
+ssimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) ssimpletest_save_restore.o $(LIBSMUMPS) $(LORDERINGS) $(LIBPAR)
+
+dsimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) dsimpletest_save_restore.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+csimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) csimpletest_save_restore.o $(LIBCMUMPS) $(LORDERINGS) $(LIBPAR)
+
+zsimpletest_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) zsimpletest_save_restore.o $(LIBZMUMPS) $(LORDERINGS) $(LIBPAR)
+
+c_example_save_restore: $$@.o
+ $(FL) -o $@ $(OPTL) $@.o $(LIBDMUMPS) $(LORDERINGS) $(LIBPAR)
+
+.SUFFIXES: .c .F .o
+.F.o:
+ $(FC) $(OPTF) -I. -I$(MUMPS_INCLUDE) -c $*.F
+.c.o:
+ $(CC) $(OPTC) $(CDEFS) -I. -I$(MUMPS_INCLUDE) -c $*.c
+
+
+clean:
+ $(RM) *.o [sdcz]simpletest c_example multiple_arithmetics_example ssimpletest_save_restore dsimpletest_save_restore csimpletest_save_restore zsimpletest_save_restore c_example_save_restore
--- MUMPS_5.4.1/src/Makefile 2021-08-03 11:49:43.000000000 +0200
+++ MUMPS_5.4.1_ok/src/Makefile 2022-01-18 11:39:09.181814202 +0100
@@ -14,19 +14,24 @@
all: $(incdir)/mumps_int_def.h libcommon s d c z
libcommon: $(incdir)/mumps_int_def.h
+ $(MAKE) $(libdir)/libmumps_common$(PLAT).so
$(MAKE) $(libdir)/libmumps_common$(PLAT)$(LIBEXT)
s: $(incdir)/mumps_int_def.h libcommon
+ $(MAKE) ARITH=s $(libdir)/libsmumps$(PLAT).so
$(MAKE) ARITH=s $(libdir)/libsmumps$(PLAT)$(LIBEXT)
d: $(incdir)/mumps_int_def.h libcommon
$(MAKE) ARITH=d $(libdir)/libdmumps$(PLAT)$(LIBEXT)
+ $(MAKE) ARITH=d $(libdir)/libdmumps$(PLAT).so
c: $(incdir)/mumps_int_def.h libcommon
$(MAKE) ARITH=c $(libdir)/libcmumps$(PLAT)$(LIBEXT)
+ $(MAKE) ARITH=c $(libdir)/libcmumps$(PLAT).so
z: $(incdir)/mumps_int_def.h libcommon
$(MAKE) ARITH=z $(libdir)/libzmumps$(PLAT)$(LIBEXT)
+ $(MAKE) ARITH=z $(libdir)/libzmumps$(PLAT).so
include $(topdir)/Makefile.inc
@@ -200,6 +205,14 @@
$(AR)$@ $?
$(RANLIB) $@
+$(libdir)/libmumps_common$(PLAT).so: $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
+ $(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-$(SONAME_VERSION).so $(OPTL) -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(MPIFLIB) $(MPICLIB) $(METISLIB) -o $(libdir)/libmumps_common$(PLAT)-$(SONAME_VERSION).so $(OPTL) -Wl,-z,defs
+ ln -fs libmumps_common$(PLAT)-$(SONAME_VERSION).so $@
+
+$(libdir)/lib$(ARITH)mumps$(PLAT).so: $(OBJS_MOD) $(OBJS_OTHER)
+ $(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-$(SONAME_VERSION).so $(OPTL) -L$(libdir) -lmumps_common$(PLAT) -lpthread $(MUMPS_LIBF77) $(LORDERINGS) $(MPIFLIB) $(METISLIB) $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-$(SONAME_VERSION).so $(OPTL) -Wl,-z,defs
+ ln -fs lib$(ARITH)mumps$(PLAT)-$(SONAME_VERSION).so $@
+
# Dependencies between modules:
# i) arithmetic-dependent modules:
$(ARITH)ana_aux.o: $(ARITH)mumps_struc_def.o \
@@ -411,13 +424,13 @@
.SUFFIXES: .c .F .o
.F.o:
- $(FC) $(OPTF) -I. -I../include $(INCS) $(IORDERINGSF) $(ORDERINGSF) -c $*.F $(OUTF)$*.o
+ $(FC) $(OPTF) -I. -I../include $(INCS) $(IORDERINGSF) $(ORDERINGSF) -fPIC -c $*.F $(OUTF)$*.o
.c.o:
- $(CC) $(OPTC) -I../include $(INCS) $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -c $*.c $(OUTC)$*.o
+ $(CC) $(OPTC) -I../include $(INCS) $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -fPIC -c $*.c $(OUTC)$*.o
$(ARITH)mumps_c.o: mumps_c.c
$(CC) $(OPTC) -I../include $(INCS) $(CDEFS) -DMUMPS_ARITH=MUMPS_ARITH_$(ARITH) \
- $(IORDERINGSC) $(ORDERINGSC) -c mumps_c.c $(OUTC)$@
+ $(IORDERINGSC) $(ORDERINGSC) -fPIC -c mumps_c.c $(OUTC)$@
clean:
$(RM) *.o *.mod $(incdir)/mumps_int_def.h build_mumps_int_def
--- MUMPS_5.4.1/Makefile 2021-08-03 11:49:43.000000000 +0200
+++ MUMPS_5.4.1_ok/Makefile 2022-01-14 16:21:56.000514000 +0100
@@ -42,7 +42,7 @@
include Makefile.inc
-prerequisites: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
+prerequisites: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT).so
# dummy MPI library (sequential version)
@@ -59,6 +59,12 @@
cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
fi;
+$(libdir)/libpord$(PLAT).so:
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cd $(LPORDDIR); make CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" ARFUNCT= RANLIB="$(RANLIB)" libpord$(PLAT).so; fi;
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cp -a $(LPORDDIR)/libpord*.so lib/; fi;
+
clean:
(cd src; $(MAKE) clean)
(cd examples; $(MAKE) clean)
--- MUMPS_5.4.1/PORD/lib/Makefile 2021-08-03 11:49:43.000000000 +0200
+++ MUMPS_5.4.1_ok/PORD/lib/Makefile 2022-01-14 16:24:27.990175000 +0100
@@ -9,7 +9,7 @@
INCLUDES = -I../include
-COPTIONS = $(INCLUDES) $(CFLAGS) $(OPTFLAGS)
+COPTIONS = $(INCLUDES) $(CFLAGS) $(OPTFLAGS) -fPIC
OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
multisector.o gelim.o bucket.o tree.o \
@@ -28,6 +28,10 @@
$(AR)$@ $(OBJS)
$(RANLIB) $@
+libpord$(PLAT).so: $(OBJS)
+ $(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)-$(SONAME_VERSION).so -o libpord$(PLAT)-$(SONAME_VERSION).so $(OPTL) -Wl,-z,defs
+ ln -fs libpord$(PLAT)-$(SONAME_VERSION).so $@
+
clean:
rm -f *.o
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment