Decision Optimization

Expand all | Collapse all

Problem with CPLEX running on Mac M1

  • 1.  Problem with CPLEX running on Mac M1

    Posted 14 days ago
    Hello everyone,
    I have some trouble running CPLEX with Java on my Mac M1 with MacOs BigSur 11.2.3. Im using a Beta version of CPLEX (CPLEX_Studio_Beta211). When trying to run my script I'm receiving the following error message:

    java.lang.UnsatisfiedLinkError: /Applications/CPLEX_Studio_Beta211/cplex/bin/x86-64_osx/libcplex2010.dylib: dlopen(/Applications/CPLEX_Studio_Beta211/cplex/bin/x86-64_osx/libcplex2010.dylib, 1): no suitable image found.  Did find:
    /Applications/CPLEX_Studio_Beta211/cplex/bin/x86-64_osx/libcplex2010.dylib: mach-o, but wrong architecture
    /Applications/CPLEX_Studio_Beta211/cplex/bin/x86-64_osx/libcplex2010.dylib: mach-o, but wrong architecture
    java.library.path must point to the directory containing the CPLEX shared library
    try invoking java with java -Djava.library.path=...

    I have already tried out several java-versions which don't seem to be the problem.

    I would appreciate any help. Thanks in advance.

    ------------------------------
    Luis Masuch Ibanez
    ------------------------------


  • 2.  RE: Problem with CPLEX running on Mac M1

    Posted 13 days ago
    Hi

    there is not yet an M1 port for CPLEX.
    Do not hesitate to log a wish in Aha

    regards


    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: Problem with CPLEX running on Mac M1

    Posted 13 days ago
    Edited by Luis Masuch Ibanez 13 days ago


  • 4.  RE: Problem with CPLEX running on Mac M1

    Posted 13 days ago
    Is there any way to use CPLEX via the Java API? I'm able to start OPL Studio.

    regards

    ------------------------------
    Luis Masuch Ibanez
    ------------------------------



  • 5.  RE: Problem with CPLEX running on Mac M1

    Posted 13 days ago
    Hi,

    have you managed to run an OPL model in the IDE ?

    Anyway, what you could try is run an OPL model from the IDE in the cloud ?

    Or use oplrunwml to run a cplex model that will run in the cloud: https://alexfleischer-84755.medium.com/command-line-call-opl-cplex-model-in-watson-machine-learning-518aba1be0b4

    regards

    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------



  • 6.  RE: Problem with CPLEX running on Mac M1

    Posted 13 days ago
    Hi,

    yes I have managed to run an existing OPL example.

    regards

    ------------------------------
    Luis Masuch Ibanez
    ------------------------------



  • 7.  RE: Problem with CPLEX running on Mac M1

    Posted 12 days ago
    Thanks for your suggestion Alex. But using the cloud is not an option
    for me. I'm implementing an algorithm in Java that uses Cplex as a
    subroutine.

    The problem is the Java API not Cplex itself. I can use Cplex via OPL
    studio and also run Cplex on the command line without problems.

    I'm using a x86-64 version of Java JDK, which is the same architecture
    as the Cplex library. Hence, I think it should be possible to use Cplex
    from Java.

    regards


    ------------------------------
    Luis Masuch Ibanez
    ------------------------------



  • 8.  RE: Problem with CPLEX running on Mac M1

    Posted 12 days ago
    Hi,
    you have some OPL / java examples in CPLEX_Studio201\opl\examples\opl_interfaces\java

    If this does not work as a workaround you could try to do an external call from java to oplrun command line

    regards

    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------



  • 9.  RE: Problem with CPLEX running on Mac M1

    Posted 10 days ago
    Hi Alex, your suggestion does not solve my problem (see my original
    post). I don't want to call OPL through Java. I want to use the Java API
    to Cplex itself (I need to invoke cuts callbacks etc.).

    Somebody else an idea?

    regards


    ------------------------------
    Luis Masuch Ibanez
    ------------------------------