TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
141 stars 72 forks source link

aarch64 linux #834

Closed shinaoka closed 2 years ago

shinaoka commented 2 years ago

Summary

Support/test on aarch64-linux

Motivation

It'd be nice if we can run aarch64 linux on a M1 macbook using docker for development because the enumeration of x86_64 is slow.

Implementation

I've tried to build a docker image for TRIQS. But, cpp2py does not seem to support aarch64.

Adding a new search path in FindPython.cmake seems to fix the issue: https://github.com/TRIQS/cpp2py/blob/2.0.x/cmake/FindPython.cmake#L114

 #
 # Check for Python library path
 #
 EXEC_PYTHON_SCRIPT("import string; from distutils.sysconfig import *; print('%s' % get_python_lib(0,1))" PYTHON_LIBRARY_BASE_PATH)
 set(PYTHON_LIBRARY_SEARCH_PATHS "${PYTHON_LIBRARY_BASE_PATH}/.." "${PYTHON_LIBRARY_BASE_PATH}/../x86_64-linux-gnu" "${PYTHON_LIBRARY_BASE_PATH}/../i386-linux-gnu" "${PYTHON_LIBRARY_BASE_PATH}/../aarch64-linux-gnu")

I want to first know if someone is already porting TRIQS to aarch64.

Wentzell commented 2 years ago

Dear @shinaoka,

Thank you for pointing out the cpp2py issue! This is now fixed in https://github.com/TRIQS/cpp2py/commit/3c2fe467352a2faec713443237926573cb6af5f0

I am not aware of any aarch64 TRIQS Dockerfile, but it would be great to know if you run into any further issues. Please let us know!

Wentzell commented 2 years ago

Note however that we have successfully built the current TRIQS/unstable branch on a compute node with Fujitsu FX700 CPU's using the armv8.2-a+sve instruction set.

shinaoka commented 2 years ago

Thank you for the fix and the information. I've successfully built triqs, triqs/cthyb, triqs/dftools, triqs/hubbard-I on ubuntu:jammy. https://github.com/shinaoka/docker/blob/main/triqs3_aarch64/Dockerfile

Wentzell commented 2 years ago

Glad that this worked without issues! I am closing this, reopen if needed.