Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  CPLEX 12.1 Callable Library compilation

    Posted Thu February 03, 2011 09:27 AM

    Originally posted by: dhabbyc


    Hello everybody,

    I have a compilation problem using gcc. I'm using a 64 bit machine with ubuntu. I use the callable library for a fortran code. At the end of the compilation i'm getting the following output:

    /usr/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libcplex.a(env.o): In function `CPXpsn':
    +../../../src/cplex/env.c:(.text+0x4f83): relocation truncated to fit: R_X86_64_PC32 against `varserialnum.0'+
    + /usr/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libcplex.a(env.o): In function `_82e56fc0b749c69266ad587df4e89749':+
    +../../../src/cplex/env.c:(.text+0x521f): relocation truncated to fit: R_X86_64_PC32 against `utilstr.4564.0.101'+
    + ../../../src/cplex/env.c:(.text+0x5256): relocation truncated to fit: R_X86_64_PC32 against `utilstr.4564.0.101'+
    /usr/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libcplex.a(env.o): In function `_0ebba97c596aff98c22f883faefbdfa2':
    + ../../../src/cplex/env.c:(.text+0x8165): relocation truncated to fit: R_X86_64_PC32 against `varserialnum.0'+
    + ../../../src/cplex/env.c:(.text+0x8172): relocation truncated to fit: R_X86_64_PC32 against `varserialnum.0'+
    + ../../../src/cplex/env.c:(.text+0x818a): relocation truncated to fit: R_X86_64_PC32 against `varserialnum.0'+
    + ../../../src/cplex/env.c:(.text+0x856e): relocation truncated to fit: R_X86_64_PC32 against `varserialnum.0'+
    /usr/ilog/cplex121/lib/x86-64_debian4.0_4.1/static_pic/libcplex.a(env.o): In function `_da91cff4c90de57833f92151b2b4242c':
    + ../../../src/cplex/env.c:(.text+0x16572): relocation truncated to fit: R_X86_64_PC32 against `lckserver.0'+
    + ../../../src/cplex/env.c:(.text+0x16592): relocation truncated to fit: R_X86_64_PC32 against `mdserver.0'+
    + ../../../src/cplex/env.c:(.text+0x16614): relocation truncated to fit: R_X86_64_PC32 against `mdserver.0'+
    + ../../../src/cplex/env.c:(.text+0x16674): additional relocation overflows omitted from the output+

    I got the same type of errors at the compilation of some of the fortran and c routines, but i manage to go around them through the mcmodel flag. The interface for the cplex function are performed through an fcallc.c routine, also i use the check.c routine.

    My machine is running on Ubuntu 10.04 x86-64, and the version of gcc is 4.4.3.

    I apollogise for my english.

    Thanks in advance.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX 12.1 Callable Library compilation

    Posted Thu February 10, 2011 06:12 AM

    Originally posted by: SystemAdmin


    I am not a Fortran programmer/expert at all. A very wild guess from the error messages is that maybe the problem goes away if you use 32bit library of CPLEX.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX 12.1 Callable Library compilation

    Posted Fri February 11, 2011 02:07 PM

    Originally posted by: GuangFeng


    I am not a FORTRAN expert either. Here are a few things I can think of:
    1. Have you tried to use -fPIC flag?
    2. The libraries you are using are meant for GCC 4.1. Maybe you can try to use GCC 4.1 and see if that reduce the number of errors.
    #CPLEXOptimizers
    #DecisionOptimization