NREL / fastsim

https://nrel.github.io/fastsim/
Apache License 2.0
20 stars 5 forks source link

build instructions for developers #100

Open bharatjayaprakash opened 8 months ago

bharatjayaprakash commented 8 months ago

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 commented 8 months ago

@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 commented 8 months ago

@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 commented 5 months ago

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

bharatjayaprakash commented 4 months ago

@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.