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

Linking HELICS 3.X with Matlab #6

Open
StormsHalted opened this issue Aug 19, 2022 · 17 comments
Open

Linking HELICS 3.X with Matlab #6

StormsHalted opened this issue Aug 19, 2022 · 17 comments

Comments

@StormsHalted
Copy link

Hello,

Earlier, my attempts to integrate Matlab with HELICS 2.8 ended in a fiasco, so, with suggestion from the developers, I decided to move up to HELICS 3.

As, I execute the installation instructions given on: [https://github.com/GMLC-TDC/matHELICS]

I get the following error: (for clarity, I am sharing the exact screenshot)

(Pardon if I did something wrong, I am relatively new to linux)

image

image

Looking forward to your support in this regard.

@phlptp
Copy link
Member

phlptp commented Aug 19, 2022

What operating system is this on?

@StormsHalted
Copy link
Author

What operating system is this on?

It is a Ubuntu 21.10

@phlptp
Copy link
Member

phlptp commented Aug 19, 2022

staring at this a bit more. it is possible there is a mismatch between the gcc used for compiling and that available in the library used by matlab. Since it appears the libstdc++ is coming from matlab.

can you try
strings <<that path used to point to libstdc++.so.6>> | grep GLIBCXX from the command line

You might also try mex -setup C++ and choose an older gcc version if you have one available and then recompile the mex file

@nightlark
Copy link
Member

If possible, uploading a copy of helicsMex.mexa64 might help with figuring out what is going on/replicating the issue.

@StormsHalted
Copy link
Author

@nightlark

Appears that the mexa64 is not one of the supported types here, so I can email that alternatively.

@StormsHalted
Copy link
Author

@phlptp

Here is what happens with using mex -setup C++

image

I am not sure if I am putting the strings line in correct syntax:

image

@phlptp
Copy link
Member

phlptp commented Aug 20, 2022

You will have to do that second one on the bash command line, not in matlab it is is linux command line, not even sure it works there or if you need to install something to use strings.

@nightlark
Copy link
Member

nightlark commented Aug 20, 2022

strings is often installed on Linux systems, if it isn't I think the package it comes from is binutils.

The << and >> are being used to show that the text inside is a description of what the argument that replaces those <<>> and everything inside them would be (as in those carrots and all the text inside them will be gone). All that is saying is to run strings on the libstdc++ file given in the error message.

For uploading the mex file, you can probably trick GitHub by making a copy with a supported extension like .png, .txt or similar to upload.

@StormsHalted
Copy link
Author

@phlptp

Sorry I missed that it had to be executed on a Command Line.

So here is how I was able to do it:

image

image

image

I get the same result as above, after I execute the buildHelicsInterface(), clearly I am not able to get the syntax correct.

@nightlark

Here is the Zip file of mexa64.

helicsMex.zip

@nightlark
Copy link
Member

You left the << and >> characters in the string instead of replacing them -- in the example command given, those are being used to mean replace the descriptive string including those characters with a file; unfortunately << and >> are both valid syntax for bash (redirection operators). A maybe clearer way of putting it is: strings path/that/points/to/libstdc++.so.6 | grep GLIBCXX.

Or run the strings command on the libstdc++.so.6 file, and pipe the output | to the grep command to look for lines starting with GLIBCXX

@nightlark
Copy link
Member

nightlark commented Aug 24, 2022

Here's a quick screen recording of running the command on two example libstdc++ files on a Linux VM.

asciicast

@StormsHalted
Copy link
Author

@nightlark

Thanks for the succinct explanation, My output is exactly the same as yours:

image

@StormsHalted
Copy link
Author

Hello Philip and Ryan,

Any leads up till now?

@StormsHalted
Copy link
Author

Hello,

Checking back to see if their are any leads on it?

@nightlark
Copy link
Member

nightlark commented Sep 14, 2022

Sorry, I don't have any updates on this.

I think Philip was going to see if the bug occurs on one of the HPC systems here that already has Matlab installed -- I'm not sure if that has been tested yet.

@phlptp
Copy link
Member

phlptp commented Nov 2, 2022

As best as we can tell the Matlab interface is behaving normally on Linux now as of the 3.3.0 release. We are going to tag a 3.3.1 release soon to match with the latest HELICS release.

@StormsHalted
Copy link
Author

Hi Philip,

Downloaded the newest version from the repo, extracted it and ran buildhelicsinterface() from inside Matlab, got the same error.

image

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

No branches or pull requests

3 participants