8000 Issue With MatLab Binaries · Issue #223 · SGpp/SGpp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue With MatLab Binaries #223

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

Open
EDShapiro opened this issue Mar 24, 2020 · 9 comments
Open

Issue With MatLab Binaries #223

EDShapiro opened this issue Mar 24, 2020 · 9 comments

Comments

@EDShapiro
Copy link

I have followed the instructions for using MatLab binaries directly.
-I have installed version 6.3.0 of MinGW_w64, and prepended the path to the binaries to the path environmental variable, both in CMD and in system settings.

  • I have downloaded the sgpp_v3.1.0_matlab-windows.tar.gz file, and extracted the files to a directory and added that path in MatLab,
    When trying to run sgpp.Grid.createLinearGrid(2) in MatLab I get the following error:
    Invalid MEX-file 'C:\Users\Evan_S\SG\matsgpp\matsgppmex.mexw64': The specified module could not be found..
    Even though I can see this file in directory.
    Can you tell me how to fix this?
@MichaelReh
Copy link
Member

Could you try the following:
Rename /PATH/TO/MATLAB/bin/win64/libstdc++-6.dll to libstdc++-6.old.dll?

Matlab ships its own version of libstdc++-6.dll and thus does not bother to look for the one from mingw. The renaming will force Matlab to look for other available libstdc++-6.dll and if your path is set correct it will find mingw's.

@EDShapiro
Copy link
Author

Thank you for the prompt response. I make the directed changes, and I am still receiving the same error message. I have prepended the path environmental variable value in my advanced system settings with the following path:
C:\Users\Evan_S\SG\mingw64\bin
Is this the correct way to prepend?
I installed mingw with the following settings:
Version: 8.1.0
Architecture: x86_64
threads: posix
exception: seh
Build revision: 0
OS: Windows 7 Home
Path to MinGW: C:\Users\Evan_S\SG\mingw64\bin

@MichaelReh
Copy link
Member

Yes, that sounds right.
You can easily check if mingw is installed and the path is set correctly by opening cmd.exe and entering "gcc -v". If the terminal tells you lots of stuff about gcc's configuration and ends with 'gcc version X.X.X)' everything is good. Otherwise something is wrong with your mingw or its path.

Apart from that, have you added 'C:\Users\Evan_S\SG\matsgpp to Matlabs pathtool?

Finally could you please tell me the exact error message you receive?

@EDShapiro
Copy link
Author

Yes, MINGW-x64 is installed properly. The complete error is:
Invalid MEX-file 'C:\Users\Evan DS\Documents\matsgpp\matsgppmex.mexw64': The specified module could not be
found.
Error in sgpp.Grid.createLinearGrid (line 66)
[varargout{1:nargout}] = matsgppmex(150, varargin{:});

@MichaelReh
Copy link
Member
MichaelReh commented Mar 26, 2020

This doesn't help much. I am used to much more verbose error messages telling which libraries are missing. Apparently in a case like yours it is common to use the Dependency Walker to find out which libraries are missing.

This error message can also happen when trying to run a mex file that was compiled with another version of MATLAB. Which version of MATLAB are you using? The MATLAB binaries were compiled with 2017a

@MichaelReh
Copy link
Member

We have also just released SG++ 3.3, including Matlab binaries which are compiled on Windows 10 with Matlab R2018a.
You can also try if maybe these work better for you.

@aleks01s
Copy link

I have downloaded the recent release according to the installation guidelines (Windows 10, MinGW-w64 8.1.0-posix-seh-rt_v6-rev0, MATLAB R2018b), but I cannot get the example "sgpp.Grid.createLinearGrid(2)" to run. The following error message pops up:

Invalid` MEX-file 'PATH2BINARIES\matsgppmex.mexw64':
Missing symbol '_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev' in
'PATH2DLL\libstdc++-6.dll'

This issue occurs whether MinGW's or Matlab's version of the DLL is used. Do you have an idea how to fix this?

@leiterrl
Copy link
Member
leiterrl commented Apr 3, 2020

@EDShapiro and @aleks01s

We changed the build environment for the latest release and as a result the steps in the Wiki seem to be outdated. We now use msys2 as a way to install an up-to-date version of mingw64 and the subsequent gcc runtime. Could you please try and remove your existing mingw64 installation and any remaining traces of any Paths pointing to it?

After that try and see if these rough instructions work for you:

  • Download and install msys2 (x64) as described here: https://www.msys2.org/
  • After you updated msys2, install the toolchain by running pacman -S mingw-w64-x86_64-toolchain
  • Add <PATH_TO_MSYS>/mingw64/bin to the top/beginning of your Path environment variable

After that you should be able to start MATLAB and follow the usual instructions to test the sgpp installation.

@EDShapiro
Copy link
Author

Hi again,
Thanks for all of your help, and apologies for taking so long to respond. I reinstalled Matlab 2018a and all of the issues resolved themselves. Some of the sg++ construction commands still do not work, like creating a polynomial Clenshaw Curtis Grid, so I am using the linearClenshawCurtis grid instead. Will the fixes you mentioned resolve these issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants
0