- Thank you received: 0
Problem running Netgen in batchmode with macOS Big Sur
- BenWilson94
- Topic Author
- Offline
- Junior Member
Less
More
3 years 6 months ago #3756
by BenWilson94
Hello,
I have just upgraded to macOS Big Sur and am using python 3.8.2 and NGSolve 6.2.2102. I am trying to run netgen in batchmode from a python script. I am using the command
Which I believe to be equivalent to
However, the second works but the first does not and I receive the following error
I have been running the first line of code on macOS High Sierra and I believe the only thing I have changed is my OS. Could you please advise if there is something I have missed or if there is an easy work around?
Kind regards,
Ben
I have just upgraded to macOS Big Sur and am using python 3.8.2 and NGSolve 6.2.2102. I am trying to run netgen in batchmode from a python script. I am using the command
Code:
subprocess.call(['netgen','-geofile=my_geometry.geo','-meshfile=my_mesh.vol','-coarse','-batchmode'])
Code:
$ netgen -geofile=my_geometry.geo -meshfile=my_mesh.vol -coarse -batchmode
Code:
Error in Tcl-Script:
result = dlopen(libgui.dylib, 6): image not found
Make sure to set environment variable NETGENDIR to directory containing ng.tcl
Kind regards,
Ben
3 years 6 months ago - 3 years 6 months ago #3757
by matthiash
Replied by matthiash on topic Problem running Netgen in batchmode with macOS Big Sur
Hi Ben,
Try to pass shell=True to subprocess.call. Otherwise, your .bash_profile file is not executed and environment variables like NETGENDIR are not defined.
Best,
Matthias
Try to pass shell=True to subprocess.call. Otherwise, your .bash_profile file is not executed and environment variables like NETGENDIR are not defined.
Best,
Matthias
Last edit: 3 years 6 months ago by matthiash.
- BenWilson94
- Topic Author
- Offline
- Junior Member
Less
More
- Thank you received: 0
3 years 6 months ago #3758
by BenWilson94
Replied by BenWilson94 on topic Problem running Netgen in batchmode with macOS Big Sur
Hi Matthias,
Thank you for your speedy reply. I have tried implementing shell=True as you suggested but am still getting the same error. You seem to suggest it is an issue when sourcing .bash_profile using subprocess though, so I will look at that and see whether I can find anything and if not I will come back. Thank you for your help.
Kind regards,
Ben
Thank you for your speedy reply. I have tried implementing shell=True as you suggested but am still getting the same error. You seem to suggest it is an issue when sourcing .bash_profile using subprocess though, so I will look at that and see whether I can find anything and if not I will come back. Thank you for your help.
Kind regards,
Ben
Time to create page: 0.094 seconds