Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Licence Issues for CPLEX on a Mac

    Posted 01/19/12 07:17 PM

    Originally posted by: SystemAdmin


    Hello,

    I am a new Mac user and new CPLEX user. I am trying to make CPLEX work, but when I solve a problem, I get a different one, so I haven't been able to start using CPLEX.

    My problem now is that I can´t compile the basic lplex1.c file that comes as an example. It does not find the cplex.h file, but it is installed in
    /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/include/ilcplex

    Looking at all the Getting Starting guides, it tells that I have to install the access key, which I have done previously and install it in:
    /Users/ilog/ilm

    But I was never able to check if cplex was properly installed. When double click in
    /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/bin/x86_darwin9_gcc4.0/cplex
    I get the following message:
    Failed to initialize CPLEX environment.
    CPLEX Error 32201: ILM Error 16: CPLEX: license file not found or unreadable.

    So I guess I have to run the access key first or somehow let CPLEX know that I have downloaded the key and install it somewhere. Here is where I get completely lost. I don't know what to do.

    Please remember that I am new to mac and Unix commands, so if you are so kind to reply this post please be very specific, since I have found several post with similar problems and I get lost with some of the UNIX commands.

    Thanks a lot ot anyone that take the time to reply this post.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/20/12 01:00 AM

    Originally posted by: SystemAdmin


    OK, it seems like you have two problems:
    1. You cannot even compile the example files.
    2. You cannot start CPLEX.

    Concerning 1: Could you please tell us exactly what you did and show us the error message you got? I guess you opened a terminal window, type 'cd ...' to change to some directory and then type 'make'?

    Concerning 2: You have to set the environment variable ILOG_LICENSE_FILE to the path to your license file. In a terminal Window you can do this by
    export ILOG_LICENSE_FILE=/path/to/access.ilm
    /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/bin/x86_darwin9_gcc4.0/cplex
    

    Does this start CPLEX properly? Note that you have to replace /path/to/access.ilm with the actual path to the license file you downloaded.
    As for starting CPLEX by a double-click: I am not a MAC expert either and I don't know how to set ILOG_LICENSE_FILE in that case. Here are things that you may try:
    • edit file .bashrc in you home directory and add the line export ILOG_LICENSE_FILE=/path/to/access.ilm
    • right-lick on the CPLEX binary and see if there is something like a "properties" menu item that allows you to specify environment variables.

    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/22/12 12:40 PM

    Originally posted by: SystemAdmin


    In response tomy concern 1 I try to compile the lplex1.c example both through my C editor (Xcode) and through the terminal. Neither of them works, and the error message has something to do with the fact that it cannot include the cplex.h file. So that's why I wonder it has to do with the fact that it is not well installed. I tried to do what you tell me on the terminal, and it does not work, but since I don't know much of UNIX I don't know if I am not doing it properly. I will try to figure out what it means and try it again later.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/22/12 12:47 PM

    Originally posted by: SystemAdmin


    As for concern 2 it finally started CPLEX. Now I will have finally had the chance to learn how to use CPLEX. Thanks a lot.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/22/12 12:47 PM

    Originally posted by: SystemAdmin


    As for concern 2 it finally started CPLEX. Now I will have finally had the chance to learn how to use CPLEX. Thanks a lot.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/23/12 02:40 AM

    Originally posted by: SystemAdmin


    How do you try to compile the stuff in the terminal? What you should do is
    cd /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/examples/XXX/YYY
    make lpex1
    

    (replace XXX and YYY by the appropriate directory names for your installation). Does this work? If this works it should not only build the 'lpex1' binary but will also display the compiler commands it invokes. This allows you to see how exactly you have to invoke the compiler.
    I never used Xcode so I cannot give you explicit instructions for that. You may want to look at the instructions how to configure the KDevelop and Code::Blocks IDEs here and here. Configuration of Xcode is probably similar.
    In some way you have to configure Xcode so that it triggers the same commands as 'make lpex1'.
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/23/12 06:30 PM

    Originally posted by: SystemAdmin


    Sorry to bother you more on this, but it still does not work. When I try to compile it from the console, the first error message I get it is the same as in Xcode:

    lpex1.c:27:27: error: ilcplex/cplex.h: No such file or directory

    And cplex.h is there in the ilcplex folder!!!

    All the error messages after that have to do with the fact that it does not identify the variables or commands that cplex.h allow

    Any suggestions why???
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/24/12 02:46 AM

    Originally posted by: SystemAdmin


    Could you please show us the full output of your console session? In particular, the directory in which you work and everything that is output after you type 'make lpex1'.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/24/12 10:05 AM

    Originally posted by: SystemAdmin


    Sorry for all the bothering. As I said at the beginning I am new to LINUX or Mac. I attached the terminal output when I try to complie the lpex1.c example.

    Hope this clarifies my problems.
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/24/12 10:59 AM

    Originally posted by: SystemAdmin


    Sorry, my instructions were not as exact as they should have been. You are invoking 'make' in the wrong directory. When I said you should do
    cd /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/examples/XXX/YYY
    

    and replace XXX and YYY appropriately, I did not think that XXX=src and YYY=c would yield a valid replacement. What you need to do is
    cd /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/examples/x86-64_darwin9_gcc4.0/static_pic/ 
    

    or
    cd /Users/Marta/Applications/IBM/ILOG/CPLEX_Studio_Academic123/cplex/examples/x86_darwin9_gcc4.0/static_pic/ 
    

    (depending on whether you have a 64bit or a 32bit machine).
    This directory should contain only one single file, called 'Makefile'. You can see the files in a directory by typing 'ls'. Try changing to one of the directories above and type 'make lpex1'. Does this work?
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Licence Issues for CPLEX on a Mac

    Posted 01/31/12 12:56 PM

    Originally posted by: SystemAdmin


    Thanks for the help.

    That worked although it does not what I expected, something happened. I think my real problem is a different one and I should posted in a new threat. I think I have CPLEX well installed now as I am able to get the CPLEX prompt in the UNIX terminal. But as I said, my problem now is a different one.

    thanks for the help with the CPLEX installation.
    #CPLEXOptimizers
    #DecisionOptimization