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

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

Closed
monugeni opened this issue Feb 26, 2023 · 4 comments
Closed

Comments

@monugeni
Copy link

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.

@jiban
Copy link
Contributor

jiban commented Feb 28, 2023

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.

@niuniuaba
Copy link

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.

@monugeni
Copy link
Author

monugeni commented Dec 26, 2023 via email

@jiban
Copy link
Contributor

jiban commented Dec 26, 2023

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 jiban closed this as completed May 30, 2024
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