Skip to content

Build AccelWattch with the Makefile flow on non-x86 hosts - #153

Open
shatalov-alex wants to merge 1 commit into
accel-sim:devfrom
shatalov-alex:fix-makefile-aarch64
Open

shatalov-alex wants to merge 1 commit into
accel-sim:devfrom
shatalov-alex:fix-makefile-aarch64

Conversation

@shatalov-alex

Copy link
Copy Markdown

src/accelwattch/mcpat.mk passes -m64 and -msse2 -mfpmath=sse unconditionally. These are x86 options. aarch64 and ppc64le compilers reject them (g++: error: unrecognized command-line option '-m64'), so make fails in AccelWattch on those hosts. #150 guarded the SSE flags in the CMake flow; this does the same for the Makefile flow.

The flags are now set only when uname -m is an x86 architecture. On x86 the resulting CXX/CC/OPT are exactly as before: I checked this by evaluating the makefile with uname -m reporting x86_64, which gives g++ -m64 and -O3 -fPIC -msse2 -mfpmath=sse .... On aarch64 they are g++ and -O3 -fPIC ....

Testing

  • Full make build on aarch64 (CUDA 12.6.3, gcc 13.2, Ubuntu 24.04): libcudart.so links. Before this change it stopped at the first AccelWattch object.
  • I have not run a real x86 build; the x86 flags were checked only by evaluating the makefile, as above.

src/accelwattch/mcpat.mk passed -m64 and -msse2 -mfpmath=sse unconditionally.
aarch64 and ppc64le compilers reject all three, so 'make' failed in
AccelWattch on those hosts. accel-sim#150 guarded the SSE flags in the CMake flow;
this does the same for the Makefile flow and drops -m64/-m32 off x86.
x86 builds get exactly the flags they had before.
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

Successfully merging this pull request may close these issues.

1 participant