(Last updated: March 13, 2022)
This is a table of all the active branches of y-cruncher. As this is just a side-hobby, overall development is slow and there is no formal release cycle. As of 2021, the project is on hiatus as I've decided to take a break to do other stuff.
|Branch||Version #||Changes (from v0.7.8.9507)|
No changes since v0.7.9.
The previous version (v0.7.7) is no longer maintained. Please update to v0.7.9. Build support is no longer maintained for v0.7.7 so I will not be able to help if anything breaks in a large computation.
As of 2019, y-cruncher is over half a million lines of code. For a single person hobby project, this is large enough to easily collapse under its own weight. So to keep things managable, development of the project has slowed down in recent years to refocus on long-term maintainability rather than rushing out tons of features and enhancements in a short amount of time.
The result of these "policies" is that it can take a very long time for anything to get done - easily months or years. But for a personal project with no deadlines or oversight, this is perfectly acceptable. Since there is less than one person working on y-cruncher, development is optimized for long-term throughput rather than short-term latency of new features.
Because of the long incubation periods of various features/improvements, there are typically many things going on at once. So I can work on whatever I feel like at any given point. If I get bored of something, I'll shelve it and come back (potentially years) later. What's shown on this page is just a subset of all things going on.
|Nth Root Radicals||
Add support for nth root radicals.
This will enable the computation of Gamma(1/3).
This was originally intended for v0.7.7 with the first release of the Custom Formula feature. But it slipped due to some unexpected numerical stability issues combined with the large backlog of other tasks for v0.7.7.
This is now confirmed for v0.7.8.
The new function is called "InvNthRoot" and will compute x^(-1/r).
Add support for the exponential function.
This will enable the fully generic non-integer power function for real numbers.
This involves inverting log(x) with Newton's Method.
This one is going be ugly. While it's conceptually easy to invert the natural logarithm with Newton's Method, there's a whole mess of other things to deal with:
This was on the roadmap for v0.7.8, but it has been shelved indefinitely.
|Radix Conversion Checkpointing||Add checkpointing to the radix conversions.||
Checkpointing was never implemented in the past for two reasons:
It's time to revisit this since the conversion can take weeks for the Pi record frontier.
|Improved Stress Tester||
The current stress-tester has increasingly poor coverage in today's processors. In fact, the program's unit and integration test frameworks are a better stress test than the dedicated stress test itself!
Find a way build a new stress test around these "better" workloads.
The difficulty here is that the "best" stress test requires mixing all the different instruction sets (SSE, AVX, AVX512). But each of y-cruncher's binaries focuses on only one of them and it's not easy to use a "lower" ISA when compiling for a "higher" one since the compiler will try to vectorize the code to use the higher one.
|Optimized Square Root||
The current square root is just the inverse square root followed by a multiply by the input.
It may be possible to do better by merging that multiply in the final iteration - as is the case for division and reciprocal.
|Optimize the AGM||
In the final iterations of the AGM, much of the output is already known. These can be used to skip some of the early iterations of the Newton's Method square root.
The current log(x) implementation is a dumb wrapper around AGM(1,x).
There are ways to make the AGM require fewer iterations that should be investigated.
|Non-Monotonically Convergent Hypergeometric Series||
Extend the SeriesHypergeometric function to allow series that are not monotonically convergent.
This is needed for confluent hypergeometic functions at large inputs where the series initially diverges before eventually converging.
This will allow certain approximation algorithms to be implemented:
This is expected to be very difficult.
Irregular convergence behavior wreaks havoc on the Binary Splitting implementation since a lot of assumptions break down. While the Brent-McMillan formula for the Euler-Mascheroni Constant already exhibits this behavior, it is specially handled.
The most difficult part of this is precision control. In order to do precision control, y-cruncher needs to know:
#1 is complicated, but likely doable.
#2 doesn't seem approachable in the generic case with the mathematical techniques that I know of.
#2 is difficult due to destructive cancellation. Confluent hypergeometric functions are notorious for this behavior. And it is just the simplest case.
Take a series and something as simple as taking its derivative can drastically alter the magnitude of the value that it converges to. (i.e. exp(-x2) and the Error Function for very large x)
It is likely that #2 will require the user to explicitly tell y-cruncher what the final magnitude will be.
These are projects which have either stalled made no recent progress or are so long term that there is no roadmap.
Provide a way to control y-cruncher through TCP. This will allow 3rd party applications to build a GUI around y-cruncher.
More details here: https://github.com/Mysticial/y-cruncher-GUI
An early version of this was launched with v0.7.6. As of v0.7.7, it theoretically should be complete enough to implement a full GUI for both the stress tester and custom compute options.
Incremental progress will continue to be made. In particular a unified way to express menus and suboptions is still needed.
As of 2019, priorities have shifted elsewhere.
MRFM stands for "Multi-Region Far Memory". It is a very large experimental project that will attempt to solve the NUMA problem and more generally, the supercomputer problem.
The current design of MRFM that is planned is a fundamental departure from y-cruncher's battle-tested model of computation. So virtually all high-level code will need new implementations for MRFM.
As a result, the plan calls for two completely new computation modes:
This will bring the total number of modes to 4. But if all goes as planned, Multi-Region Swap will become a no-compromise generalization of the current Swap Mode. So it will be possible to remove the current Swap Mode without losing much functionality.
Due to the sheer scale of this project along with a large number of unknowns, this was expected to be (and has become) a multi-year project with no guarantee of success.
Much of the planning for this began years ago. But actual coding didn't start until around September of 2016.
As of 2018, progress is stalled due to large amounts of technical debt in y-cruncher's high-level code which have been accumulating for years.
MRFM remains a multi-year project with no end in sight.
Disk I/O is the bane of large number computations. Historically, it was bad only because it is slow. Nowadays, it's also unreliable.
"Unreliability" comes in several forms:
(1) and (2) are easily solved using checkpoint-restart and periodic backups. y-cruncher has supported checkpointing this since v0.5.4 so it isn't really a problem anymore. But (3) is very scary and remains a huge problem today.
Silent data corruption is the worst since it's undetected. It plagues database applications, and unfortunately, y-cruncher is extremely vulnerable as well. If an error manages to slip through y-cruncher's built-in redundancy checks, it will cause a computation to finish with the wrong digits.
Hard drives already use error-correction and CRCs to ensure data integrity. And transfers between the drive to the controller are also protected with CRCs. So you would expect that data corruption would be detected by the operating system right? Nope...
When a hard drive fails to read a sector due to CRC failures, it usually propagates all the way back into the program and manifests as a (1). So that's not a problem. But transfer errors between the drive and the controller are less ideal. Supposedly, transfer errors lead to retransmission. But this isn't always the case.
Throughout the years of developing y-cruncher, transfer errors have also been observed to:
(1) is to be expected if the connection quality is so bad that the data gets stuck in a retransmission loop.
(2) is also be expected if the corrupted data passes a CRC by chance. (I have no idea how long the CRC is, but if it's CRC32, a 1 in 4 billion chance isn't small.)
(3) makes absolutely no sense at all. If the hard drive was able to detect the error, then why the hell doesn't it notify the OS that the operation failed?
In any case, there are other things that don't add up. And in the end, we are forced to accept the reality.
To date, y-cruncher's only defense for silent data corruption is the RAID3. When the swap file configuration is set to use RAID3, (almost) all reads are parity checked. And if the data is bad, it will report a failure. The parity bits are flipped so that zeroing errors that zero everything will fail the parity.
Unfortunately, this is far from sufficient:
To date, silent data corruption has yet to bring down a world-record attempt. But it happens regularly in the development test machines (which contain some very old hard drives). There has also been an instance reported on a forum where a 1 trillion digit computation of Pi failed - presumably due to silent data corruption.
Approximately 80% of the disk I/Os that y-cruncher does are covered by redundancy checks at a higher level. So in the absence of RAID 3, silent data corruption will be detected with 80% probability if we assume uniform distribution. To put it simply, 80% is not good enough. But at the very least, failing a redundancy check should be an immediate and serious red flag.
For a long time, solving the silent corruption problem was deemed too difficult. All software solutions come with a non-trivial amount of overhead.
y-cruncher v0.7.8 saw a complete overhaul of the Swap Mode functionality which finally allowed new features to be added. With the door opened to new stuff, one of the first experiments was a checksumming protocol which turned out be more performant than expected. Thus y-cruncher v0.7.8 will feature checksumming for disk I/O that will be enabled by default.
Will this solve the silent corruption problem? Only time will tell.
y-cruncher is currently a shared memory program. So it will run efficiently given the following assumptions:
As of 2016, these assumptions hold for almost all single-socket systems - which include the majority of personal desktop computers and low-end servers.
But due to the laws of physics and the speed of light, assumption #2 does not hold for larger systems. So now we're into the territory of Non-Uniform Memory Access (NUMA), cluster/distributed computing. For now the focus will be on NUMA systems since that's what the majority of the multi-socket systems are.
In short, y-cruncher does not run efficiently on NUMA. While it scales reasonably well onto dual-socket, it all goes downhill after that. There have been numerous reports of non-scaling (and even backwards scaling) on quad-Opteron systems. And all of this is due to the NUMA.
To exacerbate the problem, OS's normally default to a "first-touch" policy for memory allocation. The problem is that y-cruncher allocates all its memory at the start of a computation with a single thread. With the first-touch policy, all the memory will be allocated (or heavily biased) on one NUMA mode. So during the computation, all the cores from all the NUMA nodes will be hammering that one node for memory access. The interconnect going in and out of that one node will be overwhelmed by the traffic which leads to terrible performance.
y-cruncher v0.7.3 adds the ability to interleave memory across nodes. This balances the interconnect traffic and leads to a significant performance on modern dual and quad-socket systems. But ultimately, this doesn't actually solve the problem of NUMA since the memory accesses (which are now randomized) will still be hitting remote nodes over the interconnect.
To be efficient, the program needs to be aware of the NUMA and needs to be designed specifically for it. This is a fairly difficult task which is made worse by the unlimited combinations of NUMA topologies. Long story short, making y-cruncher NUMA aware will require changing the way that memory is fundamentally stored and managed. This means that it will need to be done as a new "mode" much like how "Ram Only" and "Swap Mode" have completely different data storage formats.
Currently, the most promising solution is to generalize the functionality of swap mode in the following ways:
Many binary splitting recursions have a lot of common factors between the fraction numerators and denominators. Implement an optimization that seeks to remove these common factors so that the numbers are smaller in size.
GCD Factorization was first described here (now a dead link). Since then, there have been subsequent publications that describe the method:
The general idea of the optimization is to keep the prime factorization of some of the recursion variables. Then use this factorization to obtain the GCD of the numerator and denominator terms. Obtaining this prime factorization is done using a sieve.
In the context of y-cruncher, this optimization is applicable to the following constants/algorithms:
Even though GCD factorization has been known for years, y-cruncher has yet to use it for a number of reasons:
While (1) and (3) are certainly solvable, (2) is more difficult. All the ideas so far for attacking (2) are either complicated and fragile, or they require breaking out of the current memory model. For now, there's bigger fish to fry.