baram icon indicating copy to clipboard operation
baram copied to clipboard

Not working on Mac - maybe due to issue in the Solvers file for Mac

Open monugeni opened this issue 2 years ago • 4 comments

Describe the bug

I am following the installation instructions as per the INSTALL.md file.

When I try to start Baram using:

python main.py

I get the following error:

  File "/Users/tan/baram-mac/baram/main.py", line 24, in <module>
    from view.main_window.start_window import Baram
  File "/Users/tan/baram-mac/baram/view/main_window/start_window.py", line 19, in <module>
    from coredb.project import Project, ProjectOpenType
  File "/Users/tan/baram-mac/baram/coredb/project.py", line 13, in <module>
    import openfoam.run as run
  File "/Users/tan/baram-mac/baram/openfoam/run.py", line 53, in <module>
    ompiPath = glob.glob(str(OPENFOAM / 'lib' / 'openmpi*'))[0]  # No Validity Check. It should exist.
IndexError: list index out of range

To Reproduce Steps to reproduce the behavior:

  1. Follow installation instructions as per INSTALL.md
  2. Use the Mac solvers file from :
  3. python main.py

Expected behavior Baram should start. It is working fine on Linux.

Desktop (please complete the following information):

  • OS: Ubuntu 22.10
  • Python: 3.9

Additional context I believe the problem is in the Solvers file. There are no files in the lib directory with names matching openmpi* The Solvers file for linux has a number of such files existing in the lib folder. Please check.

monugeni avatar Feb 26 '23 17:02 monugeni

Hello, monugeni. Sorry for the inconvenience. Could you try following change in openfoam/run.py? image By the way, is your mac running on Intel Silicon? Please note that Apple silicon like M1, M2 is not supported for now. However, next BARAM version is coming out soon with Apple silicon support.

jiban avatar Feb 28 '23 14:02 jiban

I am using centos linux and I can reproduce the same problem. And the fix above doesn't work because openmpi* is in lib and sys-openmpi* is in tlib. So what I need to do is to modify only line 54 in run.py by changing openmpi* to sys-openmpi*.

Hope this helps.

niuniuaba avatar Apr 12 '23 05:04 niuniuaba

Thanks for your message. The latest Baram works fine without any changes. It works on Apple Silicon mac also and I hope shall work ok on Centos also.

On Wed, 12 Apr 2023 at 10:41, niuniuaba @.***> wrote:

I am using centos linux and I can reproduce the same problem. And the fix above doesn't work because openmpi* is in lib and sys-openmpi* is in tlib. So what I need to do is to modify only line 54 in run.py by changing openmpi* to sys-openmpi*.

Hope this helps.

— Reply to this email directly, view it on GitHub https://github.com/nextfoam/baram/issues/32#issuecomment-1504642934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARVIBL26GLDLOD5HMBODGDXAY2P7ANCNFSM6AAAAAAVISEULE . You are receiving this because you authored the thread.Message ID: @.***>

monugeni avatar Dec 26 '23 08:12 monugeni

Dear @monugeni, I'm happy to hear that. Thank you for sharing the information. Please don't hesitate to let me know if you have any other trouble or suggestion.

jiban avatar Dec 26 '23 09:12 jiban