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

build instructions for developers #100

Open
bharatjayaprakash opened this issue Jan 29, 2024 · 4 comments
Open

build instructions for developers #100

bharatjayaprakash opened this issue Jan 29, 2024 · 4 comments

Comments

@bharatjayaprakash
Copy link

Are there particular instructions for building from scratch for arm64 machines. I wanted to install my forked copy of fastsim (a few changes ahead of the main branch) into my local machine. But when I do that and subsequently import fastsim into a notebook, I get the following error:
Traceback (most recent call last):
File "", line 1, in
File "/root/veh-mod-venv/src/fastsim/python/fastsim/init.py", line 9, in
from . import fastsimrust
ImportError: dlopen(/root/veh-mod-venv/src/fastsim/python/fastsim/fastsimrust.cpython-39-darwin.so, 0x0002): tried: '/root/veh-mod-venv/src/fastsim/python/fastsim/fastsimrust.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Is there a differnet .so file for arm64. I am pretty new to building from scratch and also to raising issues on github. Let me know if I need to provide some more info.

@calbaker calbaker changed the title build instructions for arm64 machines build instructions for developers Jan 29, 2024
@calbaker
Copy link
Collaborator

@bharatjayaprakash , a lot of NREL developers build on arm64 so it should totally work. Try these instructions:
https://nrel.github.io/fastsim/#building-from-scratch

Out of curiosity, what is your background and why are you using fastsim?

@bharatjayaprakash
Copy link
Author

@calbaker Thanks for the link. I had previously referred to the same build from scratch instructions in the README file in the repo. I'll re-try that.
I am currently a third-year Ph.D. student (MechE) at the University of Minnesota. I am using fastsim to create custom vehicle models to analyse the effects of ambient temp on fuel economy.

@calbaker
Copy link
Collaborator

@bharatjayaprakash, did you try the updated instructions I sent you? Did that work?

@bharatjayaprakash
Copy link
Author

@calbaker Yes. The instructions worked. The problem I had earlier was due to an architecture mismatch between my python env and the .so file for building. One used an x86 arch and the other an arm64. I just had to reinstall for the correct architecture and it worked. Thanks.

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

2 participants