Coder Social home page Coder Social logo

Comments (8)

mcafaro avatar mcafaro commented on June 18, 2024 1

There is a known issue with windows-2019 and setup-matlab@v2-beta with R2022b. We are looking into it.

A few possible workarounds:

  • Use windows-2022
  • Use MATLAB R2022a
  • Use setup-matlab@v1 (v1 has limited support for Windows and macOS (no toolboxes))

setup-matlab v1 and v2 work in different ways. The set up in v2 generally takes longer but the execution of MATLAB will be faster. As you noted, v2 is optimized with more recent versions of MATLAB.

from setup-matlab.

fangq avatar fangq commented on June 18, 2024

one other observation:

I initially thought that if the setup overhead is a result of larger installation files, using an older release, for example R2020a, may result in faster run-time.

interestingly, it turned out to be the opposite - after running for 20 min, setting up R2020a was still going, so I had to terminate the run, see

https://github.com/fangq/mmc/actions/runs/4394455692/usage

was the v2-beta optimized on R2022 compared to R2020?

from setup-matlab.

fangq avatar fangq commented on June 18, 2024

@mcafaro thanks for your helpful comments! I did not know v1 also supports mac and windows. I just tested it and setup-matlab@v1 indeed works. I do not need toolboxes, so this is perfect for me.

however, I am getting another issue: the mex command (as a shell utility) worked nicely for both Linux and Mac, but it failed for windows, complaining "which: no mex in (/mingw64/bin:/usr/bin:/c/Users/runneradmin/bin:/c/Program Files/matlab-batch:/c/Program Files/MATLAB/R2022b/bin:....", see full log here:

https://github.com/fangq/mmc/actions/runs/4406708139/jobs/7719330338

what is the correct path I should add to make mex work on windows?
thanks again

from setup-matlab.

mcafaro avatar mcafaro commented on June 18, 2024

Depending on the shell you are using in Windows, you may need to call "mex.bat" instead of just "mex" to run the mex command from a system terminal.

from setup-matlab.

fangq avatar fangq commented on June 18, 2024

I think I am one step away from completely solving this.

as you can see form my above 4 new commits, I had trouble telling MATLAB where to find gcc compiler (MW_MINGW64_LOC) on the windows runner. The runner's default gcc is installed by mingw64 located in C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw64\, however, no matter how I set this env variable (and confirm it is correctly set), MATLAB insists on resetting MW_MINGW64_LOC to C:/msys64/usr/ and ignores my desired path. Because of that, mex could not find the gcc already installed.

is there a way to tell MATLAB to take the MW_MINGW64_LOC setting from the environment?

from setup-matlab.

mcafaro avatar mcafaro commented on June 18, 2024

I do not think your env variables are making it to the location where mex is being called (in Make).

See this simple demo workflow where I call mex directly and confirm that an MW_MINGW64_LOC env var is recognized.

from setup-matlab.

fangq avatar fangq commented on June 18, 2024

I was able to get everything to work on windows. it turned out the MW_MINGW64_LOC issue was because of my hard-coded setting inside my makefile. after fixing it, it was set properly.

I am quite happy that setup-matlab@v1 works on all 3 platforms. Thanks @mcafaro for your help. feel free to close this issue.

from setup-matlab.

mcafaro avatar mcafaro commented on June 18, 2024

Glad to hear it is working for you.

from setup-matlab.

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.