mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > CADO-NFS

Reply
 
Thread Tools
Old 2020-08-06, 13:51   #1
RedGolpe
 
RedGolpe's Avatar
 
Aug 2006
Monza, Italy

10001002 Posts
Default CADO-NFS error (exit code -9)

Hi all, I am factoring a C143 but the program stopped in error, with no mention of what kind. Here are the last few lines diplayed.

Code:
Info:Square Root: Creating file of (a,b) values
Warning:Command: Process with PID 1917 finished with return code -9
Error:Square Root: Program run on server failed with exit code -9
Error:Square Root: Command line was: /home/ubuntu/cado-nfs/build/ip-172-31-36-46/sqrt/sqrt -poly nfsdata/c145.poly -prefix nfsdata/c145.dep.gz -dep 0 -t 8 -side0 -side1 -gcd > nfsdata/c145.sqrt.stdout.4 2> nfsdata/c145.sqrt.stderr.4
Error:Square Root: Stderr output (last 10 lines only) follow (stored in file nfsdata/c145.sqrt.stderr.4):
Error:Square Root:      Alg(1): starting level 3 at cpu=1962.67s (wct=257.15s), 8 values to multiply
Error:Square Root:      Alg(7): level 1 took cpu=147.07s (wct=18.52s)
Error:Square Root:      Alg(7): starting level 2 at cpu=1964.10s (wct=257.33s), 16 values to multiply
Error:Square Root:      Alg(4): level 2 took cpu=167.89s (wct=21.14s)
Error:Square Root:      Alg(4): starting level 3 at cpu=1964.98s (wct=257.44s), 8 values to multiply
Error:Square Root:      Alg(2): level 2 took cpu=167.94s (wct=21.15s)
Error:Square Root:      Alg(2): starting level 3 at cpu=1967.93s (wct=257.81s), 8 values to multiply
Error:Square Root:      Alg(3): level 2 took cpu=166.18s (wct=20.93s)
Error:Square Root:      Alg(3): starting level 3 at cpu=1982.80s (wct=259.69s), 8 values to multiply
Error:Square Root:
Traceback (most recent call last):
  File "cado-nfs/cado-nfs.py", line 122, in <module>
    factors = factorjob.run()
  File "cado-nfs/scripts/cadofactor/cadotask.py", line 5957, in run
    last_status, last_task = self.run_next_task()
  File "cado-nfs/scripts/cadofactor/cadotask.py", line 6049, in run_next_task
    return [task.run(), task.title]
  File "cado-nfs/scripts/cadofactor/cadotask.py", line 4940, in run
    raise Exception("Program failed")
Exception: Program failed
I resumed the computation and had the same issue. Can it just be that not enough memory is available? Thank you in advance.
RedGolpe is offline   Reply With Quote
Old 2020-08-06, 14:24   #2
charybdis
 
Apr 2020

113 Posts
Default

Yes, this looks like running out of memory. By default CADO runs one dependency per thread which makes the square root very memory-intensive.

Try adding a line
Code:
tasks.sqrt.threads = 1
to your parameter file and resuming - this will cause sqrt to run single-threaded so memory use is lower.

Last fiddled with by charybdis on 2020-08-06 at 14:25
charybdis is offline   Reply With Quote
Old 2020-08-06, 14:54   #3
RedGolpe
 
RedGolpe's Avatar
 
Aug 2006
Monza, Italy

22·17 Posts
Default

Thank you, it worked.
RedGolpe is offline   Reply With Quote
Old 2020-08-06, 15:07   #4
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

5·13·53 Posts
Default

Another way that I've used with larger runs is to add a swap file so I could still use full threads.
EdH is offline   Reply With Quote
Old 2020-09-01, 11:02   #5
RedGolpe
 
RedGolpe's Avatar
 
Aug 2006
Monza, Italy

4416 Posts
Default

Both methods seem to work fine. Since I am running remote instances with limited disk space, and also considering that the sqrt phase takes a negligible time compared to the rest of the factorization, I'll stick with the thread tweaking for now.

I work with 8 threads so I expect the default is tasks.sqrt.threads = 8 and indeed I monitored the memory usage in semi-real time and it overflows. I tried a C140 with tasks.sqrt.threads = 4 and it completed fine. To make it work I edited the <workdir>/c140.parameters_snapshot.<x> file after the error fired so I was able to save the previous computation.

Is there a way to make this change permanent? Should I edit the files in cado-nfs/parameters/factor/ ? I assume for example that for a C140 the relevant file is cado-nfs/parameters/factor/params.c140, is that correct?

Thank you again.
RedGolpe is offline   Reply With Quote
Old 2020-09-01, 12:25   #6
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

5×13×53 Posts
Default

You can edit the params files or you can add the option in your command line. I do the latter on a continual basis with my scripts. Just add "tasks.sqrt.threads=4" within the command:
Code:
./cado-nfs.py <comp> . . . tasks.sqrt.threads=4 . . .
I pull the spaces around the "=" out when I add an option to the command line, but I probably don't need to. Options added to the command line will show up in the snapshots.
EdH is offline   Reply With Quote
Old 2020-09-01, 12:29   #7
RedGolpe
 
RedGolpe's Avatar
 
Aug 2006
Monza, Italy

6810 Posts
Default

Ah, that's useful! Thank you very much!
RedGolpe is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
CADO-NFS error (exit code -6) RedGolpe CADO-NFS 13 2020-08-21 16:20
Is there an error code listing for msieve? EdH Msieve 2 2019-11-14 22:58
CADO-NFS Square Root Error Ferrier CADO-NFS 3 2019-11-01 23:51
Error Code 40 storm5510 Software 19 2016-11-14 15:59
HRF3.TXT now has computer-id and error code GP2 Data 2 2003-10-09 06:46

All times are UTC. The time now is 01:59.

Tue Nov 24 01:59:50 UTC 2020 up 74 days, 23:10, 4 users, load averages: 3.99, 3.91, 3.32

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.