Skip to content

Commit

Permalink
Merge pull request #71 from martin-g/linux-arm64-support-2
Browse files Browse the repository at this point in the history
Add Linux ARM64 for the Makefile.SSE3.** configs
  • Loading branch information
stamatak authored Oct 4, 2023
2 parents 685b4f0 + 981d716 commit 69a7edc
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 10 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Build on Linux x86_64
runs-on: ubuntu-latest
strategy:
matrix:
intrinsics: ["", ".SSE3", ".AVX", ".AVX2"]
type: ["", ".PTHREADS", ".MPI", ".HYBRID", ".QuartetMPI"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y file openmpi-bin libopenmpi-dev
- name: Build
run: |
set -x
if [[ -f Makefile${{ matrix.intrinsics }}${{ matrix.type }}.gcc ]]; then
make -j -f Makefile${{ matrix.intrinsics }}${{ matrix.type }}.gcc all
file raxmlHPC* | grep x86-64
fi
build-aarch64:
name: Build on Linux aarch64
runs-on: ubuntu-latest
strategy:
matrix:
intrinsics: ["", ".SSE3"]
type: ["", ".PTHREADS", ".MPI", ".HYBRID", ".QuartetMPI"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu20.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/raxml"
install: |
apt-get update -q -y
apt-get install -q -y make gcc file openmpi-bin libopenmpi-dev
run: |
set -x
make -j -f Makefile${{ matrix.intrinsics }}${{ matrix.type }}.gcc all
file raxmlHPC* | grep aarch64
9 changes: 8 additions & 1 deletion Makefile.SSE3.HYBRID.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

CC = mpicc

CFLAGS = -D_WAYNE_MPI -D_USE_PTHREADS -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ARCH_CFLAGS=-msse3
else ifeq ($(ARCH), aarch64)
ARCH_CFLAGS=
endif

CFLAGS = -D_WAYNE_MPI -D_USE_PTHREADS -D__SIM_SSE3 -O2 -D_GNU_SOURCE $(ARCH_CFLAGS) -fomit-frame-pointer -funroll-loops

LIBRARIES = -lm -pthread

Expand Down
9 changes: 8 additions & 1 deletion Makefile.SSE3.MPI.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

CC = mpicc

CFLAGS = -D_WAYNE_MPI -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ARCH_CFLAGS=-msse3
else ifeq ($(ARCH), aarch64)
ARCH_CFLAGS=
endif

CFLAGS = -D_WAYNE_MPI -D__SIM_SSE3 -O2 -D_GNU_SOURCE $(ARCH_CFLAGS) -fomit-frame-pointer -funroll-loops

LIBRARIES = -lm

Expand Down
9 changes: 8 additions & 1 deletion Makefile.SSE3.PTHREADS.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@

CC = gcc

CFLAGS = -D_USE_PTHREADS -D__SIM_SSE3 -D_GNU_SOURCE -msse3 -O2 -fomit-frame-pointer -funroll-loops #-Wall -pedantic -Wunused-parameter -Wredundant-decls -Wreturn-type -Wswitch-default -Wunused-value -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wunused -Wunused-function -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wformat -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ARCH_CFLAGS=-msse3
else ifeq ($(ARCH), aarch64)
ARCH_CFLAGS=
endif

CFLAGS = -D_USE_PTHREADS -D__SIM_SSE3 -D_GNU_SOURCE $(ARCH_CFLAGS) -O2 -fomit-frame-pointer -funroll-loops #-Wall -pedantic -Wunused-parameter -Wredundant-decls -Wreturn-type -Wswitch-default -Wunused-value -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wunused -Wunused-function -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wformat -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast


LIBRARIES = -lm -pthread
Expand Down
9 changes: 8 additions & 1 deletion Makefile.SSE3.QuartetMPI.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@

CC = mpicc

CFLAGS = -D__SIM_SSE3 -msse3 -D_GNU_SOURCE -O2 -fomit-frame-pointer -funroll-loops -D_QUARTET_MPI #-Wall -pedantic -Wunused-parameter -Wredundant-decls -Wreturn-type -Wswitch-default -Wunused-value -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wunused -Wunused-function -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wformat -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ARCH_CFLAGS=-msse3
else ifeq ($(ARCH), aarch64)
ARCH_CFLAGS=
endif

CFLAGS = -D__SIM_SSE3 $(ARCH_CFLAGS) -D_GNU_SOURCE -O2 -fomit-frame-pointer -funroll-loops -D_QUARTET_MPI #-Wall -pedantic -Wunused-parameter -Wredundant-decls -Wreturn-type -Wswitch-default -Wunused-value -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wunused -Wunused-function -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wformat -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast

LIBRARIES = -lm

Expand Down
9 changes: 8 additions & 1 deletion Makefile.SSE3.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@

CC = gcc

CFLAGS = -D__SIM_SSE3 -msse3 -D_GNU_SOURCE -O2 -fomit-frame-pointer -funroll-loops #-pedantic -Wall -Wunused-parameter -Wredundant-decls -Wreturn-type -Wswitch-default -Wunused-value -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wunused -Wunused-function -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wformat -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ARCH_CFLAGS=-msse3
else ifeq ($(ARCH), aarch64)
ARCH_CFLAGS=
endif

CFLAGS = -D__SIM_SSE3 $(ARCH_CFLAGS) -D_GNU_SOURCE -O2 -fomit-frame-pointer -funroll-loops #-pedantic -Wall -Wunused-parameter -Wredundant-decls -Wreturn-type -Wswitch-default -Wunused-value -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wunused -Wunused-function -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wformat -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast

LIBRARIES = -lm

Expand Down
6 changes: 4 additions & 2 deletions bipartitionList.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
#include "rmq.h" //include range minimum queries for fast plausibility checker

#ifdef __SIM_SSE3

#ifdef __x86_64__
#include <xmmintrin.h>
#include <pmmintrin.h>

#elif __aarch64__
#include "sse2neon.h"
#endif
#endif

#ifdef _USE_PTHREADS
Expand Down
5 changes: 4 additions & 1 deletion evaluateGenericSpecial.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@
#include <string.h>
#include "axml.h"


#ifdef __SIM_SSE3
#ifdef __x86_64__
#include <xmmintrin.h>
#include <pmmintrin.h>
/*#include <tmmintrin.h>*/
#elif __aarch64__
#include "sse2neon.h"
#endif
#endif

#ifdef _USE_PTHREADS
Expand Down
5 changes: 4 additions & 1 deletion evaluatePartialGenericSpecial.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@
#include "axml.h"

#ifdef __SIM_SSE3
#ifdef __x86_64__
#include <xmmintrin.h>
#include <pmmintrin.h>
#elif __aarch64__
#include "sse2neon.h"
#endif
#endif


/********************** GTRCAT ***************************************/

Expand Down
6 changes: 5 additions & 1 deletion fastDNAparsimony.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@

#ifdef __SIM_SSE3

#ifdef __x86_64__
#include <xmmintrin.h>
#include <pmmintrin.h>

#elif __aarch64__
#include "sse2neon.h"
#endif

#endif

#ifdef __AVX
Expand Down
4 changes: 4 additions & 0 deletions makenewzGenericSpecial.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@
#include "axml.h"

#ifdef __SIM_SSE3
#ifdef __x86_64__
#include <xmmintrin.h>
#include <pmmintrin.h>
/*#include <tmmintrin.h>*/
#elif __aarch64__
#include "sse2neon.h"
#endif
#endif

#ifdef _USE_PTHREADS
Expand Down
5 changes: 5 additions & 0 deletions newviewGenericSpecial.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@
#ifdef __SIM_SSE3

#include <stdint.h>

#ifdef __x86_64__
#include <xmmintrin.h>
#include <pmmintrin.h>
#elif __aarch64__
#include "sse2neon.h"
#endif

const union __attribute__ ((aligned (BYTE_ALIGNMENT)))
{
Expand Down

0 comments on commit 69a7edc

Please sign in to comment.