Skip to content

Commit

Permalink
gh-36541: build/pkgs/nauty: Upgrade to 2.8.6, require nauty >= 2.8
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
https://pallini.di.uniroma1.it/changes24-28.txt

<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
Fixes #36257.
Continuation of #36262

We also tighten what versions of system nauty that we accept, because
#36257 was motivated by a new feature. This change should also fix
failures from accepting ancient versions of system nauty, such as
- `ubuntu-xenial-toolchain-gcc_9` https://github.com/mkoeppe/sage/action
s/runs/6622955701/job/18026345225#step:10:7570 in
src/sage/graphs/digraph_generators.py and other files

<!-- If your change requires a documentation PR, please link it
appropriately. -->

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #36541
Reported by: Matthias Köppe
Reviewer(s): David Coudert
  • Loading branch information
Release Manager committed Oct 29, 2023
2 parents c8299c7 + a95b9d6 commit 7c6cda9
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 10 deletions.
8 changes: 4 additions & 4 deletions build/pkgs/nauty/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=nautyVERSION.tar.gz
sha1=c9fd2b4c99b8c624e430f3f4e1492a4219e3495e
md5=2ead635a417e20a18b3aabee83fac1ef
cksum=718823455
upstream_url=http://pallini.di.uniroma1.it/nauty27r1.tar.gz
sha1=10c39117c55c69c18c6a107110e7c08f3d873652
md5=7a82f4209f5d552da3078c67e5af872e
cksum=2164796643
upstream_url=https://pallini.di.uniroma1.it/nauty2_8_6.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/nauty/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27r1.p1
2.8.6.p0
144 changes: 144 additions & 0 deletions build/pkgs/nauty/patches/nauty-2.8.6-gentreeg-gentourng.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
From edb0474a4db8e69f971e4eebe18716309f5a7bb3 Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <[email protected]>
Date: Tue, 17 Jan 2023 19:44:49 -0500
Subject: [PATCH 1/1] Upstream fixes for gentreeg and gentourng.

https://mailman.anu.edu.au/pipermail/nauty/2023-January/000903.html
---
gentourng.c | 2 +-
gentreeg.c | 95 ++++++++++++++++++++++++++++-------------------------
2 files changed, 51 insertions(+), 46 deletions(-)

diff --git a/gentourng.c b/gentourng.c
index 634e5e8..5c7ffff 100644
--- a/gentourng.c
+++ b/gentourng.c
@@ -1408,7 +1408,7 @@ PLUGIN_INIT
(*outproc)(outfile,g,1);
}
}
- else
+ else if (!connec || maxn != 2)
{
makeleveldata();

diff --git a/gentreeg.c b/gentreeg.c
index 946d5f8..15bf87b 100644
--- a/gentreeg.c
+++ b/gentreeg.c
@@ -1,4 +1,4 @@
-/* gentree version 1.3; Brendan McKay Oct 2022 */
+/* gentree version 1.4; Brendan McKay Dec 2022 */
/* This program is a wrapper for the program FreeTrees.c written
* by Gang Li & Frank Ruskey. See below for their original
* comments. */
@@ -32,49 +32,54 @@ Counts for n=1..45:
1: 1
2: 1
3: 1
- 4: 1
- 5: 2
- 6: 3
- 7: 6
- 8: 11
- 9: 23
-10: 47
-11: 106
-12: 235
-13: 551
-14: 1301
-15: 3159
-16: 7741
-17: 19320
-18: 48629
-19: 123867
-20: 317955
-21: 823065
-22: 2144505
-23: 5623756
-24: 14828074
-25: 39299897
-26: 104636890
-27: 279793450
-28: 751065460
-29: 2023443032
-30: 5469566585
-31: 14830871802
-32: 40330829030
-33: 109972410221
-34: 300628862480
-35: 823779631721
-36: 2262366343746
-37: 6226306037178
-38: 17169677490714
-39: 47436313524262
-40: 131290543779126
-41: 363990257783343
-42: 1010748076717151
-43: 2810986483493475
-44: 7828986221515605
-45: 21835027912963086
-********************************/
+ 4: 2
+ 5: 3
+ 6: 6
+ 7: 11
+ 8: 23
+ 9: 47
+10: 106
+11: 235
+12: 551
+13: 1301
+14: 3159
+15: 7741
+16: 19320
+17: 48629
+18: 123867
+19: 317955
+20: 823065
+21: 2144505
+22: 5623756
+23: 14828074
+24: 39299897
+25: 104636890
+26: 279793450
+27: 751065460
+28: 2023443032
+29: 5469566585
+30: 14830871802
+31: 40330829030
+32: 109972410221
+33: 300628862480
+34: 823779631721
+35: 2262366343746
+36: 6226306037178
+37: 17169677490714
+38: 47436313524262
+39: 131290543779126
+40: 363990257783343
+41: 1010748076717151
+42: 2810986483493475
+43: 7828986221515605
+44: 21835027912963086
+45: 60978390985918906
+46: 170508699155987862
+47: 477355090753926460
+48: 1337946100045842285
+49: 3754194185716399992
+50: 10545233702911509534
+*******************************/

/* Comments on original program by original authors */
/*==============================================================*/
@@ -676,7 +681,7 @@ PLUGIN_INIT
}
else if (nv == 2)
{
- if (res == 0 && maxdeg >= 1 && mindiam <= 1 && maxdiam >= 2)
+ if (res == 0 && maxdeg >= 1 && mindiam <= 1 && maxdiam >= 1)
{
par[1] = 0;
par[2] = 1;
--
2.38.2

6 changes: 5 additions & 1 deletion build/pkgs/nauty/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# We don't use the "converseg" program, but we need to ensure that we
# only detect nauty >= 2.6 because we use the digraph6 format from
# that version -- and converseg was added in nauty-2.6.
#
# We also don't use the "genposetg" program (added in nauty 2.8) yet.
# We require it here to prepare Sage for the use of the major new features
# added in 2.7 and 2.8 (https://pallini.di.uniroma1.it/changes24-28.txt).
AC_DEFUN([SAGE_TEST_NAUTY_PROGS], [
m4_foreach([nautyprog], [directg, gentourng, geng, genbg, gentreeg, converseg], [
m4_foreach([nautyprog], [directg, gentourng, geng, genbg, gentreeg, converseg, genposetg], [
AC_PATH_PROG([$2]nautyprog, [[$1]nautyprog])
AS_IF([test x$[$2]nautyprog = x], [sage_spkg_install_nauty=yes])
])
Expand Down
8 changes: 4 additions & 4 deletions build/pkgs/nauty/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ sdh_make

# No install target so we resort to manual copy
PROGRAMS="
addedgeg amtog biplabg catg complg converseg copyg countg cubhamg deledgeg
delptg directg dreadnaut dretodot dretog genbg genbgL geng genquarticg genrang
genspecialg gentourng gentreeg hamheuristic labelg linegraphg listg multig
newedgeg pickg planarg ranlabg shortg showg subdivideg twohamg vcolg
addedgeg addptg amtog ancestorg assembleg biplabg catg complg converseg copyg countg cubhamg deledgeg
delptg dimacs2g directg dreadnaut dretodot dretog edgetransg genbg genbgL geng gengL genposetg genquarticg genrang
genspecialg gentourng gentreeg hamheuristic labelg linegraphg listg multig nbrhoodg
newedgeg pickg planarg productg ranlabg shortg showg subdivideg twohamg underlyingg vcolg
watercluster2 NRswitchg"
sdh_install $PROGRAMS "$SAGE_LOCAL/bin"

Expand Down

0 comments on commit 7c6cda9

Please sign in to comment.