-
Notifications
You must be signed in to change notification settings - Fork 70
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
macOS stand-alone client fails #13
Comments
This is the exact same strange behavior I encountered on Ubuntu. See issue #8 and chapter Limitations in the documentation. Have you tried whatever the indicated work-around on macOS would be? You have to somehow |
Resolves the issue. Checked os.environ which is correct. Seems to be not respected by the JVM. |
Edit: I just tried to use a script based on Matplotlib (and then
due to libtiff being in Maybe the env works but there are ambiguous libs? However I have to idea how to resolve that....Is running without the graphics path an option? |
Hm, yeah, I have no idea either. Running without the graphics path is not an option though. Otherwise things will break. Not just graphics-related things, such as loading an external image, even just solving the model, according to tests I've made on Linux. |
So, yes, the issue is ambiguity in install locations when It may help to preload PILlow's newer version of |
So just to go one level up - what would be the disadvantage with running in server / client mode all the time? I mean if this is too much of an issue, the other way works quite good (I know this is not really a satisfying solution). Thus removing standalone would make it more concise is terms of code. To reduce start stop, one could track the server status and only open once and connect / disconnect clients as needed. |
Well, I haven't given that much thought yet. If anything, I would have removed support for client-server mode. Because I've never really needed that. Fair point though. Maybe that's the way to go. |
Client-Server mode is a great feature actually. When models get large (in terms of RAM during calculation), you can have a local client handling file IO with local pathes and still have the mesh generation and computation on a cluster. This is very valuable, at least during my daily work where models easily ramp up to 100GB of RAM. So please keep this :) |
But then you started the server manually on the remote machine(s), right? It's already running so you can connect to it remotely. And not automated by the same Python script. Just trying to understand this use case. I use a file share to achieve what I think is the same. All "cluster" nodes (Comsol workstations) access the same shared network folder for I/O and job scheduling. Having access to a shared folder is a given, I think. But in this scenario, I don't need client-server mode. On each machine, I just start as many stand-alone clients ("workers") as I want (or as the machine has cores) and they all work on the same job queue. This approach works even without a network license. It basically lets the network file system fill in the blanks. No worries, though, we're not gonna scrap client-server mode, especially now. Come to think of it, the Matlab LiveLink also only ever uses client-server mode, not the stand-alone client. Maybe for the same reason, who knows? I did run into one issue with that though, back when I still had to use Matlab. Like when you start, say, 8 server instances on an 8-core machine, some of those would crash on start-up. I think that's because they're getting in each other's way when opening the communication port. |
Sure, starting remote is too much of a hassle with different protocols etc.
My thought, too. They tell you to always build a server, even on local. |
I may have found solution to this - setting DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH. As discussed here, macos only checks in the fallback path if the library isn't found in the default path. This ensures nothing breaks when adding the COMSOL paths necessary. Setting:
allows me to do:
with no issues! I also had to change line 481 in client.py to DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH so the script would check the right environment variable. |
Thanks for looking into this and reporting back. Good to know, I was not aware of that. This may help people who want to use stand-alone mode on macOS, but run into compatibility problems with other graphics libraries. Strange though that there seems to be no Linux equivalent, like I'll fix the checks of the environment variables in the next release. They are not necessary anyway, but certainly shouldn't get in the way of doing things right. |
As pointed out by @shomikverma, this check gets in the way when setting `DYLD_FALLBACK_LIBRARY_PATH` instead of `DYLD_LIBRARY_PATH`, which may be the better setup. It is the user's reponsibiliy to correctly configure the environment, we should not interfere with that as long as we're unsure if we have the best solution. The sanity check of environment variables was therefore removed.
As pointed out by @shomikverma, this check gets in the way when setting `DYLD_FALLBACK_LIBRARY_PATH` instead of `DYLD_LIBRARY_PATH`, which may be the better setup. It is the user's reponsibiliy to correctly configure the environment, we should not interfere with that as long as we're unsure if we have the best solution. The sanity check of environment variables was therefore removed.
With PR #11 initializing a Server object and connecting a client to this server works. However, when trying to build the Client as standalone, an exception is raised. Strangely, the path should be added (see client.py) and the file
libiomp5.dylib
is in the folder.The text was updated successfully, but these errors were encountered: