Cobalt Sky


5 Jul 2018

Updating Quantum

Brian Atkinson - Articles - 4 comments

Cobalt Sky are working with UNICOM Systems Inc., the owners of the UNICOM Intelligence suite of survey software, to update Quantum for 64-bit operating systems. Quantum is one of the most widely used tabulation and data processing packages in the survey research industry, and despite there having been few updates for many years, it is still the product of choice for many companies. We continue to use it for all manner of projects due to its power and ease of use.

However, the hardware world has moved on and UNICOM now want to update Quantum to take advantage of increased computing power. Quantum is written in C and we have worked with C and Quantum since the 1980s; we relished the challenge of the update.

The source code was written for a 32-bit architecture with modifications for different operating systems, e.g. Linux, Windows, Solaris etc. Our task was to make the 32-bit version run on Windows and Linux under a 64-bit environment. We converted first for Linux. Some sections of the code relied on 32-bit sizes and used very old tricks to save memory space. These had to be rewritten or modified so that they would work with 64-bit pointers and not worry so much about memory. Secondly, some of the code was very old and wouldn’t compile under more modern compilers. These were also fixed. In the main though, the code has stood the test of time and it is a compliment to the original programmers that we didn’t hit any major hurdles.

UNICOM provided the test suite used to check Quantum compilations; this consisted of multiple Quantum runs and their known output. The test suite runs all these programs and then checks that the output is consistent with the benchmarks. This has proved invaluable in locating odd differences caused by the conversion of the code to 64-bit.

Once we had a working 64-bit version, we then took the exact same codebase and compiled for Windows. The Windows version it had been compiled for was ancient, mostly MS-DOS. Where Windows/MS-DOS specific code was present, this was examined and altered to use later API calls if required. Because we had already done a lot of upfront work in converting the code to be 64-bit compatible, the Windows port was reasonably straight forward. The only major change in the Windows version was how Quantum “compiled” its code. We had to make this compatible with different versions of Visual Studio.

A further complication is that Windows and Linux use slightly different datatype sizing. Under Windows a long integer is 32-bits but on Linux it is 64-bits. This would have caused compatibility issues not only with the existing Quanvert DSC as it uses 32-bit values, but the range of the values stored in its data structures. We had to alter the Linux version so that it used 32-bit values. Added to this, some data structures that are saved on disk hold 64-bit pointers. The Quanvert DSC was expecting 32-bits. We had to write “shim” layers that saved such data structures down to disk with 32-bits and convert back to 64-bit when reading from disk regardless of Windows or Linux. The code has been written such that, when the Quanvert DSC is ready to move to 64-bit in the future, then both the Linux and Windows version can easily move to full 64-bits.

This has been a very interesting project so far. Now that the code is working on 64-bit machines we are looking forward to working with UNICOM on enhancements and bug fixes so that users can continue enjoying the power of Quantum well into the future.


  1. Sounds very exciting – well done to the team pulling it off and to Unicom for realising that Quantum still has a lot of potential – especially if its still being developed by people who know what to do with it. Hope they publish some delivery details soon, and I’m sure we all have a constructive list of product enhancements built up over the years.

  2. Sounds interesting, but have few question on this …more than 200 cars limit, mode calculation (not in current version), mean calculation , factors used by auto punches (if factors not mentioned), quintile , stat-test does not work with sid commands (if we join one banner table with another banner table), id limitation with ex manipulation etc..

    how come user will know you are updating as i come through finding quantum update 64 bit. user feels quantum will no longer in future.



    • Hi Sunil,

      Glad to hear you’re interested in Quantum still and thank you for your suggestions. Unicom will be managing the release and will be getting in touch with users. If you would like to be included in this let me know and I’ll pass your details onto Unicom. If you have any colleagues who are also interested please forward their details to me and I’ll pass those on too.

      With regard to your suggestions, Unicom will be collating and managing these in much the same way as Quantime used to. Once you’re “in the system” you can keep in touch with them.

      I hope that helps and thank you for your interest in Quantum.

  3. This is very interesting news, looking forward to 64-bit improved version of Quantum :)

Leave a comment

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *