Commit dc0bd3d3 authored by Francois Tessier's avatar Francois Tessier

Fortran 1D-array example using Tapioca F90 bindings

parent ef5fc309
......@@ -41,10 +41,8 @@ PROGRAM main
chunksize (1) = TYPESIZE
chunkoffset (1) = SCANSIZE * chunksize (1)
call tapioca_init ( chunkcount, chunksize, chunkoffset, 1, HDR, mpi_comm_world )
call tapioca_set_aggregation_tier ( NBUFF, AGG_MEM, "" )
call tapioca_set_target_tier ( TARGET_MEM, FILESIZE, "/projects/visualization/ftessier/debug/f90_Simple_array.dat" )
call tapioca_init ( chunkcount, chunksize, chunkoffset, 1, HDR, "/lus/theta-fs0/projects/Performance/ftessier/TAPIOCA/f90_Simple_array.dat", mpi_comm_world )
start = MPI_Wtime()
call tapioca_write ( chunkoffset(1), buf, BUFSIZE, MPI_INT, status )
......@@ -60,9 +58,7 @@ PROGRAM main
call MPI_BARRIER ( MPI_COMM_WORLD, ierr )
call tapioca_init ( chunkcount, chunksize, chunkoffset, 1, HDR, mpi_comm_world )
call tapioca_set_aggregation_tier ( NBUFF, AGG_MEM, "" )
call tapioca_set_target_tier ( TARGET_MEM, FILESIZE, "/projects/visualization/ftessier/debug/f90_Simple_array.dat" )
call tapioca_init ( chunkcount, chunksize, chunkoffset, 1, HDR, "/lus/theta-fs0/projects/Performance/ftessier/TAPIOCA/f90_Simple_array.dat", mpi_comm_world )
start = MPI_Wtime()
call tapioca_read ( chunkoffset(1), buf_r, BUFSIZE, MPI_INT, status )
......
MPIF90 = mpif90
include ../make.inc/Makefile.$(ARCHI)
FLAGS = -g -I$(HOME)/install/$(ARCHI)/include/ -DBGQ -DDBG -DCOLOR
LDFLAGS = -L$(HOME)/install/$(ARCHI)/lib/ -ltapioca -lstdc++
F90_FILES := $(wildcard *.f90)
OUT_FILES := $(F90_FILES:.f90=)
all: simple_array
all:$(OUT_FILES)
simple_array:simple_array.o ../../bindings/F90/tapioca_f90api.o
$(MPIF90) $(FLAGS) $? -o $@ $(LDFLAGS)
%:%.f90 ../../bindings/F90/tapioca_f90api.o
$(MPIF90) $(MPI_F90_FLAGS) $? -o bin/$@ $(MPI_F90_LDFLAGS)
simple_array.o:simple_array.f90
$(MPIF90) $(FLAGS) -c $? $(LDFLAGS)
install:
cd bin/; mv $(OUT_FILES) $(INSTALL_PATH)/bin
clean:
rm simple_array simple_array.o
rm -f bin/*
cd $(INSTALL_PATH)/bin/; rm -f $(OUT_FILES)
MPIF90 = mpixlf90
FLAGS = -g -I$(HOME)/install/$(ARCHI)/include/ -WF,-DBGQ -WF,-DDBG -WF,-DCOLOR #-DBGQ -DDBG -DCOLOR
FLAGS += -qextname=tapioca_init \
-qextname=tapioca_set_aggregation_tier \
-qextname=tapioca_set_target_tier \
-qextname=tapioca_read \
-qextname=tapioca_write \
-qextname=tapioca_finalize
LDFLAGS = -L${IBM_MAIN_DIR}/vacpp/bg/12.1/lib64 -L$(HOME)/install/$(ARCHI)/lib/ -ltapioca -lstdc++ -libmc++
all: simple_array
simple_array: simple_array.o ../../bindings/F90/tapioca_f90api.o
$(MPIF90) $(FLAGS) $? -o $@ $(LDFLAGS)
simple_array.o:simple_array.f90
$(MPIF90) $(FLAGS) -c $? $(LDFLAGS)
clean:
rm simple_array simple_array.o
MPIF90 = mpif90
FLAGS = -g
LDFLAGS =
all: simple_array
simple_array:simple_array.f90
$(MPIF90) $(FLAGS) $? -o $@ $(LDFLAGS)
clean:
rm simple_array
#!/bin/bash
NODES=16
PPN=16
NPROCS=$((NODES*PPN))
TARGET="/lus/theta-fs0/projects/Performance/ftessier/TAPIOCA"
DDT="/soft/debuggers/ddt/bin/ddt --connect"
STRIPE_COUNT=16
STRIPE_SIZE=8388608
AGGR_MULT=1
cd $HOME/install/$ARCHI/bin/
export TAPIOCA_STRATEGY=TOPOLOGY_AWARE
export TAPIOCA_NBAGGR=2
export TAPIOCA_NBBUFFERS=2
export TAPIOCA_BUFFERSIZE=8388608
export TAPIOCA_AGGRTIER=DDR
export TAPIOCA_DEVNULL=false
export TAPIOCA_COMMSPLIT=true
export TAPIOCA_PIPELINING=true
export TAPIOCA_REELECTAGGR=true
function updateSettings()
{
printenv | egrep "TAPIOCA_"
SETTINGS="-e TAPIOCA_STRATEGY=$TAPIOCA_STRATEGY"
SETTINGS="$SETTINGS -e TAPIOCA_NBAGGR=$TAPIOCA_NBAGGR"
SETTINGS="$SETTINGS -e TAPIOCA_NBBUFFERS=$TAPIOCA_NBBUFFERS"
SETTINGS="$SETTINGS -e TAPIOCA_BUFFERSIZE=$TAPIOCA_BUFFERSIZE"
SETTINGS="$SETTINGS -e TAPIOCA_AGGRTIER=$TAPIOCA_AGGRTIER"
SETTINGS="$SETTINGS -e TAPIOCA_DEVNULL=$TAPIOCA_DEVNULL"
SETTINGS="$SETTINGS -e TAPIOCA_COMMSPLIT=$TAPIOCA_COMMSPLIT"
SETTINGS="$SETTINGS -e TAPIOCA_PIPELINING=$TAPIOCA_PIPELINING"
SETTINGS="$SETTINGS -e TAPIOCA_REELECTAGGR=$TAPIOCA_REELECTAGGR"
SETTINGS="$SETTINGS -e MPICH_RMA_OVER_DMAPP=1"
SETTINGS="$SETTINGS -e MPICH_MPIIO_HINTS=*:cray_cb_nodes_multiplier=$AGGR_MULT"
}
function setLustreFS ()
{
rm $TARGET/*
lfs setstripe --stripe-count $STRIPE_COUNT --stripe-size $STRIPE_SIZE $TARGET
lfs getstripe $TARGET
}
PARTICLES=100000
updateSettings
setLustreFS
rm $TARGET/*
for BIN in 1D-Array-Fortran-Tapioca
do
aprun $SETTINGS -n $NPROCS -N $PPN $BIN -e $PARTICLES -o $TARGET
echo
echo "---------------------------------"
echo
sleep 5
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment