I am trying to use a Matlab use function Boosted Binary Regression Trees but according to the readme I have to complie a mex file first. To be exact here are the instructions given in the readme:
First you need to compile C++ code to get mex file. To compile with OpenMP support, do the following:
mex findBestSplit.cpp COMPFLAGS="/openmp $COMPFLAGS"
I have never used OpenMP before so I am not sure what I am supposed to do exactly, can someone walk me through the steps to get this to work?

답변 (1개)

James Tursa
James Tursa 2021년 3월 8일
편집: James Tursa 2021년 3월 8일

0 개 추천

You are simply supposed to type (or copy & paste) that text into the command line at the > prompt. Just be in the directory where the source code is located when you execute this mex command.
Note that the mex instructions given may need to be adjusted if your system is different from the author's system. The OpenMP option may be different, the COMPFLAGS may be different, etc.

댓글 수: 10

Sergio Palomo
Sergio Palomo 2021년 3월 9일
I tried that and I get:
Sorry, but mex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:/Users/Sergio/AppData/Local/MiKTeX/2.9/miktex/log/mex.log
You may want to visit the MiKTeX project page, if you need help.
James Tursa
James Tursa 2021년 3월 11일
편집: James Tursa 2021년 3월 11일
Try to compile with the verbose option and see if there are any messages:
mex('-v','findBestSplit.cpp','COMPFLAGS="/openmp $COMPFLAGS"')
Sergio Palomo
Sergio Palomo 2021년 3월 11일
I tried that and get the same thing.
James Tursa
James Tursa 2021년 3월 11일
What does "get the same thing" mean? The mex command is giving you this response? Or when you try to run the function it is displaying some response to you? Can you post a copy of what you are actually typing in and the entire response you are getting?
Sergio Palomo
Sergio Palomo 2021년 3월 11일
I am copying and pasting this command:
mex('-v','findBestSplit.cpp','COMPFLAGS="/openmp $COMPFLAGS"')
I get the following:
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6350 64-bit)
Sorry, but mex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:/Users/Sergio/AppData/Local/MiKTeX/2.9/miktex/log/mex.log
You may want to visit the MiKTeX project page, if you need help.
James Tursa
James Tursa 2021년 3월 11일
Surely more must have been printed out after the mex command? The verbose option should have caused lots of printout. This didn't happen?
Sergio Palomo
Sergio Palomo 2021년 3월 11일
No, it did not. What I have in my previous post is all that was printed
Type the following at the command line:
which mex -all
Sergio Palomo
Sergio Palomo 2021년 3월 11일
Is that right? I get the following:
'which' is not recognized as an internal or external command,
operable program or batch file.
James Tursa
James Tursa 2021년 3월 11일
편집: James Tursa 2021년 3월 11일

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

태그

질문:

2021년 3월 8일

편집:

2021년 3월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by