Skip to content

Commit

Permalink
Merge branch 'master' into flexible-make
Browse files Browse the repository at this point in the history
  • Loading branch information
rfvander committed May 26, 2016
2 parents 51c8ddf + 307516e commit 0954278
Show file tree
Hide file tree
Showing 23 changed files with 2,971 additions and 40 deletions.
2 changes: 1 addition & 1 deletion FORTRAN/Synch_p2p/p2p-coarray.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ program main
#define PRKVERSION "N/A"
#endif
write(*,'(a,a)') 'Parallel Research Kernels version ', PRKVERSION
write(*,'(a)') 'CAF pipeline execution on 2D grid'
write(*,'(a)') 'Fortran coarray pipeline execution on 2D grid'

if (command_argument_count().lt.3) then
write(*,'(a,i1)') 'argument count = ', command_argument_count()
Expand Down
21 changes: 13 additions & 8 deletions FORTRAN/Transpose/transpose-coarray.f90
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,27 @@ program main
iterations = 1
call get_command_argument(1,argtmp,arglen,err)
if (err.eq.0) read(argtmp,'(i32)') iterations
! disable to allow me to run "0" = 1 iteration
!if (iterations .lt. 1) then
! write(6,'(a35,i5)') 'ERROR: iterations must be >= 1 : ', iterations
! stop 1
!endif
if (iterations .lt. 1) then
if (printer) then
write(6,'(a35,i5)') 'ERROR: iterations must be >= 1 : ', iterations
endif
stop 1
endif

order = 1
call get_command_argument(2,argtmp,arglen,err)
if (err.eq.0) read(argtmp,'(i32)') order
if (order .lt. 1) then
write(6,'(a30,i5)') 'ERROR: order must be >= 1 : ', order
if (printer) then
write(6,'(a30,i5)') 'ERROR: order must be >= 1 : ', order
endif
stop 1
endif
if (modulo(order,npes).gt.0) then
write(6,'(a20,i5,a35,i5)') 'ERROR: matrix order ',order,&
' should be divisible by # images ',npes
if (printer) then
write(6,'(a20,i5,a35,i5)') 'ERROR: matrix order ',order,&
' should be divisible by # images ',npes
endif
stop 1
endif
col_per_pe = order/npes
Expand Down
68 changes: 68 additions & 0 deletions LEGION/Stencil/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright 2015 Stanford University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include ../../common/LEGION.defs
ifneq ($(LEGIONTOP),)
LG_RT_DIR=$(LEGIONTOP)/runtime
endif

CXX=g++

ifndef RADIUS
RADIUS=2
endif
#description: default radius of filter to be applied is 2
RADIUSFLAG = -DRADIUS=$(RADIUS)

#Flags for directing the runtime makefile what to include
DEBUG ?= 0 # Include debugging symbols
OUTPUT_LEVEL ?= LEVEL_INFO # Compile time print level
SHARED_LOWLEVEL ?= 0 # Use shared-memory runtime (not recommended)
USE_CUDA ?= 0 # Include CUDA support (requires CUDA)
USE_GASNET ?= 0 # Include GASNet support (requires GASNet)
USE_HDF ?= 0 # Include HDF5 support (requires HDF5)
ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)

# Put the binary file name here
OUTFILE ?= stencil
# List all the application source files here
GEN_SRC ?= stencil.cc # .cc files

# You can modify these variables, some will be appended to by the runtime makefile
INC_FLAGS ?=
CC_FLAGS = $(RADIUSFLAG) -DPOINTS_ARE_64BIT -DRESTRICT_KEYWORD \
-DDISABLE_BARRIER_MIGRATION # disable barrier migration temporarily
NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=

###########################################################################
#
# Don't change anything below here
#
###########################################################################

usage:
@echo "Usage: type \"make $(OUTFILE)\" to build executable"
@echo " \"make clean\" to remove objects and executables"

ifdef LG_RT_DIR
include $(LG_RT_DIR)/runtime.mk
$(GEN_OBJS): #clean
else
clean:
endif

stencil.o:
$(CXX) -o stencil.o -c stencil.cc $(CC_FLAGS) $(INC_FLAGS) -O3
Loading

0 comments on commit 0954278

Please sign in to comment.