Skip to content

Commit

Permalink
Merge pull request #42 from jeffhammond/silence-compiler-warnings-1
Browse files Browse the repository at this point in the history
Silence compiler warnings 1
  • Loading branch information
jeffhammond committed Jan 26, 2016
2 parents 1755218 + ab2d6f1 commit 2a473e6
Show file tree
Hide file tree
Showing 14 changed files with 156 additions and 103 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ matrix:
env: PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=udp
PRK_FLAGS="-Wc,-O3"
- os: osx
env: PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=smp
PRK_FLAGS="-Wc,-O3"
# Mac issue with thread_t (see https://github.com/humairakamal/fgmpi/pull/1)
- os: osx
env: PRK_TARGET=allfgmpi
Expand All @@ -57,11 +59,13 @@ matrix:
- env: PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=ofi
PRK_FLAGS="-Wc,-O3"
# UPC over MPICH on Mac hangs - may be async progress issue
- os: osx
env: PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=mpi
PRK_FLAGS="-Wc,-O3"
# probably because of old GCC (4.6)
- os: linux
compiler: gcc
Expand Down Expand Up @@ -126,15 +130,19 @@ env:
- PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=mpi
PRK_FLAGS="-Wc,-O3"
- PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=ofi
PRK_FLAGS="-Wc,-O3"
- PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=smp
PRK_FLAGS="-Wc,-O3"
- PRK_TARGET=allupc
UPC_IMPL=bupc
GASNET_CONDUIT=udp
PRK_FLAGS="-Wc,-O3"
- PRK_TARGET=allupc
UPC_IMPL=gupc
- PRK_TARGET=allampi
Expand Down
154 changes: 78 additions & 76 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ ifndef matrix_rank
matrix_rank=5
endif

ifndef default_opt_flags
default_opt_flags=-O3
ifndef PRK_FLAGS
PRK_FLAGS=-O3
endif

default:
default: allserial allopenmp allmpi

help:
@echo "Usage: \"make all\" (re-)builds all targets"
@echo " \"make allserial\" (re-)builds all serial targets"
@echo " \"make allopenmp\" (re-)builds all OpenMP targets"
Expand Down Expand Up @@ -72,117 +74,117 @@ alldarwin: allserial allopenmp allmpi1 allfgmpi allmpiopenmp allmpirma allshmem
allfreaks: allcharm++ allampi allgrappa

allmpi1:
cd MPI1/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPI1/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(default_opt_flags)" \
cd MPI1/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPI1/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)" \
"MATRIX_RANK = $(matrix_rank)" \
"NUMBER_OF_FUNCTIONS = $(number_of_functions)"

allampi:
cd AMPI/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd AMPI/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(default_opt_flags)" \
cd AMPI/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd AMPI/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)" \
"MATRIX_RANK = $(matrix_rank)" \
"NUMBER_OF_FUNCTIONS = $(number_of_functions)"

allfgmpi:
cd scripts/small; $(MAKE) -f Makefile_FG_MPI runfgmpi
cd scripts/wide; $(MAKE) -f Makefile_FG_MPI runfgmpi
cd FG_MPI/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd FG_MPI/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(default_opt_flags)" \
cd FG_MPI/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd FG_MPI/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)" \
"MATRIX_RANK = $(matrix_rank)" \
"NUMBER_OF_FUNCTIONS = $(number_of_functions)"

allmpiopenmp:
cd MPIOPENMP/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIOPENMP/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIOPENMP/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIOPENMP/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIOPENMP/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPIOPENMP/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPIOPENMP/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPIOPENMP/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allmpiomp: allmpiopenmp

allmpirma:
cd MPIRMA/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIRMA/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIRMA/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPIRMA/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPIRMA/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPIRMA/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allshmem:
cd SHMEM/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SHMEM/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SHMEM/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SHMEM/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SHMEM/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SHMEM/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allmpishm:
cd MPISHM/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPISHM/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPISHM/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd MPISHM/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPISHM/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd MPISHM/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allmpi: allmpi1 allmpiomp allmpirma allmpishm

