SWIFTSIM / SWIFT

Modern astrophysics and cosmology particle-based code. Mirror of gitlab developments at https://gitlab.cosma.dur.ac.uk/swift/swiftsim
http://www.swiftsim.com
GNU Lesser General Public License v3.0
89 stars 59 forks source link

Small mod required for build #5

Closed PhilRid closed 5 years ago

PhilRid commented 5 years ago

Hi,

Attached is a file cycle.h.patch.txt which can be used to patch src/cycle.h so that SWIFT builds on Arm.

Please try patch src/cycle.h -i cycle.h.patch.txt -o cycle.h

this should create a new file cycle.h which should replace src/cycle.h

Thanks.

MatthieuSchaller commented 5 years ago

Thanks!

cycle.h is taken directly from FFTW. What ARM chip are you considering here?

JBorrow commented 5 years ago

This should permanently fix the issues that I was having building on the test system.

MatthieuSchaller commented 5 years ago

I have pushed that patch to the master branch. It will appear online with our daily push.

I have also contacted the upstream developers too see whether they'd be interested in patching their version as well.

Thanks!

PhilRid commented 5 years ago

Just looking at the source for src/cycle.h again, it looks like something went wrong with the patch.

Line 534 should be

!defined(HAVE_TICK_COUNTER)

rather than

!defined(HAVE_ARMV8_PMCCNTR_EL0) && !defined(HAAVE_TICK_COUNTER)

Thanks!

MatthieuSchaller commented 5 years ago

Indeed! Not sure what happened there. Should have checked the result instead of just trusting the merge.

Anyway, I have just pushed the correct line to the master branch.