# The protocol file generated by protogen.py ver. 1.0 on 2013-06-27 12:54
# AUTHOR: Magda S aka Magic Magg magg dot gatech at gmail dot com
# DATE: 2013-06-27


DESCRIPTION
===========
This is a test case for Flexpath. The idea of the SCALAR_READ test: the writer writes a
an integer scalar that is the rank of the writer; the reader of should read
an integer number which is the rank of the writer and should be equal 
to the rank of the reader.

There might be as many writers as you wish, and there might be as many readers
as you wish (in theory). However, each rank reads its own rank. The reader knows how many 
writers were there so if its rank is higher then it simply quits.
It is, however, recommended to run as many readers as writers. Otherwise
some processes are blocked.


The test can work in two modes (use switch '-t flx' or '-t mpi'):

1. MPI/ADIOS_READ_METHOD_BP
2. FLEXPATH/ADIOS_READ_METHOD_FLEXPATH


NOTE:

If you are switching please be sure that first you run make clean, and after
that make. The Makefile is not perfect. 

RUN
=====
The order of execution, i.e., first writer then reader, should not matter;
however, I run first writer then the reader.

# should remove Flexpath contact text file remnants  such as _read_ready.txt, 
# _info_writer.txt, and test.bp
$ make -f Makefile.generic clean_test

$ mpirun -np 2 ./writer -t flx
$ mpirun -np 2 ./reader -t flx

See Makefile for other options or add '-h' option to the reader or writer

CONTACT
=========
If you have questions or suggestions, please contact the author (see the 
beginning of the file). And remember you are the master since you have the
sources.


TROUBLESHOOTING
================

* There might be text files left such as *reader_info.txt, *writer_info.txt; 
they should be removed for the next run. In order to do this you can 
use command:

make clean_test


NOTES
=======

2013-07-08 - tested on my local laptop (MPI and FLEXPATH)


-----------------------------------------------------------------------------
OUTDATED (2013-07-08)
------------------------------------------------------------------------------
I will update later. 

RUNNING ON KRAKEN
=================
This runs one reader per node and one writer per node.

aprun -n 1 -N 1 ./arrays_read &
aprun -n 1 -N 1 ./arrays_write

You should be able to run the example with as many readers and writers as you wish.

Example PBS script
------------------
#!/bash/bin
#PBS -l walltime=00:05:00,size=24
#PBS -A UT-TENN0033

date

echo "nodefile="
cat $PBS_NODEFILE
echo "=end nodefile"

# make sure you have all modules loaded
module use ~smagg/opt/modulefiles
module load mag-mxml-2.7/kraken-gnu
module list

cd $PBS_O_WORKDIR

aprun -n 1 -N 1 ./arrays_read &
aprun -n 1 -N 1 ./arrays_write

date

# eof

# EOF
