Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mlucas 21.0.1 - Assertion failed: Expected ',' not found after TF_BITS field in assignment-specifying line! #30

Open
efvb opened this issue May 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@efvb
Copy link

efvb commented May 5, 2024

HI All,

I installed today Mlucas 21.0.1 from main branch, no issues to compile.
Then I chose worktype 160 with the current Primenet 2.0.1
This version is faster than 20.x from last month.

But I got an error message:

This is the output: Assertion failed: Expected ',' not found after TF_BITS field in assignment-specifying line!

Mlucas 21.0.1

INFO: testing qfloat routines...
System total RAM = 23236, free RAM = 13175
INFO: 13175 MB of free system RAM detected.
CPU Family = ARM Embedded ABI, OS = Linux, 64-bit Version, compiled with Gnu C [or other compatible], Version 11.4.1 20230605 (Red Hat 11.4.1-2.1.0.1).
INFO: Build uses ARMv8 advanced-SIMD instruction set.
INFO: Using prefetch.
INFO: Using inline-macro form of MUL_LOHI64.
INFO: Using FMADD-based 100-bit modmul routines for factoring.
INFO: MLUCAS_PATH is set to ""
INFO: using 53-bit-significand form of floating-double rounding constant for scalar-mode DNINT emulation.
INFO: testing IMUL routines...
INFO: Testing 64-bit 2^p (mod q) functions with 100000 random (p, q odd) pairs...
INFO: System has 4 available processor cores.
INFO: testing FFT radix tables...
Set affinity for the following 4 cores: 0.1.2.3.
User did not set LowMem in mlucas.ini ... allowing all test types.
User did not set CheckInterval in mlucas.ini ... using default.
NTHREADS = 4
Setting ITERS_BETWEEN_CHECKPOINTS = 10000.
looking for worktodo.txt file...
worktodo.txt file found...reading next assignment...
worktodo.txt entry: PRP=2B37D274B3B7D8A18DC3D3E17E27EEAC,1,2,16582879,-1,"1628121653153521"

ERROR: at line 658 of file ../src/Mlucas.c
Assertion failed: Expected ',' not found after TF_BITS field in assignment-specifying line!

[2]+ Exit 1 ./Mlucas -cpu 0:3

@tdulcet tdulcet added the enhancement New feature or request label May 5, 2024
@tdulcet
Copy link
Member

tdulcet commented May 5, 2024

Thanks for the bug report and for testing the latest version! It looks like Mlucas does not support the abbreviated PRP format used by the PrimeNet server, where the TF bits, tests saved, PRP base and residue type parameters are optional for first time cofactor assignments. It would probably be easier for me to update the PrimeNet script to add some fake values for those parameters when using Mlucas.

In the meantime, just add something like a 99,0,3,5, before the known factor at the end of the assignment line, for example:

PRP=2B37D274B3B7D8A18DC3D3E17E27EEAC,1,2,16582879,-1,99,0,3,5,"1628121653153521"

@tdulcet
Copy link
Member

tdulcet commented May 9, 2024

As a temporary workaround, one can add the below code after this line in the PrimeNet script:

            # Workaround Mlucas bug: https://github.com/primesearch/Mlucas/issues/30
            if not (options.cudalucas or options.gpuowl):
                if not assignment.prp_base:
                    assignment.prp_base = 3
                if not assignment.prp_residue_type:
                    assignment.prp_residue_type = 5

This would force to use it to always use the long PRP format for Mlucas. One could then use the --recover-all option to fix any existing assignments. I will add it to the next version of the PrimeNet script if this Mlucas issue is not resolved before then.

@tdulcet
Copy link
Member

tdulcet commented Jun 8, 2024

I included the above temporary workaround in version 2.1 of the PrimeNet program that was released today. I will keep this code in the program until Mlucas is able to support the abbreviated PRP format...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants