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.
Historical Number
cplex/FAQ/179
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21400095