gap

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra

https://github.com/gap-system/gap

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    29 of 70 committers (41.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.6%) to scientific vocabulary

Keywords

algebra computer-algebra computer-algebra-system discrete-mathematics group-theory math mathematics representation-theory

Keywords from Contributors

abstract-algebra julia-package maths algebraic-number-theory class-field-theory number-theory julialang numerical programming-language english
Last synced: 4 months ago · JSON representation ·

Repository

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra

Basic Info
  • Host: GitHub
  • Owner: gap-system
  • License: gpl-2.0
  • Language: GAP
  • Default Branch: master
  • Homepage: https://www.gap-system.org
  • Size: 421 MB
Statistics
  • Stars: 899
  • Watchers: 39
  • Forks: 174
  • Open Issues: 490
  • Releases: 16
Topics
algebra computer-algebra computer-algebra-system discrete-mathematics group-theory math mathematics representation-theory
Created almost 11 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Citation Copyright

README.buildsys.md

The GAP build system

This file is meant to give an overview of how the GAP build system works. It is targeted at people who need to work on the build system itself (to extend it, fixes bugs in it, etc.). It should not be necessary to read this if all you want to do is compile GAP and work on the GAP library and kernel.

Note that this really is just an overview; for details, please refer to the comments inside the various parts of the build system.

Prerequisites

In order to work on the build system, you need at least the following:

  • GNU autoconf (we recommend 2.69 or later)
  • GNU make

Note that we extensively use features provided by GNU make, so in general another version of make, such as BSD make, is not suitable.

Quick start: building GAP with no frills

If you are working with a fresh clone of the GAP repository, you need to run the autogen.sh script first, which will generate the configure script. Afterwards, or if you are using a release version of GAP, you can follow the standard procedure:

./configure
make

== Overview of the files constituting the GAP build system

  • autogen.sh: sets up the build system; typically the first thing to run in a fresh clone of the GAP repository. It runs autoconf and autoheader.

  • configure: generated by autogen.sh from configure.ac.

  • configure.ac: the GNU autoconf source of our configure script.

  • GNUmakefile, GNUmakefile.in: The former file is generated from the latter by configure. It is the primary Makefile (GNU make prefers it over Makefile). It only contains variables and vpath settings, and includes Makefile.rules for the actual build rules.

  • Makefile: This is a placeholder file, and serves two purposes:

    1. If the user runs make before configure, it prints a warning.
    2. If configure did run, but make is not GNU make, it produces a corresponding error message.
  • Makefile.rules: This is the core of the build system. If you want to add or remove a kernel C source file, you need to add or remove its name here and only here.

  • cnf/: All files in this directory are part of the build system.

  • extern/: External libraries we bundle with GAP (such as GMP) are put in here.

  • build/: Generated code (such as config.h and version.c) is put into this directory.

  • build/obj/: All *.o resp. *.lo files are placed into this directory.

  • build/deps/ directories contain *.d files generated by the build system, and which are used to track dependencies, e.g. of C source files on header files.

Out-of-tree builds

The old GAP build system had a concept of "configs" and "CONFIGNAME", which allowed you to build GAP in different configurations from a single set of sources. This is gone in the current build system. However, a similar goal can be achieved by using so-called "out-of-tree builds".

In the following and also in the files that make up the build system, "srcdir" refers to the directory containing the GAP files, i.e. it contains this README, the src and lib directories and more.

To create a new out-of-tree build, create a new directory anywhere in your filesystem. A typical setup places the out-of-tree dirs into subdirectories of a "build" directory inside the srcdir. So you might have directories

srcdir/build/default
srcdir/build/default32
srcdir/build/hpcgap
srcdir/build/hpcgap32
...

We will refer to this directory from now on as the "builddir".

To initialize the out-of-tree build, change into the builddir and execute the configure script from the srcdir, like this:

cd $builddir
$srcdir/configure

You can pass any additional options you like to configure, e.g. ABI=32 or --enable-hpcgap.

Once the configure script has completed, you can run make as usual, and all the object files and the gap executable will be placed inside builddir. Your srcdir will remain untouched.

Dependency tracking

The build system tracks dependencies between files, such as between C source and header files, via *.d files stored in build/deps/. These files are mostly generated by the compiler; for this, the compiler needs to support the relevant flags (gcc, clang, icc all do so).

For a detailed explanation of a very similar scheme, see here: https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/

HPC-GAP integration

One of the main features of the new build system is that it optionally allows to build HPC-GAP instead of plain GAP. HPC-GAP is an experimental fork of GAP which implements concurrent programming, multi-threading, etc..

