diff --git a/easybuild/easyconfigs/g/GOBNILP/GOBNILP-1.6.3-GCC-11.3.0.eb b/easybuild/easyconfigs/g/GOBNILP/GOBNILP-1.6.3-GCC-11.3.0.eb new file mode 100644 index 00000000000..565232387de --- /dev/null +++ b/easybuild/easyconfigs/g/GOBNILP/GOBNILP-1.6.3-GCC-11.3.0.eb @@ -0,0 +1,63 @@ +easyblock = 'Bundle' + +name = 'GOBNILP' +version = '1.6.3' +_nodots_version = version.replace('.', '') +_scip_version = '3.2.1' +_scip_nodots_version = _scip_version.replace('.', '') + +homepage = 'https://www.cs.york.ac.uk/aig/sw/gobnilp/' +description = """GOBNILP (Globally Optimal Bayesian Network learning using Integer Linear +Programming) is a C program which learns Bayesian networks from complete +discrete data or from local scores.""" + +toolchain = {'name': 'GCC', 'version': '11.3.0'} + +dependencies = [ + ('SCIP', _scip_version), + ('ZIMPL', '3.3.4'), + ('SoPlex', '2.2.1'), + ('GMP', '6.2.1'), + ('libreadline', '8.1'), + ('ncurses', '6.3'), + ('zlib', '1.2.12'), +] + +default_easyblock = 'MakeCp' + +components = [ + ('LOP', _scip_version, { + 'source_urls': ['https://github.com/scipopt/scip/archive/refs/tags/'], + 'sources': ['v%s.tar.gz' % _scip_nodots_version], + 'patches': ['LOP-%(version)s_standalone-scip-lop-build.patch'], + 'checksums': [ + {'v321.tar.gz': + '015bdda4e681782fd03b61421b93aa3c1b913e5eea18bb8730d5fb9e4d67b4cb'}, + {'LOP-3.2.1_standalone-scip-lop-build.patch': + 'f996e56f1311fa4a613635b38969da731faf0ea9f10097799b1fa9a84598651e'}, + ], + 'start_dir': 'scip-%s/examples/%%(name)s' % _scip_nodots_version, + 'buildopts': '%(namelower)s COMP=gnu OPT=opt LPS=spx2', + 'files_to_copy': [(['bin/%(namelower)s'], 'bin')], + }), + (name, version, { + 'source_urls': ['http://www.cs.york.ac.uk/aig/sw/gobnilp'], + 'sources': ['%(namelower)s%(version)s.tar.gz'], + 'patches': ['%(name)s-%(version)s_use-eb-build-env.patch'], + 'checksums': [ + {'gobnilp1.6.3.tar.gz': + 'b31e5c87032f85f7404654beca47d472fd6c5dd7a5f82108bd5043ff0b8fa33c'}, + {'GOBNILP-1.6.3_use-eb-build-env.patch': + '9235ec8b9d05d9915f9961d4b46c2220e0d3b75f555a226a5667dcc69d76dae9'}, + ], + 'start_dir': '%(namelower)s' + _nodots_version, + 'files_to_copy': [(['bin/%(namelower)s'], 'bin')], + }), +] + +sanity_check_paths = { + 'files': ['bin/gobnilp', 'bin/lop'], + 'dirs': [], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/g/GOBNILP/GOBNILP-1.6.3_use-eb-build-env.patch b/easybuild/easyconfigs/g/GOBNILP/GOBNILP-1.6.3_use-eb-build-env.patch new file mode 100644 index 00000000000..e730aa76abf --- /dev/null +++ b/easybuild/easyconfigs/g/GOBNILP/GOBNILP-1.6.3_use-eb-build-env.patch @@ -0,0 +1,79 @@ +Use build environment and dependencies from EasyBuild +author: Alex Domingo (Vrije Universiteit Brussel) +--- Makefile.orig 2023-03-31 18:33:07.943785000 +0200 ++++ Makefile 2023-03-31 18:42:53.636293000 +0200 +@@ -5,15 +5,25 @@ + # This file was created by editing the Makefile for the linear ordering + # example in SCIP + +-# Set the path the SCIP directory +-SCIPDIR = scip +- +-# Include default project Makefile from SCIP +-include $(SCIPDIR)/make/make.project ++# Set paths and flags to SCIP libraries ++SCIPDIR = $(EBROOTSCIP) ++SCIPLIB = scip ++OBJSCIPLIB = objscip ++LPILIB = lpispx2 ++NLPILIB = nlpi.cppad ++LPSLDFLAGS = -lzimpl -lsoplex -lgmp -lreadline -lncurses -lz ++ ++# Set paths to LOP ++LOPSRC = ../scip-321/examples/LOP/src ++LOPOBJ = ../scip-321/examples/LOP/obj/cons_linearordering.o + + # This missing for scip < 3 + VALGRIND = false + ++SRCDIR = src ++OBJDIR = obj ++BINDIR = bin ++ + # Declare the phony targets + .PHONY: all doxygen manual pedmanual gobnilp clean test + +@@ -46,7 +57,7 @@ + MAINSRC = $(wildcard $(SRCDIR)/*.c) + MAINOBJ = $(notdir $(MAINSRC:.c=.o)) + +-MAIN = $(MAINNAME).$(BASE).$(LPS)$(EXEEXTENSION) ++MAIN = $(MAINNAME) + MAINFILE = $(BINDIR)/$(MAIN) + ifeq ($(OSTYPE),mingw) + MAINSHORTLINK = $(BINDIR)/$(MAINNAME).exe +@@ -63,7 +74,7 @@ + LATEXCMD = @pdflatex -halt-on-error -interaction=errorstopmode + + #Needs to appear first so that "make" makes gobnilp +-gobnilp: $(SCIP) $(MAINFILE) $(MAINSHORTLINK) ++gobnilp: $(MAINFILE) $(MAINSHORTLINK) + + #----------------------------------------------------------------------- + #---------------------------- All ---------------------------- +@@ -161,19 +172,16 @@ + + $(MAINSHORTLINK): $(MAINFILE) + @rm -f $@ +- @cd $(dir $@) && ln -s $(notdir $(MAINFILE)) $(notdir $@) + +-$(MAINFILE): $(BINDIR) $(OBJDIR) $(SCIPLIBFILE) $(LPILIBFILE) $(NLPILIBFILE) $(MAINOBJFILES) +- @echo "-> linking $@" +- @$(LINKCXX) $(STATICFLAG) $(MAINOBJFILES) \ +- $(LINKCXX_L)$(SCIPDIR)/lib $(LINKCXX_l)$(SCIPLIB)$(LINKLIBSUFFIX) \ +- $(LINKCXX_l)$(OBJSCIPLIB)$(LINKLIBSUFFIX) $(LINKCXX_l)$(LPILIB)$(LINKLIBSUFFIX) $(LINKCXX_l)$(NLPILIB)$(LINKLIBSUFFIX) \ +- $(OFLAGS) $(LPSLDFLAGS) \ +- $(LDFLAGS) $(LINKCXX_o)$@ ++$(MAINFILE): $(BINDIR) $(OBJDIR) $(MAINOBJFILES) ++ echo "-> linking $@" ++ $(CXX) -static $(MAINOBJFILES) $(LOPOBJ) \ ++ -L$(SCIPDIR)/lib -l$(SCIPLIB) -l$(OBJSCIPLIB) -l$(LPILIB) -l$(NLPILIB) \ ++ $(LDFLAGS) $(LPSLDFLAGS) -o $@ + + $(OBJDIR)/%.o: $(SRCDIR)/%.c + @echo "-> compiling $*.c" +- @$(CC) $(FLAGS) $(OFLAGS) $(BINOFLAGS) $(CFLAGS) -c -g $< $(CC_o)$@ ++ @$(CC) $(CFLAGS) $(CPPFLAGS) -I$(LOPSRC) -c -g $< -o $@ + + $(OBJDIR): + @-mkdir -p $(OBJDIR) diff --git a/easybuild/easyconfigs/g/GOBNILP/LOP-3.2.1_standalone-scip-lop-build.patch b/easybuild/easyconfigs/g/GOBNILP/LOP-3.2.1_standalone-scip-lop-build.patch new file mode 100644 index 00000000000..9fbb54ef086 --- /dev/null +++ b/easybuild/easyconfigs/g/GOBNILP/LOP-3.2.1_standalone-scip-lop-build.patch @@ -0,0 +1,41 @@ +Build LOP example standalone without triggering a full build of SCIP +author: Alex Domingo (Vrije Universiteit Brussel) +--- Makefile.orig 2023-03-31 18:52:55.793723000 +0200 ++++ Makefile 2023-03-31 18:54:59.590029000 +0200 +@@ -29,6 +29,7 @@ + #----------------------------------------------------------------------------- + + include $(SCIPDIR)/make/make.project ++OBJDIR = obj + + #----------------------------------------------------------------------------- + # Main Program +@@ -39,9 +40,9 @@ + MAINSRC = $(addprefix $(SRCDIR)/,$(MAINOBJ:.o=.c)) + MAINDEP = $(SRCDIR)/depend.cmain.$(OPT) + +-MAIN = $(MAINNAME).$(BASE).$(LPS)$(EXEEXTENSION) ++MAIN = $(MAINNAME) + MAINFILE = $(BINDIR)/$(MAIN) +-MAINSHORTLINK = $(BINDIR)/$(MAINNAME) ++MAINSHORTLINK = $(MAINNAME) + MAINOBJFILES = $(addprefix $(OBJDIR)/,$(MAINOBJ)) + + #----------------------------------------------------------------------------- +@@ -79,7 +80,6 @@ + + $(MAINSHORTLINK): $(MAINFILE) + @rm -f $@ +- cd $(dir $@) && ln -s $(notdir $(MAINFILE)) $(notdir $@) + + $(OBJDIR): + @-mkdir -p $(OBJDIR) +@@ -123,7 +123,7 @@ + + + # main target +-$(MAINFILE): $(BINDIR) $(OBJDIR) $(SCIPLIBFILE) $(LPILIBFILE) $(NLPILIBFILE) $(MAINOBJFILES) ++$(MAINFILE): $(BINDIR) $(OBJDIR) $(MAINOBJFILES) + @echo "-> linking $@" + ifeq ($(VERBOSE),true) + $(LINKCXX) $(MAINOBJFILES) \ diff --git a/easybuild/easyconfigs/s/SCIP/SCIP-3.2.1-GCC-11.3.0.eb b/easybuild/easyconfigs/s/SCIP/SCIP-3.2.1-GCC-11.3.0.eb new file mode 100644 index 00000000000..ac0cfca19e8 --- /dev/null +++ b/easybuild/easyconfigs/s/SCIP/SCIP-3.2.1-GCC-11.3.0.eb @@ -0,0 +1,58 @@ +easyblock = 'ConfigureMake' + +name = 'SCIP' +version = '3.2.1' + +homepage = 'https://www.scipopt.org/' +description = """SCIP is currently one of the fastest non-commercial solvers for mixed integer +programming (MIP) and mixed integer nonlinear programming (MINLP). It is also a +framework for constraint integer programming and branch-cut-and-price. It +allows for total control of the solution process and the access of detailed +information down to the guts of the solver.""" + +toolchain = {'name': 'GCC', 'version': '11.3.0'} + +github_account = 'scipopt' +source_urls = [GITHUB_SOURCE] +sources = ['v%s.tar.gz' % version.replace('.', '')] +checksums = ['015bdda4e681782fd03b61421b93aa3c1b913e5eea18bb8730d5fb9e4d67b4cb'] + +dependencies = [ + ('SoPlex', '2.2.1'), + ('ZIMPL', '3.3.4'), + ('GMP', '6.2.1'), + ('libreadline', '8.1'), + ('zlib', '1.2.12'), +] + +skipsteps = ['configure'] + +# prepare symlinks to installation files of dependencies +prebuildopts = 'mkdir -p lib && ' +prebuildopts += 'ln -sf "$EBROOTSOPLEX/include" "lib/spxinc" && ' +prebuildopts += 'ln -sf "$EBROOTZIMPL/include" "lib/zimplinc" && ' +prebuildopts += 'for lib in "$EBROOTSOPLEX/lib/libsoplex*.a"; do ln -sf "$lib" "lib/"; done && ' +prebuildopts += 'for lib in "$EBROOTZIMPL/lib/libzimpl*.a"; do ln -sf "$lib" "lib/"; done && ' + +# use SoPlex v2 as LP solver +buildopts = 'LPS=spx2 ' +buildopts += 'MAKESOFTLINKS=false COMP=gnu OPT=opt ' + +installopts = 'INSTALLDIR="%(installdir)s" ' +installopts += buildopts + +postinstallcmds = [ + # add extra headers to installation directory + 'cp "src/scip/misc.h" "%(installdir)s/include/scip/"', + # copy examples folder + 'cp -r "examples" "%(installdir)s/"', +] + +sanity_check_paths = { + 'files': ['bin/scip', 'lib/liblpispx2.a', 'lib/libnlpi.cppad.a', 'lib/libobjscip.a', 'lib/libscip.a'], + 'dirs': ['examples', 'include'], +} + +sanity_check_commands = ["scip -h"] + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/s/SoPlex/SoPlex-2.2.1-GCC-11.3.0.eb b/easybuild/easyconfigs/s/SoPlex/SoPlex-2.2.1-GCC-11.3.0.eb new file mode 100644 index 00000000000..309841532c7 --- /dev/null +++ b/easybuild/easyconfigs/s/SoPlex/SoPlex-2.2.1-GCC-11.3.0.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'SoPlex' +version = '2.2.1' + +homepage = 'https://soplex.zib.de/' +description = """SoPlex is an optimization package for solving linear programming problems (LPs) +based on an advanced implementation of the primal and dual revised simplex +algorithm. It provides special support for the exact solution of LPs with +rational input data. It can be used as a standalone solver reading MPS or LP +format files via a command line interface as well as embedded into other +programs via a C++ class library.""" + +toolchain = {'name': 'GCC', 'version': '11.3.0'} + +github_account = 'scipopt' +source_urls = [GITHUB_SOURCE] +sources = ['release-%s.tar.gz' % version.replace('.', '')] +checksums = ['6c2e89cd7c8910f8989f2a860fa0446641bd16d76eb87872f70974838486c9b1'] + +dependencies = [ + ('GMP', '6.2.1'), + ('zlib', '1.2.12'), +] + +skipsteps = ['configure'] + +buildopts = "COMP=gnu OPT=opt" +installopts = "INSTALLDIR=%(installdir)s" + +sanity_check_paths = { + 'files': ['bin/soplex', 'lib/libsoplex.a'], + 'dirs': ['include'], +} + +sanity_check_commands = ["soplex | grep -q '%(name)s version %(version)s'"] + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/z/ZIMPL/ZIMPL-3.3.4-GCCcore-11.3.0.eb b/easybuild/easyconfigs/z/ZIMPL/ZIMPL-3.3.4-GCCcore-11.3.0.eb new file mode 100644 index 00000000000..f193788ee27 --- /dev/null +++ b/easybuild/easyconfigs/z/ZIMPL/ZIMPL-3.3.4-GCCcore-11.3.0.eb @@ -0,0 +1,42 @@ +easyblock = 'MakeCp' + +name = 'ZIMPL' +version = '3.3.4' + +homepage = 'https://zimpl.zib.de/' +description = """ZIMPL is a little language to translate the mathematical model of a problem +into a linear or nonlinear (mixed-) integer mathematical program expressed in +.lp or .mps file format which can be read and (hopefully) solved by a LP or MIP +solver.""" + +toolchain = {'name': 'GCCcore', 'version': '11.3.0'} + +github_account = 'scipopt' +source_urls = ['https://zimpl.zib.de/download/'] +sources = [SOURCELOWER_TGZ] +checksums = ['3362fb21524df459723d23f6e0c122ebdd684153a9cc991a2c7f5b2752a83eb2'] + +builddependencies = [ + ('binutils', '2.38'), +] + +dependencies = [ + ('GMP', '6.2.1'), + ('zlib', '1.2.12'), +] + +files_to_copy = ['bin', 'lib', (['src/*.h'], 'include/zimpl')] + +postinstallcmds = [ + "cd %(installdir)s/bin && ln -sf zimpl-%(version)s.* zimpl", + "cd %(installdir)s/lib && ln -sf libzimpl-%(version)s.*.a libzimpl.a", +] + +sanity_check_paths = { + 'files': ['bin/zimpl', 'lib/libzimpl.a'], + 'dirs': ['include/zimpl'], +} + +sanity_check_commands = ["zimpl -h"] + +moduleclass = 'math'