Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{math}[foss/2022a] MUMPS v5.5.1 #16168

Merged
merged 2 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions easybuild/easyconfigs/m/MUMPS/MUMPS-5.5.1-foss-2022a-metis.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name = 'MUMPS'
version = '5.5.1'
versionsuffix = '-metis'

homepage = 'https://graal.ens-lyon.fr/MUMPS/'
description = "A parallel sparse direct solver"

toolchain = {'name': 'foss', 'version': '2022a'}
toolchainopts = {'pic': True, 'usempi': True}

source_urls = ['http://mumps.enseeiht.fr/']
sources = ['%(name)s_%(version)s.tar.gz']
patches = [
'%(name)s-%(version)s_shared-pord.patch', # builds the shared libs of PORD
'%(name)s-%(version)s_shared-mumps.patch', # builds shared libs of MUMPS
]
checksums = [
'1abff294fa47ee4cfd50dfd5c595942b72ebfcedce08142a75a99ab35014fa15', # MUMPS_5.5.1.tar.gz
'7990ca13c37aa72daa9e646cc7e6303f3eda01b9c463accea5f0f595fbc13566', # MUMPS-5.5.0_shared-pord.patch
'83c346a16dae059a2f4792ce2f847ca9e8423ef8c6949c3de12960f09383d564', # MUMPS-5.5.0_shared-mumps.patch
]

dependencies = [
('SCOTCH', '7.0.1'),
('METIS', '5.1.0'),
]

parallel = 1

# fix 'Type mismatch between actual argument' errors with GCC 10.x
prebuildopts = 'export FFLAGS="$FFLAGS -fallow-argument-mismatch" && '

buildopts = 'all SONAME_VERSION="%(version)s"'

moduleclass = 'math'
61 changes: 61 additions & 0 deletions easybuild/easyconfigs/m/MUMPS/MUMPS-5.5.1_shared-mumps.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Heavily inspired from https://src.fedoraproject.org/rpms/MUMPS//blob/rawhide/f/MUMPS-shared.patch
Author: micketeer@gmail.com
Updatd to version 5.5.0: J. Sassmannshausen/ICL (UK)
Updatd to version 5.5.1: maxim-masterov (SURF)
diff -Nru MUMPS_5.5.1.orig/src/Makefile MUMPS_5.5.1/src/Makefile
--- MUMPS_5.5.1.orig/src/Makefile 2022-08-31 11:57:42.666642000 +0200
+++ MUMPS_5.5.1/src/Makefile 2022-08-31 12:02:01.665935000 +0200
@@ -15,18 +15,23 @@

libcommon: $(incdir)/mumps_int_def.h
$(MAKE) $(libdir)/libmumps_common$(PLAT)$(LIBEXT)
+ $(MAKE) $(libdir)/libmumps_common$(PLAT).so

s: $(incdir)/mumps_int_def.h libcommon
$(MAKE) ARITH=s $(libdir)/libsmumps$(PLAT)$(LIBEXT)
+ $(MAKE) ARITH=s $(libdir)/libsmumps$(PLAT).so

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


# Rules for shared libraries
@@ -221,6 +226,13 @@
$(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT_SHARED): $(OBJS_MOD) $(OBJS_OTHER) $(libdir)/libmumps_common$(PLAT)$(LIBEXT_SHARED)
$(FC) $(OPTL) -shared $(OBJS_MOD) $(OBJS_OTHER) -L$(libdir) $(LORDERINGS) $(LIBS) $(LIBOTHERS) -lmumps_common$(PLAT) -o $@ $(RPATH_OPT)

+$(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:
@@ -435,12 +447,14 @@
.SUFFIXES: .c .F .o
.F.o:
$(FC) $(OPTF) $(FPIC) -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) $(FPIC) -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) $(FPIC) -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
44 changes: 44 additions & 0 deletions easybuild/easyconfigs/m/MUMPS/MUMPS-5.5.1_shared-pord.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Heavily inspired from https://src.fedoraproject.org/rpms/MUMPS//blob/rawhide/f/MUMPS-shared.patch
Author: micketeer@gmail.com
Updatd to version 5.5.0: J. Sassmannshausen/ICL (UK)
Updatd to version 5.5.1: maxim-masterov (SURF)
diff -Nru MUMPS_5.5.1.orig/Makefile MUMPS_5.5.1/Makefile
--- MUMPS_5.5.1.orig/Makefile 2022-08-31 11:57:42.628161000 +0200
+++ MUMPS_5.5.1/Makefile 2022-08-31 12:06:17.800078000 +0200
@@ -65,7 +65,7 @@

include Makefile.inc

-prerequisites: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
+prerequisites: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT).so

prerequisitesshared: Makefile.inc $(LIBSEQNEEDED)sharedlibseq $(libdir)/libpord$(PLAT)$(LIBEXT_SHARED)

@@ -103,8 +103,11 @@
cp $(LPORDDIR)/libpord$(LIBEXT_SHARED) $@; \
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)
diff -Nru MUMPS_5.5.1.orig/PORD/lib/Makefile MUMPS_5.5.1/PORD/lib/Makefile
--- MUMPS_5.5.1.orig/PORD/lib/Makefile 2022-08-31 11:57:42.938998000 +0200
+++ MUMPS_5.5.1/PORD/lib/Makefile 2022-08-31 12:06:20.352758000 +0200
@@ -31,6 +31,10 @@
libpord$(PLAT)$(LIBEXT_SHARED):$(OBJS)
$(CC) -shared $(OBJS) -o libpord.so

+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