Skip to content

Commit 4ed9397

Browse files
committed
Merge pull request #1 from jeffhammond/travis-ci
Travis CI support
2 parents 1b2d15d + 013f1c6 commit 4ed9397

23 files changed

+639
-32
lines changed

.travis.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# required for package manager installs
2+
sudo: true
3+
language: c
4+
os:
5+
- linux
6+
# OpenMP compiler support on Mac is an issue
7+
# - osx
8+
compiler:
9+
- gcc
10+
# - clang
11+
env:
12+
# - PRK_TARGET=allserial
13+
# - PRK_TARGET=allopenmp
14+
# - PRK_TARGET=allmpi1
15+
# - PRK_TARGET=allmpiopenmp
16+
# - PRK_TARGET=allmpishm
17+
# - PRK_TARGET=allmpirma
18+
# - PRK_TARGET=allshmem
19+
# - PRK_TARGET=allupc
20+
# - PRK_TARGET=allcharm++
21+
# - PRK_TARGET=allampi
22+
# - PRK_TARGET=allfgmpi
23+
- PRK_TARGET=allgrappa
24+
before_install:
25+
- sh ./travis/install-deps.sh $PRK_TARGET
26+
- export PATH=$HOME/bin:$PATH
27+
- export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
28+
# recent CMake required for Grappa build
29+
- export PATH=$HOME/cmake/bin:$PATH
30+
script:
31+
- sh ./travis/build-run-prk.sh $PRK_TARGET
32+
after_failure:
33+
- echo "Sad panda"
34+
notifications:
35+
email:
36+
#recipients:
37+
38+
39+
on_success: [change]
40+
on_failure: [always]

CHARM++/Transpose/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ STARFLAG = -DSTAR
2222
#DEBUGFLAG = -DVERBOSE
2323
#description: default diagnostic style is silent
2424

25-
USERFLAGS =
25+
USERFLAGS =
2626
#description: parameter to specify optional flags
2727

2828
#set the following variables for custom libraries and/or other objects
29-
EXTOBJS =
30-
LIBS = #-mt_mpi
31-
LIBPATHS =
32-
INCLUDEPATHS =
29+
EXTOBJS =
30+
LIBS =
31+
LIBPATHS =
32+
INCLUDEPATHS =
3333

3434
### End User configurable options ###
3535

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Quality Control
2+
3+
[![Build Status](https://travis-ci.org/jeffhammond/PRK.svg)](https://travis-ci.org/jeffhammond/PRK)
4+
15
# License
26

37
See LICENSE for licensing information.

SHMEM/Stencil/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ USERFLAGS =
3838
#description: parameter to specify optional flags
3939

4040
#set the following variables for custom libraries and/or other objects
41-
EXTOBJS =
42-
LIBS = -lshmem
43-
LIBPATHS = -L$(SHMEMTOP)/lib
44-
INCLUDEPATHS =
41+
EXTOBJS =
42+
LIBS = -lm
43+
LIBPATHS =
44+
INCLUDEPATHS =
4545

4646
### End User configurable options ###
4747
LOOPGENFLAG = -DLOOPGEN=$(LOOPGEN)

SHMEM/Synch_p2p/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ USERFLAGS =
1717

1818
#set the following variables for custom libraries and/or other objects
1919

20-
EXTOBJS =
21-
LIBS = -lshmem
22-
LIBPATHS = -L$(SHMEMTOP)/lib
23-
INCLUDEPATHS =
20+
EXTOBJS =
21+
LIBS = -lm
22+
LIBPATHS =
23+
INCLUDEPATHS =
2424

2525
### End User configurable options ###
2626

SHMEM/Transpose/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ USERFLAGS =
1414

1515
#set the following variables for custom libraries and/or other objects
1616

17-
EXTOBJS =
18-
LIBS = -lshmem
19-
LIBPATHS = -L$(SHMEMTOP)/lib
20-
INCLUDEPATHS =
17+
EXTOBJS =
18+
LIBS = -lm
19+
LIBPATHS =
20+
INCLUDEPATHS =
2121

2222
### End User configurable options ###
2323

common/AMPI.defs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ include ../../common/make.defs
22
AMPICC=$(CHARMTOP)/bin/ampicc
33
CCOMPILER=$(AMPICC)
44
CITRANSLATOR=$(AMPICC) -E
5-
CLINKER=$(CCOMPILER) -language ampi -mt_mpi
5+
CLINKER=$(CCOMPILER) -language ampi
66
COMOBJS=MPI_bail_out.o wtime.o
77
PROG_ENV=-DADAPTIVE_MPI

common/CHARM++.defs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ include ../../common/make.defs
22
CHARMC=$(CHARMTOP)/bin/charmc
33
CCOMPILER=$(CHARMC)
44
CITRANSLATOR=$(CHARMC) -E
5-
CLINKER=$(CCOMPILER) -language charm++ -mt_mpi
5+
CLINKER=$(CCOMPILER) -language charm++
66
COMOBJS=
77
PROG_ENV=-DCHARM++

common/make.defs.in

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
#name of MPI C compiler, e.g. mpiicc, mpicc
2-
MPICC=
2+
MPICC=MYMPICC
33

44
#name of C compiler, e.g. icc, xlc, gcc
5-
CC=
5+
CC=MYCC
66

77
#name of compile line flag enabling OpenMP, e.g. -openmp, -qopenmp, -fopenmp
8-
OPENMPFLAG=
8+
OPENMPFLAG=MYOPENMPFLAG
99

1010
#default compiler optimization flags
11-
DEFAULT_OPT_FLAGS=-O3
11+
DEFAULT_OPT_FLAGS:=MYDEFAULT_OPT_FLAGS
1212

1313
############################ OPTIONAL #########################
1414

1515
#name of C++ compiler (to be used in MPI context for Grappa), e.g. mpigxx, mpiicpc
16-
CXX=
16+
CXX=MYCXX
1717

1818
#name of UPC compiler, e.g. gupc, cc, upcc
19-
UPCC=
19+
UPCC=MYUPCC
2020

2121
#name of compile line flag enabling UPC if necessary, e.g. -h upc
22-
UPCFLAG=
22+
UPCFLAG=MYUPCFLAG
2323

2424
#name of MPI C compiler (to be used in Fine-Grain MPI context), e.g. mpicc
25-
FGMPICC=
25+
FGMPICC=MYFGMPICC
2626

2727
#location where SHMEM is installed, e.g. $(HOME)/oshmpi-install
28-
SHMEMTOP=
28+
SHMEMTOP=MYSHMEMTOP
2929

3030
#name of C compiler (to be used in MPI context of OpenSHMEM), e.g. $(MPICC)
31-
SHMEMCC=
31+
SHMEMCC=MYSHMEMCC
3232

3333
#location where Charm++ is installed, e.g. $(HOME)/charm/mpi-linux-x86_64-ifort-smp-mpicxx
34-
CHARMTOP=
34+
CHARMTOP=MYCHARMTOP
3535

3636
#location where Grappa is installed, e.g. $(GRAPPA_PREFIX) if you've done "source <grappa install dir>/bin/settings.sh"
37-
GRAPPATOP=$(GRAPPA_PREFIX)
37+
GRAPPATOP=MYGRAPPATOP
3838

3939
#location where Fine-Grain MPI is installed, e.g. $(HOME)/fgmpi-install
40-
FGMPITOP=
40+
FGMPITOP=MYFGMPITOP

travis/build-run-prk.sh

+215
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
set -e
2+
set -x
3+
4+
PRK_TARGET="$1"
5+
6+
# make this runtime configurable later
7+
COMPILER=gcc
8+
9+
# Needed for Charm++ and AMPI below
10+
os=`uname`
11+
case "$os" in
12+
Darwin)
13+
export MY_CHARM_TOP=$HOME/charm/netlrts-darwin-x86_64-smp
14+
;;
15+
Linux)
16+
#export MY_CHARM_TOP=$HOME/charm/netlrts-linux-x86_64
17+
#export MY_CHARM_TOP=$HOME/charm/netlrts-linux-x86_64-smp
18+
export MY_CHARM_TOP=$HOME/charm/multicore-linux64
19+
;;
20+
esac
21+
22+
# Needed for FG-MPI below
23+
os=`uname`
24+
case "$os" in
25+
Darwin)
26+
export MY_FGMPI_TOP=$HOME/fgmpi
27+
;;
28+
Linux)
29+
export MY_FGMPI_TOP=/usr
30+
;;
31+
esac
32+
33+
case "$PRK_TARGET" in
34+
allserial)
35+
echo "Serial"
36+
sh ./travis/create-make-defs.sh $COMPILER
37+
make $PRK_TARGET
38+
export PRK_TARGET_PATH=SERIAL
39+
# widely supported
40+
$PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
41+
$PRK_TARGET_PATH/Stencil/stencil 10 1024 32
42+
$PRK_TARGET_PATH/Transpose/transpose 10 1024 32
43+
# less support
44+
$PRK_TARGET_PATH/Reduce/reduce 10 1024
45+
$PRK_TARGET_PATH/Random/random 64 10 16384
46+
$PRK_TARGET_PATH/Nstream/nstream 10 16777216 32
47+
$PRK_TARGET_PATH/Sparse/sparse 10 10 5
48+
$PRK_TARGET_PATH/DGEMM/dgemm 10 1024 32
49+
;;
50+
allopenmp)
51+
echo "OpenMP"
52+
sh ./travis/create-make-defs.sh $COMPILER
53+
make $PRK_TARGET
54+
export PRK_TARGET_PATH=OPENMP
55+
export OMP_NUM_THREADS=4
56+
# widely supported
57+
$PRK_TARGET_PATH/Synch_p2p/p2p $OMP_NUM_THREADS 10 1024 1024
58+
$PRK_TARGET_PATH/Stencil/stencil $OMP_NUM_THREADS 10 1024
59+
$PRK_TARGET_PATH/Transpose/transpose $OMP_NUM_THREADS 10 1024 32
60+
# less support
61+
$PRK_TARGET_PATH/Reduce/reduce $OMP_NUM_THREADS 10 16777216
62+
$PRK_TARGET_PATH/Nstream/nstream $OMP_NUM_THREADS 10 16777216 32
63+
$PRK_TARGET_PATH/Sparse/sparse $OMP_NUM_THREADS 10 10 5
64+
$PRK_TARGET_PATH/DGEMM/dgemm $OMP_NUM_THREADS 10 1024 32
65+
# random is broken right now it seems
66+
#$PRK_TARGET_PATH/Random/random $OMP_NUM_THREADS 10 16384 32
67+
# no serial equivalent
68+
$PRK_TARGET_PATH/Synch_global/global $OMP_NUM_THREADS 10 16384
69+
$PRK_TARGET_PATH/RefCount_private/private $OMP_NUM_THREADS 16777216
70+
$PRK_TARGET_PATH/RefCount_shared/shared $OMP_NUM_THREADS 16777216 1024
71+
;;
72+
allmpi1)
73+
echo "MPI-1"
74+
echo "MPICC=mpicc" > common/make.defs
75+
make $PRK_TARGET
76+
export PRK_TARGET_PATH=MPI1
77+
export PRK_MPI_PROCS=4
78+
# widely supported
79+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
80+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Stencil/stencil 10 1024
81+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Transpose/transpose 10 1024 32
82+
# less support
83+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Reduce/reduce 10 16777216
84+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Nstream/nstream 10 16777216 32
85+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Sparse/sparse 10 10 5
86+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/DGEMM/dgemm 10 1024 32 1
87+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Random/random 32 20
88+
# no serial equivalent
89+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Synch_global/global 10 16384
90+
;;
91+
allmpiomp)
92+
echo "MPI+OpenMP"
93+
echo "MPICC=mpicc" > common/make.defs
94+
make $PRK_TARGET
95+
export PRK_TARGET_PATH=MPIOMP
96+
export PRK_MPI_PROCS=4
97+
# widely supported
98+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
99+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Stencil/stencil 10 1024
100+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Transpose/transpose 10 1024 32
101+
# less support
102+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Nstream/nstream 10 16777216 32
103+
;;
104+
allmpirma)
105+
echo "MPI-RMA"
106+
echo "MPICC=mpicc" > common/make.defs
107+
make $PRK_TARGET
108+
export PRK_TARGET_PATH=MPIRMA
109+
export PRK_MPI_PROCS=4
110+
# widely supported
111+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
112+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Stencil/stencil 10 1024
113+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Transpose/transpose 10 1024 32
114+
;;
115+
allmpishm)
116+
echo "MPI+MPI"
117+
echo "MPICC=mpicc" > common/make.defs
118+
make $PRK_TARGET
119+
export PRK_TARGET_PATH=MPISHM
120+
export PRK_MPI_PROCS=4
121+
export PRK_MPISHM_RANKS=$(($PRK_MPI_PROCS/2))
122+
# widely supported
123+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
124+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Stencil/stencil $PRK_MPISHM_RANKS 10 1024
125+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Transpose/transpose $PRK_MPISHM_RANKS 10 1024 32
126+
;;
127+
allshmem)
128+
echo "SHMEM"
129+
echo "SHMEMTOP=$HOME\nSHMEMCC=oshcc" > common/make.defs
130+
make $PRK_TARGET
131+
export PRK_TARGET_PATH=SHMEM
132+
export PRK_SHMEM_PROCS=4
133+
# widely supported
134+
mpirun -n $PRK_SHMEM_PROCS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
135+
mpirun -n $PRK_SHMEM_PROCS $PRK_TARGET_PATH/Stencil/stencil 10 1024
136+
mpirun -n $PRK_SHMEM_PROCS $PRK_TARGET_PATH/Transpose/transpose 10 1024 32
137+
;;
138+
allupc)
139+
echo "UPC"
140+
# compiler for static thread execution, so set this prior to build
141+
echo "UPCC=/usr/local/gupc/bin/upc" > common/make.defs
142+
make $PRK_TARGET
143+
export PRK_TARGET_PATH=UPC
144+
export PRK_UPC_PROCS=4
145+
# widely supported
146+
$PRK_TARGET_PATH/Synch_p2p/p2p -n $PRK_UPC_PROCS 10 1024 1024
147+
$PRK_TARGET_PATH/Stencil/stencil -n $PRK_UPC_PROCS 10 1024
148+
$PRK_TARGET_PATH/Transpose/transpose -n $PRK_UPC_PROCS 10 1024 32
149+
;;
150+
allcharm++)
151+
echo "Charm++"
152+
echo "CHARMTOP=$MY_CHARM_TOP" > common/make.defs
153+
make $PRK_TARGET
154+
export PRK_TARGET_PATH=CHARM++
155+
export PRK_CHARM_PROCS=4
156+
# widely supported |
157+
# For Charm++, the last argument is the overdecomposition factor --> \|/
158+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Synch_p2p/p2p +p$PRK_CHARM_PROCS 10 1024 1024 1
159+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Stencil/stencil +p$PRK_CHARM_PROCS 10 1024 1
160+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Transpose/transpose +p$PRK_CHARM_PROCS 10 1024 32 1
161+
;;
162+
allampi)
163+
echo "Adaptive MPI (AMPI)"
164+
echo "CHARMTOP=$MY_CHARM_TOP" > common/make.defs
165+
make $PRK_TARGET
166+
export PRK_TARGET_PATH=AMPI
167+
export PRK_CHARM_PROCS=4
168+
# widely supported
169+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Synch_p2p/p2p +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 1024 1024
170+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Stencil/stencil +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 1024
171+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Transpose/transpose +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 1024 32
172+
# less support
173+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Reduce/reduce +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 16777216
174+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Nstream/nstream +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 16777216 32
175+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Sparse/sparse +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 10 5
176+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/DGEMM/dgemm +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 1024 32 1
177+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Random/random +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 32 20
178+
# no serial equivalent
179+
$MY_CHARM_TOP/bin/charmrun $PRK_TARGET_PATH/Synch_global/global +p$PRK_CHARM_PROCS +vp$PRK_CHARM_PROCS 10 16384
180+
;;
181+
allfgmpi)
182+
echo "Fine-Grain MPI (FG-MPI)"
183+
#
184+
echo "FGMPITOP=$MY_FGMPI_TOP\nFGMPICC=$MY_FGMPI_TOP/bin/mpicc" > common/make.defs
185+
make $PRK_TARGET
186+
export PRK_TARGET_PATH=FG_MPI
187+
export PRK_MPI_PROCS=2
188+
export PRK_FGMPI_THREADS=2
189+
# widely supported
190+
# widely supported
191+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
192+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Stencil/stencil 10 1024
193+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Transpose/transpose 10 1024 32
194+
# less support
195+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Reduce/reduce 10 16777216
196+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Nstream/nstream 10 16777216 32
197+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Sparse/sparse 10 10 5
198+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/DGEMM/dgemm 10 1024 32 1
199+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Random/random 32 20
200+
# no serial equivalent
201+
$MY_FGMPI_TOP/bin/mpiexec -np $PRK_MPI_PROCS -nfg $PRK_FGMPI_THREADS $PRK_TARGET_PATH/Synch_global/global 10 16384
202+
;;
203+
allgrappa)
204+
echo "Grappa"
205+
# compiler for static thread execution, so set this prior to build
206+
echo "GRAPPATOP=$HOME/grappa" > common/make.defs
207+
make $PRK_TARGET
208+
export PRK_TARGET_PATH=GRAPPA
209+
export PRK_MPI_PROCS=4
210+
# widely supported
211+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Synch_p2p/p2p 10 1024 1024
212+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Stencil/stencil 10 1024
213+
mpirun -n $PRK_MPI_PROCS $PRK_TARGET_PATH/Transpose/transpose 10 1024 32
214+
;;
215+
esac

0 commit comments

Comments
 (0)