Skip to content
Open
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
2 changes: 1 addition & 1 deletion .LIBSEMIGROUPS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.3
3.5.4
52 changes: 49 additions & 3 deletions .github/workflows/config-options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: "Build Semigroups"
uses: gap-actions/build-pkg@v2
with:
CONFIGFLAGS: --disable-hpcombi --enable-debug
CONFIGFLAGS: --enable-debug
- name: "Run Semigroups package's tst/teststandard.g"
uses: gap-actions/run-pkg-tests@v4

Expand All @@ -56,6 +56,8 @@ jobs:
../bin/BuildPackages.sh --strict digraphs io orb datastructures profiling
- name: "Build Semigroups"
uses: gap-actions/build-pkg@v2
with:
CONFIGFLAGS: --enable-hpcombi
- name: "Run Semigroups package's tst/teststandard.g"
uses: gap-actions/run-pkg-tests@v4
- uses: gap-actions/process-coverage@v3
Expand Down Expand Up @@ -101,7 +103,51 @@ jobs:
../bin/BuildPackages.sh --strict digraphs io orb datastructures profiling
- name: "Build Semigroups"
uses: gap-actions/build-pkg@v2
with: # we use --with-external-fmt since this is available from conda
CONFIGFLAGS: --disable-hpcombi --with-external-libsemigroups --enable-fmt --with-external-fmt
with:
CONFIGFLAGS: --with-external-libsemigroups
- name: "Run Semigroups package's tst/teststandard.g"
uses: gap-actions/run-pkg-tests@v4

with-external-libsemigroups-and-flags:
name: "External libsemigroups + ${{ matrix.flag.value }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
# Store a list of possible flags, and the expected result when ./configure is called with
# --with-external-libsemigroups and <flag.value>.
flag:
- { value: "--enable-hpcombi", configure-result: 1 }
- { value: "--disable-hpcombi", configure-result: 1 }
- { value: "--enable-backward", configure-result: 1 }
- { value: "--disable-backward", configure-result: 1 }
- { value: "--enable-eigen", configure-result: 1 }
- { value: "--diable-eigen", configure-result: 1 }
- { value: "--with-external-backward", configure-result: 1 }
- { value: "--with-external-fmt", configure-result: 1 }
- { value: "--with-external-eigen", configure-result: 1 }
- { value: "--enable-popcnt", configure-result: 1 }
- { value: "--disable-popcnt", configure-result: 1 }
- { value: "--enable-clzll", configure-result: 1 }
- { value: "--disable-clzll", configure-result: 1 }
- { value: "--enable-debug", configure-result: 0 }
env:
PKG_CONFIG_PATH: "/home/runner/micromamba/envs/libsemigroups/lib/pkgconfig:/home/runner/micromamba/envs/libsemigroups/share/pkgconfig/"
LD_LIBRARY_PATH: "/home/runner/micromamba/envs/libsemigroups/lib"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v6
- name: "Install conda environment from environment.yml . . ."
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
cache-environment: true
- name: "Install GAP"
uses: gap-actions/setup-gap@v3
- name: "Check Semigroups' ./configure ${{ matrix.flag.configure-result == 0 && 'passes' || 'fails' }}"
run: |
./autogen.sh
./configure --with-gaproot=$GAPROOT --with-external-libsemigroups ${{ matrix.flag.value }}
(( $? == ${{ matrix.flag.configure-result }}))
10 changes: 3 additions & 7 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ KEXT_LDFLAGS = @LIBSEMIGROUPS_RPATH@ @LIBSEMIGROUPS_LIBS@

# configure settings
GAPPATH = @GAPROOT@
HPCOMBI_CONSTEXPR_FUN_ARGS = @HPCOMBI_CONSTEXPR_FUN_ARGS@
LIBSEMIGROUPS_HPCOMBI_ENABLED = @LIBSEMIGROUPS_HPCOMBI_ENABLED@
WITH_INCLUDED_LIBSEMIGROUPS = @WITH_INCLUDED_LIBSEMIGROUPS@
SYS_IS_CYGWIN = @SYS_IS_CYGWIN@
abs_top_builddir = @abs_top_builddir@
Expand Down Expand Up @@ -42,12 +40,10 @@ KEXT_SOURCES += gapbind14/src/gapbind14.cpp