allupc:
cd UPC/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd UPC/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd UPC/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd UPC/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd UPC/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd UPC/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allpgas: allshmem allupc allmpirma

allopenmp:
cd OPENMP/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/RefCount_shared; $(MAKE) shared "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/RefCount_private; $(MAKE) private "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd OPENMP/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(default_opt_flags)" \
cd OPENMP/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/RefCount_shared; $(MAKE) shared "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/RefCount_private; $(MAKE) private "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Synch_global; $(MAKE) global "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd OPENMP/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)" \
"MATRIX_RANK = $(matrix_rank)" \
"NUMBER_OF_FUNCTIONS = $(number_of_functions)"

allcharm++:
cd CHARM++/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd CHARM++/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd CHARM++/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd CHARM++/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd CHARM++/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd CHARM++/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allgrappa:
cd GRAPPA/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd GRAPPA/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd GRAPPA/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd GRAPPA/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd GRAPPA/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd GRAPPA/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"

allserial:
cd SERIAL/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
cd SERIAL/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(default_opt_flags)" \
cd SERIAL/DGEMM; $(MAKE) dgemm "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Nstream; $(MAKE) nstream "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Reduce; $(MAKE) reduce "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Stencil; $(MAKE) stencil "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Transpose; $(MAKE) transpose "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Random; $(MAKE) random "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Sparse; $(MAKE) sparse "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Synch_p2p; $(MAKE) p2p "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)"
cd SERIAL/Branch; $(MAKE) branch "DEFAULT_OPT_FLAGS = $(PRK_FLAGS)" \
"MATRIX_RANK = $(matrix_rank)" \
"NUMBER_OF_FUNCTIONS = $(number_of_functions)"
cd SERIAL/PIC; $(MAKE) pic "DEFAULT_OPT_FLAGS = $(default_opt_flags)"
Expand Down
4 changes: 2 additions & 2 deletions OPENMP/DGEMM/dgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ HISTORY: Written by Rob Van der Wijngaart, September 2006.

#define forder (1.0*order)

main(int argc, char **argv){
int main(int argc, char **argv){

int iter, i,ii,j,jj,k,kk,ig,jg,kg; /* dummies */
int iterations; /* number of times the multiplication is done */
Expand Down Expand Up @@ -167,7 +167,7 @@ main(int argc, char **argv){

#pragma omp parallel private (i,j,k,ii,jj,kk,ig,jg,kg,iter)
{
double *AA, *BB, *CC;
double *AA=NULL, *BB=NULL, *CC=NULL;

if (block > 0) {
/* matrix blocks for local temporary copies */
Expand Down
6 changes: 6 additions & 0 deletions OPENMP/Nstream/nstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ int main(int argc, char **argv)
}
bail_out(num_error);

/* FIXME Use OpenMP 4 via _Pragma */
#pragma omp for
#ifdef __INTEL_COMPILER
#pragma vector always
#endif
for (j=0; j<length; j++) {
a[j] = 0.0;
b[j] = 2.0;
Expand All @@ -252,8 +255,11 @@ int main(int argc, char **argv)
}
}

/* FIXME Use OpenMP 4 via _Pragma */
#pragma omp for
#ifdef __INTEL_COMPILER
#pragma vector always
#endif
for (j=0; j<length; j++) a[j] += b[j]+scalar*c[j];

} /* end of iterations */
Expand Down
4 changes: 2 additions & 2 deletions OPENMP/Reduce/reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ int main(int argc, char ** argv)

vector_length = atol(*++argv);
if (vector_length < 1){
printf("ERROR: vector length must be >= 1 : %d \n",vector_length);
printf("ERROR: vector length must be >= 1 : %ld \n",vector_length);
exit(EXIT_FAILURE);
}

Expand Down Expand Up @@ -195,7 +195,7 @@ int main(int argc, char ** argv)
}
else {
printf("Number of threads = %d\n",nthread_input);
printf("Vector length = %d\n", vector_length);
printf("Vector length = %ld\n", vector_length);
printf("Reduction algorithm = %s\n", algorithm);
printf("Number of iterations = %d\n", iterations);
}
Expand Down
Loading

0 comments on commit 2a473e6

Please sign in to comment.