Commit 92716851 authored by Francois Tessier's avatar Francois Tessier

Wrong integer type fixed in Fortran code. Makefiles updated.

parent 22be674b
MPICXX = mpicxx
MPICXX = mpixlcxx
MPI_CFLAGS = -g -O3 -I$(HOME)/install/$(ARCHI)/include/ -DBGQ -DDBG -DCOLOR
MPI_LDFLAGS = -L$(HOME)/install/$(ARCHI)/lib/ -ltapioca
......@@ -6,9 +6,12 @@ INSTALL_PATH = $(HOME)/install/$(ARCHI)
all: 1d_array
1d_array:1d_array.c ../../bindings/C/tapioca_capi.o
1d_array:1d_array.o ../../bindings/C/tapioca_capi.o
$(MPICXX) $(MPI_CFLAGS) $? -o $@ $(MPI_LDFLAGS)
1d_array.o:1d_array.c
$(MPICXX) $(MPI_CFLAGS) -c $? $(MPI_LDFLAGS)
install:
mv 1d_array $(HOME)/install/$(ARCHI)/bin/
......
MPIF90 = mpif90
MPIF90 = mpixlf90
FLAGS = -g -I$(HOME)/install/$(ARCHI)/include/ -DBGQ -DDBG -DCOLOR
LDFLAGS = -L$(HOME)/install/$(ARCHI)/lib/ -ltapioca -lstdc++
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
simple_array: simple_array.o ../../bindings/F90/tapioca_f90api.o
$(MPIF90) $(FLAGS) $? -o $@ $(LDFLAGS)
simple_array.o:simple_array.f90
......
#!/bin/bash
NODES=2
NODES=8
PPN=16
NPROCS=$((NODES*PPN))
TARGET="/projects/visualization/ftessier/debug"
cd $HOME/TAPIOCA/examples/Fortran
export TAPIOCA_DEVNULL=false
export TAPIOCA_COMMSPLIT=true
export TAPIOCA_STRATEGY=TOPOLOGY_AWARE
export TAPIOCA_NBAGGR=2
export TAPIOCA_BUFFERSIZE=4194304
export TAPIOCA_PIPELINING=true
export TAPIOCA_REELECTAGGR=false
function updateSettings()
{
SETTINGS="PAMID_VERBOSE=1"
printenv | egrep "TAPIOCA_"
SETTINGS="TAPIOCA_DEVNULL=$TAPIOCA_DEVNULL"
SETTINGS="$SETTINGS TAPIOCA_COMMSPLIT=$TAPIOCA_COMMSPLIT"
SETTINGS="$SETTINGS TAPIOCA_STRATEGY=$TAPIOCA_STRATEGY"
SETTINGS="$SETTINGS TAPIOCA_NBAGGR=$TAPIOCA_NBAGGR"
SETTINGS="$SETTINGS TAPIOCA_BUFFERSIZE=$TAPIOCA_BUFFERSIZE"
SETTINGS="$SETTINGS TAPIOCA_PIPELINING=$TAPIOCA_PIPELINING"
SETTINGS="$SETTINGS TAPIOCA_REELECTAGGR=$TAPIOCA_REELECTAGGR"
SETTINGS="$SETTINGS PAMID_VERBOSE=1"
SETTINGS="$SETTINGS PAMID_COLLECTIVES_MEMORY_OPTIMIZED=1"
SETTINGS="$SETTINGS PAMID_COLLECTIVES=1"
SETTINGS="$SETTINGS BG_SHAREDMEMSIZE=64"
SETTINGS="$SETTINGS BGLOCKLESSMPIO_F_TYPE=0x47504653"
SETTINGS="$SETTINGS GPFSMPIO_BALANCECONTIG=1"
SETTINGS="$SETTINGS GPFSMPIO_P2PCONTIG=1"
#SETTINGS="$SETTINGS MPICH_MPIIO_HINTS=*:bg_nodes_pset=$TAPIOCA_NBAGGR"
echo $SETTINGS
}
rm $TARGET/*
......
......@@ -13,7 +13,7 @@ export TAPIOCA_STRATEGY=TOPOLOGY_AWARE
export TAPIOCA_NBAGGR=2
export TAPIOCA_BUFFERSIZE=4194304
export TAPIOCA_PIPELINING=true
export TAPIOCA_REELECTAGGR=false
rm $TARGET/*
mpirun -f $COBALT_NODEFILE -n $NPROCS ./simple_array
......@@ -2,21 +2,25 @@
PROGRAM main
use mpi
use iso_c_binding
integer ierr, i, myrank, mysize, filehandle
integer*8 BUFSIZE, TOTSIZE, SCANSIZE, HDR
integer buf(20000), buf_r(20000)
integer ierr, i, myrank, mysize, filehandle, NBUFF, AGG_MEM, TARGET_MEM, TYPESIZE
integer*8 BUFSIZE, TOTSIZE, SCANSIZE, HDR, FILESIZE
integer(kind=MPI_OFFSET_KIND) disp
integer status(MPI_STATUS_SIZE)
real*8 start, finish, duration, max_duration, io_bw
integer buf(40000), buf_r(40000)
integer*8 chunkcount(1)
integer chunksize(1)
integer*8 chunkoffset(1)
BUFSIZE = 20000
SCANSIZE = 0
HDR = 0
BUFSIZE = 40000
TYPESIZE = 4
SCANSIZE = 0
HDR = 0
NBUFF = 2
! DDR=0, HBM=1, SSD=2, HDD=3, NVR=4
AGG_MEM = 0
TARGET_MEM = 3
call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, myrank, ierr)
......@@ -31,11 +35,15 @@ PROGRAM main
call MPI_ALLREDUCE ( BUFSIZE, TOTSIZE, 1, MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD, ierr )
call MPI_EXSCAN ( BUFSIZE, SCANSIZE, 1, MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD, ierr )
FILESIZE = TOTSIZE * TYPESIZE + HDR
chunkcount (1) = BUFSIZE
chunksize (1) = 4
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" )
start = MPI_Wtime()
call tapioca_write ( chunkoffset(1), buf, BUFSIZE, MPI_INT, status )
......@@ -46,14 +54,16 @@ PROGRAM main
call MPI_REDUCE ( duration, max_duration, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD, ierr )
if ( myrank == 0 ) then
io_bw = TOTSIZE * 4 / max_duration / ( 1024 * 1024 )
io_bw = TOTSIZE * TYPESIZE / max_duration / ( 1024 * 1024 )
write(*, '(a,f10.2,a)') "[TIMING] Write I/O bandwidth ",io_bw," MBps"
endif
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" )
start = MPI_Wtime()
call tapioca_read ( chunkoffset(1), buf_r, BUFSIZE, MPI_INT, status )
......@@ -63,7 +73,7 @@ PROGRAM main
call MPI_REDUCE ( duration, max_duration, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD, ierr )
if ( myrank == 0 ) then
io_bw = TOTSIZE * 4 / max_duration / ( 1024 * 1024 )
io_bw = TOTSIZE * TYPESIZE / max_duration / ( 1024 * 1024 )
write(*, '(a,f10.2,a)') "[TIMING] Read I/O bandwidth ",io_bw," MBps"
endif
......
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