Skip to content

Add support for serial and parallel GDF read write. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3516f8e
Tidied up some includes.
Jul 28, 2014
ab91450
Makefile now removes .mod files.
Jul 28, 2014
55a4d11
mpi=off
Jul 28, 2014
10802db
Test run on iceberg.
Jul 28, 2014
bff3cac
Add a module for SAC gdf calls, not using vacpp
Jul 29, 2014
e83cd4f
Add fgdfio library, change common_variables module name and try to make
Cadair Jul 29, 2014
d273315
Big commit, but SAC is now saving GDF files!!
Cadair Jul 29, 2014
d45466c
SAVE ALL THE THINGS.
Cadair Jul 30, 2014
bdbdfcc
First pass at initial condition reading.
Cadair Jul 31, 2014
017c209
what the bug bug.
Cadair Aug 1, 2014
bd91b09
Make read kinda work, code still not running.
Cadair Sep 9, 2014
d0bd3b0
getting closer to it actually working.
Cadair Sep 10, 2014
0e8601c
Bit of a tidy up.
Cadair Sep 11, 2014
d4eccf4
Fix attribute read which fixes the old bug.
Cadair Sep 19, 2014
c39210f
why are these even in the git repo?
Cadair Sep 22, 2014
fcb8a69
Working read and write for non-fullgrid.
Cadair Sep 22, 2014
59571b5
Towards parallel write
Cadair Sep 23, 2014
4b3a568
More fgdfio updates, closer to parallel write.
Cadair Sep 24, 2014
c239ea3
update fgdfio
Cadair Sep 29, 2014
c640aaa
Compile on iceberg
Oct 1, 2014
26b6f07
Moving towards parallel out.
Cadair Oct 3, 2014
d88ab2a
more progress with parallel write.
Cadair Oct 4, 2014
3f62015
Add mpi configs for testing gdf
Cadair Oct 6, 2014
d1d4ad9
Change submodule to SWAT fork
Cadair Oct 28, 2014
c6e6aed
update fgdfio
Oct 7, 2014
00bc151
Update makefile to use env vars
Oct 7, 2014
af071f0
remove mpi prints
Oct 7, 2014
d2af9c0
update changes to fgdfio
Cadair Oct 17, 2014
80803b1
updates, now saving edges out in parallel properly
Cadair Oct 17, 2014
bad7552
update fgdfio
Cadair Oct 28, 2014
cc26ef1
Add vacini back in for good measure. @mikeg64
Cadair Oct 28, 2014
db7db93
Update submodule url
Cadair Nov 13, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.mod
*.o
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sac/src/fgdfio"]
path = sac/src/fgdfio
url = git://github.com/SWAT-Sheffield/fgdfio.git
15 changes: 9 additions & 6 deletions sac/par/mhdmodes → sac/par/binout
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
&testlist /
&testlist
teststr='readfileini'
/

&filelist
filenameini='/archive/mhdmodes_2D.ini'
filenameini='/archive/gdf_testing/mhdmodes_2D.ini'

typefileini='binary'
filename= '/archive/mhdmodes_2D.log',
'/archive/mhdmodes_2D.out'
filename= '/archive/gdf_testing/mhdmodes_2D.log',
'/archive/gdf_testing/mhdmodes_2D.out'
typefileout='binary'
fullgridout= T
fullgridout= F
fullgridini= T
/

&savelist
dtsave=0.1,0.0001
dtsave = 1,0.1
itsave(1,2)=0

/

Expand Down
52 changes: 52 additions & 0 deletions sac/par/binoutmpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
&testlist
teststr='readfileini'
/

&filelist
filenameini='/archive/gdf_testing/mhdmodes_np0202.ini'

typefileini='binary'
filename= '/archive/gdf_testing/mhdmodes_np0202.log',
'/archive/gdf_testing/mhdmodes_np0202.out'
typefileout='binary'
fullgridout= F
fullgridini= T
/

&savelist
dtsave = 1,0.1
itsave(1,2)=0

/

&stoplist
tmax=0.2d0
itmax = 10000
/

&methodlist

wnames= 'h m1 m2 e b1 b2 eb rhob bg1 bg2'
typefull= 6*'cd4',4*'nul'
typeadvance= 'onestep'
typefilter= 10*'nul'
dimsplit= F
sourcesplit= F
divBfix= F
smallp= 10.d0
/

&boundlist
typeB= 10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'

/

&paramlist
courantpar=0.2

/
52 changes: 52 additions & 0 deletions sac/par/gdfini
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
&testlist
teststr='readfileini readfileini_gdf'
/

&filelist
filenameini='/archive/gdf_testing/mhdmodes_2D_00000000.gdf'

typefileini='gdf'
filename= '/archive/gdf_testing/mhdmodes_2D.log',
'/archive/gdf_testing/mhdmodes_2D_ii_'
typefileout='gdf'
fullgridout= F
fullgridini= F
/

&savelist
dtsave=1,0.1
itsave(1,2)=0

/

&stoplist
tmax=0.2d0
itmax = 10000
/

&methodlist

wnames= 'h m1 m2 e b1 b2 eb rhob bg1 bg2'
typefull= 6*'cd4',4*'nul'
typeadvance= 'onestep'
typefilter= 10*'nul'
dimsplit= F
sourcesplit= F
divBfix= F
smallp= 10.d0
/

&boundlist
typeB= 10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'

/

&paramlist
courantpar=0.2

/
52 changes: 52 additions & 0 deletions sac/par/gdfout
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
&testlist
teststr='readfileini'
/

&filelist
filenameini='/archive/gdf_testing/mhdmodes_2D.ini'

typefileini='binary'
filename= '/archive/gdf_testing/mhdmodes_2D.log',
'/archive/gdf_testing/mhdmodes_2D_'
typefileout='gdf'
fullgridout= F
fullgridini= T
/

&savelist
dtsave=1,0.1
itsave(1,2)=0

/

&stoplist
tmax=0.2d0
itmax = 10000
/

&methodlist

wnames= 'h m1 m2 e b1 b2 eb rhob bg1 bg2'
typefull= 6*'cd4',4*'nul'
typeadvance= 'onestep'
typefilter= 10*'nul'
dimsplit= F
sourcesplit= F
divBfix= F
smallp= 10.d0
/

&boundlist
typeB= 10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'

/

&paramlist
courantpar=0.2

/
52 changes: 52 additions & 0 deletions sac/par/gdfoutmpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
&testlist
teststr=''
/

&filelist
filenameini='/archive/gdf_testing/mhdmodes_np0202.ini'

typefileini='binary'
filename= '/archive/gdf_testing/mhdmodes_np0202.log',
'/archive/gdf_testing/mhdmodes_np0202_'
typefileout='gdf'
fullgridout= F
fullgridini= T
/

&savelist
dtsave = 1,0.1
itsave(1,2)=0

/

&stoplist
tmax=0.2d0
itmax = 10000
/

&methodlist

wnames= 'h m1 m2 e b1 b2 eb rhob bg1 bg2'
typefull= 6*'cd4',4*'nul'
typeadvance= 'onestep'
typefilter= 10*'nul'
dimsplit= F
sourcesplit= F
divBfix= F
smallp= 10.d0
/

&boundlist
typeB= 10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'
10*'fixed'

/

&paramlist
courantpar=0.2

/
43 changes: 29 additions & 14 deletions sac/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# This is a VERY striped down makefile for compiling sac with gfortran

# Check to see if the ENV variables are defined for the compiler
# This will become a SAC only f2py makefile hopefully
ifndef F90
F90=mpif90
F90=h5pfc
endif
ifndef F90FLG
F90FLG=-std=f2008
Expand All @@ -23,20 +22,27 @@ F=.f90
O=.o

VACDIR=.
GDFDIR=./fgdfio/lib

################# Definitions for source files #############################

LIBS = vacdef$F
INCLUDES = vacdef$F vacpar$F vacusrpar$F
LIBS = vacdef$F sacgdf$F
INCLUDES = vacdef$F vacpar$F vacusrpar$F sacgdf$F
GDF_INCLUDES = $(GDFDIR)/gdf_types.F90 $(GDFDIR)/helpers_hdf5.F90 $(GDFDIR)/grid_data_format.F90 $(GDFDIR)/gdf_datasets.F90

VAC_FOR = vac$F vacio$F vacgrid$F vacphys0$F vacphys$F vacusr$F
VAC_OBJ = vac$O vacio$O vacgrid$O vacphys0$O vacphys$O vacusr$O

# The VACCD, VACMC, VACFCT, VACTVDLF, VACTVD, VACIMPL, VACPOISSON, VACMPI
# modules are removed or added in the following two lines by "setvac".
# DO NOT TOUCH THESE TWO LINES:
VACFOR = $(VAC_FOR) vaccd$F
VACOBJ = $(VAC_OBJ) vaccd$O
VACFOR = $(VAC_FOR) vaccd$F vacmpi$F
VACOBJ = $(VAC_OBJ) vaccd$O vacmpi$O

# The VACMPI module is removed or added the following two lines by "setvac".
# DO NOT TOUCH THESE TWO LINES:
VACINIFOR = vacini$F vacio$F vacphys0$F vacusr$F vacmpi$F
VACINIOBJ = vacini$O vacio$O vacphys0$O vacusr$O vacmpi$O

ROEOBJ = roetest$O vacphys0$O vacphys$O

Expand All @@ -47,10 +53,11 @@ PREPROC= $(VACPP_)
.SUFFIXES:
.SUFFIXES: .t $F $O

$(VACFOR) vacini$F vacdef$F vacpar$F vacusrpar$F : $(PREPROC)
$(VACFOR) vacini$F vacdef$F vacpar$F vacusrpar$F sacgdf$F : $(PREPROC)
roetest$F : $(PREPROC)

$(VACOBJ) vacini$O vacall$O vaciniall$O vacsmall$O roetest$O : $(INCLUDES)
$(VACOBJ) vacini$O vacall$O vaciniall$O vacsmall$O roetest$O sacgdf$0 : $(INCLUDES)
$(VACINIOBJ) vacini$O vacall$O vaciniall$O vacsmall$O roetest$O sacgdf$0 : $(INCLUDES)

vacusrpar$F: vacusrpar.t
$(VACPP) $< $(PREFOR) > $@
Expand All @@ -62,6 +69,9 @@ vacpar$F: vacpar.t
vacdef$F: vacdef.t
$(VACPP) $< $(PREFOR) > $@

sacgdf$F: sacgdf.t
$(VACPP) $< $(PREFOR) > $@
$(FOR) -c sacgdf.f90

# General precompilation rule
.t$(F):
Expand All @@ -71,22 +81,27 @@ vacdef$F: vacdef.t
$(F)$(O):
$(FOR) $(FORFLG) -c $<



########### Extra dependencies for some files with "INCLUDE:" statements
vacphys$F: vacphys.t vacphys.mhd0.t vacphys.mhdres.t
$(VACPP) $< $(PREFOR) > $@

vacgrid$F: vacgrid.t
$(VACPP) $< $(PREFOR) > $@

vac :$(VACOBJ) $(LIBS_)
$(FOR) $(FORFLG) -o $(VACDIR)/vac $(VACOBJ) $(LIBS)
gdf :
$(FOR) $(FORFLG) -c $(GDF_INCLUDES)

# The "vacini" and "vac" targets use the default Fortran compiler
vacini : gdf $(VACINIOBJ) $(LIBS_)
$(FOR) $(FORFLG) -o $(VACDIR)/vacini $(GDF_INCLUDES) $(VACINIOBJ) $(LIBS)

vac : gdf $(VACOBJ) $(LIBS_)
$(FOR) $(FORFLG) -o $(VACDIR)/vac $(GDF_INCLUDES) $(VACOBJ) $(LIBS)

###### Removing object files, precompiled Fortran files, and symbolic links

clean :
rm -f vac*$F roetest$F Vvac*$F vac*.d *$O *~
rm -f vac*$F sac*$F roetest$F Vvac*$F vac*.d *$O *~ *.mod

cleanall: clean
rm -f vacphys.t vacphys0.t vacpar.t vacusrpar.t vacusr.t
1 change: 1 addition & 0 deletions sac/src/fgdfio
Submodule fgdfio added at c66a78
Loading