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

Is there an aarch64 version of EnergyPlus? Or how to compile the aarch64 version from the source code #8669

Closed
fubingting opened this issue Mar 30, 2021 · 12 comments
Assignees
Labels
Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc)

Comments

@fubingting
Copy link

No description provided.

@bonnema
Copy link
Contributor

bonnema commented Mar 30, 2021

@eringold
Copy link

also see: #8664

@jmarrec
Copy link
Contributor

jmarrec commented Apr 1, 2021

Either checkout #8664 or do this: specificy CMAKE_OSX_ARCHITECTURES

cmake -DCMAKE_OSX_ARCHITECTURES=arm64 [...]

Alternatively, I think this should also prefill the CMAKE_OSX_ARCHITECTURES correctly

export ARCHFLAGS="-arch x86_64"
cmake

Once the arch is detected correctly, I can assure you that EnergyPlus builds and runs fine.

@jmarrec jmarrec self-assigned this May 19, 2021
@jmarrec
Copy link
Contributor

jmarrec commented May 19, 2021

@fubingting I uploaded an aarch64 version on the release page: https://github.com/NREL/EnergyPlus/releases/tag/v9.5.0

EnergyPlus-9.5.0-de239b2e5f-Darwin-macOS11.2-arm64.dmg
EnergyPlus-9.5.0-de239b2e5f-Darwin-macOS11.2-arm64.tar.gz

Could you give it a shot?

@jmarrec jmarrec added the AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) label May 19, 2021
@fubingting
Copy link
Author

@fubingting I uploaded an aarch64 version on the release page: https://github.com/NREL/EnergyPlus/releases/tag/v9.5.0

EnergyPlus-9.5.0-de239b2e5f-Darwin-macOS11.2-arm64.dmg
EnergyPlus-9.5.0-de239b2e5f-Darwin-macOS11.2-arm64.tar.gz

Could you give it a shot?

Thank you very much. I'll try to install it.

@fubingting
Copy link
Author

After downloading and decompressing, I execute the three energyplus-9.5.0,EPMacro,ExpandObjects commands, and the following error occurs:

**./energyplus-9.5.0**
-bash: ./energyplus-9.5.0: cannot execute binary file: Exec format error
**file energyplus-9.5.0**
energyplus-9.5.0: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE>

@jmarrec

@jmarrec
Copy link
Contributor

jmarrec commented Jun 21, 2021

@fubingting what OS/Version are you using? This package is specifically for an M1 mac.

@fubingting
Copy link
Author

platform:aarch64
os:centos8
Because you mentioned above

 I uploaded an aarch64 version on the release page: https://github.com/NREL/EnergyPlus/releases/tag/v9.5.0,Could you give it a shot?

@fubingting what OS/Version are you using? This package is specifically for an M1 mac.

@jmarrec
Copy link
Contributor

jmarrec commented Jun 21, 2021

I assumed you were using an M1 mac incorrectly. The name of the installer mentions darwin-macos11.2-arm64 so I thought it was explicit that this would work on macOS only.

We do not have a centos aarch64 package no.

@jmarrec
Copy link
Contributor

jmarrec commented Jun 21, 2021

#8664 was merged, so you should try to compile it from source. https://github.com/NREL/EnergyPlus/wiki/Building-EnergyPlus

You'll need cmake and a C/CXX compiler, and that should pretty much be it as far as dependencies. I suggest a fortran compiler too so you can build the auxiliary programs such as ReadVarEso and ExpandObjects.

@airallergy
Copy link
Contributor

airallergy commented Dec 2, 2021

Hi @jmarrec, I tried to compile EP on M1, everything seems to work fine with binaries directly from the build folder. But after I installed the compiled package in the Applications folder, a few binaries do not work and give the error

zsh: killed     ReadVarsESO
zsh: killed     ExpandObjects
...

while bash gives

Killed: 9

I did not test all binaries exhaustively. Two I found working are energyplus and EPMacro. I tried compiling 9.6, also installing the precompiled 9.5 you attached above. Any ideas why this might be?

I can open a new issue if more appropriate.

@jmarrec jmarrec added Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) and removed AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) labels Feb 23, 2022
@jmarrec
Copy link
Contributor

jmarrec commented Mar 1, 2022

I'm closing this issue as it works as intended. I'm moving @airallergy 's issue with M1 mac to #9303

@jmarrec jmarrec closed this as completed Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc)
Projects
None yet
Development

No branches or pull requests

5 participants