WvanWoerden / G6K-GPU-Tensor

Lattice Sieving using GPU Tensor cores based on the General Sieve Kernel (G6K)
21 stars 6 forks source link

Assertion `first <= nth && nth < last' failed #15

Open clay3154 opened 1 year ago

clay3154 commented 1 year ago

Hello developers,when i install python3lwe branches and run python bkz.py 180 --bkz/betas 60:97:1 --bkz/pre_beta 59 --trials 8 --workers 8 --bkz/extra_d4f 12 --bkz/jump 3 The following error code has occurred

python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.
python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.

python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.
python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.

python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.

python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.
python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.
python3: ../cuda/../kernel/parallel_algorithms.hpp:356: void parallel_algorithms::nth_element(RandIt, RandIt, RandIt, Compare, Threadpool&, std::size_t) [with RandIt = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; Compare = Siever::gpu_sieve()::<lambda(std::size_t, std::size_t)>; Threadpool = thread_pool::thread_pool; std::size_t = long unsigned int]: Assertion `first <= nth && nth < last' failed.
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/python3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/python3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "bkz.py", line 129, in bkz_kernel
    pump_params=pump_params)
  File "/home/clay/py3-lwe/G6K-GPU-Tensor/g6k/algorithms/bkz.py", line 123, in pump_n_jump_bkz_tour
    pump(g6k, tracer, kappa, beta, f, **pump_params)
  File "/home/clay/py3-lwe/G6K-GPU-Tensor/g6k/algorithms/pump.py", line 140, in pump
    wrapped_sieve(pump)  # The first initializing Sieve should always be Gauss to avoid rank-loss
  File "/home/clay/py3-lwe/G6K-GPU-Tensor/g6k/algorithms/pump.py", line 36, in wrapped_sieve
    pump.g6k(alg=alg, tracer=pump.tracer)
  File "g6k/siever.pyx", line 1261, in g6k.siever.Siever.__call__
    with tracer.context("gpu"):
  File "g6k/siever.pyx", line 1262, in g6k.siever.Siever.__call__
    self.gpu_sieve(reset_stats=reset_stats)
  File "g6k/siever.pyx", line 1170, in g6k.siever.Siever.gpu_sieve
    sig_on()
RuntimeError: Aborted
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "bkz.py", line 199, in <module>
    bkz_tour()
  File "bkz.py", line 177, in bkz_tour
    seed=args.seed)
  File "/home/clay/py3-lwe/G6K-GPU-Tensor/g6k/utils/cli.py", line 115, in run_all
    for i, res in enumerate(pool.map(f, jobs)):
  File "/usr/local/python3/lib/python3.7/multiprocessing/pool.py", line 290, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/local/python3/lib/python3.7/multiprocessing/pool.py", line 683, in get
    raise self._value
RuntimeError: Aborted

it seems like #2 ,i modify the Makefile but the problem remains,my cuda version is 11.2 and gcc version is 8.4.Wish your help,thanks!