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

Aarch64 fixes #80

Open
wants to merge 2 commits into
base: spheric2022
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,19 @@ LIB_PATH_SFX =
# override: TARGET_ARCH - set the target architecture
# override: defaults to -m64 for 64-bit machines
# override: -m32 for 32-bit machines
ifeq ($(findstring 64,$(arch)), 64)
ifeq ($(arch), x86_64)
TARGET_ARCH ?= -m64
# on Linux, toolkit libraries are under /lib64 for 64-bit
else ifeq ($(findstring 86,$(arch)), 86) # matches i386 and i686
TARGET_ARCH ?= -m32
else # other architectures such as aarch64 and ppc64
TARGET_ARCH ?=
endif

# on Linux, toolkit libraries are under /lib64 for 64-bit
ifeq ($(findstring 64,$(arch)), 64)
ifeq ($(platform), Linux)
LIB_PATH_SFX = 64
endif
else # i386 or i686
TARGET_ARCH ?= -m32
endif

# override: INCPATH - paths for include files
Expand Down
6 changes: 3 additions & 3 deletions src/cuda/forces.cu
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ setconstants(const SimParams *simparams, const PhysParams *physparams,

// Neibs cell to offset table
char3 cell_to_offset[27];
for(char z=-1; z<=1; z++) {
for(char y=-1; y<=1; y++) {
for(char x=-1; x<=1; x++) {
for(signed char z=-1; z<=1; z++) {
for(signed char y=-1; y<=1; y++) {
for(signed char x=-1; x<=1; x++) {
int i = (x + 1) + (y + 1)*3 + (z + 1)*9;
cell_to_offset[i] = make_char3(x, y, z);
}
Expand Down