Coder Social home page Coder Social logo

MATLAB building fails on macOS about nomad HOT 4 OPEN

bbopt avatar bbopt commented on August 25, 2024
MATLAB building fails on macOS

from nomad.

Comments (4)

ctribes avatar ctribes commented on August 25, 2024

My architecture is close to yours, except for clang version (clang-1300.0.29.30).
I can compile with architecture x86_64 (by default I have arm64). But the compilation works fine.

I am not sure if there is just the utSetInterruptPending function missing. Could you try to comment the lines

` //Check for Ctrl-C

    if ( utIsInterruptPending() )

    {

        utSetInterruptPending(false); /* clear Ctrl-C status */

        mexPrintf("\nCtrl-C Detected. Exiting NOMAD...\n\n");

        count_eval = false;

        NOMAD::Step::setUserTerminate();

        return false;

     }`

This is around line 368 in $NOMAD_HOME/interfaces/Matlab_MEX/Source/nomadmex.cpp.
This function is used for CTRL-C detection.

from nomad.

ragonneau avatar ragonneau commented on August 25, 2024

It now compiles, but MATLAB crashes every time I run nomadOpt. More precisely, I tried

nomadOpt(@(x)x^2,1)

Did I misunderstood the syntax and broke the MEX-file? Thanks 👍

from nomad.

ctribes avatar ctribes commented on August 25, 2024

The syntax you used is not correct. Run the examples in $NOMAD_HOME/interfaces/Matlab_MEX/test_nomad_gerad.m to make sure that everything works normally. You can use the examples to work your problem.

Nevertheless, Matlab should not crash if the nomadOpt is called with the wrong syntax. I will look into that and also how to replace the utIsInterruptPending() function.

from nomad.

ragonneau avatar ragonneau commented on August 25, 2024

I understand. The tests runs on my machine, and produces

------------------------------------------------------------------
 This is NOMAD v4.2.0
 Authors: C. Audet, S. Le Digabel, V. Rochon Montplaisir and C. Tribes
 MEX Interface C. Tribes 2021 

 Problem Properties:
 # Decision Variables:                  2
 # Number of Objectives:                1
 # Number of Nonlinear Constraints:     0
------------------------------------------------------------------
BBE OBJ
1 909       
10  20       
13   4.82    
23   2.5     
27   2.12    
37   1.7     
42   1.22    
59   1       
60   0.929419
63   0.80402 
68   0.71065 
72   0.694857
74   0.639846
76   0.631801
78   0.588927
80   0.5689  
82   0.561994
84   0.505621
90   0.477985
91   0.461502
93   0.420715
97   0.400596
98   0.376996
99   0.359715
100   0.35004 
A termination criterion is reached: Maximum number of blackbox evaluations (Eval Global) Success found and opportunistic strategy is used 100

Best feasible solution:     #4590 ( 0.455 0.184 )	Evaluation OK	 f =   0.3500400000000000178 	 h =   0                     

Best infeasible solution:   Undefined.

Blackbox evaluations:        100
Total model evaluations:     3664
Cache hits:                  8
Total number of evaluations: 108
Feasible solution obtained

Thank you very much,
Tom.

from nomad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.