Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running matlab setup file for bbob-biobj-matlab-smsemoa example #1853

Closed
paulduf opened this issue Mar 4, 2019 · 9 comments
Closed

Comments

@paulduf
Copy link
Collaborator

paulduf commented Mar 4, 2019

When I run the "setup.m" file in the example folder I have compilation errors (with g++):

For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.

compiling Hypervolume.cpp...Building with 'g++'.
Error using mex
/home/pol/workspace/1+1_mo_cma_es/hv.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:
/home/pol/workspace/1+1_mo_cma_es/hv.cpp:31:32: error: cannot convert ‘const mwSize* {aka const long unsigned int*}’ to ‘const int*’ in assignment
dims = mxGetDimensions(prhs[0]);
^
/home/pol/workspace/1+1_mo_cma_es/hv.cpp:37:34: error: cannot convert ‘const mwSize* {aka const long unsigned int*}’ to ‘const int*’ in assignment
dims_r = mxGetDimensions(prhs[1]);
^

Error in setup (line 8)
mex -I. hv.cpp Hypervolume.cpp

I use Debian 9 and g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516.

@ttusar
Copy link
Contributor

ttusar commented Mar 4, 2019

I can duplicate the problem

@ttusar ttusar added the bug label Mar 4, 2019
@nikohansen
Copy link
Contributor

I am slightly lost which step of the installation we are talking about. Is it that

python do.py run-matlab

calls setup.m which then fails?

@brockho
Copy link
Contributor

brockho commented Mar 4, 2019

The problem seems to lie in the hypervolume code that is borrowed from the Shark library and has nothing to do directly with COCO.

@paulduf
Copy link
Collaborator Author

paulduf commented Mar 4, 2019

In the do.py file this refers to the run-matlab-sms method. but when I run this, the program is stuck after prnting:

RUN matlab -nodisplay -nosplash -r setup, exit in code-experiments/examples/bbob-biobj-matlab-smsemoa

The error I show comes from a direct call matlab -nodisplay -nosplash -r setup

@ttusar
Copy link
Contributor

ttusar commented Mar 4, 2019

The SMS-EMOA example fails. I already have a fix.

@paulduf
Copy link
Collaborator Author

paulduf commented Mar 4, 2019

The problem seems to lie in the hypervolume code that is borrowed from the Shark library and has nothing to do directly with COCO.

I agree but then it should be either solved or removed from the examples ?

@brockho
Copy link
Contributor

brockho commented Mar 4, 2019

If @ttusar has a fix, that's the best way to proceed. We had never tested the Matlab code under a non-Windows non-MacOS operating system (and therefore also never claimed that it should work :-), see here). But, of course, many thanks for catching the error.

@ttusar
Copy link
Contributor

ttusar commented Mar 4, 2019

I have just created a pull request with the fix (#1854). When the tests pass, we need to merge it into the development branch.

@ttusar
Copy link
Contributor

ttusar commented Mar 4, 2019

Merged

@ttusar ttusar closed this as completed Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants