IBM Support

How to extend 32-bit CPLEX on Microsoft Windows use more than 2GB or RAM

Question & Answer


Question

Can 32-bit CPLEX on Microsoft Windows use more than 2GB? Does CPLEX support 4GT tuning to use 3GB per process?

Answer

On 32-bit Microsoft Windows, the normal addressable space is limited to 2GB per process. However, it is possible to tweak the kernel and increase this limit to 3GB per process. An overview of the entire process is available at http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx

First, we stress that users who are encountering a 2GB limit should strongly consider migrating to a 64-bit platform. 64 bit processes can access up to 16 exabytes (16 billion GB) of memory without the need to resort to special tricks. Hence, on today's computers, the only memory limitation associated with running a 64 bit version of CPLEX comes from the available memory on the machine rather than the amount of addressable memory associated with 64 bit pointers. In addition, 32-bit programs that reach a 2GB limit today may reach a 3GB limit in the near future; a 64-bit program would be able to address much greater amounts of memory.

In addition, so-called 3GB-turning is entirely a Microsoft procedure, and IBM cannot directly assist with the details. However, we do have reports of some customers successfully using these tweaks with CPLEX and other products, so we have summarized their tips here.

So-called 3GB-tuning is available only for certain versions of Windows 2000 (Advanced, Datacenter), Windows XP (Professional), and Windows Server 2003 (regular, Enterprise, Datacenter). Please make sure that you use one of these operating systems if you want to use 3GB-tuning.

To allow an application that uses CPLEX to use 3GB tuning, you will need to follow two steps:

  • Edit the boot.ini file to add the /3GB switch (as discussed in the Microsoft article).
  • Modify executables to enable large addressing.

If you are building an application (such as an application that uses the Callable Library or the C++ Concert interface), you can pass the /LARGEADDRESSAWARE flag to the link command line.

Otherwise, you will need to use the editbin utility (included with Microsoft Visual Studio) to modify the executable header and set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag. Both editbin and dumpbin are documented in the Microsoft Visual Studio documentation. The basic syntax is:

     editbin /LARGEADDRESSAWARE <exe or dll> 

You can check the result with

     dumpbin /headers <exe or dll> 

You should see a line like

     Application can handle large (>2GB) addresses 

You must make sure that this flag is set for each application you use, along with any other DLLs or .NET assemblies that it needs. For example, if you want to adjust the CPLEX Interactive Optimizer, you will need to tweak both the cplex.exe executable, and the appropriate shared CPLEX DLL file for your version.

After your application and its related DLLs are set to handle large addresses, and the kernel is set to allow them, then the application can address up to 3GB per process.

[{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Computing environment","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.2;9.1.3;9.1.2;9.1;9.0;8.1;8.0;7.5;7.1;7.0;6.6;12.4;12.3;12.2;12.1;12.0;11.2.1;11.2;11.1.1;11.1;11.0.1;11.0;10.3;10.2.1;10.2;10.1.1;10.1;10.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF017","label":"Mac OS"}],"Version":"12.4;12.3;12.2.0.1;12.2","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

cplex/FAQ/179

Document Information

Modified date:
16 June 2018

UID

swg21400095