Commit 0665bb25 authored by Deike Kleberg's avatar Deike Kleberg
Browse files

interim 2

parent 3eb8b2f1
noinst_PROGRAMS=myModel
noinst_PROGRAMS=collectData
if USE_MPI
noinst_PROGRAMS+=pio_write myModel2003 compareResourcesArray collectData
else
noinst_PROGRAMS+=collectData
noinst_PROGRAMS+=compareResourcesArray
endif
AM_CFLAGS=-I$(top_srcdir)/src
pio_write_SOURCES=pio_write.F90
pio_write_LDADD=-L../src -lcdi
myModel_SOURCES=myModel.c
myModel_LDADD=-L../src -lcdi
myModel2003_SOURCES=myModel2003.F90
collectData_SOURCES=collectData.c
myModel2003_LDADD=-L../src -lcdi
collectData_LDADD=-L../src -lcdi
compareResourcesArray_SOURCES=compareResourcesArray.c
compareResourcesArray_LDADD=-L../src -lcdi
collectData_SOURCES=collectData.c
collectData_LDADD=-L../src -lcdi
\ No newline at end of file
compareResourcesArray_LDADD=-L../src -lcdi
\ No newline at end of file
......@@ -34,9 +34,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = myModel$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2)
@USE_MPI_TRUE@am__append_1 = pio_write myModel2003 compareResourcesArray collectData
@USE_MPI_FALSE@am__append_2 = collectData
noinst_PROGRAMS = collectData$(EXEEXT) $(am__EXEEXT_1)
@USE_MPI_TRUE@am__append_1 = compareResourcesArray
subdir = pioExamples
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
......@@ -52,10 +51,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@USE_MPI_TRUE@am__EXEEXT_1 = pio_write$(EXEEXT) myModel2003$(EXEEXT) \
@USE_MPI_TRUE@ compareResourcesArray$(EXEEXT) \
@USE_MPI_TRUE@ collectData$(EXEEXT)
@USE_MPI_FALSE@am__EXEEXT_2 = collectData$(EXEEXT)
@USE_MPI_TRUE@am__EXEEXT_1 = compareResourcesArray$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am_collectData_OBJECTS = collectData.$(OBJEXT)
collectData_OBJECTS = $(am_collectData_OBJECTS)
......@@ -63,28 +59,10 @@ collectData_DEPENDENCIES =
am_compareResourcesArray_OBJECTS = compareResourcesArray.$(OBJEXT)
compareResourcesArray_OBJECTS = $(am_compareResourcesArray_OBJECTS)
compareResourcesArray_DEPENDENCIES =
am_myModel_OBJECTS = myModel.$(OBJEXT)
myModel_OBJECTS = $(am_myModel_OBJECTS)
myModel_DEPENDENCIES =
am_myModel2003_OBJECTS = myModel2003.$(OBJEXT)
myModel2003_OBJECTS = $(am_myModel2003_OBJECTS)
myModel2003_DEPENDENCIES =
am_pio_write_OBJECTS = pio_write.$(OBJEXT)
pio_write_OBJECTS = $(am_pio_write_OBJECTS)
pio_write_DEPENDENCIES =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
FCLD = $(FC)
FCLINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
......@@ -94,10 +72,8 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(collectData_SOURCES) $(compareResourcesArray_SOURCES) \
$(myModel_SOURCES) $(myModel2003_SOURCES) $(pio_write_SOURCES)
DIST_SOURCES = $(collectData_SOURCES) $(compareResourcesArray_SOURCES) \
$(myModel_SOURCES) $(myModel2003_SOURCES) $(pio_write_SOURCES)
SOURCES = $(collectData_SOURCES) $(compareResourcesArray_SOURCES)
DIST_SOURCES = $(collectData_SOURCES) $(compareResourcesArray_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
......@@ -262,20 +238,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = -I$(top_srcdir)/src
pio_write_SOURCES = pio_write.F90
pio_write_LDADD = -L../src -lcdi
myModel_SOURCES = myModel.c
myModel_LDADD = -L../src -lcdi
myModel2003_SOURCES = myModel2003.F90
myModel2003_LDADD = -L../src -lcdi
compareResourcesArray_SOURCES = compareResourcesArray.c
compareResourcesArray_LDADD = -L../src -lcdi
collectData_SOURCES = collectData.c
collectData_LDADD = -L../src -lcdi
compareResourcesArray_SOURCES = compareResourcesArray.c
compareResourcesArray_LDADD = -L../src -lcdi
all: all-am
.SUFFIXES:
.SUFFIXES: .F90 .c .lo .o .obj
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
......@@ -321,15 +291,6 @@ collectData$(EXEEXT): $(collectData_OBJECTS) $(collectData_DEPENDENCIES)
compareResourcesArray$(EXEEXT): $(compareResourcesArray_OBJECTS) $(compareResourcesArray_DEPENDENCIES)
@rm -f compareResourcesArray$(EXEEXT)
$(LINK) $(compareResourcesArray_OBJECTS) $(compareResourcesArray_LDADD) $(LIBS)
myModel$(EXEEXT): $(myModel_OBJECTS) $(myModel_DEPENDENCIES)
@rm -f myModel$(EXEEXT)
$(LINK) $(myModel_OBJECTS) $(myModel_LDADD) $(LIBS)
myModel2003$(EXEEXT): $(myModel2003_OBJECTS) $(myModel2003_DEPENDENCIES)
@rm -f myModel2003$(EXEEXT)
$(FCLINK) $(myModel2003_OBJECTS) $(myModel2003_LDADD) $(LIBS)
pio_write$(EXEEXT): $(pio_write_OBJECTS) $(pio_write_DEPENDENCIES)
@rm -f pio_write$(EXEEXT)
$(FCLINK) $(pio_write_OBJECTS) $(pio_write_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
......@@ -339,16 +300,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collectData.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compareResourcesArray.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myModel.Po@am__quote@
.F90.o:
$(PPFCCOMPILE) -c -o $@ $<
.F90.obj:
$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.F90.lo:
$(LTPPFCCOMPILE) -c -o $@ $<
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
......@@ -11,9 +11,7 @@
#include "pio_util.h"
#include <assert.h>
extern void reshArrayPrint ( char * );
#define nProcsIO 1
#define nProcsIO 3
static int hasLocalFile[] = { 0 };
......@@ -25,11 +23,11 @@ static int nlev[nVars] = {1,1,5,5,2};
#define maxlev 5
#define ntsteps 3
int IOMode = PIO_NONE;
//int IOMode = PIO_NONE;
//int IOMode = PIO_MPI_NONB;
//int IOMode = PIO_POSIX_FPGUARD_SENDRECV;
//int IOMode = PIO_POSIX_ASYNCH;
//int IOMode = PIO_POSIX_NONB;
int IOMode = PIO_POSIX_NONB;
void modelRun ()
{
......@@ -126,9 +124,6 @@ int main (int argc, char *argv[])
xmpi ( MPI_Comm_dup ( MPI_COMM_WORLD, &commGlob ));
xmpi ( MPI_Comm_set_errhandler ( commGlob, MPI_ERRORS_RETURN ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
if ( nProcsIO <= 0 || nProcsIO >= sizeGlob )
xabort ( "bad distribution of tasks on PEs" );
commModel = pioInit_c ( commGlob, nProcsIO, IOMode );
#endif
......
......@@ -205,9 +205,6 @@ extern "C" {
#define PIO_MAXIOMODUS PIO_POSIX_FPGUARD_SENDRECV
#define PIO_MINIOMODUSWITHSPECIALPROCS PIO_POSIX_NONB
//#define TEST_LOCAL 0
// set to 1 if running compareResourceArray with one PE
int pioInit ( int, int, int );
......
......@@ -16,8 +16,8 @@ enum {
intbits = sizeof(int) * CHAR_BIT,
nspbits = 4,
idxbits = intbits - nspbits,
nspmask = ((1<<nspbits) - 1) << idxbits,
idxmask = (1<<idxbits) - 1,
nspmask = (( 1 << nspbits ) - 1) << idxbits,
idxmask = ( 1 << idxbits ) - 1,
};
enum {
......
......@@ -465,8 +465,10 @@ int pioInit ( int comm, int nIOP, int mode )
*/
#ifdef USE_MPI
MPI_Comm pioInit_c ( MPI_Comm commGlob, int nIOP, int IOMode )
MPI_Comm pioInit_c ( MPI_Comm commGlob, int nProcsIO, int IOMode )
{
int sizeGlob;
if ( IOMode < PIO_NONE || IOMode > PIO_MAXIOMODUS )
xabort ( "PIOTYPE is no valid modus" );
......@@ -477,9 +479,15 @@ MPI_Comm pioInit_c ( MPI_Comm commGlob, int nIOP, int IOMode )
commInit ();
commDefCommGlob ( commGlob );
commDefNProcsIO ( nIOP );
sizeGlob = commInqSizeGlob ();
if ( nProcsIO <= 0 || nProcsIO >= sizeGlob || nProcsIO > sizeGlob / 2 )
xabort ( "bad distribution of tasks on PEs" );
commDefNProcsIO ( nProcsIO );
commDefIOMode ( IOMode, PIO_MAXIOMODUS, PIO_MINIOMODUSWITHSPECIALPROCS );
commDefCommPio ();;
commDefCommPio ();
// just for test case compareResourceArray
if ( commInqRankGlob () == 0 && commInqSizeGlob () == 1 )
return commInqCommGlob ();
......
......@@ -9,8 +9,6 @@
#include <mpi.h>
extern MPI_Comm * commPio;
void IOServer ();
#endif
......
Supports Markdown
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