Bitness
Choose 32- or 64-bit version?
As a general note, 32-bit applications/programs are generally being phased out, so in the longer run we do not plan to offer 32-bit Gekko or Gekcel versions. But the longer run may be long, and as long as 32-bit Windows or Excel versions are being used fairly commonly, we will keep offering 32-bit, too.
- Gekko: If you are running on 64-bit Windows, you can choose either Gekko version, but it is advised to use 64-bit Gekko so that you can access more RAM (and some tasks run faster). If you are running on 32-bit Windows, you must use 32-bit Gekko (which can only access at most 3 GB RAM, regardless of physical RAM size).
- Gekcel: If you are using 64-bit Excel, you must use 64-bit Gekcel, and if you are using 32-bit Excel, you must use 32-bit Gekcel. If you do not do this, strange Excel errors will occur.
The Gekko and Gekcel installations are completely independent, so you may for instance use a 64-bit “normal” Gekko, and a 32-bit Gekcel at the same time (the Gekko and Gekcel version numbers may differ, too).
- To check Windows bitness, hit Windows+i (Windows button and ‘i’), and then go to ‘System’, ‘About’. 64-bit Windows is quite normal nowadays: most Windows 7 and almost all Windows 10 installations are 64-bit. Windows 11 and on only runs as 64-bit.
- To check Excel bitness, go to the ‘File’ tab in the ribbon, select ‘Account’, and choose ‘About Excel’. Since 2019, new installations of Excel/Office are 64-bit as default. But there are still a lot of 32-bit versions of Excel in active use, also on 64-bit Windows.
To check the bitness of your current Gekko installation, in the normal Gekko you may choose ‘Help’, ‘About’ from the menu, and Gekko will among other things print a line like “Bitness: 64-bit Gekko process on 64-bit Windows system”. Otherwise, you may use “TELL gekkoinfo(‘short2’);” to show version and bitness (this also works from within Gekcel).
RAM
With a 32-bit Gekko, you can only access at most 3 GB RAM, regardless of your physical RAM size. With 64-bit Gekko, you can access all of your physical RAM, but Gekko will access even more via disk-swapping (putting some of the data on the hard disk drive). With for instance 8 GB physical RAM, datasets much larger are possible (for instance up to 20-30 GB or more). Disk-swapping is slower than physical RAM access, but may still be useful for some kinds of datasets. You can explore RAM limits in your Gekko installation with the undocumented “–testram;” command (hit the “Stop current job” button when you want to stop the test).
Speed
Some kinds of Gekko programs run faster on 64-bit, for instance if they involve a lot of timeseries calculations (SERIES statements). Such statements seem to run around 30% faster on 64-bit, compared to 32-bit. Model solving (SIM) with the Gauss-Seidel algorithm seems to run with double speed compared to 32-bit, whereas the speed gains with the Newton algorithm are more limited (about 10%). Other kinds of jobs may run at the same speed, or even marginally slower in rare cases. The speed gains may have to do with the fact that Gekko uses double-precision numbers internally (and these are 64-bit).
To test speed of statements, you may use code like this (the tic() and toc() functions only work in Gekko >= 3.1.11):
%n = 10000; //choose repetitions tic(); for val %i = 1 to %n; //Put statement(s) here. //Only the statement itself, not definitions //of helper variables, TIME commands, etc. end; prt toc();
Notes
Gekcel: It is a good question whether it would be possible to run 64-bit Gekko from inside Excel 32-bit, via the Gekcel interface. At the moment, this cannot be done, and since the use of 32-bit Excel will slowly fade away over time anyway, this question will perhaps not be pursued unless users really need it (alternatively, these users might instead migrate to 64-bit Excel, which Microsoft now officially recommends to use instead of 32-bit Excel).