KEXT_CPPFLAGS = -Igapbind14/include/

ifdef HPCOMBI_CONSTEXPR_FUN_ARGS
KEXT_CPPFLAGS += -DHPCOMBI_CONSTEXPR_FUN_ARGS
endif
include @LIBSEMIGROUPS_INCLUDEDIR@/hpcombi.mk

ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED
KEXT_CXXFLAGS += @HPCOMBI_CXXFLAGS@
KEXT_CXXFLAGS += $(HPCOMBI_CXXFLAGS)
endif

ifdef WITH_INCLUDED_LIBSEMIGROUPS
Expand Down Expand Up @@ -97,7 +93,7 @@ bin/include/libsemigroups/libsemigroups.hpp:
# resides in. The following achieves that assuming that the GAP
# being used was self-compiled by the user. This supports
# both older GAPs with libtool (first) and GAP without libtool (second)
# Additionally, we rebsae the dll with respect to the database to
# Additionally, we rebase the dll with respect to the database to
# avoid fork conflicts
if test -f bin/bin/cygsemigroups*.dll ; then rebase -s bin/bin/cygsemigroups*.dll ; fi
if test -f bin/bin/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi
Expand Down
13 changes: 10 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ esac

dnl ## Check for libsemigroups
AX_CHECK_LIBSEMIGROUPS
AS_IF([test "x$with_external_libsemigroups" = "xyes"],
[for flag in $ac_configure_args; do
flag=$(echo "$flag" | tr -d "'")
case $flag in
--enable-hpcombi|--disable-hpcombi|--enable-backward|--disable-backward|--enable-eigen|--disable-eigen|--with-external-backward|--with-external-fmt|--with-external-eigen|--enable-popcnt|--disable-popcnt|--enable-clzll|--disable-clzll)
AC_MSG_ERROR([the flag $flag is incompatible with --with-external-libsemigroups, the external libsemigroups may have been built with a different setting])
;;
esac
done
])

dnl ## User setting: Debug mode (off by default)
AC_ARG_ENABLE([debug],
Expand All @@ -82,9 +92,6 @@ AC_MSG_RESULT([$enable_debug])
KERNEL_DEBUG=$enable_debug
AC_SUBST(KERNEL_DEBUG)

# Check if HPCombi is enable, and available
AX_CHECK_HPCOMBI

dnl ##
dnl ## Output everything
dnl ##
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge

dependencies:
- libsemigroups==3.5.3
- libsemigroups==3.5.4
5 changes: 2 additions & 3 deletions gap/libsemigroups/froidure-pin.gi
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ function(S, coll)
Error("Expected a transf. coll. or empty list, found ",
TNAM_OBJ(coll));
fi;
if N <= 16
and IsBound(LIBSEMIGROUPS_HPCOMBI_ENABLED) then
if N <= 16 and LIBSEMIGROUPS_HPCOMBI_ENABLED then
return libsemigroups.FroidurePinTransf16;
elif N <= 2 ^ 16 then
return libsemigroups.FroidurePinTransfUInt2;
Expand All @@ -93,7 +92,7 @@ function(S, coll)
Error("Expected a partial perm. coll. or empty list, found ",
TNAM_OBJ(coll));
fi;
if N <= 16 and IsBound(LIBSEMIGROUPS_HPCOMBI_ENABLED) then
if N <= 16 and LIBSEMIGROUPS_HPCOMBI_ENABLED then
return libsemigroups.FroidurePinPPerm16;
elif N <= 2 ^ 16 then
return libsemigroups.FroidurePinPPermUInt2;
Expand Down
44 changes: 0 additions & 44 deletions m4/ax_check_hpcombi.m4

This file was deleted.

21 changes: 15 additions & 6 deletions m4/ax_check_libsemigroup.m4
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [
AS_IF(
[test -f libsemigroups/.VERSION],
[],
[AS_IF([test -f libsemigroups/etc/version-number.sh],
[AS_IF([test -f libsemigroups/etc/version-number.sh],
[cd libsemigroups && etc/version-number.sh > .TMP_VERSION && mv .TMP_VERSION .VERSION && cd ..],
[AC_MSG_ERROR([cannot determine the version of libsemigroups])])])
AC_MSG_CHECKING([libsemigroups version])
FOUND_LIBSEMIGROUPS_VERSION="$(cat libsemigroups/.VERSION)"
AC_MSG_RESULT([$FOUND_LIBSEMIGROUPS_VERSION])
Expand All @@ -56,11 +56,20 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [
AC_CONFIG_SUBDIRS([libsemigroups])
AC_SUBST([LIBSEMIGROUPS_RPATH],['-Wl,-rpath,$(abs_top_builddir)/bin/lib'])
else
LIBSEMIGROUPS_VERSION="$(pkg-config --modversion libsemigroups)"
LIBSEMIGROUPS_INCLUDEDIR="$srcdir/libsemigroups"
AC_MSG_NOTICE([the libsemigroups include dir is $LIBSEMIGROUPS_INCLUDEDIR])
AC_SUBST([LIBSEMIGROUPS_INCLUDEDIR])
else
LIBSEMIGROUPS_VERSION="$(pkg-config --modversion libsemigroups)"
AC_MSG_NOTICE([using external libsemigroups $LIBSEMIGROUPS_VERSION])
PKG_CHECK_VAR([LIBSEMIGROUPS_RPATH], [libsemigroups], [libdir],
[AC_SUBST([LIBSEMIGROUPS_RPATH],[-Wl,-rpath,${LIBSEMIGROUPS_RPATH}])])
PKG_CHECK_VAR([LIBSEMIGROUPS_RPATH],
[libsemigroups],
[libdir],
[AC_SUBST([LIBSEMIGROUPS_RPATH],[-Wl,-rpath,${LIBSEMIGROUPS_RPATH}])])
LIBSEMIGROUPS_INCLUDEDIR=$(pkg-config --variable=includedir libsemigroups)/libsemigroups
AC_MSG_NOTICE([the libsemigroups include dir is $LIBSEMIGROUPS_INCLUDEDIR])
AC_SUBST([LIBSEMIGROUPS_INCLUDEDIR])
fi
AS_IF([test "x$need_included_libsemigroups" = xyes],
Expand Down
1 change: 1 addition & 0 deletions src/init-froidure-pin-pperm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "to-gap.hpp" // for to_gap

// libsemigroups headers
#include "libsemigroups/config.hpp" // for LIBSEMIGROUPS_HPCOMBI_ENABLED
#include "libsemigroups/froidure-pin.hpp" // for FroidurePin
#include "libsemigroups/transf.hpp" // for PPerm

Expand Down
1 change: 1 addition & 0 deletions src/init-froidure-pin-transf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "to-gap.hpp" // for to_gap

// libsemigroups headers
#include "libsemigroups/config.hpp" // for LIBSEMIGROUPS_HPCOMBI_ENABLED
#include "libsemigroups/froidure-pin.hpp" // for FroidurePin
#include "libsemigroups/transf.hpp" // for Transf

Expand Down
8 changes: 7 additions & 1 deletion src/pkg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,13 @@ static Int InitLibrary(StructInitInfo* module) {
InitGVarFiltsFromTable(GVarFilts);
InitGVarFuncsFromTable(GVarFuncs);
#ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED
ExportAsConstantGVar(LIBSEMIGROUPS_HPCOMBI_ENABLED);
#if LIBSEMIGROUPS_HPCOMBI_ENABLED == 1
AssReadOnlyGVar(GVarName("LIBSEMIGROUPS_HPCOMBI_ENABLED"), True);
#else
AssReadOnlyGVar(GVarName("LIBSEMIGROUPS_HPCOMBI_ENABLED"), False);
#endif
#else
AssReadOnlyGVar(GVarName("LIBSEMIGROUPS_HPCOMBI_ENABLED"), False);
#endif
return PostRestore(module);
}
Expand Down
1 change: 1 addition & 0 deletions src/to-cpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
// libsemigroups headers
#include "libsemigroups/adapters.hpp" // for Degree
#include "libsemigroups/bmat8.hpp" // for BMat8
#include "libsemigroups/config.hpp" // for LIBSEMIGROUPS_HPCOMBI_ENABLED
#include "libsemigroups/cong.hpp" // for Congruence
#include "libsemigroups/constants.hpp" // for NegativeInfinity, PositiveIn...
#include "libsemigroups/matrix.hpp" // for NTPMat, MaxPlusTruncMat, Min...
Expand Down
Loading