Skip to content
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
36 changes: 17 additions & 19 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ env:
GLOBAL_MULTIPLIER: 1

concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the main branch we don't
# Group by workflow and ref, and to limit to 1 concurrent job except for main
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
# Cancel intermediate builds for pull requests
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
Expand All @@ -40,7 +39,7 @@ jobs:
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}"
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: "Setup"
run: |
Expand All @@ -58,7 +57,7 @@ jobs:
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV

# install FLINT dev version
git clone https://github.com/flintlib/flint.git
git clone --depth=1 https://github.com/flintlib/flint.git
cd flint
./bootstrap.sh
./configure
Expand Down Expand Up @@ -90,10 +89,10 @@ jobs:
$MAKE check

##############################################################################
# ubuntu 24.04, clang, flint 3.2.0
# ubuntu 24.04, clang, flint 3.4.0
##############################################################################
ubuntu-clang-flint320:
name: Ubuntu 24.04, clang, FLINT 3.2.0 (x10)
ubuntu-clang-flint340:
name: Ubuntu 24.04, clang, FLINT 3.4.0 (x10)

runs-on: ubuntu-24.04

Expand All @@ -108,7 +107,7 @@ jobs:
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}"
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: "Setup"
run: |
Expand All @@ -126,9 +125,8 @@ jobs:
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV

# install FLINT dev version
git clone https://github.com/flintlib/flint.git
git clone --depth=1 https://github.com/flintlib/flint.git --branch v3.4.0 --single-branch
cd flint
git checkout v3.2.0
./bootstrap.sh
./configure
make
Expand Down Expand Up @@ -177,7 +175,7 @@ jobs:
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}"
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: "Setup"
run: |
Expand All @@ -195,7 +193,7 @@ jobs:
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV

# install FLINT dev version
git clone https://github.com/flintlib/flint.git
git clone --depth=1 https://github.com/flintlib/flint.git
cd flint
./bootstrap.sh
./configure
Expand Down Expand Up @@ -246,7 +244,7 @@ jobs:
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}"
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: "Setup"
run: |
Expand Down Expand Up @@ -308,7 +306,7 @@ jobs:
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}"
echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: "Setup"
run: |
Expand All @@ -326,7 +324,7 @@ jobs:
echo "MAKE=gmake -j$(expr $(nproc) + 1) -l 10 --output-sync=target" >> $GITHUB_ENV

# install FLINT dev version
git clone https://github.com/flintlib/flint.git
git clone --depth=1 https://github.com/flintlib/flint.git
cd flint
./bootstrap.sh
./configure \
Expand Down Expand Up @@ -380,7 +378,7 @@ jobs:
# FLINT_TEST_MULTIPLIER: "0.5"

# steps:
# - uses: actions/checkout@v4
# - uses: actions/checkout@v6

# - name: "Setup MinGW"
# uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -444,7 +442,7 @@ jobs:
# echo "TIMEOUT=$TIMEOUT | Out-File -Append -FilePath $env:GITHUB_ENV"
# shell: powershell

# - uses: actions/checkout@v4
# - uses: actions/checkout@v6

# - name: "Setup cache for dependencies"
# uses: actions/github-script@v7
Expand Down Expand Up @@ -509,7 +507,7 @@ jobs:
# echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}"
# echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV

# - uses: actions/checkout@v4
# - uses: actions/checkout@v6

# - name: "Setup latest Alpine Linux"
# uses: jirutka/setup-alpine@v1
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ matrices, structured matrices, and their applications.
Version 0.5

Warning: the FLINT-based part of PML (flint-extras folder) is work in progress.
Currently, it requires FLINT version 3.4.0 (November 2025) or later.

## Authors

Expand Down Expand Up @@ -61,7 +62,7 @@ Public License), see `flint-extras/COPYING_FLINT` for the license.
## Installation (FLINT-based version)

The FLINT-based version is work in progress, and currently compiles with FLINT
3.2.0 or later versions, including the current development version.
3.4.0 or later versions, including the current development version.

The build system is similar to (and directly derived from) FLINT's one. In
short, for a standard configuration, the following steps should work:
Expand Down
2 changes: 1 addition & 1 deletion flint-extras/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ FLINT_CHECK_MPFR_H(4,1,0)
# check FLINT
################################################################################

PML_CHECK_FLINT_H(3,2,0)
PML_CHECK_FLINT_H(3,4,0)

################################################################################
# check headers
Expand Down
2 changes: 1 addition & 1 deletion flint-extras/pml.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Name: @PACKAGE_NAME@
Description: Polynomial Matrix Library / FLINT
Version: @PACKAGE_VERSION@
URL: https://github.com/vneiger/pml
Requires: gmp >= 6.2.1 mpfr >= 4.1.0 flint >= 3.2.0
Requires: gmp >= 6.2.1 mpfr >= 4.1.0 flint >= 3.4.0
Cflags: -I${includedir}
Libs: -L${libdir} -lpml
12 changes: 6 additions & 6 deletions flint-extras/src/nmod32_vec/profile/p-dot_mdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ void time_##fun(time_args targs, flint_rand_t state) \
\
double FLINT_SET_BUT_UNUSED(tcpu), twall; \
\
TIMEIT_START \
TIMEIT_START; \
res = _nmod32_vec_##fun(v1, v2, len, mod, arg); \
TIMEIT_STOP_VALUES(tcpu, twall) \
TIMEIT_STOP_VALUES(tcpu, twall); \
\
printf("%.2e", twall); \
\
Expand Down Expand Up @@ -151,9 +151,9 @@ void time_dot_msolve_avx2(time_args targs, flint_rand_t state)

double FLINT_SET_BUT_UNUSED(tcpu), twall;

TIMEIT_START
TIMEIT_START;
res = _nmod32_vec_dot_msolve_avx2(v1, v2, len, mod.n);
TIMEIT_STOP_VALUES(tcpu, twall)
TIMEIT_STOP_VALUES(tcpu, twall);

printf("%.2e", twall);

Expand Down Expand Up @@ -219,10 +219,10 @@ void time_##fun(time_args targs, flint_rand_t state) \
\
double FLINT_SET_BUT_UNUSED(tcpu), twall; \
\
TIMEIT_START \
TIMEIT_START; \
_nmod32_vec_##fun(res, mat, vec, \
nrows, len, len, mod); \
TIMEIT_STOP_VALUES(tcpu, twall) \
TIMEIT_STOP_VALUES(tcpu, twall); \
\
printf("%.2e", twall); \
\
Expand Down
2 changes: 1 addition & 1 deletion flint-extras/src/nmod_extra.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ulong inverse_mod_power_of_two(ulong p, int k);
/* finds an element of order at least n */
/* returns 0 if not found */
/*------------------------------------------------------------*/
ulong nmod_find_root(long n, nmod_t mod);
ulong nmod_find_root(ulong n, nmod_t mod);


/*------------------------------------------------------------*/
Expand Down
10 changes: 5 additions & 5 deletions flint-extras/src/nmod_extra/nmod_find_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
/* finds an element of order at least n */
/* returns 0 if not found */
/*------------------------------------------------------------*/
ulong nmod_find_root(slong n, nmod_t mod)
ulong nmod_find_root(ulong n, nmod_t mod)
{
slong q;
for(q = 2; q < (slong) mod.n; q++)
ulong q;
for(q = 2; q < mod.n; q++)
{
slong k = 1;
slong qk = q;
ulong k = 1;
ulong qk = q;
while (qk != 1 && k < n)
{
qk = nmod_mul(qk, q, mod);
Expand Down
Loading