Topic
  • 6 replies
  • Latest Post - ‏2009-10-06T03:36:56Z by SystemAdmin
SystemAdmin
SystemAdmin
7929 Posts

Pinned topic Re: out-of-memory issues with CPLEX 12.1

‏2009-08-12T04:11:41Z |

[TheEngineer said:]

As this problem is obviously linked to the 32bit architecture of my system I decided to switch to a 64bit system.
On this machine Linux is available and CPLEX 12.1 is also installed as well as Concert 29.
The code was running perfectly on the 32bit system (except from the memory problem) and was not changed.

The compiling is done via (had to change the filenames a little bit for publishing)

...
c++ -L/home/x/lib -L/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic -L/home/x/ilog/concert29/lib/x86-64_debian4.0_4.1/static_pic   -o main.o             -pthread -lm -lconcert -lcplex -lilocplex -lgfortran
...
c++ -L/home/x/lib -L/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic -L/home/x/ilog/concert29/lib/x86-64_debian4.0_4.1/static_pic   -o main.o             -pthread -lm -lconcert -lcplex -lilocplex -lgfortran

On the 64bit environment the program does not compile. The linking process does produce errors like these:


/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `isSoln(cpxenv const*, cpxlp const*)':
ilocplex.cpp:(.text+0xa35): undefined reference to `CPXgetstat'
/home/xi/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `rowName':
ilocplex.cpp:(.text+0x1015): undefined reference to `CPXEgetorigrowind'
/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `colName':
ilocplex.cpp:(.text+0x11cf): undefined reference to `CPXEgetorigcolind'
/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `IloCplexI::cpxthrow(int) const':
ilocplex.cpp:(.text+0x1eef): undefined reference to `CPXgeterrorstring'
/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `IloCplexI::getCplexTime() const':
ilocplex.cpp:(.text+0x1f25): undefined reference to `CPXgettime'
/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `IloCplexI::getMax(IloCplex::NumParam) const':
ilocplex.cpp:(.text+0x1f6a): undefined reference to `CPXinfodblparam'
/home/x/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libilocplex.a(ilocplex.o): In function `IloCplexI::getMax(IloCplex::IntParam) const':



How can I solve this problem??

Thanks in advance,
Christian
Updated on 2009-10-06T03:36:56Z at 2009-10-06T03:36:56Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: out-of-memory issues with CPLEX 12.1

    ‏2009-08-12T05:19:54Z  

    [AFonseca said:]

    I had similar issue when running Cplex embedded in Java code and using C++ interface, in a 8GB machine, with a problem a little bit larger than yours. It was because Java was not collecting garbage properly. So I added the following garbage collector to comand line -XX:+UseConcMarkSweepGC and I got the issue resolved.
    I don't know if your case is the same.
    I don't have that kind of problems since my team migrated the code to C#.

    By the way my problem is a Unit Commitment running for 3 months with a system with over 60 units. Based on your wording it sounds that yours is kind of.
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: out-of-memory issues with CPLEX 12.1

    ‏2009-08-13T07:57:08Z  

    [AFonseca said:]

    I had similar issue when running Cplex embedded in Java code and using C++ interface, in a 8GB machine, with a problem a little bit larger than yours. It was because Java was not collecting garbage properly. So I added the following garbage collector to comand line -XX:+UseConcMarkSweepGC and I got the issue resolved.
    I don't know if your case is the same.
    I don't have that kind of problems since my team migrated the code to C#.

    By the way my problem is a Unit Commitment running for 3 months with a system with over 60 units. Based on your wording it sounds that yours is kind of.

    [TheEngineer said:]

    You are right, this is a unit commitment problem.

    I am not very familiar with Java and switching to C# is also not a possible but thanks for the hint. Maybe it will help someone else looking for solutions to similar problems.

    In the moment I am still very confused why there are linker errors for my program. I did not change a single line...
    Updated on 2009-08-13T07:57:08Z at 2009-08-13T07:57:08Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: out-of-memory issues with CPLEX 12.1

    ‏2009-08-14T00:02:30Z  

    [TheEngineer said:]

    You are right, this is a unit commitment problem.

    I am not very familiar with Java and switching to C# is also not a possible but thanks for the hint. Maybe it will help someone else looking for solutions to similar problems.

    In the moment I am still very confused why there are linker errors for my program. I did not change a single line...

    [TheEngineer said:]

    Problem solved.

    I finally fixed the compiler errors with bringing the -l parameters in the right order. I messed those up while writing my makefile.

    For everyone else who occurs "undefined reference to CPXsomething" while compiling your c++ program: you must use the libraries in the following order:
    -lilocplex -lcplex -lconcert -lm -pthread
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: out-of-memory issues with CPLEX 12.1

    ‏2009-08-16T01:54:46Z  

    [TheEngineer said:]

    Problem solved.

    I finally fixed the compiler errors with bringing the -l parameters in the right order. I messed those up while writing my makefile.

    For everyone else who occurs "undefined reference to CPXsomething" while compiling your c++ program: you must use the libraries in the following order:
    -lilocplex -lcplex -lconcert -lm -pthread

    [notdarkyet said:]

    Hi Christian,

    I am wondering how your first mentioned workstation with 8 processors can utilize the 16 GB RAM at all, if it is a 32-Bit CPU. Linux 32 Bit can use up to 3 GB of RAM - 4 GB address space minus some address ranges reserved for system and hardware usage. If it is a shared-memory system, putting more than 3 GB of RAM into means wasting it in this machine, I think. Seems like is is a 2GB per processor architecture.
    You could see the amount of usable memory e.g. in the first lines of the top command or using the free command. I wonder if Linux displays the 16 GB of memory there...
    notdarkyet
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: out-of-memory issues with CPLEX 12.1

    ‏2009-08-17T23:10:45Z  

    [notdarkyet said:]

    Hi Christian,

    I am wondering how your first mentioned workstation with 8 processors can utilize the 16 GB RAM at all, if it is a 32-Bit CPU. Linux 32 Bit can use up to 3 GB of RAM - 4 GB address space minus some address ranges reserved for system and hardware usage. If it is a shared-memory system, putting more than 3 GB of RAM into means wasting it in this machine, I think. Seems like is is a 2GB per processor architecture.
    You could see the amount of usable memory e.g. in the first lines of the top command or using the free command. I wonder if Linux displays the 16 GB of memory there...
    notdarkyet

    [TheEngineer said:]

    top shows
    Mem:  16623128k total,  1126368k used, 15496760k free,  366672k buffers

    The installed Linux kernel can handle even more than the 16 GB (meaning 2 GB per processor), but applications are limited to 2 GB from the 32 bit architecture. Please don't ask me why or how, I am no IT guy but thats what the sysadmin told me.

  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: out-of-memory issues with CPLEX 12.1

    ‏2009-10-06T03:36:56Z  

    [TheEngineer said:]

    top shows
    Mem:  16623128k total,  1126368k used, 15496760k free,  366672k buffers

    The installed Linux kernel can handle even more than the 16 GB (meaning 2 GB per processor), but applications are limited to 2 GB from the 32 bit architecture. Please don't ask me why or how, I am no IT guy but thats what the sysadmin told me.

    [achterberg said:]

    Hi Christian,

    is your memory issue resolved by going to 64 bit? In any case, it would be great if you could send us your model in order to help us improve CPLEX. If you want to do this, please contact me at achterberg [at] de [dot] ibm [dot] com.

    Thanks!