[math-fun] Custom number crunching programs --- expectations?
Hello, I've used a GNFS factoring package, and it seemed to have been modeled after a C program targeting POSIX, and emitting output to stdout. I also wrote similar programs with the same mode of operation. Have you had experience with custom number crunching programs like that? How did you interacting with them? What would you expect? Thanks in advance. Andres.
I consider output on stdout (note the name), well, standard. Duplicating some of the lines (start of run, jobname, end of run) to stderr recently proved useful for a multicore computation. One can always redirect to files or pipes, so nothing (I am aware of) is lost. That's how I "interact" with programs. Taking great care that the output is trivially machine readable is something I do with anything of non-zero importance. Best regards, jj P.S.: should you ever use C++ and note that stdin/stdout are very slow (they are by default), use ios::sync_with_stdio(false); Of course you must not use C input/output in the same program then. * Andres Valloud <avalloud@smalltalk.comcastbiz.net> [Apr 17. 2019 13:51]:
Hello,
I've used a GNFS factoring package, and it seemed to have been modeled after a C program targeting POSIX, and emitting output to stdout. I also wrote similar programs with the same mode of operation.
Have you had experience with custom number crunching programs like that? How did you interacting with them? What would you expect?
Thanks in advance.
Andres. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
P.S.: should you ever use C++ and note that stdin/stdout are very slow (they are by default), use ios::sync_with_stdio(false); Of course you must not use C input/output in the same program then.
Don't count on this. In particular, this does not appear to change the performance when using newer, LLVM-based compilers (and yes, the performance is still incredibly bad). If you need high-performance I/O you should probably just use plain old C I/O. -tom -- -- http://cube20.org/ -- http://golly.sf.net/ --
participants (3)
-
Andres Valloud -
Joerg Arndt -
Tomas Rokicki