The HPC-GAP kernel and library were forked from the GAP kernel and library and developed semi-independently for several years, with occasional merges between the two. In order to recombine the two, we merged the HPC-GAP fork into a subdirectory hpcgap of the GAP repository. Then, all files inside hpcgap which were identical to their counterparts in the GAP repository were deleted (e.g. hpcgap/src/ariths.c was deleted as it was identical to src/ariths.c). At this point, hpcgap/src has been fully merged, but there are still files in hpcgap/lib/ which differ from their counterparts in lib/

The new build system can optionally be instructed to build HPC-GAP, by passing the --enable-hpcgap flag to the configure script. For the resulting HPC-GAP binary to work, a trick is used: HPC-GAP mode uses multiple GAP root paths. Specifically, the GAP kernel function SySetGapRootPath was modified so that for every root directory FOO that gets added, we first add FOO/hpcgap to the list of root directories. This way, GAPROOT/hpcgap/lib is searched first for files, and only if no matching file is found there does GAP also search in GAPROOT/lib.

Cross compilation

The GAP build system supports cross compilation by leveraging the GNU autoconf support for this (please consult the GNU autoconf manual for details). When building GAP from a release archive, everything should just work (if it doesn't, please report it to us as a bug).

However, for development versions of GAP built directly from its git sources, there is a complication: GAP uses a few C source files which are the output of the GAP-to-C compiler gac, which in turn needs a working gap executable. This requires a bootstrapping process, which works because GAP can actually be built and used without those files, they are merely a performance optimization. So what our build system does is to first compile a version of GAP without those files, then run that to generate those files (if they are missing or not up-to-date). Then finally the actual GAP executable is compiled.

Unfortunately, this poses a problem for cross compilation: when compiling GAP on one computer (the "build" architecture) for a different computer with a different OS / CPU architecture / whatnot (the "host" architecture), then the first GAP executable needs to be built for the "build" architecture, so that it can run during the build process and generated code; while the second GAP executable needs to be compiled for the "host" architecture.

A second cross compilation obstacle is that there files build/ffdata.c and build/ffdata.h are generated by a C program ffgen that thus needs to be built for the "build" architecture.

To overcome these obstacles, you may proceed as follows:

  1. First build GAP for the "build" architecture as usual.
  2. This produces files build/c_*.c and build/ffdata.* which you should copy into the src directory.
  3. Clean all build artifacts (alternatively, perform steps 1 & 2 in an out-of-tree build directory)
  4. Build GAP a second time, for the "host" architecture. The build system will detect the files you copied into src in step 2, and will then not attempt to generate them.

Here is a minimal example to illustrate this:

./configure && make                 # build native GAP
cp build/c_*.c build/ffdata.* src   # copy the generated code
make clean
./configure --host=HOST_ARCH        # build for the "host" architecture
make

Note that this is really a minimalistic example; for actual cross compilation, you may need to provide further flags to the configure script and/or set environment variables, e.g. to ensure it finds dependencies like GMP or GNU readline, or to specify an installation prefix, and so on.

One final remark: some of the generated files differ for HPC-GAP. If you want to cross compile HPC-GAP, you need to generate them with HPC-GAP, and place them into src/hpc instead of src, like in this example:

./configure --enable-hpcgap
make
cp build/c_*.c src/hpc/
cp build/ffdata.* src/
make clean
./configure --host=HOST_ARCH --enable-hpcgap
make

Open tasks

There are many things that still need to be done in the new build system. For an overview, see https://github.com/gap-system/gap/issues?q=is%3Aopen+is%3Aissue+label%3A%22topic%3A+build+system%22

Owner

  • Name: GAP - Groups, Algorithms, Programming
  • Login: gap-system
  • Kind: organization
  • Email: gap@gap-system.org

A System for Computational Discrete Algebra

Citation (CITATION)

Please use one of the following samples to cite GAP version from this installation

Text:

[GAP]  GAP  –  Groups,  Algorithms,  and Programming, Version 4.16dev, 
The GAP Group (this year), https://www.gap-system.org.

HTML:

<p class='BibEntry'>
[<span class='BibKey'>GAP</span>]   
 <i class='BibTitle'>GAP – Groups, Algorithms, and Programming, Version 4.16dev</i>,
 <span class='BibOrganization'>The GAP Group</span> (<span class='BibYear'>this year</span>),
<span class='BibHowpublished'><a href="https://www.gap-system.org">https://www.gap-system.org</a></span>.
</p>

BibXML:

<entry id="GAP4.16dev"><misc>
  <title><C>GAP</C> &ndash; <C>G</C>roups, <C>A</C>lgorithms,
         and <C>P</C>rogramming, <C>V</C>ersion 4.16dev</title>
  <howpublished><URL>https://www.gap-system.org</URL></howpublished>
  <year>this year</year>
  <key>GAP</key>
  <keywords>groups; *; gap; manual</keywords>
  <other type="organization">The GAP <C>G</C>roup</other>
</misc></entry>

BibTeX:

@misc{ GAP4.16dev,
  title =            {{GAP} {\textendash} {G}roups, {A}lgorithms, and {P}rogramming, {V}ersion 4.16dev},
  organization =     {The GAP {G}roup},
  year =             {this year},
  howpublished =     {\href{https://www.gap-system.org}{\texttt{https://www.gap-system.org}}},
  key =              {GAP},
  keywords =         {groups; *; gap; manual}
}

If you are not using BibTeX, here is the bibliography entry produced 
by BibTeX (in bibliography style `alpha'):

\bibitem[GAP]{GAP4}
\emph{GAP -- Groups, Algorithms, and Programming}, Version 4.16dev,
The GAP~Group (this year), \verb+https://www.gap-system.org+.

If you have (predominantly) used one or more particular GAP packages,
please cite these packages in addition to GAP itself (either check the
the package documentation for the suggestions, or use a scheme like:

[PKG]
<Author name(s)>, <package name>, <package long title>, 
Version <package version> (<package date>), (GAP package),
<package URL>.

You may also produce citation samples for a GAP package by entering

    Cite("packagename");

in a GAP installation with the working version of this package available.

GitHub Events

Total
  • Create event: 47
  • Commit comment event: 6
  • Release event: 2
  • Issues event: 121
  • Watch event: 85
  • Delete event: 44
  • Issue comment event: 468
  • Push event: 193
  • Pull request review comment event: 169
  • Pull request review event: 312
  • Pull request event: 350
  • Fork event: 20
Last Year
  • Create event: 47
  • Commit comment event: 6
  • Release event: 2
  • Issues event: 121
  • Watch event: 85
  • Delete event: 44
  • Issue comment event: 468
  • Push event: 193
  • Pull request review comment event: 169
  • Pull request review event: 312
  • Pull request event: 350
  • Fork event: 20

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 9,327
  • Total Committers: 70
  • Avg Commits per committer: 133.243
  • Development Distribution Score (DDS): 0.534
Past Year
  • Commits: 330
  • Committers: 13
  • Avg Commits per committer: 25.385
  • Development Distribution Score (DDS): 0.588
Top Committers
Name Email Commits
Max Horn m****x@q****e 4,343
Reimer Behrends b****s@g****m 866
Chris Jefferson c****1@s****k 831
Alexander Hulpke h****e@m****u 637
Alexander Konovalov a****v@s****k 552
Markus Pfeiffer m****r@s****k 529
Steve Linton s****n@s****k 259
Thomas Breuer s****m@m****e 249
James Mitchell j****3@s****k 237
Wilf Wilson w****f@w****t 144
Gábor Horváth g****h@s****u 118
Frank Lübeck f****k@m****e 75
Sergio Siccha s****a@p****t 70
gap d****l@g****g 57
Max Neunhöffer n****f@m****k 33
Vladimir Janjic jv@c****k 27
Fabian Zickgraf f****f@d****m 27
Sebastian Gutsche g****e@m****e 27
Burkhard Höfling b****d@h****e 21
Michael Torpey m****5@s****k 19
Mathieu Dutour Sikiric m****r@g****m 18
E. Madison Bray e****y@l****r 17
Chris Wensley c****s@b****m 12
Friedrich Rober f****r@r****e 12
Sandeep Murthy s****p@s****s 12
Dmitrii Pasechnik d****a@p****o 9
Laurent Bartholdi l****i@g****m 9
Dominik Bernhardt d****t@r****e 8
Lucas Wollenhaupt g****b@w****e 8
Jerry James l****y@g****m 7
and 40 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 246
  • Total pull requests: 495
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 2 months
  • Total issue authors: 68
  • Total pull request authors: 38
  • Average comments per issue: 3.22
  • Average comments per pull request: 1.34
  • Merged pull requests: 358
  • Bot issues: 0
  • Bot pull requests: 17
Past Year
  • Issues: 61
  • Pull requests: 249
  • Average time to close issues: 8 days
  • Average time to close pull requests: 6 days
  • Issue authors: 29
  • Pull request authors: 20
  • Average comments per issue: 1.67
  • Average comments per pull request: 1.04
  • Merged pull requests: 171
  • Bot issues: 0
  • Bot pull requests: 6
Top Authors
Issue Authors
  • fingolfin (82)
  • ThomasBreuer (44)
  • dimpase (9)
  • zickgraf (6)
  • olexandr-konovalov (5)
  • ChrisJefferson (5)
  • TWiedemann (5)
  • rokicki (4)
  • wilfwilson (4)
  • stertooy (4)
  • orlitzky (4)
  • james-d-mitchell (4)
  • hulpke (3)
  • qodesign (3)
  • lgoettgens (3)
Pull Request Authors
  • fingolfin (260)
  • ThomasBreuer (68)
  • dependabot[bot] (17)
  • hulpke (17)
  • lgoettgens (16)
  • james-d-mitchell (15)
  • ChrisJefferson (14)
  • zickgraf (12)
  • TWiedemann (11)
  • olexandr-konovalov (6)
  • stertooy (5)
  • reiniscirpons (4)
  • BaseMax (4)
  • ptrrsn (4)
  • mtorpey (4)
Top Labels
Issue Labels
kind: bug (29) kind: enhancement (27) topic: ci (15) kind: discussion (14) kind: bug: wrong result (13) topic: packages (12) kind: bug: unexpected error (11) topic: documentation (11) topic: library (11) topic: build system (10) regression (9) topic: tests (8) topic: kernel (8) topic: infrastructure (7) os: windows (6) kind: bug: crash (5) good first issue (5) topic: HPC-GAP (3) priority: high (2) priority: low (2) kind: general proposed change (2) topic: libgap (2) kind: quirk (2) topic: julia (1) gapdays2024-summer (1) release notes: not needed (1) topic: workflow (1) kind: support request (1) topic: error handling (1) gapdays2017-fall (1)
Pull Request Labels
release notes: not needed (257) topic: library (123) release notes: use title (84) topic: kernel (79) kind: bug (67) kind: enhancement (66) kind: bug: unexpected error (34) topic: documentation (32) backport-to-4.14 (28) kind: bug: wrong result (25) topic: build system (22) backport-to-4.13 (21) topic: ci (20) dependencies (17) topic: performance (16) topic: infrastructure (16) do not merge (14) topic: tests (14) topic: packages (13) regression (11) topic: julia (11) backport-to-4.14-DONE (7) release notes: to be added (7) os: windows (5) kind: removal or deprecation (5) topic: HPC-GAP (4) kind: discussion (4) topic: gac (4) priority: high (3) gapdays2025-summer (3)

Packages

  • Total packages: 4
  • Total downloads: unknown
  • Total dependent packages: 7
    (may contain duplicates)
  • Total dependent repositories: 7
    (may contain duplicates)
  • Total versions: 76
proxy.golang.org: github.com/gap-system/gap
  • Versions: 62
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago
conda-forge.org: gap-defaults
  • Versions: 3
  • Dependent Packages: 2
  • Dependent Repositories: 5
Rankings
Dependent repos count: 14.7%
Forks count: 14.7%
Stargazers count: 15.6%
Average: 16.2%
Dependent packages count: 19.6%
Last synced: 4 months ago
conda-forge.org: gap-core
  • Versions: 4
  • Dependent Packages: 3
  • Dependent Repositories: 1
Rankings
Forks count: 14.7%
Stargazers count: 15.6%
Dependent packages count: 15.6%
Average: 17.5%
Dependent repos count: 24.1%
Last synced: 4 months ago
conda-forge.org: gap
  • Versions: 7
  • Dependent Packages: 2
  • Dependent Repositories: 1
Rankings
Forks count: 14.7%
Stargazers count: 15.6%
Average: 18.5%
Dependent packages count: 19.6%
Dependent repos count: 24.1%
Last synced: 4 months ago

Dependencies

.github/workflows/CI.yml actions
  • Chocobo1/setup-ccache-action v1 composite
  • act10ns/slack v2 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
  • gap-actions/setup-cygwin v1 composite
  • gap-actions/should-i-notify-action v1 composite
  • mxschmitt/action-tmate v3 composite
.github/workflows/lint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/release.yml actions
  • act10ns/slack v2 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • gap-actions/setup-cygwin v1 composite
  • gap-actions/should-i-notify-action v1 composite
  • softprops/action-gh-release v1 composite
.github/workflows/update-gh-pages.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v2 composite
  • actions/deploy-pages v1 composite
  • actions/upload-pages-artifact v1 composite