Skip to content

Commit

Permalink
Merge branch 'master' into barry/wirth-fusion-materials
Browse files Browse the repository at this point in the history
bad manual merge needs to be fixed
this is what happens when branches hang around too long

Conflicts:
	src/ts/examples/tutorials/advection-diffusion-reaction/ex10.c
  • Loading branch information
BarrySmith committed Jan 13, 2014
2 parents 9a40d00 + cf1bcbd commit c7ff62d
Show file tree
Hide file tree
Showing 1,629 changed files with 78,951 additions and 136,999 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

Andy Terrel <aterrel@uchicago.edu>
Aron Ahmadia <aron@ahmadia.net> <ahmadia@harley.mcs.anl.gov>
Barry Smith <bsmith@mcs.anl.gov> BarryFSmith
Blaise Bourdin <bourdin@lsu.edu>
Brad Aagaard <baagaard@usgs.gov> <baagaard at usgs.gov>
Ethan Coon <ecoon@lanl.gov>
Expand Down
127 changes: 78 additions & 49 deletions bin/TOPSInstaller.py → bin/FASTMathInstaller.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/usr/bin/env python
"""
TOPS software installer. This is written using the EasyGui.py python module
FASTMath software installer.
This can be run from the command line with:
curl --silent https://bitbucket.org/petsc/petsc/raw/60658920ec66ea33cc584d568c1da6e3ed8d2bf9/bin/FASTMathInstaller.py | python
I still cannot come up with a simple portable browser-based click to install to have this run due to people's security concerns.
This is written using the EasyGui.py python module
which is, for simplicity, included in this file
EasyGui provides an easy-to-use interface for simple GUI interaction
Expand Down Expand Up @@ -1260,24 +1269,23 @@ def _test():

if __name__ == '__main__':
args = []
title = "TOPS Software Installer"
message1 = """SciDAC TOPS Software Installer"""
message2 = """The DOE Mathematics SciDAC TOPS ISIC develops software for the
scalable solution of optimizations, eigenvalues and algebraic systems. More
information on TOPS may be found at http://www.tops-scidac.org. \n\n
title = "FASTMat Software Installer"
message1 = """SciDAC FASTMath Software Installer"""
message2 = """The DOE Mathematics SciDAC FASTMath develops software for the
scalable solution of optimizations, eigenvalues and algebraic systems. \n\n
The software installed is covered by a variety of licenses, please refer to
each package's license information before redistributing it. This installer
can also install additional packages that are used by the TOPS packages."""
can also install additional packages that are used by the FASTMath packages."""

result = buttonbox(message=message1, title="TOPS Software Installer", choices = ["Cancel", "Continue"],fontSize = 20,message2=message2)
result = buttonbox(message=message1, title="FASTMath Software Installer", choices = ["Cancel", "Continue"],fontSize = 20,message2=message2)
if result == "Cancel": sys.exit()

result = buttonbox(message='This preview version of the installer uses\nthe nightly snapshot of the development\nversion of PETSc.\n\nShould you encounter problems please send email\nto petsc-maint@mcs.anl.gov with all output\n', title="TOPS Software Installer", choices = ["Cancel", "Continue"])
result = buttonbox(message='Should you encounter problems please send email\nto petsc-maint@mcs.anl.gov with all output\n', title="FASTMath Software Installer", choices = ["Cancel", "Continue"])
if result == "Cancel": sys.exit()

options = []
packages = ["hypre (parallel preconditioners)","SuperLU_dist (parallel sparse direct solver)", "SuperLU","Sundials (parallel ODE integrators)"]
reply = multchoicebox("Pick the optional TOPS packages to install. PETSc will \nalways be installed. \n\nNote: many of these packages are not portable\nfor all machines, hence select only the packages you truly need.",title, packages)
reply = multchoicebox("Pick the optional FASTMath packages to install. PETSc will \nalways be installed. \n\nNote: many of these packages are not portable\nfor all machines, hence select only the packages you truly need.",title, packages)
for i in reply:
i = i.lower().replace(' ','')
f = i.find('(')
Expand All @@ -1292,12 +1300,18 @@ def _test():
if f > 0: i = i[0:f]
args.append('--download-'+i+'=1')

reply = indexbox('Compiler to use for PETSc?',title,['C','C++'])
if reply == 1: args.append( '--with-clanguage=c++')
result = buttonbox('Compiler to use for compiling PETSc?\n\nC is recommended even if you plan to program in C++',title,choices = ['C','C++'])
args.append( '--with-clanguage='+result)

reply = indexbox('Use complex numbers; select only if needed',title,['Yes','No'])
if reply == 1: args.append( '--with-scalar-type=complex')
else: args.append( '--with-scalar-type=real')

result = buttonbox('Precision of floating point numbers',title,choices = ['double','__float128','single'])
args.append( '--with-precision='+result)

reply = ynbox('Compile libraries so they may be used from Fortran?',title)
if reply: args.append( '--with-fortran=1')
else: args.append('--with-fc=0')
if not reply: args.append( '--with-fc=0')

reply = ynbox('Compile libraries so they may be used from Python?',title)
if reply:
Expand All @@ -1312,7 +1326,7 @@ def _test():
if '--with-clanguage=c++' in args:
reply = fileopenbox("Location of C++ compiler","Location of C++ compiler")
args.append('--with-cxx='+reply)
if '--with-fortran=1' in args:
if not '--with-fc=0' in args:
reply = fileopenbox("Location of Fortran compiler","Location of Fortran compiler")
args.append('--with-fc='+reply)

Expand All @@ -1321,7 +1335,7 @@ def _test():

reply = indexbox('Which version of BLAS and LAPACK do you wish to use?',title,['Have installer locate it', 'Install it',"I'll indicate its location"])
if reply == 1:
if '--with-fortran=1' in args: args.append('--download-f-blas-lapack')
if not '--with-fc=0' in args: args.append('--download-f-blas-lapack')
else: args.append('--download-f2cblaslapack')
elif reply == 2:
reply = diropenbox("Directory of BLAS and LAPACK libraries","Directory of BLAS and LAPACK libraries")
Expand All @@ -1337,52 +1351,64 @@ def _test():
if not reply: sys.exit()
args.append('--with-mpi-dir='+reply)

reply = buttonbox('Install TOPS Solver Components?',title,['Yes','No'],message2="You must have CCAFE and BABEL\n already installed to use them.")
if reply == 'Yes':
reply = diropenbox("Directory of Babel","Directory of Babel")
if not reply: sys.exit()
args.append('--with-babel-dir='+reply)
reply = diropenbox("Directory of CCafe","Directory of CCAFE")
if not reply: sys.exit()
args.append('--with-ccafe-dir='+reply)


reply = ynbox('Do MPI jobs need to be submitted with a batch system?',title)
if reply: args.append('--with-batch=1')
if reply == 4:
reply = ynbox('Do MPI jobs need to be submitted with a batch system?',title)
if reply: args.append('--with-batch=1')

arch = ''
while not arch:
arch = enterbox("Name of this configuration",title)
arch = enterbox("Name of this configuration",title,"arch-")
args.append('-PETSC_ARCH='+arch)

reply = diropenbox("Location to compile and install packages","Location to compile and install packages")
reply = diropenbox("Location of PETSc directory or where to download and compile packages","Location of PETSc directory or where to download and compile andpackages")
if not reply: sys.exit()

import os.path
import sys


petscroot = os.path.join(reply,'petsc-dev')
if not os.path.isfile(os.path.join(petscroot,'include','petscsys.h')):
y = ynbox('Could not locate PETSc directory, should I download it?',title)
if not y: sys.exit()
# download PETSc
import urllib
try:
urllib.urlretrieve('http://ftp.mcs.anl.gov/pub/petsc/petsc-dev.tar.gz', os.path.join(reply,'petsc.tar.gz'))
except Exception, e:
raise RuntimeError('Unable to download PETSc')
import commands
try:
commands.getoutput('cd '+reply+'; gunzip petsc.tar.gz ; tar xf petsc.tar')
except RuntimeError, e:
raise RuntimeError('Error unzipping petsc.tar.gz'+str(e))
os.unlink(os.path.join(reply, 'petsc.tar'))
petscroot = None
if os.path.isfile(os.path.join(reply,'include','petscsys.h')):
petscroot = os.path.join(reply,'petsc')
else:
ldir = os.listdir(reply)
for i in ldir:
if i.startswith('petsc') and os.path.isfile(os.path.join(reply,i,'include','petscsys.h')):
y = ynbox('There is a subdirectory called '+os.path.join(reply,i)+'.Do you wish to use that?',title)
if y:
petscroot = os.path.join(reply,i)
break
if not petscroot:
y = ynbox('Could not locate PETSc directory, should I download it\nand install it in the directory '+reply+'?',title)
if not y: sys.exit()

result = buttonbox('Which version of PETSc should I download?\n\nPlease be patient after making your selection\nthis may take several minutes.'+reply,title,choices = ['Release','Development'])
if result == 'Release':
# download PETSc
import urllib
try:
urllib.urlretrieve('http://ftp.mcs.anl.gov/pub/petsc/petsc.tar.gz', os.path.join(reply,'petsc.tar.gz'))
except Exception, e:
raise RuntimeError('Unable to download PETSc')
import commands
try:
commands.getoutput('cd '+reply+'; gunzip petsc.tar.gz ; tar xf petsc.tar')
except RuntimeError, e:
raise RuntimeError('Error unzipping petsc.tar.gz'+str(e))
os.unlink(os.path.join(reply, 'petsc.tar'))
else:
import commands
try:
commands.getoutput('cd '+reply+'; git clone https://bitbucket.org/petsc/petsc.git')
except RuntimeError, e:
raise RuntimeError('Error trying to obtain development version of PETSc with git'+str(e))
ldir = os.listdir(reply)
for i in ldir:
# wrong because will pick up old petsc directories in this directory
if i.startswith('petsc') and os.path.isfile(os.path.join(reply,i,'include','petscsys.h')): petscroot = os.path.join(reply,i)


args.append('--with-shared-libraries=1')
args.append('--with-dynamic-loading=1')
args.append('--with-external-packages-dir='+reply)
args.append('--with-external-packages-dir='+os.path.join(petscroot,arch,'externalpackages'))
args = multenterbox("Configure options you have selected.", title, None, args)
if not args: sys.exit()

Expand All @@ -1398,3 +1424,6 @@ def _test():
f.close()
os.chmod(configfile,0755)
msgbox('After hitting OK run\n\n cd '+petscroot+'\npython config-'+arch+'.py\n\nto continue the install')
print("Execute the following two commands and follow the directions")
print('cd '+petscroot)
print('python config-'+arch+'.py')
10 changes: 5 additions & 5 deletions bin/maint/asterix-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -x
# basic gcc tests
./config/examples/asterix/asterix64.py
make PETSC_ARCH=asterix64 all alltests tests_DATAFILESPATH DATAFILESPATH=/home/balay/datafiles
./config/configure.py CC=gcc FC=gfortran CXX=g++ PETSC_ARCH=asterix64-cxx-sieve --with-clanguage=cxx \
--with-sieve=1 --download-mpich=1 --download-boost=1 --download-chaco=1 \
./config/configure.py CC=gcc FC=gfortran CXX=g++ PETSC_ARCH=asterix64-cxx --with-clanguage=cxx \
--download-mpich=1 --download-boost=1 --download-chaco=1 \
--download-plapack=1 --download-tetgen=1 --download-triangle=1 --download-hdf5=1
make PETSC_ARCH=asterix64-cxx-sieve all alltests tests_DATAFILESPATH DATAFILESPATH=/home/balay/datafiles
make PETSC_ARCH=asterix64-cxx all alltests tests_DATAFILESPATH DATAFILESPATH=/home/balay/datafiles
./config/examples/asterix/asterix64-openmpi.py
make PETSC_ARCH=asterix64-openmpi all alltests tests_DATAFILESPATH DATAFILESPATH=/home/balay/datafiles
./config/examples/asterix/asterix64.py --with-clanguage=cxx -PETSC_ARCH=asterix64-cxx-opt --with-debugging=0 --with-log=0
Expand All @@ -26,7 +26,7 @@ make PETSC_ARCH=asterix64-c89 all test alltests tests_DATAFILESPATH DATAFILESPAT
# basic sun tests
./config/examples/asterix/asterix64-sun.py
make PETSC_ARCH=asterix64-sun all test
./config/examples/asterix/asterix64-sun.py --with-shared-libraries=1 --with-dynamic-loading=1 -PETSC_ARCH=asterix64-sun-dynamic
./config/examples/asterix/asterix64-sun.py --with-shared-libraries=1 -PETSC_ARCH=asterix64-sun-dynamic
make PETSC_ARCH=asterix64-sun-dynamic all alltests tests_DATAFILESPATH DATAFILESPATH=/home/balay/datafiles
./config/examples/asterix/asterix64-sun.py --with-clanguage=cxx -PETSC_ARCH=asterix64-sun-cxx --with-debugging=0 --with-pic=0 \
--download-f-blaslapack=1 --download-spooles=1 --download-superlu=1 \
Expand All @@ -35,7 +35,7 @@ make PETSC_ARCH=asterix64-sun-dynamic all alltests tests_DATAFILESPATH DATAFILES
make PETSC_ARCH=asterix64-sun-cxx all
make PETSC_ARCH=asterix64-sun-cxx CLINKER=sun-cc shared
make PETSC_ARCH=asterix64-sun-cxx test
./config/examples/asterix/asterix64-sun.py --with-shared-libraries=1 --with-dynamic-loading=1 --with-scalar-type=complex --with-clanguage=cxx -PETSC_ARCH=asterix64-sun-complex-dynamic
./config/examples/asterix/asterix64-sun.py --with-shared-libraries=1 --with-scalar-type=complex --with-clanguage=cxx -PETSC_ARCH=asterix64-sun-complex-dynamic
make PETSC_ARCH=asterix64-sun-complex-dynamic all
make PETSC_ARCH=asterix64-sun-complex-dynamic CLINKER=sun-cc shared
make PETSC_ARCH=asterix64-sun-complex-dynamic test
Expand Down
2 changes: 1 addition & 1 deletion bin/maint/builddist
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ version_subminor=`grep '^#define PETSC_VERSION_SUBMINOR ' include/petscversion.h

#generated a couple of more values
version_date=`date +"%b, %d, %Y"`
version_git=`git log -1 --pretty=format:%H`
version_git=`git describe`
version_date_git=`git log -1 --pretty=format:%ci`
if [ ${version}foo = foo ]; then
if [ ${version_release} = 0 ]; then
Expand Down
8 changes: 4 additions & 4 deletions bin/maint/buildtest
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ if ( $? ) then
else
set BUILDER="yes"
endif
set GCOV=`grep PETSC_USE_GCOV $nPETSC_DIR/$PETSC_ARCH/include/petscconf.h`

if ( "${BUILDER}" == "yes" ) then
env PETSC_ARCH=$PETSC_ARCH PETSC_DIR=$nPETSC_DIR ./config/builder2.py clean >>& build.log
env PETSC_ARCH=$PETSC_ARCH PETSC_DIR=$nPETSC_DIR ./config/builder2.py build >>& build.log
if ( "${GCOV}" != "" ) then
make PETSC_ARCH=$PETSC_ARCH PETSC_DIR=$nPETSC_DIR all-legacy test >>& build.log
else
make PETSC_ARCH=$PETSC_ARCH PETSC_DIR=$nPETSC_DIR all test >>& build.log
endif
Expand All @@ -100,6 +100,7 @@ if ( $? ) then
set VALGRIND='DUMMYARGUMENT=foobar'
else
set VALGRIND=`echo MPIEXEC="${PETSC_DIR}/bin/petscmpiexec -valgrind"`
setenv PETSCVALGRIND_OPTIONS "--suppressions=${PETSC_DIR}/bin/maint/petsc-val.supp"
endif
rm -f examples.log
echo "Build on $MACH $PETSC_ARCH TESTMODE=$TESTMODE ${VALGRIND} `date` " > examples.log
Expand All @@ -110,7 +111,6 @@ else
endif
echo '******************************************************' >>& $nPETSC_DIR/examples.log

set GCOV=`grep PETSC_USE_GCOV $nPETSC_DIR/$PETSC_ARCH/include/petscconf.h`
if ( "${GCOV}" != "" ) then
make PETSC_ARCH=$PETSC_ARCH PETSC_DIR=$nPETSC_DIR gcov >>& examples.log
endif
Expand Down
2 changes: 1 addition & 1 deletion bin/maint/confignightly/churn2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set MACH=churn
set USR=petsc
set LOC=/sandbox/petsc/${RNAME}-2
set CONF=arch-linux-cxx-sieve
set CONF=arch-linux-cxx
2 changes: 1 addition & 1 deletion bin/maint/confignightly/crush3
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set MACH=crush
set USR=petsc
set LOC=/sandbox/petsc/${RNAME}-3
set CONF=arch-linux-cxx-sieve-gcov
set CONF=arch-linux-cxx-gcov
1 change: 0 additions & 1 deletion bin/maint/dos/makecpp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ proc updatemakefile { makefile } {
#
regsub -all "\ninclude" $databuff "\n!include" databuff
#
# Change -D__SDIR__='"${LOCDIR}"' to /D__SDIR__="\"${LOCDIR}\""
# Change -DPETSC_DIR='"${PETSC_DIR}"' to /DPETSC_DIR="\"${PETSC_DIR}\""
#
regsub -all "\\\-D" $databuff "/D" databuff
Expand Down
3 changes: 0 additions & 3 deletions bin/maint/dos/rules_win32
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ OBJS = $(OBJSC) $(OBJSF)
PETSC_INCLUDE = /I$(PETSC_DIR) /I$(PETSC_DIR)\include $(MPI_INCLUDE) \
/I$(PETSC_DIR)\bmake\$(PETSC_ARCH) $(AMS_INCLUDE) $(PETSC_BLASLAPACK_FLAGS)
CCPPFLAGS = $(PETSC_INCLUDE) $(PCONF) $(PETSCFLAGS) $(CPPFLAGS)
# __SDIR__ is not required as, on NT, the absolute path is used when compiling a
# source file (which already includes the __SDIR__ information
# /D__SDIR__="\"$(LOCDIR)\""
FCPPFLAGS = $(PETSC_INCLUDE) $(PCONF) $(PETSCFLAGS) $(FPPFLAGS)
PETSC_SYS_LIB = libpetsc.lib $(EXTERNAL_LIB) $(BLASLAPACK_LIB) \
$(MPE_LIB) $(MPI_LIB) $(X11_LIB) $(SYS_LIB)
Expand Down
9 changes: 4 additions & 5 deletions bin/maint/gcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,17 @@ def make_tarball(dirname):
print """Tarball created in %s"""%(PETSC_DIR)
return

def make_htmlpage(LOC,tarballs):
def make_htmlpage(gcov_dir,LOC,tarballs):

# Create index_gcov webpages using information processed from
# running gcov
# This is done in four stages
# Stage 1: Extract tar balls,merge files and dump .lines files in /tmp/gcov
# Stage 1: Extract tar balls,merge files and dump .lines files in gcov_dir
# Stage 2: Process .lines files
# Stage 3: Create marked HTML source code files
# Stage 4: Create HTML pages having statistics and hyperlinks to HTML source code files (files are sorted by filename and percentage code tested)
# Stores the main HTML pages in LOC if LOC is defined via command line argument o-wise it uses the default PETSC_DIR

gcov_dir = os.path.join('/tmp','gcov')
if os.path.isdir(gcov_dir):
shutil.rmtree(gcov_dir)
os.makedirs(gcov_dir)
Expand Down Expand Up @@ -387,7 +386,7 @@ def make_htmlpage(LOC,tarballs):

def main():

USER = os.environ>['USER']
USER = os.environ['USER']
gcov_dir = "/tmp/gcov-"+USER

if (sys.argv[1] == "-run_gcov"):
Expand All @@ -406,7 +405,7 @@ def main():
LOC = PETSC_DIR
tarballs = sys.argv[2:]

make_htmlpage(LOC,tarballs)
make_htmlpage(gcov_dir,LOC,tarballs)
else:
print "No or invalid option specified:"
print "Usage: To run gcov and create tarball"
Expand Down
9 changes: 6 additions & 3 deletions bin/maint/generatefortranstubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def FixFile(filename):
ff.close()

# gotta be a better way to do this
data = re.subn('\nvoid ','\nvoid PETSC_STDCALL ',data)[0]
data = re.subn('\nPetscErrorCode ','\nvoid PETSC_STDCALL ',data)[0]
data = re.subn('\nvoid ','\nPETSC_EXTERN void PETSC_STDCALL ',data)[0]
data = re.subn('\nPetscErrorCode ','\nPETSC_EXTERN void PETSC_STDCALL ',data)[0]
data = re.subn('Petsc([ToRm]*)Pointer\(int\)','Petsc\\1Pointer(void*)',data)[0]
data = re.subn('PetscToPointer\(a\) \(a\)','PetscToPointer(a) (*(long *)(a))',data)[0]
data = re.subn('PetscFromPointer\(a\) \(int\)\(a\)','PetscFromPointer(a) (long)(a)',data)[0]
Expand Down Expand Up @@ -161,7 +161,10 @@ def processDir(arg,dirname,names):
(status,output) = commands.getstatusoutput(cmd)
if status:
raise RuntimeError('Error running bfort\n'+cmd+'\n'+output)
FixDir(petscdir,outdir,verbose)
try:
FixDir(petscdir,outdir,verbose)
except:
print 'Error! with FixDir('+outdir+')'

# remove from list of subdirectories all directories without source code
rmnames=[]
Expand Down
1 change: 0 additions & 1 deletion bin/maint/getinterfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ def main(args):
classes['PetscBinary'] = {}
classes['PetscOptions'] = {}
classes['PetscMalloc'] = {}
classes['PetscHMPI'] = {}
classes['PetscToken'] = {}
for i in args:
getclasses(i)
Expand Down
4 changes: 2 additions & 2 deletions bin/maint/package-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -x
ECHO=

OPT1='--with-shared-libraries=1 --with-dynamic-loading=1 --with-debugging=0'
OPT2='--with-clanguage=cxx --with-sieve=1 --with-log=0'
OPT1='--with-shared-libraries=1 --with-debugging=0'
OPT2='--with-clanguage=cxx --with-log=0'
OPT3='--with-scalar-type=complex --with-clanguage=cxx --with-pic=0 --with-log=0'

DATAFILESPATH=/home/petsc/datafiles
Expand Down
10 changes: 10 additions & 0 deletions bin/maint/petsc-val.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
<petsc-nightlybuild-with-gfortran>
Memcheck:Cond
fun:fd_to_stream
fun:_gfortrani_init_units
fun:init
fun:call_init.part.0
fun:_dl_init
obj:/lib/x86_64-linux-gnu/ld-2.15.so
}
Loading

0 comments on commit c7ff62d

Please sign in to comment.