Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Cplex license can't find. please help!!

  • 1.  Cplex license can't find. please help!!

    Posted 09/21/10 03:51 PM

    Originally posted by: chens


    I am a cplex new user. My Cplex program complains that "CPLEX Error 32201: ILM Error 16: CPLEX license file not found or unreadable."

    I am using Linux system, and I put access.ilm in "~/Research/Cplex/", I also added "export ILOG_LICENSE_FILE=~/Research/Cplex/access.ilm" to my bashrc file. When I type echo $ILOG_LICENSE_FILE, it correctly finds ~/Research/Cplex/access.ilm. But I don't understand why Cplex can't find the license file.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Cplex license can't find. please help!!

    Posted 09/21/10 05:04 PM

    Originally posted by: SystemAdmin


    Does the problem persist if you instead use

    export ILOG_LICENSE_FILE=$HOME/Research/Cplex/access.ilm
    Philip Starhill
    CPLEX Research Engineer
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Cplex license can't find. please help!!

    Posted 09/22/10 11:51 AM

    Originally posted by: chens


    Hi Philip,

    I changed the bashrc file into: export ILOG_LICENSE_FILE=/home/siqi/Research/Cplex/access.ilm

    and echo $ILOG_LICENSE_FILE returns correctly as: /home/siqi/Research/Cplex/access.ilm

    but Cplex still complains about license file not found.

    Anything else I am missing?

    Thanks
    Siqi
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Cplex license can't find. please help!!

    Posted 09/22/10 02:55 AM

    Originally posted by: SystemAdmin


    Philip is right. The special character '~' is only understood by the shell and not by CPLEX. If you do
    echo $ILOG_LICENSE_FILE
    

    then it should output an absolute path like
    /home/yourname/Research/Cplex/access.ilm
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Cplex license can't find. please help!!

    Posted 09/22/10 11:52 AM

    Originally posted by: chens


    Hi Daniel,

    I changed the bashrc file into: export ILOG_LICENSE_FILE=/home/siqi/Research/Cplex/access.ilm

    and echo $ILOG_LICENSE_FILE returns correctly as: /home/siqi/Research/Cplex/access.ilm

    but Cplex still complains about license file not found.

    Anything else I am missing?

    Thanks
    Siqi
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Cplex license can't find. please help!!

    Posted 09/22/10 12:27 PM

    Originally posted by: SystemAdmin


    Perhaps something went wrong when copying the license file. When you enter

    cat $ILOG_LICENSE_FILE

    on the command line do you see the contents of the license file displayed on the screen?
    Philip Starhill
    CPLEX Research Engineer
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Cplex license can't find. please help!!

    Posted 09/22/10 12:58 PM

    Originally posted by: chens


    Yes, cat $ILOG_LICENSE_FILE returns the content in access.ilm :(
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Cplex license can't find. please help!!

    Posted 09/23/10 02:33 AM

    Originally posted by: SystemAdmin


    That is strange. What is the content of that file?
    Does this work:
    ILOG_LICENSE_FILE=/home/siqi/Research/Cplex/access.ilm cplex
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Cplex license can't find. please help!!

    Posted 09/23/10 10:13 AM

    Originally posted by: chens


    It returns:

    ILOG CPLEX 11.010, licensed to XXXXXXX

    Welcome to CPLEX Interactive Optimizer 11.0.1
    with Simplex, Mixed Integer & Barrier Optimizers
    Copyright (c) ILOG 1997-2008
    CPLEX is a registered trademark of ILOG

    Type 'help' for a list of available commands.
    Type 'help' followed by a command name for more
    information on commands.

    It works, right?
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Cplex license can't find. please help!!

    Posted 09/24/10 12:54 AM

    Originally posted by: SystemAdmin


    Yes, it seems like it is working.
    So you did something wrong with you .bashrc.
    • Do you have
    export ILOG_LICENSE_FILE=/home/siqi/Research/Cplex/access.ilm
    

    in that file? You may also write
    ILOG_LICENSE_FILE=/home/siqi/Research/Cplex/access.ilm
    export ILOG_LICENSE_FILE
    

    The 'export' keyword is important.
    • Did you start a new terminal or a new shell after changing .bashrc?
    • Do you use bash at all? What does
    echo $SHELL
    

    print?
    If your answer to all these questions is 'yes' then I have no more ideas what might be wrong. Maybe you just have some typo somewhere?
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Cplex license can't find. please help!!

    Posted 09/24/10 09:19 AM

    Originally posted by: SystemAdmin


    > chens wrote:
    > I am a cplex new user. My Cplex program complains that "CPLEX Error 32201: ILM Error 16: CPLEX license file not found or unreadable."

    You are referring to a program you wrote that uses CPLEX libraries? How are you running it (from a shell, from an IDE, as a Java applet, ...)?

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: Cplex license can't find. please help!!

    Posted 09/24/10 02:33 PM

    Originally posted by: chens


    I just noticed something interesting.

    If I run the executable in terminal, the license is actually working; but if I switch back to KDevelop (an IDE in Linux), and run the program within KDevelop, then the license file can't be found. I guess this shows that the license file is correct and Cplex can indeed find it. But for some reason, it is not loaded in KDevelop... Very weird.....
    -Siqi
    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: Cplex license can't find. please help!!

    Posted 09/24/10 02:58 PM

    Originally posted by: SystemAdmin


    > chens wrote:
    >
    > If I run the executable in terminal, the license is actually working; but if I switch back to KDevelop (an IDE in Linux), and run the program within KDevelop, then the license file can't be found. I guess this shows that the license file is correct and Cplex can indeed find it. But for some reason, it is not loaded in KDevelop... Very weird.....

    I'm not familiar with KDevelop. If it has an option to set run-time environment variables, try putting the license file export command there. It may be that KDevelop does not use the environment variables set in your bash profile.

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 14.  Re: Cplex license can't find. please help!!

    Posted 09/25/10 04:01 AM

    Originally posted by: SystemAdmin


    Aha, this is an interesting detail you did not tell us about before :-)
    I guess you are starting kdevelop via some kind of button on your desktop? To make things work in kdevelop do one of the following
    • Start kdevelop from a terminal. This should propagate the ILOG_LICENSE_FILE to kdevelop.
    • In kdevelop use Project->Project Options->Run Options and add the ILOG_LICENSE_FILE environment variable to the "Environment Variables" list.
    • Applications started from a menu or button usually don't source ~/.bashrc. So you have to define the environment variable in another place that is also honored by programs started from menus or buttons. I am not an expert in KDE but I hear that putting the value into /env/environment may do the trick (restart of KDE may be required). If it does not work you may have to search the web :-(

    #CPLEXOptimizers
    #DecisionOptimization


  • 15.  Re: Cplex license can't find. please help!!

    Posted 09/26/10 06:05 PM

    Originally posted by: chens


    You are awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
    I added the system variable to KDevelop and it works!!!!

    Thank you so much,
    -Siqi
    #CPLEXOptimizers
    #DecisionOptimization


  • 16.  Re: Cplex license can't find. please help!!

    Posted 04/06/12 12:11 AM

    Originally posted by: RahulPandya


    Sir, I am also facing the same error. Please let me know where do I download the license file. Would you please send me a link. Thanks Rahul.
    #CPLEXOptimizers
    #DecisionOptimization