-
Notifications
You must be signed in to change notification settings - Fork 76
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
Discovery of Comsol 6.0 fails on Linux #67
Comments
Thanks for reporting this. Which part of the code fails isn't all that relevant. The root cause must be that something in Comsol's folder structure has changed between 5.x and 6.0. So far, there is nothing version-specific in the discovery mechanism. I don't have access to a Comsol 6.0 installation at this point, so cannot look into this or test possible solutions. Pull request welcome. |
I see nothing in the Comsol 6.0 release notes that would indicate any changes to the folder layout. So, no clue what's happening there. |
Hi, |
I agree, you should be using Comsol 6.0 if you have it. But according to the original post it does not work with MPh. I can't verify if that's true, but it probably is. Let me know if you want to help fix this. The information provided so far is obviously insufficient. You would need Comsol 6.0 and run some tests, then report back. I can walk you through the steps, it's not difficult. I may be able to fix this, but I need feedback I can work with. |
Thanks for your quick reply. |
Okay, great. Here's what you can do… Basically, if the discovery mechanism does indeed not work with Comsol 6.0, we want to see what's different compared to Comsol 5.6. You could look at the folder structure of the two installations and see if you notice anything. But there's also a test script you can run, which should report everything that's important.
Here's what the output looks like with Comsol 5.6 on Windows. C:\temp\MPh-main
$ python tools/test.py discovery --log
Running test group "discovery".
[00:00.717] Checking registry node "SOFTWARE\Comsol\COMSOL56".
[00:00.717] Checking installation folder "C:\Program Files\COMSOL\COMSOL56\Multiphysics".
[00:01.504] Reported version info is "COMSOL Multiphysics 5.6.0.401".
[00:01.504] Assigned name "5.6" to this installation.
Passed in 2 s. Those messages are logged by the |
Hi @john-hen PS: This holds for macOS - I will have access to windows soon but honestly do not see any issues. I think we need more input from @louisreg on this specific issue. Maybe some other path problems? |
Hi Max, great to hear from you! Job changes, I know all about that. I don't actually work with Comsol right now, but obviously we want to get 6.0 working a.s.a.p. Appreciate your feedback. So it's not a problem across all operating systems then. Makes it more likely to be a Linux issue, as most people are on Windows, I would assume, and there hasn't exactly been an uproar over 6.0 not working, even though it's been out for over a month now. When you get a chance to test on Windows, make sure you run the full test suite there too ( PS: I didn't add that many features. But the one, I think, that stands out is that we can now do |
Will do. We have COMSOL windows licenses available but need a project to justify the cost per department. I do plan on running simulations where COMSOL is a viable option but this will take some time (weeks...). |
Ah, okay. Then just run the discovery test, that doesn't need a license (if you manage to install without one). I'm not really worried about the other tests. For one, it's out of scope as far as this issue is concerned. And for another, it would just mean the tests need fixing, not the actual library code. If the discovery works, then everything else should be fine, from a user perspective. |
`test_tag()` in `test_node.py` compares the node tags generated by MPh with the tags created by Comsol for the same model. The reference model is the demo model from the Tutorial. It was created with Comsol 5.5 and then saved to a file, stored in the `demos` folder. Newer Comsol versions (such as 6.0, see #67) may create default nodes that older versions didn't. To future-proof the test, we therefore only compare the tags if the node already existed in the reference model, but ignore "new" nodes (if any) possibly introduced by later Comsol versions.
I just future-proofed that one iffy test I alluded to. Also, I had forgotten that we actually skip that test on macOS / Linux, because it's unbearably slow in client–server mode. So it could not have failed when you ran the test suite on macOS. |
The below holds for Windows 10, COMSOL 6.0: So if the installation is performed correctly, |
Thanks for looking into this, @max3-2. This is good news. Means most users won't be affected by this. |
I'll leave this open until we hear from a Linux user. Note that there is no need to "downgrade" even if 6.0 doesn't work. We can have multiple Comsol versions installed side by side. After all, that's the whole point of the "discovery mechanism". Just check |
Hi
tell me if you want additional information |
Hi @mchekr, thanks for running the test. Yes, I'll need a bit more information. So it looks like the dynamic library
Can you search the $ cat /usr/local/comsol60/multiphysics/bin/glnxa64/comsol.ini In Comsol 5.6, that file contains: # Settings for COMSOL desktop on glnxa64
-startup
../../plugins/org.eclipse.equinox.launcher_1.5.700.v20200527-1300.jar
--launcher.library
../glnxa64
-install ../..
-vm
../../java/glnxa64/jre/lib/amd64/server/libjvm.so
-vmargs
#-Djava.net.useSystemProxies=true
-Dosgi.splashPath=platform:/base/plugins/com.comsol.util/
-Dosgi.clean=true
-Dorg.osgi.service.log.admin.loglevel=DEBUG
-Dosgi.configuration.cascaded=true
-Dosgi.checkConfiguration=true
-Dosgi.sharedConfiguration.area=file:configuration/comsol
-Dosgi.sharedConfiguration.area.readOnly=true
-Dosgi.configuration.area=@user.home/.comsol/v56/configuration/comsol
-Dosgi.instance.area=@user.home/.comsol/v56/workspace/comsol
#-Dorg.eclipse.swt.browser.DefaultType=mozilla
-Declipse.security=
-Djava.security.policy=${osgi.install.area}/bin/glnxa64/comsol.policy
-Dcs.logoutput=file
-Dcs.logfileprefix=comsol
-Dcs.client=true
-Xss4m
-Xms40m
-Xmx2g
-XX:MaxMetaspaceSize=512m The 8th line is the relative path from there to Maybe they vendored a new Java version? You could check that too. Like with Comsol 5.6, the output is this:
Should be the same call, except |
The
(the as for the Java version, the output is:
|
The relative location of `libjvm.so` has changed between Comsol 5.6 and 6.0, probably because the vendored JDK was upgraded from 8 to 11. We now simply check both locations. Also removed a check for `libjvm.so` on macOS, which is most probably doing nothing there.
Ah, okay, they upgraded the JDK from 8 to 11. That's probably a good thing, might alleviate (or even solve) the issues discussed in #38. I fixed that, we're now simply checking both locations. Was the easiest thing to do, but maybe I'll have it parse Can you run the discovery test again with the patch? I'll do a new release a.s.a.p. if the test now passes, which it should. |
Great! Many Thanks for the work, I'll wait for the release when you'll have the time. |
Perfect. Thanks for your help! Release will be out shortly… |
Fixed in MPh 1.1.4, released today. |
Hi guys, I am using comsol 6 on linux and mph 1.1.6 and I am running into this issue. My comsol is in a custom folder. I tried creating a symbolic link in ~/.local as stated here. Still no luck. Would love some help. |
Hi. Then it must be something else, as this issue was fixed in MPh 1.1.4. Probably just the symbolic link that has an incorrect target or name? |
Hi,
I've upgraded my comsol version to 6.0 and now mph is failing to locate comsol. I did a quick research and it seems that the following code is failing with comsol 6.0:
backends.append({ 'name': name, 'major': major, 'minor': minor, 'patch': patch, 'build': build, 'root': root, 'jvm': jvm, 'java': java, 'server': [comsol, 'mphserver'],
I've downgraded and it works as usual.
Louis
The text was updated successfully, but these errors were encountered: