diff --git a/config/BuildSystem/config/package.py b/config/BuildSystem/config/package.py index e0ca9e3bc23..4c10ac770de 100644 --- a/config/BuildSystem/config/package.py +++ b/config/BuildSystem/config/package.py @@ -345,7 +345,7 @@ def __remove_flag_pair(self, flags, flag_to_remove, pair_prefix): - flag_to_remove - the flag to remove - pair_prefix - (Optional) if not None, indicates that FLAG_TO_REMOVE is in a pair, and is prefixed by str(pair_prefix). For example, pair_prefix='-Xcompiler' indicates - that the flag is specificied as -Xcompiler FLAG_TO_REMOVE + that the flag is specified as -Xcompiler FLAG_TO_REMOVE Return ------ diff --git a/config/BuildSystem/config/packages/MFEM.py b/config/BuildSystem/config/packages/MFEM.py index 24754da985d..47a76aa13db 100644 --- a/config/BuildSystem/config/packages/MFEM.py +++ b/config/BuildSystem/config/packages/MFEM.py @@ -4,15 +4,16 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) #disable version checking - #self.minversion = '4' - #self.version = '4.0.0' + #self.minversion = '4.6' + #self.version = '4.6' #self.versionname = 'MFEM_VERSION_STRING' #self.versioninclude = 'mfem/config.hpp' - self.gitcommit = 'v4.5.2' + self.gitcommit = 'v4.6' self.download = ['git://https://github.com/mfem/mfem.git','https://github.com/mfem/mfem/archive/'+self.gitcommit+'.tar.gz'] self.linkedbypetsc = 0 self.downloadonWindows = 1 self.buildLanguages = ['Cxx'] + self.maxCxxVersion = 'c++17' self.skippackagewithoptions = 1 self.builtafterpetsc = 1 self.noMPIUni = 1 @@ -57,7 +58,7 @@ def Install(self): if not os.path.exists(configDir): os.makedirs(configDir) - if self.framework.argDB['prefix']: + if self.framework.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: PETSC_DIR = os.path.abspath(os.path.expanduser(self.argDB['prefix'])) PETSC_ARCH = '' prefix = os.path.abspath(os.path.expanduser(self.argDB['prefix'])) @@ -70,16 +71,8 @@ def Install(self): self.pushLanguage('Cxx') cxx = self.getCompiler() - cxxflags = self.getCompilerFlags() + cxxflags = self.updatePackageCxxFlags(self.getCompilerFlags()) self.popLanguage() - cxxflags = cxxflags.replace('-fvisibility=hidden','') # MFEM is currently broken with -fvisibility=hidden - # MFEM uses the macro MFEM_BUILD_DIR that builds a path by combining the directory plus other stuff but if the - # directory name contains "-linux" this is converted by CPP to the value 1 since that is defined in Linux header files - # unless the -std=C++11 or -std=C++14 flag is used; we want to support MFEM without this flag - if '-linux' in self.packageDir: - cxxflags += ' -Dlinux=linux' - # MFEM adds C++ standard flags automatically - cxxflags = re.sub(r'-std=([^\s]+) ','',cxxflags) if 'download-mfem-ghv-cxx' in self.argDB and self.argDB['download-mfem-ghv-cxx']: ghv = self.argDB['download-mfem-ghv-cxx'] else: @@ -158,7 +151,7 @@ def Install(self): slepclib = '-L'+prefix+'/lib -lslepc' slepcext = '' g.write('SLEPC_LIB = '+petscrpt+' '+slepclib+' '+slepcext+' $(PETSC_LIB)\n') - if self.argDB['prefix']: + if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: makedepend = 'slepc-install' else: makedepend = 'slepc-build' @@ -173,16 +166,17 @@ def Install(self): if self.cuda.found: self.pushLanguage('CUDA') petscNvcc = self.getCompiler() - cudaFlags = self.getCompilerFlags() + cudaFlags = self.updatePackageCUDAFlags(self.getCompilerFlags()) self.popLanguage() cudaFlags = re.sub(r'-std=([^\s]+) ','',cudaFlags) g.write('MFEM_USE_CUDA = YES\n') g.write('CUDA_CXX = '+petscNvcc+'\n') g.write('CXXFLAGS := '+cudaFlags+' $(addprefix -Xcompiler ,$(CXXFLAGS))\n') + g.write('CUDA_ARCH = sm_' + self.cuda.cudaArchSingle() + '\n') if self.hip.found: self.pushLanguage('HIP') hipcc = self.getCompiler() - hipFlags = self.getCompilerFlags() + hipFlags = self.updatePackageCxxFlags(self.getCompilerFlags()) self.popLanguage() hipFlags = re.sub(r'-std=([^\s]+) ','',hipFlags) g.write('MFEM_USE_HIP = YES\n') @@ -193,13 +187,22 @@ def Install(self): g.write('MPI_LIB = '+self.mpi.libpaths+' '+self.mpi.mpilibs+'\n') g.close() + with open(os.path.join(configDir,'petsc.mk'),'w') as f: + f.write(''' +MAKEOVERRIDES := $(filter-out CXXFLAGS=%,$(MAKEOVERRIDES)) +unexport CXXFLAGS +.PHONY: run-config +run-config: +\t$(MAKE) -f {mfile} config MFEM_DIR={mfemdir} +'''.format(mfile=os.path.join(self.packageDir,'makefile'), mfemdir=self.packageDir)) + self.addDefine('HAVE_MFEM',1) self.addMakeMacro('MFEM','yes') self.addMakeRule('mfembuild',makedepend, \ ['@echo "*** Building MFEM ***"',\ '@${RM} ${PETSC_ARCH}/lib/petsc/conf/mfem.errorflg',\ '@(cd '+buildDir+' && \\\n\ - ${OMAKE} -f '+self.packageDir+'/makefile config MFEM_DIR='+self.packageDir+' && \\\n\ + ${OMAKE} -f '+configDir+'/petsc.mk run-config && \\\n\ ${OMAKE} clean && \\\n\ '+self.make.make_jnp+') > ${PETSC_ARCH}/lib/petsc/conf/mfem.log 2>&1 || \\\n\ (echo "**************************ERROR*************************************" && \\\n\ @@ -216,7 +219,7 @@ def Install(self): echo "********************************************************************" && \\\n\ exit 1)']) - if self.argDB['prefix']: + if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: self.addMakeRule('mfem-build','') self.addMakeRule('mfem-install','mfembuild mfeminstall') else: diff --git a/config/BuildSystem/config/packages/MPI.py b/config/BuildSystem/config/packages/MPI.py index cb1f51b0dfc..f48d7816c65 100644 --- a/config/BuildSystem/config/packages/MPI.py +++ b/config/BuildSystem/config/packages/MPI.py @@ -48,14 +48,11 @@ def __init__(self, framework): self.usingMPIUni = 0 self.shared = 0 # local state - self.commf2c = 0 - self.commc2f = 0 self.needBatchMPI = 1 self.alternativedownload = 'mpich' + self.haveReduceLocal = 0 # support MPI-3 process shared memory self.support_mpi3_shm = 0 - # support MPI-3 non-blocking collectives - self.support_mpi3_nbc = 0 self.mpi_pkg_version = '' self.mpi_pkg = '' # mpich,mpich2,mpich3,openmpi,intel,intel2,intel3 @@ -413,21 +410,12 @@ def configureMPI2(self): '''): raise RuntimeError('PETSc requires some of the MPI-2.0 (1997), MPI-2.1 (2008) functions - they are not available with the specified MPI library') - if self.checkLink('#include \n', 'int count=2; int blocklens[2]={0,1}; MPI_Aint indices[2]={0,1}; MPI_Datatype old_types[2]={MPI_INT,MPI_DOUBLE}; MPI_Datatype *newtype = 0;\n \ + if not self.checkLink('#include \n', 'int count=2; int blocklens[2]={0,1}; MPI_Aint indices[2]={0,1}; MPI_Datatype old_types[2]={MPI_INT,MPI_DOUBLE}; MPI_Datatype *newtype = 0;\n \ if (MPI_Type_create_struct(count, blocklens, indices, old_types, newtype)) { }\n'): - self.haveTypeCreateStruct = 1 - else: - self.haveTypeCreateStruct = 0 self.framework.addDefine('MPI_Type_create_struct(count,lens,displs,types,newtype)', 'MPI_Type_struct((count),(lens),(displs),(types),(newtype))') - if self.checkLink('#include \n', 'MPI_Comm_errhandler_fn * p_err_fun = 0; MPI_Errhandler * p_errhandler = 0; if (MPI_Comm_create_errhandler(p_err_fun,p_errhandler)) { }\n'): - self.haveCommCreateErrhandler = 1 - else: - self.haveCommCreateErrhandler = 0 + if not self.checkLink('#include \n', 'MPI_Comm_errhandler_fn * p_err_fun = 0; MPI_Errhandler * p_errhandler = 0; if (MPI_Comm_create_errhandler(p_err_fun,p_errhandler)) { }\n'): self.framework.addDefine('MPI_Comm_create_errhandler(p_err_fun,p_errhandler)', 'MPI_Errhandler_create((p_err_fun),(p_errhandler))') - if self.checkLink('#include \n', 'if (MPI_Comm_set_errhandler(MPI_COMM_WORLD,MPI_ERRORS_RETURN)) { }\n'): - self.haveCommSetErrhandler = 1 - else: - self.haveCommSetErrhandler = 0 + if not self.checkLink('#include \n', 'if (MPI_Comm_set_errhandler(MPI_COMM_WORLD,MPI_ERRORS_RETURN)) { }\n'): self.framework.addDefine('MPI_Comm_set_errhandler(comm,p_errhandler)', 'MPI_Errhandler_set((comm),(p_errhandler))') if self.checkLink('#include \n', 'if (MPI_Reduce_local(0, 0, 0, MPI_INT, MPI_SUM)) { }\n'): # MPI_Reduce_local is in MPI-2.2 self.haveReduceLocal = 1 @@ -499,7 +487,6 @@ def configureMPI3(self): if (MPI_Ibarrier(MPI_COMM_WORLD,&req)) return 0; '''): self.addDefine('HAVE_MPI_NONBLOCKING_COLLECTIVES', 1) - self.support_mpi3_nbc = 1 if self.checkLink('#include \n', 'MPI_Comm distcomm; \n\ MPI_Request req; \n\ @@ -635,8 +622,6 @@ def alternateConfigureLibrary(self): self.framework.addDefine('MPI_Comm_create_errhandler(p_err_fun,p_errhandler)', 'MPI_Errhandler_create((p_err_fun),(p_errhandler))') self.framework.addDefine('MPI_Comm_set_errhandler(comm,p_errhandler)', 'MPI_Errhandler_set((comm),(p_errhandler))') self.logWrite(self.framework.restoreLog()) - self.commf2c = 1 - self.commc2f = 1 self.usingMPIUni = 1 self.found = 1 self.version = 'PETSc MPIUNI uniprocessor MPI replacement' @@ -693,7 +678,6 @@ def FortranMPICheck(self): if self.fortran.fortranIsF90: self.log.write('Checking for mpi.mod\n') if self.libraries.check(self.lib,'', call = ' use mpi\n integer(kind=selected_int_kind(5)) ierr,rank\n call mpi_init(ierr)\n call mpi_comm_rank(MPI_COMM_WORLD,rank,ierr)\n'): - self.havef90module = 1 self.addDefine('HAVE_MPI_F90MODULE', 1) self.compilers.FPPFLAGS = oldFlags self.libraries.popLanguage() diff --git a/config/BuildSystem/config/packages/MPICH.py b/config/BuildSystem/config/packages/MPICH.py index b20435cca7f..319bdc2bde9 100644 --- a/config/BuildSystem/config/packages/MPICH.py +++ b/config/BuildSystem/config/packages/MPICH.py @@ -7,7 +7,7 @@ def __init__(self, framework): self.version = '4.1.2' self.download = ['https://github.com/pmodels/mpich/releases/download/v'+self.version+'/mpich-'+self.version+'.tar.gz', 'https://www.mpich.org/static/downloads/'+self.version+'/mpich-'+self.version+'.tar.gz', # does not always work from Python? So add in ftp.mcs URL below - 'https://ftp.mcs.anl.gov/pub/petsc/externalpackages'+'/mpich-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages'+'/mpich-'+self.version+'.tar.gz'] self.download_git = ['git://https://github.com/pmodels/mpich.git'] self.gitsubmodules = ['.'] self.downloaddirnames = ['mpich'] diff --git a/config/BuildSystem/config/packages/MUMPS.py b/config/BuildSystem/config/packages/MUMPS.py index 9d36cc43da3..7f13bd75fd3 100644 --- a/config/BuildSystem/config/packages/MUMPS.py +++ b/config/BuildSystem/config/packages/MUMPS.py @@ -9,7 +9,7 @@ def __init__(self, framework): self.requiresversion = 1 self.gitcommit = 'v'+self.version self.download = ['https://graal.ens-lyon.fr/MUMPS/MUMPS_'+self.version+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/MUMPS_'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/MUMPS_'+self.version+'.tar.gz'] self.downloaddirnames = ['petsc-pkg-mumps','MUMPS'] self.buildLanguages = ['C','FC'] self.precisions = ['single','double'] diff --git a/config/BuildSystem/config/packages/OpenMPI.py b/config/BuildSystem/config/packages/OpenMPI.py index 9c5881bcb64..4e5b6285279 100644 --- a/config/BuildSystem/config/packages/OpenMPI.py +++ b/config/BuildSystem/config/packages/OpenMPI.py @@ -4,9 +4,9 @@ class Configure(config.package.GNUPackage): def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) - self.version = '4.1.5' + self.version = '4.1.6' self.download = ['https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-'+self.version+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/openmpi-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/openmpi-'+self.version+'.tar.gz'] self.downloaddirnames = ['openmpi','ompi'] self.skippackagewithoptions = 1 self.isMPI = 1 diff --git a/config/BuildSystem/config/packages/PTScotch.py b/config/BuildSystem/config/packages/PTScotch.py index b146a835b2f..0288e95a97b 100644 --- a/config/BuildSystem/config/packages/PTScotch.py +++ b/config/BuildSystem/config/packages/PTScotch.py @@ -8,7 +8,7 @@ def __init__(self, framework): self.gitcommit = 'v'+self.version self.download = ['git://https://gitlab.inria.fr/scotch/scotch.git', 'https://gitlab.inria.fr/scotch/scotch/-/archive/'+self.gitcommit+'/scotch-'+self.gitcommit+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/scotch-'+self.gitcommit+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/scotch-'+self.gitcommit+'.tar.gz'] self.downloaddirnames = ['scotch','petsc-pkg-scotch'] self.liblist = [['libptesmumps.a','libptscotchparmetisv3.a','libptscotch.a','libptscotcherr.a','libesmumps.a','libscotch.a','libscotcherr.a'],['libptesmumps.a','libptscotchparmetis.a','libptscotch.a','libptscotcherr.a','libesmumps.a','libscotch.a','libscotcherr.a'], ['libptesmumps.a','libptscotchparmetis.a','libptscotch.a','libptscotcherr.a','libesmumps.a','libscotch.a','libscotcherr.a']] diff --git a/config/BuildSystem/config/packages/PaStiX.py b/config/BuildSystem/config/packages/PaStiX.py index dc8754e52df..0aeb47731a3 100644 --- a/config/BuildSystem/config/packages/PaStiX.py +++ b/config/BuildSystem/config/packages/PaStiX.py @@ -6,7 +6,7 @@ def __init__(self, framework): self.version = '5.2.3' self.versionname = 'PASTIX_MAJOR_VERSION.PASTIX_MEDIUM_VERSION.PASTIX_MINOR_VERSION' # 'https://gforge.inria.fr/frs/download.php/file/36212/pastix_'+self.version+'.tar.bz2', - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/pastix_'+self.version+'.tar.bz2'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/pastix_'+self.version+'.tar.bz2'] self.liblist = [['libpastix.a'], ['libpastix.a','libpthread.a','librt.a']] self.functions = ['pastix'] diff --git a/config/BuildSystem/config/packages/SAMRAI.py b/config/BuildSystem/config/packages/SAMRAI.py index e7ddfb6a0a8..45744d729b4 100644 --- a/config/BuildSystem/config/packages/SAMRAI.py +++ b/config/BuildSystem/config/packages/SAMRAI.py @@ -3,7 +3,7 @@ class Configure(config.package.GNUPackage): def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/SAMRAI-v2.4.4p.tar.gz', 'https://computation-rnd.llnl.gov/SAMRAI/download/SAMRAI-v2.4.4.tar.gz'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/SAMRAI-v2.4.4p.tar.gz', 'https://computation-rnd.llnl.gov/SAMRAI/download/SAMRAI-v2.4.4.tar.gz'] self.functions = [] self.includes = ['Box.h'] self.liblist = [['libSAMRAI.a']] diff --git a/config/BuildSystem/config/packages/SuperLU.py b/config/BuildSystem/config/packages/SuperLU.py index 44cb456d687..f484f732ba2 100644 --- a/config/BuildSystem/config/packages/SuperLU.py +++ b/config/BuildSystem/config/packages/SuperLU.py @@ -7,8 +7,7 @@ def __init__(self, framework): self.version = '6.0.1' self.minversion = '5.2.1' # bugs in 5.2.0 prevent it from functioning self.versionname = 'SUPERLU_MAJOR_VERSION.SUPERLU_MINOR_VERSION.SUPERLU_PATCH_VERSION' - # self.gitcommit = 'v'+self.version - self.gitcommit = 'baeea941129895a3718b558a2b8f2c65df1be15f' # master, may-7-2023 + self.gitcommit = 'v'+self.version self.download = ['git://https://github.com/xiaoyeli/superlu','https://github.com/xiaoyeli/superlu/archive/'+self.gitcommit+'.tar.gz'] self.functions = ['set_default_options'] self.includes = ['slu_ddefs.h'] @@ -33,7 +32,7 @@ def setupDependencies(self, framework): def formCMakeConfigureArgs(self): args = config.package.CMakePackage.formCMakeConfigureArgs(self) args.append('-DUSE_XSDK_DEFAULTS=YES') - + args.append('-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE') args.append('-DTPL_BLAS_LIBRARIES="'+self.libraries.toString(self.blasLapack.dlib)+'"') # Tests are broken on Apple since they depend on a shared library that is not resolved against BLAS diff --git a/config/BuildSystem/config/packages/Zoltan.py b/config/BuildSystem/config/packages/Zoltan.py index 9d0f5ddf8fe..bf776740314 100644 --- a/config/BuildSystem/config/packages/Zoltan.py +++ b/config/BuildSystem/config/packages/Zoltan.py @@ -6,7 +6,7 @@ def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.version = '3.83' self.versionname = 'ZOLTAN_VERSION_NUMBER' - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/zoltan_distrib_v'+self.version+'.tar.gz'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/zoltan_distrib_v'+self.version+'.tar.gz'] self.functions = ['Zoltan_LB_Partition'] self.includes = ['zoltan.h'] self.liblist = [['libzoltan.a']] diff --git a/config/BuildSystem/config/packages/boost.py b/config/BuildSystem/config/packages/boost.py index 773b357fc9a..185f25136c6 100644 --- a/config/BuildSystem/config/packages/boost.py +++ b/config/BuildSystem/config/packages/boost.py @@ -5,7 +5,7 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) self.download = ['https://downloads.sourceforge.net/project/boost/boost/1.78.0/boost_1_78_0.tar.gz', - 'https://ftp.mcs.anl.gov/pub/petsc/externalpackages/boost_1_78_0.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/boost_1_78_0.tar.gz'] self.includes = ['boost/multi_index_container.hpp'] self.liblist = [] self.buildLanguages = ['Cxx'] diff --git a/config/BuildSystem/config/packages/cmake.py b/config/BuildSystem/config/packages/cmake.py index 9434f72e260..bb2b6eb06cb 100644 --- a/config/BuildSystem/config/packages/cmake.py +++ b/config/BuildSystem/config/packages/cmake.py @@ -4,11 +4,11 @@ class Configure(config.package.GNUPackage): def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) - self.version = '3.27.4' + self.version = '3.27.6' self.download = ['https://github.com/Kitware/CMake/releases/download/v'+self.version+'/cmake-'+self.version+'.tar.gz', 'https://gitlab.kitware.com/cmake/cmake/-/archive/v'+self.version+'/cmake-v'+self.version+'.tar.gz'] self.download_solaris = ['https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/cmake-3.11.4.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/cmake-3.11.4.tar.gz'] self.downloadonWindows = 1 self.lookforbydefault = 1 self.publicInstall = 0 # always install in PETSC_DIR/PETSC_ARCH (not --prefix) since this is not used by users diff --git a/config/BuildSystem/config/packages/concurrencykit.py b/config/BuildSystem/config/packages/concurrencykit.py index 3216a266fc3..641fb3e3f68 100644 --- a/config/BuildSystem/config/packages/concurrencykit.py +++ b/config/BuildSystem/config/packages/concurrencykit.py @@ -5,7 +5,7 @@ class Configure(config.package.GNUPackage): def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.download = ['http://concurrencykit.org/releases/ck-0.4.5.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/ck-0.4.5.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/ck-0.4.5.tar.gz'] self.functions = [] self.includes = ['ck_spinlock.h'] self.liblist = [['libck.a']] diff --git a/config/BuildSystem/config/packages/eigen.py b/config/BuildSystem/config/packages/eigen.py index c42133e394f..1198697258e 100644 --- a/config/BuildSystem/config/packages/eigen.py +++ b/config/BuildSystem/config/packages/eigen.py @@ -8,7 +8,7 @@ def __init__(self, framework): self.gitcommit = self.version self.download = ['git://https://gitlab.com/libeigen/eigen.git', 'https://gitlab.com/libeigen/eigen/-/archive/'+self.gitcommit+'/eigen-'+self.gitcommit+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/eigen-'+self.gitcommit+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/eigen-'+self.gitcommit+'.tar.gz'] self.functions = [] self.includes = ['Eigen/Core'] self.liblist = [] diff --git a/config/BuildSystem/config/packages/f2cblaslapack.py b/config/BuildSystem/config/packages/f2cblaslapack.py index cbed74a81f5..03e626d4acc 100644 --- a/config/BuildSystem/config/packages/f2cblaslapack.py +++ b/config/BuildSystem/config/packages/f2cblaslapack.py @@ -3,7 +3,7 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/f2cblaslapack-3.8.0.q2.tar.gz'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/f2cblaslapack-3.8.0.q2.tar.gz'] self.downloadonWindows = 1 self.skippackagewithoptions = 1 diff --git a/config/BuildSystem/config/packages/fftw.py b/config/BuildSystem/config/packages/fftw.py index d9ece0b93d9..c22f50a8bd9 100644 --- a/config/BuildSystem/config/packages/fftw.py +++ b/config/BuildSystem/config/packages/fftw.py @@ -5,7 +5,7 @@ def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) # host locally as fftw.org url can expire after new release. self.download = ['http://www.fftw.org/fftw-3.3.10.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/fftw-3.3.8.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/fftw-3.3.8.tar.gz'] self.functions = ['fftw_malloc'] self.includes = ['fftw3.h'] self.liblist = [['libfftw3_mpi.a','libfftw3.a'],['libfftw3.a']] diff --git a/config/BuildSystem/config/packages/hdf5.py b/config/BuildSystem/config/packages/hdf5.py index f1481e0a760..2aba0e53592 100644 --- a/config/BuildSystem/config/packages/hdf5.py +++ b/config/BuildSystem/config/packages/hdf5.py @@ -7,7 +7,7 @@ def __init__(self, framework): self.minversion = '1.8' self.versionname = 'H5_VERSION' self.download = ['https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.bz2', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hdf5-1.12.2.tar.bz2'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/hdf5-1.12.2.tar.bz2'] self.download_solaris = ['https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.bz2'] # David Moulton reports that HDF5 configure can fail on NERSC systems and this can be worked around by removing the # getpwuid from the test for ac_func in gethostname getpwuid getrusage lstat diff --git a/config/BuildSystem/config/packages/hpddm.py b/config/BuildSystem/config/packages/hpddm.py index 903dfcd0d9a..0799c89f27c 100644 --- a/config/BuildSystem/config/packages/hpddm.py +++ b/config/BuildSystem/config/packages/hpddm.py @@ -3,8 +3,8 @@ class Configure(config.package.Package): def __init__(self,framework): config.package.Package.__init__(self,framework) - # self.version = '2.2.3' - self.gitcommit = '73e22aeecde71e65a30686b0b1f2be44c2171fe6' # harmonic sep-15-2023 + self.version = '2.2.4' + self.gitcommit = 'v'+self.version # main sep-15-2023 self.download = ['git://https://github.com/hpddm/hpddm','https://github.com/hpddm/hpddm/archive/'+self.gitcommit+'.tar.gz'] self.minversion = '2.2.1' self.versionname = 'HPDDM_VERSION' diff --git a/config/BuildSystem/config/packages/hwloc.py b/config/BuildSystem/config/packages/hwloc.py index 7f5fd400533..b86ac7ecf2b 100644 --- a/config/BuildSystem/config/packages/hwloc.py +++ b/config/BuildSystem/config/packages/hwloc.py @@ -6,7 +6,7 @@ def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.version = '2.9.3' self.download = ['https://download.open-mpi.org/release/hwloc/v2.9/hwloc-'+self.version+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hwloc-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/hwloc-'+self.version+'.tar.gz'] self.functions = ['hwloc_topology_init'] self.includes = ['hwloc.h'] self.liblist = [['libhwloc.a'],['libhwloc.a','libxml2.a']] diff --git a/config/BuildSystem/config/packages/kokkos-kernels.py b/config/BuildSystem/config/packages/kokkos-kernels.py index dcd29e96b12..c465aa5c97a 100644 --- a/config/BuildSystem/config/packages/kokkos-kernels.py +++ b/config/BuildSystem/config/packages/kokkos-kernels.py @@ -39,7 +39,8 @@ def setupDependencies(self, framework): self.cuda = framework.require('config.packages.cuda',self) self.hip = framework.require('config.packages.hip',self) self.sycl = framework.require('config.packages.sycl',self) - self.odeps = [self.cuda,self.hip,self.sycl] + self.blasLapack = framework.require('config.packages.BlasLapack',self) + self.odeps = [self.cuda,self.hip,self.sycl,self.blasLapack] return def versionToStandardForm(self,ver): @@ -97,6 +98,11 @@ def formCMakeConfigureArgs(self): elif self.sycl.found: args = self.rmArgsStartsWith(args,'-DCMAKE_CXX_COMPILER=') args.append('-DCMAKE_CXX_COMPILER='+self.getCompiler('SYCL')) + if self.argDB['with-kokkos-kernels-tpl']: + if self.blasLapack.mkl: # KK uses them to find MKL + args.append('-DKokkosKernels_ENABLE_TPL_MKL=ON') + elif 'with-kokkos-kernels-tpl' in self.framework.clArgDB: + raise RuntimeError('Kokkos-Kernels TPL is explicitly required but could not find OneMKL') # These options will be taken from Kokkos configuration args = self.rmArgsStartsWith(args,'-DCMAKE_CXX_STANDARD=') diff --git a/config/BuildSystem/config/packages/libjpeg.py b/config/BuildSystem/config/packages/libjpeg.py index 723d7dc695c..40e4a054e92 100644 --- a/config/BuildSystem/config/packages/libjpeg.py +++ b/config/BuildSystem/config/packages/libjpeg.py @@ -5,7 +5,7 @@ def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.versionname = 'JPEG_LIB_VERSION_MAJOR.JPEG_LIB_VERSION_MINOR' self.download = ['http://www.ijg.org/files/jpegsrc.v9c.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/jpegsrc.v9c.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/jpegsrc.v9c.tar.gz'] self.downloaddirnames = ['jpeg'] self.includes = ['jpeglib.h'] self.liblist = [['libjpeg.a']] @@ -15,4 +15,4 @@ def configureLibrary(self): config.package.Package.configureLibrary(self) # removed from the list of defines because there is already and entry from checking the library exists # note the duplication that would otherwise occur comes from the package having a lib at the beginning of the name - self.libraries.delDefine('HAVE_LIBJPEG') \ No newline at end of file + self.libraries.delDefine('HAVE_LIBJPEG') diff --git a/config/BuildSystem/config/packages/libpng.py b/config/BuildSystem/config/packages/libpng.py index 17e5dda4c69..24a6d3db50d 100644 --- a/config/BuildSystem/config/packages/libpng.py +++ b/config/BuildSystem/config/packages/libpng.py @@ -6,7 +6,7 @@ def __init__(self, framework): self.versionname = 'PNG_HEADER_VERSION_STRING' self.version = '1.6.37' self.download = ['https://sourceforge.net/projects/libpng/files/libpng16/'+self.version+'/libpng-1.6.37.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/libpng-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/libpng-'+self.version+'.tar.gz'] self.includes = ['png.h'] self.liblist = [['libpng.a']] self.functions = ['png_create_write_struct'] diff --git a/config/BuildSystem/config/packages/make.py b/config/BuildSystem/config/packages/make.py index 29bdaaec43b..e80fc453f2f 100644 --- a/config/BuildSystem/config/packages/make.py +++ b/config/BuildSystem/config/packages/make.py @@ -15,7 +15,7 @@ def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.minversion = '3.81' self.download = ['https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/make-4.4.1.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/make-4.4.1.tar.gz'] self.downloadonWindows = 1 self.useddirectly = 0 self.linkedbypetsc = 0 diff --git a/config/BuildSystem/config/packages/mpfr.py b/config/BuildSystem/config/packages/mpfr.py index 4b2aca28e3e..00b2d5fa3a3 100644 --- a/config/BuildSystem/config/packages/mpfr.py +++ b/config/BuildSystem/config/packages/mpfr.py @@ -4,7 +4,7 @@ class Configure(config.package.GNUPackage): def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.download = ['http://www.mpfr.org/mpfr-3.1.5/mpfr-3.1.5.tar.gz', - 'https://ftp.mcs.anl.gov/pub/petsc/externalpackages/mpfr-3.1.5.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/mpfr-3.1.5.tar.gz'] self.functions = ['mpfr_get_version'] self.includes = ['mpfr.h'] self.liblist = [['libmpfr.a']] diff --git a/config/BuildSystem/config/packages/netcdf.py b/config/BuildSystem/config/packages/netcdf.py index 8bc028ebcab..0d00a2fca55 100644 --- a/config/BuildSystem/config/packages/netcdf.py +++ b/config/BuildSystem/config/packages/netcdf.py @@ -8,7 +8,7 @@ def __init__(self, framework): self.versionname = 'NC_VERSION_MAJOR.NC_VERSION_MINOR.NC_VERSION_PATCH' self.versioninclude = 'netcdf_meta.h' self.download = ['https://github.com/Unidata/netcdf-c/archive/v%s.tar.gz' % self.version, - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/netcdf-%s.tar.gz' % self.version,] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/netcdf-%s.tar.gz' % self.version,] self.functions = ['nccreate'] self.includes = ['netcdf.h'] self.liblist = [['libnetcdf.a']] diff --git a/config/BuildSystem/config/packages/pnetcdf.py b/config/BuildSystem/config/packages/pnetcdf.py index 9d6aec490d4..e60dad44caf 100644 --- a/config/BuildSystem/config/packages/pnetcdf.py +++ b/config/BuildSystem/config/packages/pnetcdf.py @@ -9,7 +9,7 @@ def __init__(self, framework): self.gitcommit = 'checkpoint.' + self.version # 1.12.1 is first to include MPI1 deprecated fix self.download = ['git://https://github.com/parallel-netcdf/pnetcdf','https://github.com/parallel-netcdf/pnetcdf/archive/'+self.gitcommit+'.tar.gz', 'https://parallel-netcdf.github.io/Release/pnetcdf-'+self.version+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/pnetcdf-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/pnetcdf-'+self.version+'.tar.gz'] self.functions = ['ncmpi_create'] self.includes = ['pnetcdf.h'] self.liblist = [['libpnetcdf.a']] diff --git a/config/BuildSystem/config/packages/slepc.py b/config/BuildSystem/config/packages/slepc.py index 7deedbe5d63..1177e3c02da 100644 --- a/config/BuildSystem/config/packages/slepc.py +++ b/config/BuildSystem/config/packages/slepc.py @@ -3,7 +3,7 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) - self.gitcommit = 'a1d36dd18c7101bd3f39dbd8be6cb143587a0c61' + self.gitcommit = '5e3471a0e62d9a53446d7a4b9f4c58dfb4eedb92' # main sep-29-2023 self.download = ['git://https://gitlab.com/slepc/slepc.git','https://gitlab.com/slepc/slepc/-/archive/'+self.gitcommit+'/slepc-'+self.gitcommit+'.tar.gz'] self.functions = [] self.includes = [] diff --git a/config/BuildSystem/config/packages/spai.py b/config/BuildSystem/config/packages/spai.py index 6e4d07348b4..708341a35b9 100644 --- a/config/BuildSystem/config/packages/spai.py +++ b/config/BuildSystem/config/packages/spai.py @@ -3,7 +3,7 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/spai-3.0-p1.tar.gz'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/spai-3.0-p1.tar.gz'] self.functions = ['bspai'] self.includes = ['spai.h'] self.liblist = [['libspai.a']] diff --git a/config/BuildSystem/config/packages/sprng.py b/config/BuildSystem/config/packages/sprng.py index 3ad8cd7d2aa..ab94ffa5663 100644 --- a/config/BuildSystem/config/packages/sprng.py +++ b/config/BuildSystem/config/packages/sprng.py @@ -3,7 +3,7 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/sprng-1.0.tar.gz'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/sprng-1.0.tar.gz'] self.functions = ['make_new_seed_mpi'] self.includes = ['sprng.h'] self.liblist = [['liblcg.a']] diff --git a/config/BuildSystem/config/packages/sundials2.py b/config/BuildSystem/config/packages/sundials2.py index e8d037ad769..18bc16d0e13 100644 --- a/config/BuildSystem/config/packages/sundials2.py +++ b/config/BuildSystem/config/packages/sundials2.py @@ -6,7 +6,7 @@ def __init__(self, framework): self.version = '2.5.0' self.maxversion = '2.5.100000' self.versionname = 'SUNDIALS_PACKAGE_VERSION' - self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/sundials-'+self.version+'p1.tar.gz'] + self.download = ['https://web.cels.anl.gov/projects/petsc/download/externalpackages/sundials-'+self.version+'p1.tar.gz'] self.downloaddirnames = ['sundials'] self.functions = ['CVSpgmr','CVDense'] self.includes = ['sundials/sundials_nvector.h'] diff --git a/config/BuildSystem/config/packages/szlib.py b/config/BuildSystem/config/packages/szlib.py index 903826c4a33..78378b3ef35 100644 --- a/config/BuildSystem/config/packages/szlib.py +++ b/config/BuildSystem/config/packages/szlib.py @@ -6,7 +6,7 @@ def __init__(self, framework): self.version = '2.1.1' self.versionname = 'SZLIB_VERSION' self.download = ['https://support.hdfgroup.org/ftp/lib-external/szip/'+self.version+'/src/szip-2.1.1.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/szip-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/szip-'+self.version+'.tar.gz'] self.functions = ['SZ_BufftoBuffCompress', 'SZ_BufftoBuffDecompress'] self.includes = ['szlib.h'] self.liblist = [['libsz.a'],['szlib.lib']] diff --git a/config/BuildSystem/config/packages/tetgen.py b/config/BuildSystem/config/packages/tetgen.py index be46e091a17..d58f98926c9 100644 --- a/config/BuildSystem/config/packages/tetgen.py +++ b/config/BuildSystem/config/packages/tetgen.py @@ -4,7 +4,7 @@ class Configure(config.package.Package): def __init__(self, framework): config.package.Package.__init__(self, framework) self.download = ['http://www.tetgen.org/1.5/src/tetgen1.6.0.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/tetgen1.6.0.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/tetgen1.6.0.tar.gz'] self.liblist = [['libtet.a']] self.includes = ['tetgen.h'] self.buildLanguage= 'Cxx' diff --git a/config/BuildSystem/config/packages/yaml.py b/config/BuildSystem/config/packages/yaml.py index 4a2bda10f31..d317763cc6a 100644 --- a/config/BuildSystem/config/packages/yaml.py +++ b/config/BuildSystem/config/packages/yaml.py @@ -4,7 +4,7 @@ class Configure(config.package.GNUPackage): def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) self.download = ['http://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/yaml-0.2.5.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/yaml-0.2.5.tar.gz'] self.functions = ['yaml_parser_load'] self.includes = ['yaml.h'] self.liblist = [['libyaml.a']] diff --git a/config/BuildSystem/config/packages/zlib.py b/config/BuildSystem/config/packages/zlib.py index aa5dc2f6c9d..7613eb85df7 100644 --- a/config/BuildSystem/config/packages/zlib.py +++ b/config/BuildSystem/config/packages/zlib.py @@ -6,7 +6,7 @@ def __init__(self, framework): self.version = '1.2.13' self.versionname = 'ZLIB_VERSION' self.download = ['http://www.zlib.net/zlib-'+self.version+'.tar.gz', - 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/zlib-'+self.version+'.tar.gz'] + 'https://web.cels.anl.gov/projects/petsc/download/externalpackages/zlib-'+self.version+'.tar.gz'] self.functions = ['compress', 'uncompress'] self.includes = ['zlib.h'] self.liblist = [['libz.a'],['zlib.lib']] diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py index 152272a9709..ed1a74df373 100644 --- a/config/BuildSystem/config/setCompilers.py +++ b/config/BuildSystem/config/setCompilers.py @@ -2314,10 +2314,10 @@ def generateSharedLinkerGuesses(self): yield (self.argDB['LD_SHARED'], [], 'so') if Configure.isDarwin(self.log): if 'with-shared-ld' in self.argDB: - yield (self.argDB['with-shared-ld'], ['-dynamiclib -single_module', '-undefined dynamic_lookup', '-multiply_defined suppress', '-no_compact_unwind'], 'dylib') + yield (self.argDB['with-shared-ld'], ['-dynamiclib', '-undefined dynamic_lookup', '-no_compact_unwind'], 'dylib') if hasattr(self, 'CXX') and self.mainLanguage == 'Cxx': - yield (self.CXX, ['-dynamiclib -single_module', '-undefined dynamic_lookup', '-multiply_defined suppress', '-no_compact_unwind'], 'dylib') - yield (self.CC, ['-dynamiclib -single_module', '-undefined dynamic_lookup', '-multiply_defined suppress', '-no_compact_unwind'], 'dylib') + yield (self.CXX, ['-dynamiclib', '-undefined dynamic_lookup', '-no_compact_unwind'], 'dylib') + yield (self.CC, ['-dynamiclib', '-undefined dynamic_lookup', '-no_compact_unwind'], 'dylib') if hasattr(self, 'CXX') and self.mainLanguage == 'Cxx': # C++ compiler default yield (self.CXX, ['-qmkshrobj'], 'so') @@ -2397,7 +2397,7 @@ def checkSharedLinker(self): del self.sharedLinker return - def checkLinkerFlag(self, flag): + def checkLinkerFlag(self, flag, filterAlways = 0): '''Determine whether the linker accepts the given flag''' flagsArg = self.getLinkerFlagsArg() oldFlags = getattr(self, flagsArg) @@ -2407,7 +2407,7 @@ def checkLinkerFlag(self, flag): if status: valid = 0 self.logPrint('Rejecting linker flag '+flag+' due to nonzero status from link') - output = self.filterLinkOutput(output) + output = self.filterLinkOutput(output, filterAlways) if self.containsInvalidFlag(output): valid = 0 self.logPrint('Rejecting '+self.language[-1]+' linker flag '+flag+' due to \n'+output) @@ -2435,8 +2435,8 @@ def checkLinkerMac(self): languages.append('FC') for language in languages: self.pushLanguage(language) - for testFlag in ['-Wl,-bind_at_load','-Wl,-multiply_defined,suppress', '-Wl,-multiply_defined -Wl,suppress', '-Wl,-commons,use_dylibs', '-Wl,-search_paths_first', '-Wl,-no_compact_unwind']: - if self.checkLinkerFlag(testFlag): + for testFlag in ['-Wl,-ld_classic', '-Wl,-bind_at_load', '-Wl,-commons,use_dylibs', '-Wl,-search_paths_first', '-Wl,-no_compact_unwind']: + if self.checkLinkerFlag(testFlag, filterAlways=1): # expand to CC_LINKER_FLAGS or CXX_LINKER_FLAGS or FC_LINKER_FLAGS linker_flag_var = langMap[language]+'_LINKER_FLAGS' val = getattr(self,linker_flag_var) @@ -2534,10 +2534,10 @@ def generateDynamicLinkerGuesses(self): # Mac OSX if Configure.isDarwin(self.log): if 'with-dynamic-ld' in self.argDB: - yield (self.argDB['with-dynamic-ld'], ['-dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress'], 'dylib') + yield (self.argDB['with-dynamic-ld'], ['-dynamiclib -undefined dynamic_lookup'], 'dylib') if hasattr(self, 'CXX') and self.mainLanguage == 'Cxx': - yield (self.CXX, ['-dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress'], 'dylib') - yield (self.CC, ['-dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress'], 'dylib') + yield (self.CXX, ['-dynamiclib -undefined dynamic_lookup'], 'dylib') + yield (self.CC, ['-dynamiclib -undefined dynamic_lookup'], 'dylib') # Shared default if hasattr(self, 'sharedLinker'): yield (self.sharedLinker, self.sharedLibraryFlags, 'so') diff --git a/config/BuildSystem/retrieval.py b/config/BuildSystem/retrieval.py index d5caf8bb8d9..6bd55538839 100644 --- a/config/BuildSystem/retrieval.py +++ b/config/BuildSystem/retrieval.py @@ -48,12 +48,7 @@ def setupURLs(self,packagename,urls,gitsubmodules,gitprereq): elif parsed[0] == 'link': self.link_urls.append(self.removePrefix(url,'link://')) else: - # check for ftp.mcs.anl.gov - and use https://,www.mcs.anl.gov,ftp:// - if url.find('ftp.mcs.anl.gov') != -1: - https_url = url.replace('http://','https://').replace('ftp://','http://') - self.tarball_urls.extend([https_url,https_url.replace('ftp.mcs.anl.gov/pub/petsc/','www.mcs.anl.gov/petsc/mirror/'),https_url.replace('https://','ftp://')]) - else: - self.tarball_urls.extend([url]) + self.tarball_urls.extend([url]) def isDirectoryGitRepo(self, directory): if not hasattr(self.sourceControl, 'git'): diff --git a/config/PETSc/options/sharedLibraries.py b/config/PETSc/options/sharedLibraries.py index fae390456e8..c1e7861c290 100755 --- a/config/PETSc/options/sharedLibraries.py +++ b/config/PETSc/options/sharedLibraries.py @@ -66,7 +66,7 @@ def configureSharedLibraries(self): if self.setCompilers.isDarwin(self.log): self.addMakeRule('shared_arch','shared_darwin') self.addMakeMacro('SONAME_FUNCTION', '$(1).$(2).dylib') - self.addMakeMacro('SL_LINKER_FUNCTION', '-dynamiclib -install_name $(call SONAME_FUNCTION,$(1),$(2)) -compatibility_version $(2) -current_version $(3) -single_module -multiply_defined suppress -undefined dynamic_lookup') + self.addMakeMacro('SL_LINKER_FUNCTION', '-dynamiclib -install_name $(call SONAME_FUNCTION,$(1),$(2)) -compatibility_version $(2) -current_version $(3) -undefined dynamic_lookup') elif self.setCompilers.CC.find('win32fe') >=0: self.addMakeMacro('SONAME_FUNCTION', '$(1).dll') self.addMakeMacro('SL_LINKER_FUNCTION', '-LD') diff --git a/config/examples/arch-olcf-frontier-opt.py b/config/examples/arch-olcf-frontier-opt.py index 27c5ee59e75..911fce1cd63 100755 --- a/config/examples/arch-olcf-frontier-opt.py +++ b/config/examples/arch-olcf-frontier-opt.py @@ -74,7 +74,7 @@ # # -std=c2x is a workaround for this hipsparse problem # # /opt/rocm-5.4.0/include/hipsparse/hipsparse.h:8741:28: error: expected '= constant-expression' or end of enumerator definition # # HIPSPARSE_ORDER_COLUMN [[deprecated("Please use HIPSPARSE_ORDER_COL instead")]] = 1, -# # -Wno-constant-logical-operand is a workaround to supress excessive warnings caused by -std=c2x in petsc source which we don't want to address, see MR !6287 +# # -Wno-constant-logical-operand is a workaround to suppress excessive warnings caused by -std=c2x in petsc source which we don't want to address, see MR !6287 # '--CFLAGS=-std=c2x -Wno-constant-logical-operand', # 'LIBS={GTLDIR} {GTLLIBS}'.format(GTLDIR=os.environ['PE_MPICH_GTL_DIR_amd_gfx90a'], GTLLIBS=os.environ['PE_MPICH_GTL_LIBS_amd_gfx90a']), # #'--with-openmp=1', # enable if using "craype-accel-amd-gfx90a" module diff --git a/doc/build_man_impls_links.py b/doc/build_man_impls_links.py index aee6930dcc3..a8089267b96 100755 --- a/doc/build_man_impls_links.py +++ b/doc/build_man_impls_links.py @@ -6,19 +6,28 @@ import os import re -def processfile(petsc_dir,dir,file,implsClassAll,implsFuncAll): +def processfile(petsc_dir,dir,file,implsClassAll,subimplsClassAll,implsFuncAll): #print('Processing '+os.path.join(dir,file)) + isclass = False with open(os.path.join(dir,file),'r') as f: text = f.read() bibneeded = text.find('{cite}') > -1 + isclass = text.find('typedef struct') > -1 if bibneeded: with open(os.path.join(dir,file),'w') as f: f.write(text[0:text.find('## See Also')]) f.write('\n## References\n```{bibliography}\n:filter: docname in docnames\n```\n\n') f.write(text[text.find('## See Also'):]) + itemName = file[0:-3] - func = list(filter(lambda x: x.find(itemName+'_') > -1, implsFuncAll)) - iclass = list(filter(lambda x: x.find('_p_'+itemName) > -1, implsClassAll)) + if isclass: + iclass = list(filter(lambda x: x.find('_p_'+itemName+' ') > -1, implsClassAll)) + func = None + isubclass = list(filter(lambda x: x.find('} '+itemName+'_') > -1, subimplsClassAll)) + else: + iclass = None + isubclass = None + func = list(filter(lambda x: x.find(' '+itemName+'_') > -1, implsFuncAll)) if func or iclass: with open(os.path.join(dir,file),'a') as f: f.write('\n## Implementations\n') @@ -28,22 +37,29 @@ def processfile(petsc_dir,dir,file,implsClassAll,implsFuncAll): if iclass: for str in iclass: f.write(re.sub('(.*\.[ch]x*u*):.*struct.*(_p_'+itemName+').*{','\\2 in \\1
',str,count=1)+'\n') + if isubclass: + for str in isubclass: + f.write(re.sub('(.*\.[ch]x*u*):} ('+itemName+'_.*);','\\2 in \\1
',str,count=1)+'\n') + def loadstructfunctions(petsc_dir): '''Creates the list of structs and class functions''' import subprocess implsClassAll = subprocess.check_output(['git', 'grep', '-E', 'struct[[:space:]]+_[pn]_[^[:space:]]+.*\{', '--', '*.c', '*.cpp', '*.cu', '*.c', '*.h', '*.cxx'], cwd = petsc_dir).strip().decode('utf-8') implsClassAll = list(filter(lambda x: not (x.find('/tests/') > -1 or x.find('/tutorials') > -1 or x.find(';') > -1), implsClassAll.split('\n'))) + subimplsClassAll = subprocess.check_output(['git', 'grep', '-E', '} [A-Z][A-Za-z]*_[A-Za-z]*;', '--', '*.c', '*.cpp', '*.cu', '*.c', '*.h', '*.cxx'], cwd = petsc_dir).strip().decode('utf-8') + subimplsClassAll = list(filter(lambda x: not (x.find('/tests/') > -1 or x.find('/tutorials') > -1), subimplsClassAll.split('\n'))) + implsFuncAll = subprocess.check_output(['git', 'grep', '-nE', '^(static )?(PETSC_EXTERN )?(PETSC_INTERN )?(extern )?PetscErrorCode +[^_ ]+_[^_ ]+\(', '--', '*/impls/*.c', '*/impls/*.cpp', '*/impls/*.cu', '*/impls/*.c', '*/impls/*.h', '*/impls/*.cxx'], cwd = petsc_dir).strip().decode('utf-8') implsFuncAll = list(filter(lambda x: not (x.find('_Private') > -1 or x.find('_private') > -1 or x.find(';') > -1), implsFuncAll.split('\n'))) - return (implsClassAll,implsFuncAll) + return (implsClassAll,subimplsClassAll,implsFuncAll) def main(petsc_dir): - (implsClassAll,implsFuncAll) = loadstructfunctions(petsc_dir) + (implsClassAll,subimplsClassAll,implsFuncAll) = loadstructfunctions(petsc_dir) for dirpath, dirnames, filenames in os.walk(os.path.join(petsc_dir,'doc','manualpages'),topdown=True): #print('Processing directory '+dirpath) for file in filenames: - if file.endswith('.md'): processfile(petsc_dir,dirpath,file,implsClassAll,implsFuncAll) + if file.endswith('.md'): processfile(petsc_dir,dirpath,file,implsClassAll,subimplsClassAll,implsFuncAll) if __name__ == "__main__": main(os.path.abspath(os.environ['PETSC_DIR'])) diff --git a/doc/changes/231.rst b/doc/changes/231.rst index fc311d5e0a1..ebd3965acb1 100644 --- a/doc/changes/231.rst +++ b/doc/changes/231.rst @@ -102,7 +102,7 @@ Changes: 2.3.1 code is in fixed form - there could be errors with lines exceeding 72 char limit -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: - PLAPACK support added - BLOPEX support added diff --git a/doc/changes/232.rst b/doc/changes/232.rst index b508d8d2e86..18d51adb0db 100644 --- a/doc/changes/232.rst +++ b/doc/changes/232.rst @@ -79,6 +79,6 @@ Changes: 2.3.2 .. rubric:: Fortran: -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: - SPRNG support added. diff --git a/doc/changes/233.rst b/doc/changes/233.rst index dc79945830a..8235b3c1bf4 100644 --- a/doc/changes/233.rst +++ b/doc/changes/233.rst @@ -138,7 +138,7 @@ Changes: 2.3.3 .. rubric:: Fortran: -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: - Hypre interface is updated to use version 2.0.0 - Mumps interface is updated to use version 4.7.3 diff --git a/doc/changes/300.rst b/doc/changes/300.rst index 0bb141493dc..3595ce778db 100644 --- a/doc/changes/300.rst +++ b/doc/changes/300.rst @@ -185,4 +185,4 @@ Changes: 3.0.0 - PetscLogFlopsNoCheck() no longer exists; you can simply call PetscLogFlops() it no longer has a return in it. -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: diff --git a/doc/changes/31.rst b/doc/changes/31.rst index 5c9f9729ac3..13ddb543190 100644 --- a/doc/changes/31.rst +++ b/doc/changes/31.rst @@ -157,7 +157,7 @@ Changes: 3.1 - use petsc and use petscdef are now use petscsys and use petscsysdef -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: - Added MATORDERING_AMD for Tim Davis' Approximate Minimum Degree package. diff --git a/doc/changes/32.rst b/doc/changes/32.rst index e9f2244d1ab..2cbf9a3b0ec 100644 --- a/doc/changes/32.rst +++ b/doc/changes/32.rst @@ -287,4 +287,4 @@ Changes: 3.2 .. rubric:: Fortran: -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: diff --git a/doc/changes/320.rst b/doc/changes/320.rst new file mode 100644 index 00000000000..0a4ae4d5248 --- /dev/null +++ b/doc/changes/320.rst @@ -0,0 +1,241 @@ +============= +Changes: 3.20 +============= + +.. + STYLE GUIDELINES: + * Capitalize sentences + * Use imperative, e.g., Add, Improve, Change, etc. + * Don't use a period (.) at the end of entries + * If multiple sentences are needed, use a period or semicolon to divide sentences, but not at the end of the final sentence + +.. rubric:: General: + +- Add ``PetscOptionsBegin()``, ``PetscOptionsEnd()``, ``PetscOptionsInt()``, ``PetscOptionsBool()``, ``PetscOptionsIntArray()``, + ``PetscOptionsReal()``, ``PetscOptionsRealArray()``, and ``PetscOptionsScalar()`` for Fortran +- Add ``PetscAssertPointer()`` as a replacement for ``PetscValidPointer()``, ``PetscValidCharPointer()``, ``PetscValidIntPointer()``, ``PetscValidInt64Pointer()``, ``PetscValidCountPointer()``, ``PetscValidBoolPointer()``, ``PetscvalidScalarPointer()``, and ``PetscValidRealPointer()`` +- Convert standard header-guards in PETSc header-files to ``#pragma once``. Users relying on specific preprocessor definitions to determine whether particular PETSc headers (e.g. ``petscdm.h`` used to be guarded by ``PETSCDM_H``) have been included will find that this no longer works. While header-guards are technically "public" (insofar that they appear in public header-files), their name and value are considered implementation details + +.. rubric:: Configure/Build: + +- Add support for external-packages to prefer tarball download for regular use - as currently all packages prefer git clones. MPICH is a package using this feature. Here MPICH tarball will be downloaded for regular use. However on providing ``--download-mpich-commit=main`` option - configure download and builds from MPICH git repository +- Add support for external package SLATE, optional dependency for STRUMPACK +- Add support for external package ZFP, optional dependency for STRUMPACK +- Add support for external package ButterflyPACK, optional dependency for STRUMPACK + +.. rubric:: Sys: + +- Add ``PetscDeviceContextGetStreamHandle()`` to return a handle to the stream the current device context is using +- Add utility functions ``PetscGetCurrentCUDAStream()`` and ``PetscGetCurrentHIPStream()`` to return the GPU stream the current device context is using +- Add ``PetscStrcmpAny()`` to compare against multiple non-empty strings +- Change arguments 4 and 5 of ``PetscViewerBinaryReadAll()`` and ``PetscViewerBinaryWriteAll()`` to ``PetscInt64`` +- Add ``PetscIsCloseAtTolScalar()`` +- Remove ``PetscTellMyCell()`` and related runtime option +- Remove ``PetscTextBelt()`` and related runtime option +- Remove deprecated ``-malloc [no]`` startup option +- Remove deprecated ``-malloc_info`` startup option +- Remove deprecated ``-log_summary`` option +- Remove ``PetscURLShorten()``, it has not worked since 2019 +- Move ``PetscIntStackCreate()``, ``PetscIntStackDestroy()``, ``PetscIntStackPush()``, ``PetscIntStackPop()``, and ``PetscIntStackEmpty()`` declarations to public API in `petsclog.h` +- Add ``-on_error_malloc_dump`` option + +.. rubric:: Event Logging: + +- Add ``PetscLogState`` interface for describing profiling events and stages +- Add ``PetscLogHandler`` interface that interprets the profiling events of a ``PetscLogState`` +- Add ``PETSCLOGHANDLERDEFAULT`` implementation of ``PetscLogHandler`` +- Add ``PETSCLOGHANDLERNESTED`` implementation of ``PetscLogHandler`` +- Add ``PETSCLOGHANDLERTRACE`` implementation of ``PetscLogHandler`` +- Add ``PetscLogHandlerCreateTrace()`` +- Add ``PETSCLOGHANDLERMPE`` implementation of ``PetscLogHandler`` +- Add ``PETSCLOGHANDLERPERFSTUBS`` implementation of ``PetscLogHandler`` +- Add ``PETSCLOGHANDLERLEGACY`` implementation of ``PetscLogHandler`` +- Add ``PetscLogHandlerCreateLegacy()`` +- Add ``PetscLogPerfstubsBegin()`` for log handling with PerfStubs/TAU +- Add ``PetscLogLegacyCallbacksBegin()`` to transition old log handler callbacks to the ``PetscLogHandler``-based approach +- Add ``PetscLogHandlerStart()`` to connect a ``PetscLogHandler`` to PETSc's global logging events +- Add ``PetscLogStageGetName()`` +- Add ``PetscLogEventGetName()`` +- Add ``PetscLogEventsPause()`` and ``PetscLogEventsResume()`` to isolate a logging event from unrelated in-process events +- Add ``PetscLogClassGetClassId()`` +- Add ``PetscLogClassIdGetName()`` +- Deprecate ``PetscLogClassPerfInfoClear()` , ``PetscLogClassPerfLogCreate()``, and ``PetscLogClassPerfLogDestroy()`` +- Deprecate ``PetscClassPerfLogEnsureSize()``, ``PetscClassRegInfoDestroy()``, ``PetscClassRegLogCreate()``, ``PetscClassRegLogDestroy()``, ``PetscClassRegLogGetClass()``, and ``PetscClassRegLogRegister()`` +- Deprecate ``PetscEventPerfInfoClear()`` and ``PetscEventPerfInfoCopy()`` +- Deprecate ``PetscEventPerfLogActivate()``, ``PetscEventPerfLogActivateClass()``, ``PetscEventPerfLogCreate()``, ``PetscEventPerfLogDeactivate()``, ``PetscEventPerfLogDeactivateClass()``, ``PetscEventPerfLogDeactivatePop()``, ``PetscEventPerfLogDeactivatePush()``, ``PetscEventPerfLogDestroy()``, ``PetscEventPerfLogEnsureSize()``, ``PetscEventPerfLogGetVisible()``, and ``PetscEventPerfLogSetVisible()`` +- Deprecate ``PetscEventRegLogCreate()``, ``PetscEventRegLogDestroy()``, ``PetscEventRegLogGetEvent()``, and ``PetscEventRegLogRegister()`` +- Deprecate ``PetscStageLogCreate()``, ``PetscStageLogDestroy()``, ``PetscStageLogGetActive()``, ``PetscStageLogGetClassPerfLog()``, ``PetscStageLogGetClassRegLog()``, ``PetscStageLogGetEventRegLog()``, ``PetscStageLogGetStage()``, ``PetscStageLogGetVisible()``, ``PetscStageLogPop()``, ``PetscStageLogPush()``, ``PetscStageLogRegister()``, ``PetscStageLogSetActive()``, ``PetscStageLogSetVisible()``, ``PetscStageLogGetCurrent()``, and ``PetscStageLogGetEventPerfLog()`` +- Deprecate ``PetscLogGetStageLog()`` +- Deprecate ``PetscLogPushCurrentEvent_Internal()`` +- Deprecate ``PetscLogPopCurrentEvent_Internal()`` +- Deprecate ``PetscLogAllBegin()`` +- Deprecate ``PetscLogSet()`` +- Add ``PetscLogHandlerGetEventPerfInfo()`` +- Add ``PetscLogHandlerSetLogActions()`` +- Add ``PetscLogHandlerSetLogObjects()`` +- Add ``PetscLogHandlerLogObjectState()`` +- Add ``PetscLogHandlerGetNumObjects()`` +- Add ``PetscLogHandlerEventDeactivatePush()`` +- Add ``PetscLogHandlerEventDeactivatePop()`` +- Add ``PetscLogHandlerEventsPause()`` +- Add ``PetscLogHandlerEventsResume()`` +- Add ``PetscLogHandlerDump()`` +- Add ``PetscLogHandlerStageSetVisible()`` +- Add ``PetscLogHandlerStageGetVisible()`` +- Add ``PetscLogHandlerGetStagePerfInfo()`` +- Add ``PetscLogStageGetPerfInfo()`` +- Add ``PETSCLOGHANDLERNVTX`` implementation of ``PetscLogHandler`` + +.. rubric:: PetscViewer: + +- Add ``PetscViewerASCIIOpenWithFileUnit()`` and ``PetscViewerASCIISetFileUnit()`` + +.. rubric:: PetscDraw: + +.. rubric:: AO: + +.. rubric:: IS: + +.. rubric:: VecScatter / PetscSF: + +.. rubric:: PF: + +.. rubric:: Vec: + +- Add ``VecErrorWeightedNorms()`` to unify weighted local truncation error norms used in ``TS`` +- Add CUDA/HIP implementations for ``VecAbs()``, ``VecSqrt()``, ``VecExp()``, ``VecLog()``, ``VecPointwiseMax()``, ``VecPointwiseMaxAbs()``, and ``VecPointwiseMin()`` +- Add ``VecMAXPBY()`` +- Deprecate ``VecChop()`` in favor of ``VecFilter()`` +- Add ``VecCreateFromOptions()`` + +.. rubric:: PetscSection: + +- Add ``PetscSectionResetClosurePermutation()`` + +.. rubric:: PetscPartitioner: + +.. rubric:: Mat: + +- Add ``MatCreateDenseFromVecType()`` +- Add support for calling ``MatDuplicate()`` on a matrix preallocated via ``MatSetPreallocationCOO()``, and then ``MatSetValuesCOO()`` on the new matrix +- Remove ``MATSOLVERSPARSEELEMENTAL`` since it is no longer functional +- Add ``MATSELLCUDA``. It supports fast ``MatMult()``, ``MatMultTranspose()``, and ``MatMultAdd()`` on GPUs +- Add support for ``MAT_FACTOR_LU`` and ``MAT_FACTOR_CHOLESKY`` with ``MATSOLVERMUMPS`` for ``MATNEST`` +- ``MatGetFactor()`` can now return ``NULL`` for some combinations of matrices and solvers types. This is to support those combinations that can only be inspected at runtime (i.e. MatNest with AIJ blocks vs MatNest with SHELL blocks) +- Remove ``MatSetValuesDevice()``, ``MatCUSPARSEGetDeviceMatWrite()``, ``MatKokkosGetDeviceMatWrite`` +- Add ``MatDenseCUDASetPreallocation()`` and ``MatDenseHIPSetPreallocation()`` +- Add support for KOKKOS in ``MATH2OPUS`` +- Add ``-pc_precision single`` option for use with ``MATSOLVERSUPERLU_DIST`` +- Add ``MATDIAGONAL`` which can be created with ``MatCreateDiagonal()`` +- Add ``MatDiagonalGetDiagonal()``, ``MatDiagonalRestoreDiagonal()``, ``MatDiagonalGetInverseDiagonal()``, and ``MatDiagonalRestoreInverseDiagonal()`` +- Add support for ``MatLoad()`` and ``MatView()`` to load and store ``MATMPIAIJ`` matrices that have more than ``PETSC_INT_MAX`` nonzeros, so long as each rank has fewer than ``PETSC_INT_MAX`` +- Add ``MatLRCSetMats()`` and register creation routine for ``MatLRC`` +- Add CUDA/HIP implementation for ``MatGetDiagonal()`` +- Add a Boolean parameter to ``MatEliminateZeros()`` to force the removal of zero diagonal coefficients +- Expose ``MatComputeVariableBlockEnvelope()`` in public headers +- Add ``MatEliminateZeros()`` implementations for ``MatBAIJ`` and ``MatSBAIJ`` +- Deprecate ``MatChop()`` in favor of ``MatFilter()``, with two additional Boolean parameters to compress the underlying storage and keep or discard near-zero diagonal coefficients +- Add ``MatCreateFromOptions()`` +- Add ``MatSTRUMPACKGetReordering()``, ``MatSTRUMPACKSetGeometricNxyz()``, ``MatSTRUMPACKSetGeometricComponents()``, ``MatSTRUMPACKSetGeometricWidth()``, ``MatSTRUMPACKGetColPerm()``, ``MatSTRUMPACKSetGPU()``, ``MatSTRUMPACKGetGPU()``, ``MatSTRUMPACKSetCompression()``, ``MatSTRUMPACKGetCompression()``, ``MatSTRUMPACKSetCompRelTol()``, ``MatSTRUMPACKGetCompRelTol()``, ``MatSTRUMPACKSetCompAbsTol()``, ``MatSTRUMPACKGetCompAbsTol()``, ``MatSTRUMPACKSetCompMinSepSize()``, ``MatSTRUMPACKGetCompMinSepSize()``, ``MatSTRUMPACKSetCompLeafSize()``, ``MatSTRUMPACKGetCompLeafSize()``, ``MatSTRUMPACKSetCompLossyPrecision()``, ``MatSTRUMPACKGetCompLossyPrecision()``, ``MatSTRUMPACKSetCompButterflyLevels()``, ``MatSTRUMPACKGetCompButterflyLevels()`` +- Add ``MAT_STRUMPACK_GEOMETRIC``, ``MAT_STRUMPACK_AMD``, ``MAT_STRUMPACK_MMD``, ``MAT_STRUMPACK_AND``, ``MAT_STRUMPACK_MLF``, ``MAT_STRUMPACK_SPECTRAL`` to ``MatSTRUMPACKReordering`` +- Add ``MatSTRUMPACKCompressionType`` +- Remove ``MatSTRUMPACKSetHSSLeafSize()``, ``MatSTRUMPACKSetHSSMaxRank()``, ``MatSTRUMPACKSetHSSMinSize()``, ``MatSTRUMPACKSetHSSMinSepSize()``, ``MatSTRUMPACKSetHSSAbsTol()``, ``MatSTRUMPACKSetHSSRelCompTol()``, ``MatSTRUMPACKSetHSSRelTol()`` + +.. rubric:: MatCoarsen: + +.. rubric:: PC: + +- Add ``PCMatGetApplyOperation()`` and ``PCMatSetApplyOperation()`` +- Add ``PCReduceFailedReason()`` +- Add ``PCSetKSPNestLevel()`` and ``PCSetKSPNestLevel()`` +- Refactor ``PCMPI`` to be a private system used automatically when ``-mpi_linear_solver_server`` is used. The ``KSP`` and ``PC`` objects that solve the system now inherit any prefix provided + initially with ``KSPSetPrefix()`` and do not require the previously required ``mpi_`` prefix +- Add option ``-fieldsplit_1_pc_hpddm_schur_precondition`` to use ``PCHPDDM`` on the Schur complements from ``PCFIELDSPLIT`` +- Add ``PCGAMGSetAggressiveSquareGraph()`` to use square graph method for aggressive coarsening that was the previous default coarsening approach before release 3.19 +- Add ``PCGAMGSetAggressiveMISk()`` to set the number of levels (k) of aggressive MIS-k coarseing (2 is very common) +- Add ``PCGAMGSetMinDegreeOrderingMISk()`` to use a minimum degree ordering for the (greedy) MIS-k algorithm +- Change ``PCGAMGSetUseParallelCoarseGridSolve()`` to ``PCGAMGSetParallelCoarseGridSolve()`` +- Add ``PCGAMGSetRecomputeEstEig()`` to set flag to have Chebyshev recompute its eigen estimates (default set to true) + +.. rubric:: KSP: + +- Add ``KSPSetMinimumIterations()`` and ``KSPGetMinimumIterations()`` +- Add ``KSPSetNestLevel()`` and ``KSPGetNestLevel()`` +- Support ``KSPSetInitialGuessNonzero()`` with ``KSPPREONLY`` and ``PCDISTRIBUTE`` when it is called on both the outer and inner ``KSP`` + +.. rubric:: SNES: + +- Add a convenient, developer-level ``SNESConverged()`` function that runs the convergence test and updates the internal converged reason +- Swap the order of monitor and convergence test. Now monitors are always called after a convergence test +- Deprecate option ``-snes_ms_norms`` in favor of ``-snes_norm_schedule always`` + +.. rubric:: SNESLineSearch: + +.. rubric:: TS: + +- Remove ``TSErrorWeightedNormInfinity()``, ``TSErrorWeightedNorm2()``, ``TSErrorWeightedENormInfinity()``, ``TSErrorWeightedENorm2()`` since the same functionality can be obtained with ``VecErrorWeightedNorms()`` +- Add support for time-dependent solvers with varying solution size using ``TSSetResize()`` +- Add support for Diagonally Implicit Runge-Kutta methods with the new ``TSDIRK`` type + +.. rubric:: TAO: + +- Add ``TaoADMMGetRegularizerCoefficient()`` +- Add ``TAOBNCG``, ``TaoBNCGGetType()`` and ``TaoBNCGSetType()`` + +.. rubric:: DM/DA: + +- Add support for ``DMDAGetElements()`` for Fortran +- Add support for clearing named vectors with ``DMClearNamedGlobalVectors()`` and ``DMClearNamedLocalVectors()`` +- Add ``DMPrintCellIndices()`` for debugging +- Add ``DMUseTensorOrder()`` +- Add ``DMCeedCreate()``, ``DMCeedComputeGeometry()``, and ``DMCeedDestroy()`` + +.. rubric:: DMSwarm: + +- Add scatter mode to ``DMSwarmProjectFields()`` and no longer create vectors +- Promote ``DMSwarmDataFieldGetEntries()``, ``DMSwarmDataFieldRestoreEntries()``, ``DMSwarmDataBucketGetDMSwarmDataFieldByName()``, ``DMSwarmDataBucketGetDMSwarmDataFieldIdByName()``, and ``DMSwarmDataBucketQueryDMSwarmDataFieldByName()`` to public interface + +.. rubric:: DMPlex: + +- Add ``DMPlexTransformExtrudeGetPeriodic()`` and ``DMPlexTransformExtrudeSetPeriodic()`` +- Replace ``DMPlexGetGhostCellStratum()`` with ``DMPlexGetCellTypeStratum()`` +- Add ``DMPlexSetUseMatClosurePermutation()`` and ``DMPlexGetUseMatClosurePermutation()`` +- Add ``DMPlexGetUseCeed()``, ``DMPlexSetUseCeed()``, and ``DMPlexSNESComputeResidualCEED()`` +- Add ``DMPlexSNESComputeResidualDS()`` + +.. rubric:: FE/FV: + +- Add ``PLEXFE_QFUNCTION`` macro to create CEED QFunctions from Plex pointwise functions + +.. rubric:: DMNetwork: + +- Add ``DMNetworkViewSetShowRanks()``, ``DMNetworkViewSetViewRanks()``, ``DMNetworkViewSetShowGlobal()``, ``DMNetworkViewSetShowVertices()``, ``DMNetworkViewSetShowNumbering()`` + +- Add ``-dmnetwork_view_all_ranks`` ``-dmnetwork_view_rank_range`` ``-dmnetwork_view_no_vertices`` ``-dmnetwork_view_no_numbering`` for viewing DMNetworks with the Matplotlib viewer + +- Add ``-dmnetwork_view_zoomin_vertices`` ``-dmnetwork_view_zoomin_vertices_padding`` for viewing DMNetworks with the Matplotlib viewer + +.. rubric:: DMStag: + +.. rubric:: DT: + +- Add ``PETSCFEVECTOR`` for making a finite element that is a vector of copies of another finite element +- Add ``PetscFECreateVector()`` +- Add ``PETSCDUALSPACESUM`` for a finite element dual basis that is the sum of other dual bases +- Add ``PetscDualSpaceCreateSum()`` +- Add ``PetscDualSpaceSumSetNumSubspaces()`` +- Add ``PetscDualSpaceSumGetNumSubspaces()`` +- Add ``PetscDualSpaceSumSetSubspace()`` +- Add ``PetscDualSpaceSumGetSubspace()`` +- Add ``PetscDualSpaceSumSetConcatenate()`` +- Add ``PetscDualSpaceSumGetConcatenate()`` +- Add ``PetscDualSpaceSumSetInterleave()`` +- Add ``PetscDualSpaceSumGetInterleave()`` +- Add ``PetscSpaceSumSetInterleave()`` +- Add ``PetscSpaceSumGetInterleave()`` +- Add ``PetscDualSpaceGetInteriorSection()`` + +.. rubric:: Fortran: + +- Add ``PetscCheck()`` and ``PetscCheckA()`` for Fortran +- Change ``PETSC_HAVE_FORTRAN`` to ``PETSC_USE_FORTRAN_BINDINGS`` to indicate if PETSc is built with Fortran bindings diff --git a/doc/changes/33.rst b/doc/changes/33.rst index d03ab28e0f8..50f0510dff5 100644 --- a/doc/changes/33.rst +++ b/doc/changes/33.rst @@ -225,7 +225,7 @@ Changes: 3.3 - PETSC_NULL_TRUTH is now PETSC_NULL_BOOL - PetscOptionsGetEnum() now available from Fortran -.. rubric:: `ExternalPackages `__: +.. rubric:: ExternalPackages: - The Hypre interface was updated to 2.8.0b and now supports 64-bit integers. diff --git a/doc/changes/dev.rst b/doc/changes/dev.rst index bfef532e246..f613de1d20c 100644 --- a/doc/changes/dev.rst +++ b/doc/changes/dev.rst @@ -11,84 +11,14 @@ Changes: Development .. rubric:: General: -- Add ``PetscOptionsBegin()``, ``PetscOptionsEnd()``, ``PetscOptionsInt()``, ``PetscOptionsBool()``, ``PetscOptionsIntArray()``, - ``PetscOptionsReal()``, ``PetscOptionsRealArray()``, and ``PetscOptionsScalar()`` for Fortran -- Add ``PetscAssertPointer()`` as a replacement for ``PetscValidPointer()``, ``PetscValidCharPointer()``, ``PetscValidIntPointer()``, ``PetscValidInt64Pointer()``, ``PetscValidCountPointer()``, ``PetscValidBoolPointer()``, ``PetscvalidScalarPointer()``, and ``PetscValidRealPointer()`` -- Convert standard header-guards in PETSc header-files to ``#pragma once``. Users relying on specific preprocessor definitions to determine whether particular PETSc headers (e.g. ``petscdm.h`` used to be guarded by ``PETSCDM_H``) have been included will find that this no longer works. While header-guards are technically "public" (insofar that they appear in public header-files), their name and value are considered implementation details - .. rubric:: Configure/Build: -- Add support for external-packages to prefer tarball download for regular use - as currently all packages prefer git clones. MPICH is a package using this feature. Here MPICH tarball will be downloaded for regular use. However on providing ``--download-mpich-commit=main`` option - configure download and builds from MPICH git repository -- Add support for external package SLATE, optional dependency for STRUMPACK -- Add support for external package ZFP, optional dependency for STRUMPACK -- Add support for external package ButterflyPACK, optional dependency for STRUMPACK - .. rubric:: Sys: -- Add ``PetscDeviceContextGetStreamHandle()`` to return a handle to the stream the current device context is using -- Add utility functions ``PetscGetCurrentCUDAStream()`` and ``PetscGetCurrentHIPStream()`` to return the GPU stream the current device context is using -- Add ``PetscStrcmpAny()`` to compare against multiple non-empty strings -- Change arguments 4 and 5 of ``PetscViewerBinaryReadAll()`` and ``PetscViewerBinaryWriteAll()`` to ``PetscInt64`` -- Add ``PetscIsCloseAtTolScalar()`` -- Remove ``PetscTellMyCell()`` and related runtime option -- Remove ``PetscTextBelt()`` and related runtime option -- Remove deprecated ``-malloc [no]`` startup option -- Remove deprecated ``-malloc_info`` startup option -- Remove deprecated ``-log_summary`` option -- Remove ``PetscURLShorten()``, it has not worked since 2019 -- Move ``PetscIntStackCreate()``, ``PetscIntStackDestroy()``, ``PetscIntStackPush()``, ``PetscIntStackPop()``, and ``PetscIntStackEmpty()`` declarations to public API in `petsclog.h` -- Add ``-on_error_malloc_dump`` option - .. rubric:: Event Logging: -- Add ``PetscLogState`` interface for describing profiling events and stages -- Add ``PetscLogHandler`` interface that interprets the profiling events of a ``PetscLogState`` -- Add ``PETSCLOGHANDLERDEFAULT`` implementation of ``PetscLogHandler`` -- Add ``PETSCLOGHANDLERNESTED`` implementation of ``PetscLogHandler`` -- Add ``PETSCLOGHANDLERTRACE`` implementation of ``PetscLogHandler`` -- Add ``PetscLogHandlerCreateTrace()`` -- Add ``PETSCLOGHANDLERMPE`` implementation of ``PetscLogHandler`` -- Add ``PETSCLOGHANDLERPERFSTUBS`` implementation of ``PetscLogHandler`` -- Add ``PETSCLOGHANDLERLEGACY`` implementation of ``PetscLogHandler`` -- Add ``PetscLogHandlerCreateLegacy()`` -- Add ``PetscLogPerfstubsBegin()`` for log handling with PerfStubs/TAU -- Add ``PetscLogLegacyCallbacksBegin()`` to transition old log handler callbacks to the ``PetscLogHandler``-based approach -- Add ``PetscLogHandlerStart()`` to connect a ``PetscLogHandler`` to PETSc's global logging events -- Add ``PetscLogStageGetName()`` -- Add ``PetscLogEventGetName()`` -- Add ``PetscLogEventsPause()`` and ``PetscLogEventsResume()`` to isolate a logging event from unrelated in-process events -- Add ``PetscLogClassGetClassId()`` -- Add ``PetscLogClassIdGetName()`` -- Deprecate ``PetscLogClassPerfInfoClear()` , ``PetscLogClassPerfLogCreate()``, and ``PetscLogClassPerfLogDestroy()`` -- Deprecate ``PetscClassPerfLogEnsureSize()``, ``PetscClassRegInfoDestroy()``, ``PetscClassRegLogCreate()``, ``PetscClassRegLogDestroy()``, ``PetscClassRegLogGetClass()``, and ``PetscClassRegLogRegister()`` -- Deprecate ``PetscEventPerfInfoClear()`` and ``PetscEventPerfInfoCopy()`` -- Deprecate ``PetscEventPerfLogActivate()``, ``PetscEventPerfLogActivateClass()``, ``PetscEventPerfLogCreate()``, ``PetscEventPerfLogDeactivate()``, ``PetscEventPerfLogDeactivateClass()``, ``PetscEventPerfLogDeactivatePop()``, ``PetscEventPerfLogDeactivatePush()``, ``PetscEventPerfLogDestroy()``, ``PetscEventPerfLogEnsureSize()``, ``PetscEventPerfLogGetVisible()``, and ``PetscEventPerfLogSetVisible()`` -- Deprecate ``PetscEventRegLogCreate()``, ``PetscEventRegLogDestroy()``, ``PetscEventRegLogGetEvent()``, and ``PetscEventRegLogRegister()`` -- Deprecate ``PetscStageLogCreate()``, ``PetscStageLogDestroy()``, ``PetscStageLogGetActive()``, ``PetscStageLogGetClassPerfLog()``, ``PetscStageLogGetClassRegLog()``, ``PetscStageLogGetEventRegLog()``, ``PetscStageLogGetStage()``, ``PetscStageLogGetVisible()``, ``PetscStageLogPop()``, ``PetscStageLogPush()``, ``PetscStageLogRegister()``, ``PetscStageLogSetActive()``, ``PetscStageLogSetVisible()``, ``PetscStageLogGetCurrent()``, and ``PetscStageLogGetEventPerfLog()`` -- Deprecate ``PetscLogGetStageLog()`` -- Deprecate ``PetscLogPushCurrentEvent_Internal()`` -- Deprecate ``PetscLogPopCurrentEvent_Internal()`` -- Deprecate ``PetscLogAllBegin()`` -- Deprecate ``PetscLogSet()`` -- Add ``PetscLogHandlerGetEventPerfInfo()`` -- Add ``PetscLogHandlerSetLogActions()`` -- Add ``PetscLogHandlerSetLogObjects()`` -- Add ``PetscLogHandlerLogObjectState()`` -- Add ``PetscLogHandlerGetNumObjects()`` -- Add ``PetscLogHandlerEventDeactivatePush()`` -- Add ``PetscLogHandlerEventDeactivatePop()`` -- Add ``PetscLogHandlerEventsPause()`` -- Add ``PetscLogHandlerEventsResume()`` -- Add ``PetscLogHandlerDump()`` -- Add ``PetscLogHandlerStageSetVisible()`` -- Add ``PetscLogHandlerStageGetVisible()`` -- Add ``PetscLogHandlerGetStagePerfInfo()`` -- Add ``PetscLogStageGetPerfInfo()`` - .. rubric:: PetscViewer: -- Add ``PetscViewerASCIIOpenWithFileUnit()`` and ``PetscViewerASCIISetFileUnit()`` - .. rubric:: PetscDraw: .. rubric:: AO: @@ -101,140 +31,38 @@ Changes: Development .. rubric:: Vec: -- Add ``VecErrorWeightedNorms()`` to unify weighted local truncation error norms used in ``TS`` -- Add CUDA/HIP implementations for ``VecAbs()``, ``VecSqrt()``, ``VecExp()``, ``VecLog()``, ``VecPointwiseMax()``, ``VecPointwiseMaxAbs()``, and ``VecPointwiseMin()`` -- Add ``VecMAXPBY()`` -- Deprecate ``VecChop()`` in favor of ``VecFilter()`` -- Add ``VecCreateFromOptions()`` - .. rubric:: PetscSection: -- Add ``PetscSectionResetClosurePermutation()`` - .. rubric:: PetscPartitioner: .. rubric:: Mat: -- Add ``MatCreateDenseFromVecType()`` -- Add support for calling ``MatDuplicate()`` on a matrix preallocated via ``MatSetPreallocationCOO()``, and then ``MatSetValuesCOO()`` on the new matrix -- Remove ``MATSOLVERSPARSEELEMENTAL`` since it is no longer functional -- Add ``MATSELLCUDA``. It supports fast ``MatMult()``, ``MatMultTranspose()``, and ``MatMultAdd()`` on GPUs -- Add support for ``MAT_FACTOR_LU`` and ``MAT_FACTOR_CHOLESKY`` with ``MATSOLVERMUMPS`` for ``MATNEST`` -- ``MatGetFactor()`` can now return ``NULL`` for some combinations of matrices and solvers types. This is to support those combinations that can only be inspected at runtime (i.e. MatNest with AIJ blocks vs MatNest with SHELL blocks) -- Remove ``MatSetValuesDevice()``, ``MatCUSPARSEGetDeviceMatWrite()``, ``MatKokkosGetDeviceMatWrite`` -- Add ``MatDenseCUDASetPreallocation()`` and ``MatDenseHIPSetPreallocation()`` -- Add support for KOKKOS in ``MATH2OPUS`` -- Add ``-pc_precision single`` option for use with ``MATSOLVERSUPERLU_DIST`` -- Add ``MATDIAGONAL`` which can be created with ``MatCreateDiagonal()`` -- Add ``MatDiagonalGetDiagonal()``, ``MatDiagonalRestoreDiagonal()``, ``MatDiagonalGetInverseDiagonal()``, and ``MatDiagonalRestoreInverseDiagonal()`` -- Add support for ``MatLoad()`` and ``MatView()`` to load and store ``MATMPIAIJ`` matrices that have more than ``PETSC_INT_MAX`` nonzeros, so long as each rank has fewer than ``PETSC_INT_MAX`` -- Add ``MatLRCSetMats()`` and register creation routine for ``MatLRC`` -- Add CUDA/HIP implementation for ``MatGetDiagonal()`` -- Add a Boolean parameter to ``MatEliminateZeros()`` to force the removal of zero diagonal coefficients -- Expose ``MatComputeVariableBlockEnvelope()`` in public headers -- Add ``MatEliminateZeros()`` implementations for ``MatBAIJ`` and ``MatSBAIJ`` -- Deprecate ``MatChop()`` in favor of ``MatFilter()``, with two additional Boolean parameters to compress the underlying storage and keep or discard near-zero diagonal coefficients -- Add ``MatCreateFromOptions()`` -- Add ``MatSTRUMPACKGetReordering()``, ``MatSTRUMPACKSetGeometricNxyz()``, ``MatSTRUMPACKSetGeometricComponents()``, ``MatSTRUMPACKSetGeometricWidth()``, ``MatSTRUMPACKGetColPerm()``, ``MatSTRUMPACKSetGPU()``, ``MatSTRUMPACKGetGPU()``, ``MatSTRUMPACKSetCompression()``, ``MatSTRUMPACKGetCompression()``, ``MatSTRUMPACKSetCompRelTol()``, ``MatSTRUMPACKGetCompRelTol()``, ``MatSTRUMPACKSetCompAbsTol()``, ``MatSTRUMPACKGetCompAbsTol()``, ``MatSTRUMPACKSetCompMinSepSize()``, ``MatSTRUMPACKGetCompMinSepSize()``, ``MatSTRUMPACKSetCompLeafSize()``, ``MatSTRUMPACKGetCompLeafSize()``, ``MatSTRUMPACKSetCompLossyPrecision()``, ``MatSTRUMPACKGetCompLossyPrecision()``, ``MatSTRUMPACKSetCompButterflyLevels()``, ``MatSTRUMPACKGetCompButterflyLevels()`` -- Add ``MAT_STRUMPACK_GEOMETRIC``, ``MAT_STRUMPACK_AMD``, ``MAT_STRUMPACK_MMD``, ``MAT_STRUMPACK_AND``, ``MAT_STRUMPACK_MLF``, ``MAT_STRUMPACK_SPECTRAL`` to ``MatSTRUMPACKReordering`` -- Add ``MatSTRUMPACKCompressionType`` -- Remove ``MatSTRUMPACKSetHSSLeafSize()``, ``MatSTRUMPACKSetHSSMaxRank()``, ``MatSTRUMPACKSetHSSMinSize()``, ``MatSTRUMPACKSetHSSMinSepSize()``, ``MatSTRUMPACKSetHSSAbsTol()``, ``MatSTRUMPACKSetHSSRelCompTol()``, ``MatSTRUMPACKSetHSSRelTol()`` - .. rubric:: MatCoarsen: .. rubric:: PC: -- Add ``PCMatGetApplyOperation()`` and ``PCMatSetApplyOperation()`` -- Add ``PCReduceFailedReason()`` -- Add ``PCSetKSPNestLevel()`` and ``PCSetKSPNestLevel()`` -- Refactor ``PCMPI`` to be a private system used automatically when ``-mpi_linear_solver_server`` is used. The ``KSP`` and ``PC`` objects that solve the system now inherit any prefix provided - initially with ``KSPSetPrefix()`` and do not require the previously required ``mpi_`` prefix -- Add option ``-fieldsplit_1_pc_hpddm_schur_precondition`` to use ``PCHPDDM`` on the Schur complements from ``PCFIELDSPLIT`` -- Add ``PCGAMGSetAggressiveSquareGraph()`` to use square graph method for aggressive coarsening that was the previous default coarsening approach before release 3.19 -- Add ``PCGAMGSetAggressiveMISk()`` to set the number of levels (k) of aggressive MIS-k coarseing (2 is very common) -- Add ``PCGAMGSetMinDegreeOrderingMISk()`` to use a minimum degree ordering for the (greedy) MIS-k algorithm -- Change ``PCGAMGSetUseParallelCoarseGridSolve()`` to ``PCGAMGSetParallelCoarseGridSolve()`` -- Add ``PCGAMGSetRecomputeEstEig()`` to set flag to have Chebyshev recompute its eigen estimates (default set to true) - .. rubric:: KSP: -- Add ``KSPSetMinimumIterations()`` and ``KSPGetMinimumIterations()`` -- Add ``KSPSetNestLevel()`` and ``KSPGetNestLevel()`` -- Support ``KSPSetInitialGuessNonzero()`` with ``KSPPREONLY`` and ``PCDISTRIBUTE`` when it is called on both the outer and inner ``KSP`` - .. rubric:: SNES: -- Add a convenient, developer-level ``SNESConverged()`` function that runs the convergence test and updates the internal converged reason -- Swap the order of monitor and convergence test. Now monitors are always called after a convergence test -- Deprecate option ``-snes_ms_norms`` in favor of ``-snes_norm_schedule always`` - .. rubric:: SNESLineSearch: .. rubric:: TS: -- Remove ``TSErrorWeightedNormInfinity()``, ``TSErrorWeightedNorm2()``, ``TSErrorWeightedENormInfinity()``, ``TSErrorWeightedENorm2()`` since the same functionality can be obtained with ``VecErrorWeightedNorms()`` -- Add support for time-dependent solvers with varying solution size using ``TSSetResize()`` -- Add support for Diagonally Implicit Runge-Kutta methods with the new ``TSDIRK`` type - .. rubric:: TAO: -- Add ``TaoADMMGetRegularizerCoefficient()`` -- Add ``TAOBNCG``, ``TaoBNCGGetType()`` and ``TaoBNCGSetType()`` - .. rubric:: DM/DA: -- Add support for ``DMDAGetElements()`` for Fortran -- Add support for clearing named vectors with ``DMClearNamedGlobalVectors()`` and ``DMClearNamedLocalVectors()`` -- Add ``DMPrintCellIndices()`` for debugging -- Add ``DMUseTensorOrder()`` -- Add ``DMCeedCreate()``, ``DMCeedComputeGeometry()``, and ``DMCeedDestroy()`` - .. rubric:: DMSwarm: -- Add scatter mode to ``DMSwarmProjectFields()`` and no longer create vectors -- Promote ``DMSwarmDataFieldGetEntries()``, ``DMSwarmDataFieldRestoreEntries()``, ``DMSwarmDataBucketGetDMSwarmDataFieldByName()``, ``DMSwarmDataBucketGetDMSwarmDataFieldIdByName()``, and ``DMSwarmDataBucketQueryDMSwarmDataFieldByName()`` to public interface - .. rubric:: DMPlex: -- Add ``DMPlexTransformExtrudeGetPeriodic()`` and ``DMPlexTransformExtrudeSetPeriodic()`` -- Replace ``DMPlexGetGhostCellStratum()`` with ``DMPlexGetCellTypeStratum()`` -- Add ``DMPlexSetUseMatClosurePermutation()`` and ``DMPlexGetUseMatClosurePermutation()`` -- Add ``DMPlexGetUseCeed()``, ``DMPlexSetUseCeed()``, and ``DMPlexSNESComputeResidualCEED()`` -- Add ``DMPlexSNESComputeResidualDS()`` - .. rubric:: FE/FV: -- Add ``PLEXFE_QFUNCTION`` macro to create CEED QFunctions from Plex pointwise functions - .. rubric:: DMNetwork: -- Add ``DMNetworkViewSetShowRanks()``, ``DMNetworkViewSetViewRanks()``, ``DMNetworkViewSetShowGlobal()``, ``DMNetworkViewSetShowVertices()``, ``DMNetworkViewSetShowNumbering()`` - -- Add ``-dmnetwork_view_all_ranks`` ``-dmnetwork_view_rank_range`` ``-dmnetwork_view_no_vertices`` ``-dmnetwork_view_no_numbering`` for viewing DMNetworks with the Matplotlib viewer - -- Add ``-dmnetwork_view_zoomin_vertices`` ``-dmnetwork_view_zoomin_vertices_padding`` for viewing DMNetworks with the Matplotlib viewer - .. rubric:: DMStag: .. rubric:: DT: -- Add ``PETSCFEVECTOR`` for making a finite element that is a vector of copies of another finite element -- Add ``PetscFECreateVector()`` -- Add ``PETSCDUALSPACESUM`` for a finite element dual basis that is the sum of other dual bases -- Add ``PetscDualSpaceCreateSum()`` -- Add ``PetscDualSpaceSumSetNumSubspaces()`` -- Add ``PetscDualSpaceSumGetNumSubspaces()`` -- Add ``PetscDualSpaceSumSetSubspace()`` -- Add ``PetscDualSpaceSumGetSubspace()`` -- Add ``PetscDualSpaceSumSetConcatenate()`` -- Add ``PetscDualSpaceSumGetConcatenate()`` -- Add ``PetscDualSpaceSumSetInterleave()`` -- Add ``PetscDualSpaceSumGetInterleave()`` -- Add ``PetscSpaceSumSetInterleave()`` -- Add ``PetscSpaceSumGetInterleave()`` -- Add ``PetscDualSpaceGetInteriorSection()`` - .. rubric:: Fortran: - -- Add ``PetscCheck()`` and ``PetscCheckA()`` for Fortran -- Change ``PETSC_HAVE_FORTRAN`` to ``PETSC_USE_FORTRAN_BINDINGS`` to indicate if PETSc is built with Fortran bindings diff --git a/doc/changes/index.rst b/doc/changes/index.rst index 4253dfb7a56..072d798c2ac 100644 --- a/doc/changes/index.rst +++ b/doc/changes/index.rst @@ -24,6 +24,7 @@ editor. :maxdepth: 1 main - PETSc development version + 3.20 - Public Release, Sep 28, 2023 <320> 3.19 - Public Release, Mar 30, 2023 <319> 3.18 - Public Release, Sep 30, 2022 <318> 3.17 - Public Release, Mar 30, 2022 <317> diff --git a/doc/developers/documentation.rst b/doc/developers/documentation.rst index 82a973d4cc0..aa53035ea44 100644 --- a/doc/developers/documentation.rst +++ b/doc/developers/documentation.rst @@ -247,8 +247,8 @@ Building Classic Documentation Some of the documentation is built by a "classic" process as described below using the documentation tools listed below, which are automatically downloaded and installed if needed while building the PETSc documentation./ -* `Sowing `__: Developed by Bill Gropp, this produces the PETSc manual pages; see the `Sowing documentation `__ and :ref:`manual_page_format`. -* `C2html `__: This generates the HTML versions of all the source code. +* `Sowing `__: Developed by Bill Gropp, this produces the PETSc manual pages; see the `Sowing documentation `__ and :ref:`manual_page_format`. +* `C2html `__: This generates the HTML versions of all the source code. Sowing and C2html are build tools that do not use the compilers specified to PETSc's ``configure``, as they need to work in cross-compilation environments. Thus, they default to using ``gcc``, ``g++``, and ``flex`` from diff --git a/doc/install/download.rst b/doc/install/download.rst index 9c18475727c..102c0206ed4 100644 --- a/doc/install/download.rst +++ b/doc/install/download.rst @@ -31,16 +31,16 @@ Alternative: Obtain Release Version with Tarball Tarball which contains only the source. Documentation available `online `__. -- `petsc-3.19.5.tar.gz `__ +- `petsc-3.20.0.tar.gz `__ Tarball which includes all documentation, recommended for offline use. -- `petsc-with-docs-3.19.5.tar.gz `__ +- `petsc-with-docs-3.20.0.tar.gz `__ Tarball to enable a separate installation of petsc4py. -- `petsc4py-3.19.5.tar.gz `__ +- `petsc4py-3.20.0.tar.gz `__ To extract the sources use: @@ -50,9 +50,7 @@ To extract the sources use: Current and older release tarballs are available at: -- `Primary server `__ - -- `Mirror `__ +- `Primary server `__ .. Note:: diff --git a/doc/install/install.rst b/doc/install/install.rst index 2e6e82add1f..2d3628160e6 100644 --- a/doc/install/install.rst +++ b/doc/install/install.rst @@ -567,10 +567,10 @@ configure time. For example: .. code-block:: console - $ ./configure --prefix=/opt/petsc/petsc-3.19.0-mpich --with-mpi-dir=/opt/mpich + $ ./configure --prefix=/opt/petsc/petsc-3.20.0-mpich --with-mpi-dir=/opt/mpich $ make $ make install [DESTDIR=/tmp/petsc-pkg] - $ ./configure --prefix=/opt/petsc/petsc-3.19.0-openmpi --with-mpi-dir=/opt/openmpi + $ ./configure --prefix=/opt/petsc/petsc-3.20.0-openmpi --with-mpi-dir=/opt/openmpi $ make $ make install [DESTDIR=/tmp/petsc-pkg] diff --git a/doc/manual/ksp.rst b/doc/manual/ksp.rst index d66f57d1f00..da0b5067b30 100644 --- a/doc/manual/ksp.rst +++ b/doc/manual/ksp.rst @@ -1027,7 +1027,7 @@ the options database ``-pc_gasm_type`` ``[basic``, ``interpolate``, Unlike ``PCASM``, however, ``PCGASM`` allows the user to define subdomains that span multiple MPI ranks. The simplest way to do this is -using a call to ``PCGASMSetTotalSubdomains(PC pc,PetscPetscInt N)`` with +using a call to ``PCGASMSetTotalSubdomains(PC pc,PetscInt N)`` with the total number of subdomains ``N`` that is smaller than the MPI communicator ``size``. In this case ``PCGASM`` will coalesce ``size/N`` consecutive single-rank subdomains into a single multi-rank subdomain. @@ -1271,12 +1271,12 @@ and are using a modest number of point smoothing steps (e.g., 1-4 iterations of SOR), then you may be fairly close to textbook multigrid efficiency. Although you also need to check the setup costs. This can be determined by running with ``-log_view`` and check that the time for the -Galerkin coarse grid construction (``MatPtAP``) is not (much) more than -the time spent in each solve (``KSPSolve``). If the ``MatPtAP`` time is +Galerkin coarse grid construction (``MatPtAP()``) is not (much) more than +the time spent in each solve (``KSPSolve()``). If the ``MatPtAP()`` time is too large then one can increase the coarsening rate by decreasing the threshold and using aggressive coarsening (``-pc_gamg_aggressive_coarsening ``, squares the graph on the finest N -levels). Likewise if your ``MatPtAP`` time is small and your convergence +levels). Likewise if your ``MatPtAP()`` time is small and your convergence rate is not ideal then you could decrease the coarsening rate. PETSc’s AMG solver is constructed as a framework for developers to @@ -1284,8 +1284,8 @@ easily add AMG capabilities, like a new AMG methods or an AMG component like a matrix triple product. Contact us directly if you are interested in contributing. -It is possible but not recommended to use algebraic multigrid as a "standalone" solver, that is not accelerating it with a Krylov method. Use a `KSPType` of `KSPRICHARDSON` -(or equivalently `-ksp_type richardson`) to achieve this. Using `KSPPREONLY` will not work since it only applies a single cycle of multigrid. +It is possible but not recommended to use algebraic multigrid as a "standalone" solver, that is not accelerating it with a Krylov method. Use a ``KSPType`` of ``KSPRICHARDSON`` +(or equivalently `-ksp_type richardson`) to achieve this. Using ``KSPPREONLY`` will not work since it only applies a single cycle of multigrid. Adaptive Interpolation `````````````````````` @@ -1406,9 +1406,9 @@ This indicates that the generalized eigenvector associated with that eigenvalue Balancing Domain Decomposition by Constraints ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -PETSc provides the Balancing Domain Decomposition by Constraints (BDDC) +PETSc provides the Balancing Domain Decomposition by Constraints (``PCBDDC``) method for preconditioning parallel finite element problems stored in -unassembled format (see ``MATIS``). BDDC is a 2-level non-overlapping +unassembled format (see ``MATIS``). ``PCBDDC`` is a 2-level non-overlapping domain decomposition method which can be easily adapted to different problems and discretizations by means of few user customizations. The application of the preconditioner to a vector consists in the static @@ -1476,7 +1476,7 @@ elements, a user defined change of basis of the degrees of freedom can be beneficial for ``PCBDDC``; use ``PCBDDCSetChangeOfBasisMat()`` to customize the change of basis. -The BDDC method is usually robust with respect to jumps in the material +The ``PCBDDC`` method is usually robust with respect to jumps in the material parameters aligned with the interface; for PDEs with more than one material parameter you may also consider to use the so-called deluxe scaling, available via the command line switch @@ -1484,7 +1484,7 @@ scaling, available via the command line switch ``PCISSetSubdomainScalingFactor()``, ``PCISSetSubdomainDiagonalScaling()`` or ``PCISSetUseStiffnessScaling()``. However, the convergence properties of -the BDDC method degrades in presence of large jumps in the material +the `PCBDDC`` method degrades in presence of large jumps in the material coefficients not aligned with the interface; for such cases, PETSc has the capability of adaptively computing the primal constraints. Adaptive selection of constraints could be requested by specifying a threshold @@ -1495,13 +1495,13 @@ values corresponding to more robust preconditioners. For SPD problems in Raviart-Thomas or Brezzi-Douglas-Marini elements), such a threshold is a very accurate estimator of the condition number of the resulting preconditioned operator. Since the adaptive selection of constraints for -BDDC methods is still an active topic of research, its implementation is +`PCBDDC`` methods is still an active topic of research, its implementation is currently limited to SPD problems; moreover, because the technique requires the explicit knowledge of the local Schur complements, it needs the external package MUMPS. When solving problems decomposed in thousands of subdomains or more, the -solution of the BDDC coarse problem could become a bottleneck; in order +solution of the ``PCBDDC`` coarse problem could become a bottleneck; in order to overcome this issue, the user could either consider to solve the parallel coarse problem on a subset of the communicator associated with ``PCBDDC`` by using the command line switch @@ -1897,7 +1897,7 @@ matrices can also be stored using the ``MATNEST`` format which holds separate assembled blocks. Each of these nested matrices is itself distributed in parallel. It is more efficient to use ``MATNEST`` with the methods described in this section because there are fewer copies and -better formats (e.g. ``BAIJ`` or ``SBAIJ``) can be used for the +better formats (e.g. ``MATBAIJ`` or ``MATSBAIJ``) can be used for the components, but it is not possible to use many other methods with ``MATNEST``. See :any:`sec_matnest` for more on assembling block matrices without depending on a specific matrix format. @@ -2032,7 +2032,7 @@ and not out of ``Amat`` (i.e., :math:`A` itself). As discussed above in :any:`sec_combining-pcs`, however, it is possible to use ``Amat`` instead of ``Pmat`` by calling ``PCSetUseAmat(pc)`` or using ``-pc_use_amat`` on the command line. -Alternatively, you can have ``PCFieldSplit`` extract the diagonal blocks +Alternatively, you can have ``PCFIELDSPLIT`` extract the diagonal blocks :math:`A_{00}, A_{11}` etc. out of ``Amat`` by calling ``PCFieldSplitSetDiagUseAmat(pc,PETSC_TRUE)`` or supplying command-line argument ``-pc_fieldsplit_diag_use_amat``. Similarly, @@ -2160,7 +2160,7 @@ The effectiveness of the Schur complement preconditioner depends on the availability of a good preconditioner :math:`\hat Sp` for the Schur complement matrix. In general, you are responsible for supplying :math:`\hat Sp` via -``PCFieldSplitSchurPrecondition(pc,PC_FIELDSPLIT_SCHUR_PRE_USER,Sp)``. +``PCFieldSplitSetSchurPre(pc,PC_FIELDSPLIT_SCHUR_PRE_USER,Sp)``. In the absence of a good problem-specific :math:`\hat Sp`, you can use some of the built-in options. @@ -2437,7 +2437,7 @@ One can also create matrices with the appropriate capabilities by calling ``MatCreate()`` followed by ``MatSetType()`` specifying the desired matrix type from :any:`tab-externaloptions`. These matrix types inherit capabilities from their PETSc matrix parents: -``seqaij``, ``mpiaij``, etc. As a result, the preallocation routines +``MATSEQAIJ``, ``MATMPIAIJ``, etc. As a result, the preallocation routines ``MatSeqAIJSetPreallocation()``, ``MatMPIAIJSetPreallocation()``, etc. and any other type specific routines of the base class are supported. One can also call ``MatConvert()`` inplace to convert the matrix to and @@ -2463,7 +2463,7 @@ Using PETSc's MPI parallel linear solvers from a non-MPI program Using PETSc's MPI linear solver server it is possible to use multiple MPI processes to solve a a linear system when the application code, including the matrix generation, is run on a single MPI rank (with or without OpenMP). The application code must be built with MPI and must call -``PetscIntialize()`` at the very beginning of the program and end with ``PetscFinalize()``. The +``PetscInitialize()`` at the very beginning of the program and end with ``PetscFinalize()``. The application code may utilize OpenMP. The code may create multiple matrices and `KSP` objects and call `KSPSolve()`, similarly the code may utilize the `SNES` nonlinear solvers, the `TS` ODE integrators, and the `TAO` optimization algorithms diff --git a/doc/manual/profiling.rst b/doc/manual/profiling.rst index 7dbe2ba3a36..0c1c05d2b85 100755 --- a/doc/manual/profiling.rst +++ b/doc/manual/profiling.rst @@ -676,29 +676,45 @@ time for PETSc programs that use these macros. NVIDIA Nsight Systems profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a CUDA executable is preceeded by -``nsys profile -f true -o filename``, the default event profiling will add annotations to the -Nsight Systems data that can help the navigation of ``file-name`` with the Nsight Systems GUI +Nsight Systems will generate profiling data with a CUDA executable +with the command ``nsys``. +For example, in serial + +.. code-block:: bash + + nsys profile -t nvtx,cuda -o file --stats=true --force-overwrite true ./a.out + +will generate a file ``file.qdstrm`` with performance data that is +annotated with PETSc events (methods) and Kokkos device kernel names. +The Nsight Systems GUI, ``nsys-ui``, can be used to navigate this file (https://developer.nvidia.com/nsight-systems). The Nsight Systems GUI lets you see a timeline of code performance information like kernels, -mallocs, CPU-GPU communication, and high-level data like register -usage in a kernel, among other things in a popup window when the mouse -hovers over the section. The PETSc events are automatically also -displayed in Nsight if the option -log_view is also used. +memory mallocs and frees, CPU-GPU communication, and high-level data like time, sizes +of memory copies, and more, in a popup window when the mouse +hovers over the section. +To view the data, start ``nsys-ui`` without any arguments and then ``Import`` the +``.qdstrm`` file in the GUI. +A side effect of this viewing process is the generation of a file ``file.nsys-rep``, which can be viewed directly +with ``nsys-ui`` in the future. + +For an MPI parallel job, only one process can call ``nsys``, +say have rank zero output ``nsys`` data and have all other +ranks call the executable directly. For example with MPICH +or OpenMPI - we can run a parallel job on 4 MPI tasks as: -For and MPI parallel job, only one process can call ``nsys``. -For example one can in a bash script use something like: - -.. code-block:: bash +.. code-block:: console - if [ "$OMPI_COMM_WORLD_RANK" == "0" ]; then - nsys profile -f true -o output "$@" - else - "$@" - fi + mpiexec -n 1 nsys profile -t nvtx,cuda -o file_name --stats=true --force-overwrite true ./a.out : -n 3 ./a.out .. _sec_using_tau: +Note: The Nsight GUI can open profiling reports from elsewhere. For +example, a report from a compute node can be analyzed on your local +machine, but care should be taken to use the exact same versions of +Nsight Systems that generated the report. +To check the version of Nsight on the compute node run ``nsys-ui`` and +note the version number at the top of the window. + Using TAU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/miscellaneous/applications_publications.rst b/doc/miscellaneous/applications_publications.rst index da164cba1ef..1aa0486b5b7 100644 --- a/doc/miscellaneous/applications_publications.rst +++ b/doc/miscellaneous/applications_publications.rst @@ -83,9 +83,9 @@ components. discussed at http://mdolab.engin.umich.edu * `Fast deformation - `__ and + `__ and `slower deformation - `__ + `__ from the code LaMEM developed by Boris Kaus, Johannes Gutenberg University of Mainz, Mainz, Germany. diff --git a/doc/overview/index.rst b/doc/overview/index.rst index 211bbd8fc17..c0263a28a1d 100644 --- a/doc/overview/index.rst +++ b/doc/overview/index.rst @@ -25,3 +25,4 @@ managing parallel PDE discretizations including parallel matrix and vector assem ../manualpages/index ../changes/index ../manualpages/singleindex + previous_release_docs diff --git a/doc/overview/previous_release_docs.rst b/doc/overview/previous_release_docs.rst new file mode 100644 index 00000000000..b9e5d7252c2 --- /dev/null +++ b/doc/overview/previous_release_docs.rst @@ -0,0 +1,26 @@ + +========================================= +Documentation for previous PETSc releases +========================================= + +.. toctree:: + :maxdepth: 1 + + 3.19 + 3.18 + 3.17 + 3.16 + 3.15 + 3.14 + 3.13 + 3.12 + 3.11 + 3.10 + 3.9 + 3.8 + 3.7 + 3.6 + 3.5 + 3.4 + 3.3 + diff --git a/doc/petsc.bib b/doc/petsc.bib index e3d6617473a..95125ff731b 100644 --- a/doc/petsc.bib +++ b/doc/petsc.bib @@ -7853,7 +7853,7 @@ @TechReport{ petsc-user-ref Zhang}, title = {{PETSc/TAO} Users Manual}, institution = {Argonne National Laboratory}, - number = {ANL-21/39 - Revision 3.19}, + number = {ANL-21/39 - Revision 3.20}, doi = {10.2172/1968587}, year = {2023} } @@ -20213,12 +20213,12 @@ @Article{ nemirovsky1991 year = {1991} } -@Misc{ siamcseprize, - title = {{SIAM/ACM} {P}rize in {C}omputational {S}cience and {E}ngineering}, - key = {{SIAM/ACM} {P}rize in {C}omputational {S}cience and {E}ngineering}, - url = {https://www.siam.org/prizes/sponsored/cse.php}, - howpublished = {\url{https://www.siam.org/prizes/sponsored/cse.php}}, - year = {2015} +@Misc{siamcseprize, + author = {{PETSc Team}}, + title = {{SIAM/ACM} {P}rize in {C}omputational {S}cience and {E}ngineering}, + key = {{SIAM/ACM} {P}rize in {C}omputational {S}cience and {E}ngineering}, + url = {https://www.siam.org/prizes/sponsored/cse.php}, + year = {2015} } @Article{ rathgeber2017, @@ -21771,7 +21771,7 @@ @InBook{ koppen2002 } @PhDThesis{ bryant2008, - title = {Analysis of {Kolmogorov's} superpostion theorem and its implementation in + title = {Analysis of {Kolmogorov's} superposition theorem and its implementation in applications with low and high dimensional data}, author = {Donald W Bryant}, school = {University of Central Florida}, @@ -34707,7 +34707,7 @@ @InProceedings{ reckwerdt.mackie.ea:three-dimensional @Article{ reid:sparsity-exploiting, author = {J. K. Reid}, - title = {A Sparsity-Exploiting Variant of the {B}artels-{G}olub Decompostion for Linear + title = {A Sparsity-Exploiting Variant of the {B}artels-{G}olub Decomposition for Linear Programming Bases}, journal = {Mathematical Programming}, year = {1982}, @@ -38057,3 +38057,80 @@ @PhDThesis{ nathawanithesis2023 month = may, year = {2023} } + +@article{MckayEriksonKozdon2019, + title = {A computational method for earthquake cycles within anisotropic media}, + author = {Maricela Best Mckay and Brittany A Erickson and Jeremy E Kozdon}, + journal = {Geophysical Journal International}, + volume = {219}, + number = {2}, + pages = {816--833}, + year = {2019}, +} + +article{EricksonOReillyNordstrom2019, + title = {Accuracy of stable, high-order finite difference methods for hyperbolic systems with non-smooth wave speeds}, + author = {Brittany A Erickson and Ossian O’Reilly and Jan Nordstr{\"o}m}, + journal = {Journal of Scientific Computing}, + volume = {81}, + pages = {2356--2387}, + year = {2019}, +} + +@article{KozdonEricksonWilcox2021, + title = {Hybridized summation-by-parts finite difference methods}, + author = {Jeremy E Kozdon and Brittany A Erickson and Lucas C Wilcox}, + journal = {Journal of Scientific Computing}, + volume = {87}, + number = {3}, + pages = {85}, + year = {2021}, +} + +@article{SEAS2022, + title = {Community-driven code comparisons for three-dimensional dynamic modeling of sequences of earthquakes and aseismic slip}, + author = {Junle Jiang and Brittany A Erickson and Val{\`e}re R Lambert and Jean-Paul Ampuero and Ryosuke Ando and Sylvain D Barbot and Camilla Cattania and Luca Dal Zilio and Benchun Duan and Eric M Dunham and Alice-Agnes Gabriel and Nadia Lapusta and Duo Li and Meng Li and Dunyu Liu and Yajing Liu and So Ozawa and Casper Pranger and Ylona van Dinther}, + journal = {Journal of Geophysical Research: Solid Earth}, + volume = {127}, + number = {3}, + pages = {e2021JB023519}, + year = {2022}, +} + +@article{EricksonKozdonHarvey2022, + title = {A non-stiff summation-by-parts finite difference method for the scalar wave equation in second order form: Characteristic boundary conditions and nonlinear interfaces}, + author = {Brittany A Erickson and Jeremy E Kozdon and Tobias Harvey}, + journal = {Journal of Scientific Computing}, + volume = {93}, + number = {1}, + pages = {17}, + year = {2022}, +} + +@article{RuckerEriksonKarlstromLeeGopalakrishnan2022, + title = {A Computational Framework for Time-Dependent Deformation in Viscoelastic Magmatic Systems}, + author = {Cody Rucker and Brittany A Erickson and Leif Karlstrom and Brian Lee and Jay Gopalakrishnan}, + journal = {Journal of Geophysical Research: Solid Earth}, + volume = {127}, + number = {9}, + pages = {e2022JB024506}, + year = {2022}, +} + +@article{HarveyEriksonKozdon2023, + title = {A High-order Accurate Summation-by-Parts Finite Difference Method for Fully-dynamic Earthquake Sequence Simulations within Sedimentary Basins}, + author = {Tobias W Harvey and Brittany A Erickson and Jeremy E Kozdon}, + journal = {Journal of Geophysical Research: Solid Earth}, + pages = {e2022JB025357}, + year = {2023}, +} + +@article{SEAS2023, + title = {Incorporating full elastodynamic effects and dipping fault geometries in community code verification exercises for simulations of earthquake sequences and aseismic slip {(SEAS)}}, + author = {Brittany A Erickson and Junle Jiang and Val{\`e}re Lambert and Sylvain D Barbot and Mohamed Abdelmeguid and Martin Almquist and Jean-Paul Ampuero and Ryosuke Ando and Camilla Cattania and Alexandre Chen and Luca Dal Zilio and Shuai Deng and Eric M. Dunham and Ahmed E. Elbanna and Alice‐Agnes Gabriel and Tobias W. Harvey and Yihe Huang and Yoshihiro Kaneko and Jeremy E. Kozdon and Nadia Lapusta and Duo Li and Meng Li and Chao Liang and Yajing Liu and So Ozawa and Andrea Perez‐Silva and Casper Pranger and Paul Segall and Yudong Sun and Prithvi Thakur and Carsten Uphoff and Ylona van Dinther and Yuyun Yang}, + journal = {Bulletin of the Seismological Society of America}, + volume = {113}, + number = {2}, + pages = {499--523}, + year = {2023}, +} diff --git a/include/petsc/finclude/petscdm.h b/include/petsc/finclude/petscdm.h index f82feb7f0cb..7964c7d9aa1 100644 --- a/include/petsc/finclude/petscdm.h +++ b/include/petsc/finclude/petscdm.h @@ -1,4 +1,3 @@ - ! ! Include file for Fortran use of the DM package in PETSc ! diff --git a/include/petsc/finclude/petscdmda.h b/include/petsc/finclude/petscdmda.h index 093b0b193f6..2a9493f63b5 100644 --- a/include/petsc/finclude/petscdmda.h +++ b/include/petsc/finclude/petscdmda.h @@ -1,4 +1,3 @@ - ! ! Include file for Fortran use of the DMDA (distributed array) package in PETSc ! diff --git a/include/petsc/finclude/petscdmnetwork.h b/include/petsc/finclude/petscdmnetwork.h index f2995b2653e..b5668b5a942 100644 --- a/include/petsc/finclude/petscdmnetwork.h +++ b/include/petsc/finclude/petscdmnetwork.h @@ -1,4 +1,3 @@ - ! ! Include file for Fortran use of the DMNetwork ! diff --git a/include/petsc/mpiuni/mpif.h b/include/petsc/mpiuni/mpif.h index 7bf48873206..b5fb7e6b241 100644 --- a/include/petsc/mpiuni/mpif.h +++ b/include/petsc/mpiuni/mpif.h @@ -94,4 +94,3 @@ MPIUNI_FInt MPI_MAX_PROCESSOR_NAME parameter (MPI_MAX_PROCESSOR_NAME=128-1) - diff --git a/include/petsc/private/cupmatomics.hpp b/include/petsc/private/cupmatomics.hpp index 1f86778018a..864e96c7712 100644 --- a/include/petsc/private/cupmatomics.hpp +++ b/include/petsc/private/cupmatomics.hpp @@ -687,7 +687,7 @@ __device__ static float atomicMax(float *address, float val) #endif #endif -/* As of ROCm 3.10 llint atomicMin/Max(llint*, llint) is not supported */ + #if PETSC_PKG_HIP_VERSION_LT(5, 7, 0) __device__ static llint atomicMin(llint *address, llint val) { ullint *address_as_ull = (ullint *)(address); @@ -709,6 +709,7 @@ __device__ static llint atomicMax(llint *address, llint val) } while (assumed != old); return (llint)old; } + #endif template struct AtomicMin { diff --git a/include/petsc/private/dmnetworkimpl.h b/include/petsc/private/dmnetworkimpl.h index 9fa8dd4eaf8..43e7e57d60c 100644 --- a/include/petsc/private/dmnetworkimpl.h +++ b/include/petsc/private/dmnetworkimpl.h @@ -91,7 +91,7 @@ typedef struct { } DMSubnetwork; /* - Stucture storing default viewing options for the DMNetwork + Structure storing default viewing options for the DMNetwork */ typedef struct { PetscBool showallranks; /* Shows each rank individually as well */ diff --git a/include/petsc/private/logimpl.h b/include/petsc/private/logimpl.h index f25216a5a7b..41752111108 100644 --- a/include/petsc/private/logimpl.h +++ b/include/petsc/private/logimpl.h @@ -204,4 +204,10 @@ PETSC_INTERN PetscInt PetscLogGetTid(void); PETSC_EXTERN PetscBool PetscLogGpuTimeFlag; +#if PetscDefined(USE_LOG) +PETSC_INTERN PetscErrorCode PetscLogTypeBegin(PetscLogHandlerType type); +#else + #define PetscLogTypeBegin(t) ((void)(t), PETSC_SUCCESS) +#endif + #define PETSC_LOG_VIEW_FROM_OPTIONS_MAX 4 diff --git a/include/petsclogtypes.h b/include/petsclogtypes.h index 5cfaefe3661..116aab777d5 100644 --- a/include/petsclogtypes.h +++ b/include/petsclogtypes.h @@ -135,7 +135,8 @@ typedef struct _p_PetscLogHandler *PetscLogHandler; . `PETSCLOGHANDLERTRACE` (`PetscLogTraceBegin()`) - traces profiling events in an output stream . `PETSCLOGHANDLERMPE` (`PetscLogMPEBegin()`) - outputs parallel performance visualization using MPE . `PETSCLOGHANDLERPERFSTUBS` (`PetscLogPerfstubsBegin()`) - outputs instrumentation data for PerfStubs/TAU -- `PETSCLOGHANDLERLEGACY` (`PetscLogLegacyCallbacksBegin()`) - adapts legacy callbacks to the `PetscLogHandler` interface +. `PETSCLOGHANDLERLEGACY` (`PetscLogLegacyCallbacksBegin()`) - adapts legacy callbacks to the `PetscLogHandler` interface +- `PETSCLOGHANDLERNVTX` - creates NVTX ranges for events that are visible in Nsight .seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerSetType()`, `PetscLogHandlerGetType()` J*/ @@ -147,6 +148,7 @@ typedef const char *PetscLogHandlerType; #define PETSCLOGHANDLERMPE "mpe" #define PETSCLOGHANDLERPERFSTUBS "perfstubs" #define PETSCLOGHANDLERLEGACY "legacy" +#define PETSCLOGHANDLERNVTX "nvtx" typedef struct _n_PetscLogRegistry *PetscLogRegistry; diff --git a/include/petscmacros.h b/include/petscmacros.h index d5c48cfa117..938a8b113aa 100644 --- a/include/petscmacros.h +++ b/include/petscmacros.h @@ -390,7 +390,7 @@ M*/ Example Usage: .vb - // may be used in place of '\0' or other such teminators in the definition of char arrays + // may be used in place of '\0' or other such terminators in the definition of char arrays const char *const MyEnumTypes[] = { "foo", "bar", diff --git a/include/petscpctypes.h b/include/petscpctypes.h index 6d714a2c473..538d7192477 100644 --- a/include/petscpctypes.h +++ b/include/petscpctypes.h @@ -313,8 +313,8 @@ typedef enum { Values: + `PCGAMGAGG` - (the default) smoothed aggregation algorithm, robust, very well tested -. `PCGAMGGEO` - geometric coarsening, uses mesh generator to produce coarser meshes, limited to triangles, not supported, referance implementation (2D) -- `PCGAMGCLASSICAL` - classical algebraic multigrid preconditioner, incomplete, not supported, referance implementation +. `PCGAMGGEO` - geometric coarsening, uses mesh generator to produce coarser meshes, limited to triangles, not supported, reference implementation (2D) +- `PCGAMGCLASSICAL` - classical algebraic multigrid preconditioner, incomplete, not supported, reference implementation Level: intermediate diff --git a/include/petscsys.h b/include/petscsys.h index c23c47da3f2..a2d40da9e9f 100644 --- a/include/petscsys.h +++ b/include/petscsys.h @@ -1928,7 +1928,7 @@ static inline PetscErrorCode PetscIntSumError(PetscInt a, PetscInt b, PetscInt * PETSC_VERSION - This manual page provides information about how PETSc documents and uses its version information. This information is available to both C/C++ and Fortran compilers when `petscsys.h` is included. - The current PETSc version and the API for accessing it are defined in include/petscverson.html + The current PETSc version and the API for accessing it are defined in include/petscversion.html The complete version number is given as the triple PETSC_VERSION_MAJOR.PETSC_VERSION_MINOR.PETSC_VERSION_SUBMINOR (in short hand x.y.z) diff --git a/include/petscversion.h b/include/petscversion.h index dae3d32efe5..82dd827ecaa 100644 --- a/include/petscversion.h +++ b/include/petscversion.h @@ -4,9 +4,9 @@ #define PETSC_VERSION_RELEASE 0 #define PETSC_VERSION_MAJOR 3 -#define PETSC_VERSION_MINOR 19 -#define PETSC_VERSION_SUBMINOR 5 -#define PETSC_RELEASE_DATE "Mar 30, 2023" +#define PETSC_VERSION_MINOR 20 +#define PETSC_VERSION_SUBMINOR 0 +#define PETSC_RELEASE_DATE "Sep 28, 2023" #define PETSC_VERSION_DATE "unknown" #if !defined(PETSC_VERSION_GIT) diff --git a/lib/petsc/bin/maint/rebuildtar b/lib/petsc/bin/maint/rebuildtar index 164d0041a61..61e59e517cf 100755 --- a/lib/petsc/bin/maint/rebuildtar +++ b/lib/petsc/bin/maint/rebuildtar @@ -20,14 +20,14 @@ RELEASE=${version_major}.${version_minor} VERSION=${version_major}.${version_minor}.${version_subminor} #Now copy the generated tarfiles over to the website -scp ~/petsc-${VERSION}.tar.gz petsc@login.mcs.anl.gov:/mcs/ftp/pub/petsc/release-snapshots/ -scp ~/petsc4py-${VERSION}.tar.gz petsc@login.mcs.anl.gov:/mcs/ftp/pub/petsc/release-snapshots/ -scp ~/petsc-with-docs-${VERSION}.tar.gz petsc@login.mcs.anl.gov:/mcs/ftp/pub/petsc/release-snapshots/ -ssh petsc@login.mcs.anl.gov "cd /mcs/ftp/pub/petsc/release-snapshots; ln -s petsc-${VERSION}.tar.gz petsc-lite-${VERSION}.tar.gz" +scp ~/petsc-${VERSION}.tar.gz svcpetsc@compute-01.cels.anl.gov:/nfs/pub_html/gce/projects/petsc/download/release-snapshots/ +scp ~/petsc4py-${VERSION}.tar.gz svcpetsc@compute-01.cels.anl.gov:/nfs/pub_html/gce/projects/petsc/download/release-snapshots/ +scp ~/petsc-with-docs-${VERSION}.tar.gz svcpetsc@compute-01.cels.anl.gov:/nfs/pub_html/gce/projects/petsc/download/release-snapshots/ +ssh svcpetsc@compute-01.cels.anl.gov "cd /nfs/pub_html/gce/projects/petsc/download/release-snapshots; ln -s petsc-${VERSION}.tar.gz petsc-lite-${VERSION}.tar.gz" # petsc.tar.gz/petsc-lite.tar.gz links are done manually -ssh petsc@login.mcs.anl.gov " \ - cd /mcs/ftp/pub/petsc/release-snapshots; \ +ssh svcpetsc@compute-01.cels.anl.gov " \ + cd /nfs/pub_html/gce/projects/petsc/download/release-snapshots; \ /bin/rm -f petsc-${RELEASE}.tar.gz petsc-lite-${RELEASE}.tar.gz petsc-with-docs-${RELEASE}.tar.gz petsc4py-${RELEASE}.tar.gz ; \ /bin/ln -s petsc-${VERSION}.tar.gz petsc-${RELEASE}.tar.gz; \ /bin/ln -s petsc4py-${VERSION}.tar.gz petsc4py-${RELEASE}.tar.gz; \ diff --git a/lib/petsc/bin/maint/testharness_util.py b/lib/petsc/bin/maint/testharness_util.py index 6945f7f9743..019d62e6779 100755 --- a/lib/petsc/bin/maint/testharness_util.py +++ b/lib/petsc/bin/maint/testharness_util.py @@ -74,7 +74,7 @@ def walktree(top, action, datafilespath=None): if action == 'print_datafiles': print('\n'.join(alldatafiles)) if action == 'gen_dl_path': - ftproot='http://ftp.mcs.anl.gov/pub/petsc/Datafiles/' + ftproot='https://web.cels.anl.gov/projects/petsc/download/Datafiles/' for dfile in alldatafiles: fulldfile=os.path.join(datafilespath,dfile) if not os.path.exists(fulldfile): diff --git a/lib/petsc/bin/maint/toclapack.sh b/lib/petsc/bin/maint/toclapack.sh index 2e93196a615..79999579d53 100755 --- a/lib/petsc/bin/maint/toclapack.sh +++ b/lib/petsc/bin/maint/toclapack.sh @@ -126,7 +126,7 @@ echo ' ######################################################################################## # f2cblaslapack: BLAS/LAPACK in C for being linked with PETSc. # Created by $PETSC_DIR/lib/petsc/bin/maint/petsc/toclapack.sh script -# You may obtain PETSc at http://www.mcs.anl.gov/petsc +# You may obtain PETSc at https://petsc.org ######################################################################################## ALL: blas_lib lapack_lib diff --git a/lib/petsc/conf/rules.utils b/lib/petsc/conf/rules.utils index d407181ea5f..c3a1a10bfb6 100644 --- a/lib/petsc/conf/rules.utils +++ b/lib/petsc/conf/rules.utils @@ -129,7 +129,9 @@ checkbadSource: -@git --no-pager grep -n -P '^[ ]*(suffix|output_file|nsize|requires|args): [-.!0-9a-zA-Z()_{}]* [ ]*' -- ${GITSRC} >> checkbadSource.out;true -@echo "------Using PetscInfo() without carriage return --------------------" >> checkbadSource.out -@git --no-pager grep -n -P 'PetscCall\(PetscInfo\(' -- ${GITSRC} | grep -v '\\n' >> checkbadSource.out;true - @a=`cat checkbadSource.out | wc -l`; l=`expr $$a - 20` ;\ + -@echo "------First blank line ---------------------------------------------" >> checkbadSource.out + @git --no-pager grep -n -P \^\$$ -- ${GITSRC} | grep ':1:' >> checkbadSource.out;true + @a=`cat checkbadSource.out | wc -l`; l=`expr $$a - 21` ;\ if [ $$l -gt 0 ] ; then \ echo $$l " files with errors detected in source code formatting" ;\ cat checkbadSource.out ;\ diff --git a/setup.py b/setup.py index 8337537c81a..ff269000f03 100755 --- a/setup.py +++ b/setup.py @@ -268,7 +268,7 @@ def version(): def tarball(): VERSION = version() if '.dev' in VERSION: return None - return ('https://ftp.mcs.anl.gov/pub/petsc/release-snapshots//' + return ('https://web.cels.anl.gov/projects/petsc/download/release-snapshots/' 'petsc-%s.tar.gz#egg=petsc-%s' % (VERSION, VERSION)) description = __doc__.split('\n')[1:-1]; del description[1:3] diff --git a/share/petsc/saws/js/matrixTex.js b/share/petsc/saws/js/matrixTex.js index fc567f9e8b5..7d4047bf51d 100644 --- a/share/petsc/saws/js/matrixTex.js +++ b/share/petsc/saws/js/matrixTex.js @@ -1,4 +1,4 @@ -//gives users a visual of the nested matricies +//gives users a visual of the nested matrices //instead of using subscript of subscript of subscript, etc. simply put the id of the matrix in the first subscript level. for example, A_{010} //this function is recursive and should always be called with parameter "0" diff --git a/src/benchmarks/Index.c b/src/benchmarks/Index.c index d5706f614dc..46f46fc1d6e 100644 --- a/src/benchmarks/Index.c +++ b/src/benchmarks/Index.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/MPI_Wtime.c b/src/benchmarks/MPI_Wtime.c index 7ddd9efa5e5..2382041da87 100644 --- a/src/benchmarks/MPI_Wtime.c +++ b/src/benchmarks/MPI_Wtime.c @@ -1,4 +1,3 @@ - #include int main(int argc,char **argv) diff --git a/src/benchmarks/PLogEvent.c b/src/benchmarks/PLogEvent.c index 394b9bf5c3e..b4ecee93595 100644 --- a/src/benchmarks/PLogEvent.c +++ b/src/benchmarks/PLogEvent.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscGetCPUTime.c b/src/benchmarks/PetscGetCPUTime.c index 3caceed44f3..d94919daad2 100644 --- a/src/benchmarks/PetscGetCPUTime.c +++ b/src/benchmarks/PetscGetCPUTime.c @@ -1,4 +1,3 @@ - #include int main(int argc,char **argv) diff --git a/src/benchmarks/PetscGetTime.c b/src/benchmarks/PetscGetTime.c index 313db0f3d33..b4b8c8494c6 100644 --- a/src/benchmarks/PetscGetTime.c +++ b/src/benchmarks/PetscGetTime.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscMalloc.c b/src/benchmarks/PetscMalloc.c index a4b0a92742d..526a5ffa948 100644 --- a/src/benchmarks/PetscMalloc.c +++ b/src/benchmarks/PetscMalloc.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscMemcmp.c b/src/benchmarks/PetscMemcmp.c index 0c4c4e901db..f2f3b8e89ff 100644 --- a/src/benchmarks/PetscMemcmp.c +++ b/src/benchmarks/PetscMemcmp.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscMemcpy.c b/src/benchmarks/PetscMemcpy.c index f9a558363b7..8b5e5f95969 100644 --- a/src/benchmarks/PetscMemcpy.c +++ b/src/benchmarks/PetscMemcpy.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscMemzero.c b/src/benchmarks/PetscMemzero.c index 7916036044e..d34a2dd7aba 100644 --- a/src/benchmarks/PetscMemzero.c +++ b/src/benchmarks/PetscMemzero.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscTime.c b/src/benchmarks/PetscTime.c index 2b286792a42..ab93be08999 100644 --- a/src/benchmarks/PetscTime.c +++ b/src/benchmarks/PetscTime.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/PetscVecNorm.c b/src/benchmarks/PetscVecNorm.c index 69630d78a8a..2129d04b91a 100644 --- a/src/benchmarks/PetscVecNorm.c +++ b/src/benchmarks/PetscVecNorm.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/benchmarks/streams/BasicVersion.c b/src/benchmarks/streams/BasicVersion.c index bbbdb054dd1..a064e9fe13d 100644 --- a/src/benchmarks/streams/BasicVersion.c +++ b/src/benchmarks/streams/BasicVersion.c @@ -1,4 +1,3 @@ - #include /* int gettimeofday(struct timeval *tp, struct timezone *tzp); */ @@ -178,4 +177,3 @@ int checktick(void) return minDelta; } - diff --git a/src/benchmarks/streams/OpenMPVersion.c b/src/benchmarks/streams/OpenMPVersion.c index 3f0d66b777b..38f930f7b46 100644 --- a/src/benchmarks/streams/OpenMPVersion.c +++ b/src/benchmarks/streams/OpenMPVersion.c @@ -255,4 +255,3 @@ double mysecond() (void) gettimeofday(&tp,&tzp); return ((double) tp.tv_sec + (double) tp.tv_usec * 1.e-6); } - diff --git a/src/binding/petsc4py/CHANGES.rst b/src/binding/petsc4py/CHANGES.rst index 73aa069ea77..b62e58e547e 100644 --- a/src/binding/petsc4py/CHANGES.rst +++ b/src/binding/petsc4py/CHANGES.rst @@ -6,6 +6,12 @@ CHANGES: PETSc for Python :Contact: dalcinl@gmail.com +Release 3.20.0 +============== + +- Update to PETSc 3.20 release. +- Update Cython build, require ``Cython >= 3.0.0``. + Release 3.19.0 ============== diff --git a/src/binding/petsc4py/DESCRIPTION.rst b/src/binding/petsc4py/DESCRIPTION.rst index 049b245d376..3d1e5409fae 100644 --- a/src/binding/petsc4py/DESCRIPTION.rst +++ b/src/binding/petsc4py/DESCRIPTION.rst @@ -40,6 +40,6 @@ project. D. May, L. Curfman McInnes, R. Mills, L. Mitchell, T. Munson, J. Roman, K. Rupp, P. Sanan, J Sarich, B. Smith, S. Zampini, H. Zhang, and H. Zhang, J. Zhang, - *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.19, 2023. + *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.20, 2023. http://dx.doi.org/10.2172/1968587, https://petsc.org/release/docs/manual/manual.pdf diff --git a/src/binding/petsc4py/README.rst b/src/binding/petsc4py/README.rst index c15ce2cdb97..3fa32d5c6b0 100644 --- a/src/binding/petsc4py/README.rst +++ b/src/binding/petsc4py/README.rst @@ -27,6 +27,4 @@ Dependencies Documentation ------------- -* https://petsc4py.readthedocs.org/, This does not contain the epydoc-generated API reference. - -* https://www.mcs.anl.gov/petsc/petsc4py-current/docs/, This is for the last release, not the in-development version. +* https://petsc.org/release/petsc4py/petsc4py/ diff --git a/src/binding/petsc4py/conf/stubgen.py b/src/binding/petsc4py/conf/stubgen.py index db0020db930..6a13433031b 100644 --- a/src/binding/petsc4py/conf/stubgen.py +++ b/src/binding/petsc4py/conf/stubgen.py @@ -133,7 +133,7 @@ def visit_class(cls, outer=None, done=None): '__module__', '__weakref__', '__pyx_vtable__', - '__enum2str', # FIXME refactor implemetation + '__enum2str', # FIXME refactor implementation '_traceback_', # FIXME maybe refactor? '__lt__', '__le__', diff --git a/src/binding/petsc4py/docs/source/citing.rst b/src/binding/petsc4py/docs/source/citing.rst index ee976d11eed..25afc17d7d9 100644 --- a/src/binding/petsc4py/docs/source/citing.rst +++ b/src/binding/petsc4py/docs/source/citing.rst @@ -17,6 +17,6 @@ project. D. May, L. Curfman McInnes, R. Mills, L. Mitchell, T. Munson, J. Roman, K. Rupp, P. Sanan, J Sarich, B. Smith, S. Zampini, H. Zhang, and H. Zhang, J. Zhang, - *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.19, 2023. + *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.20, 2023. http://dx.doi.org/10.2172/1968587, https://petsc.org/release/docs/manual/manual.pdf diff --git a/src/binding/petsc4py/docs/source/links.txt b/src/binding/petsc4py/docs/source/links.txt index e4948b088e0..3b43a5fb997 100644 --- a/src/binding/petsc4py/docs/source/links.txt +++ b/src/binding/petsc4py/docs/source/links.txt @@ -4,7 +4,7 @@ .. _Open MPI: http://www.open-mpi.org -.. _PETSc: http://www.mcs.anl.gov/petsc/ +.. _PETSc: https://petsc.org .. _SLEPc: http://slepc.upv.es diff --git a/src/binding/petsc4py/docs/source/overview.rst b/src/binding/petsc4py/docs/source/overview.rst index eeae830f0e1..59f2354cbe7 100644 --- a/src/binding/petsc4py/docs/source/overview.rst +++ b/src/binding/petsc4py/docs/source/overview.rst @@ -29,7 +29,7 @@ communication and computation. D. May, L. Curfman McInnes, R. Mills, L. Mitchell, T. Munson, J. Roman, K. Rupp, P. Sanan, J Sarich, B. Smith, S. Zampini, H. Zhang, and H. Zhang, J. Zhang, - *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.19, 2023. + *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.20, 2023. http://dx.doi.org/10.2172/1968587, https://petsc.org/release/docs/manual/manual.pdf diff --git a/src/binding/petsc4py/src/petsc4py/__init__.py b/src/binding/petsc4py/src/petsc4py/__init__.py index e8c03103825..d597a532bfd 100644 --- a/src/binding/petsc4py/src/petsc4py/__init__.py +++ b/src/binding/petsc4py/src/petsc4py/__init__.py @@ -16,7 +16,7 @@ """ __author__ = 'Lisandro Dalcin' -__version__ = '3.19.5' +__version__ = '3.20.0' __credits__ = 'PETSc Team ' diff --git a/src/dm/dt/dualspace/impls/lagrange/tests/ex1.c b/src/dm/dt/dualspace/impls/lagrange/tests/ex1.c index 0ef61568255..793bc6f2192 100644 --- a/src/dm/dt/dualspace/impls/lagrange/tests/ex1.c +++ b/src/dm/dt/dualspace/impls/lagrange/tests/ex1.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/dm/dt/interface/dtprob.c b/src/dm/dt/interface/dtprob.c index fb7e8cd5de0..a48be34389c 100644 --- a/src/dm/dt/interface/dtprob.c +++ b/src/dm/dt/interface/dtprob.c @@ -521,7 +521,7 @@ PetscErrorCode PetscPDFSampleConstant3D(const PetscReal p[], const PetscReal dum Input Parameters: + dim - The dimension of sample points . prefix - The options prefix, or NULL -- name - The option name for the probility distribution type +- name - The option name for the probability distribution type Output Parameters: + pdf - The PDF of this type diff --git a/src/dm/f90-mod/petscdmdamod.F90 b/src/dm/f90-mod/petscdmdamod.F90 index 0b63832352d..3b273e9b5ea 100644 --- a/src/dm/f90-mod/petscdmdamod.F90 +++ b/src/dm/f90-mod/petscdmdamod.F90 @@ -1,4 +1,3 @@ - module petscdmdadef use petscdmdef #include <../src/dm/f90-mod/petscdmda.h> diff --git a/src/dm/f90-mod/petscdmmod.F90 b/src/dm/f90-mod/petscdmmod.F90 index 4238e20cab5..4b04a3b5335 100644 --- a/src/dm/f90-mod/petscdmmod.F90 +++ b/src/dm/f90-mod/petscdmmod.F90 @@ -1,4 +1,3 @@ - module petscdmdefdummy use petscmatdef #include <../src/dm/f90-mod/petscdm.h> @@ -95,4 +94,3 @@ module petscdt #include <../src/dm/f90-mod/ftn-auto-interfaces/petscdt.h90> end interface end module - diff --git a/src/dm/f90-mod/petscdmnetwork.h b/src/dm/f90-mod/petscdmnetwork.h index e17acece3ac..45d2ad1df73 100644 --- a/src/dm/f90-mod/petscdmnetwork.h +++ b/src/dm/f90-mod/petscdmnetwork.h @@ -1,5 +1,3 @@ - ! ! #include "petsc/finclude/petscdmnetwork.h" - diff --git a/src/dm/f90-mod/petscdmplexmod.F90 b/src/dm/f90-mod/petscdmplexmod.F90 index 80ed2e9ad78..f7cb31cc35a 100644 --- a/src/dm/f90-mod/petscdmplexmod.F90 +++ b/src/dm/f90-mod/petscdmplexmod.F90 @@ -1,4 +1,3 @@ - module petscdmplexdef use petscdmdef #include <../src/dm/f90-mod/petscdmplex.h> diff --git a/src/dm/f90-mod/petscdmswarmmod.F90 b/src/dm/f90-mod/petscdmswarmmod.F90 index 4582fe780ee..1a9d0a26aef 100644 --- a/src/dm/f90-mod/petscdmswarmmod.F90 +++ b/src/dm/f90-mod/petscdmswarmmod.F90 @@ -1,4 +1,3 @@ - module petscdmswarmdef use petscdmdef #include <../src/dm/f90-mod/petscdmswarm.h> diff --git a/src/dm/impls/composite/ftn-custom/zfddaf.c b/src/dm/impls/composite/ftn-custom/zfddaf.c index 264b8611f28..3424ea01c94 100644 --- a/src/dm/impls/composite/ftn-custom/zfddaf.c +++ b/src/dm/impls/composite/ftn-custom/zfddaf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/dm/impls/composite/packm.c b/src/dm/impls/composite/packm.c index 4c64a5d9877..06a280164fc 100644 --- a/src/dm/impls/composite/packm.c +++ b/src/dm/impls/composite/packm.c @@ -1,4 +1,3 @@ - #include <../src/dm/impls/composite/packimpl.h> /*I "petscdmcomposite.h" I*/ static PetscErrorCode DMCreateMatrix_Composite_Nest(DM dm, Mat *J) diff --git a/src/dm/impls/da/da1.c b/src/dm/impls/da/da1.c index 6286c657554..8acbb989c7b 100644 --- a/src/dm/impls/da/da1.c +++ b/src/dm/impls/da/da1.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular 1d arrays in parallel. This file was created by Peter Mell 6/30/95 diff --git a/src/dm/impls/da/da2.c b/src/dm/impls/da/da2.c index a90f3d51858..84612cbc18c 100644 --- a/src/dm/impls/da/da2.c +++ b/src/dm/impls/da/da2.c @@ -1,4 +1,3 @@ - #include /*I "petscdmda.h" I*/ #include diff --git a/src/dm/impls/da/da3.c b/src/dm/impls/da/da3.c index 10dad4da97c..db56124db6e 100644 --- a/src/dm/impls/da/da3.c +++ b/src/dm/impls/da/da3.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular 3d arrays in parallel. File created by Peter Mell 7/14/95 diff --git a/src/dm/impls/da/dacorn.c b/src/dm/impls/da/dacorn.c index f81db15b424..eeb0ea7991e 100644 --- a/src/dm/impls/da/dacorn.c +++ b/src/dm/impls/da/dacorn.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/dacreate.c b/src/dm/impls/da/dacreate.c index 7a7aea09a3a..25e7951fbde 100644 --- a/src/dm/impls/da/dacreate.c +++ b/src/dm/impls/da/dacreate.c @@ -1,4 +1,3 @@ - #include /*I "petscdmda.h" I*/ static PetscErrorCode DMSetFromOptions_DA(DM da, PetscOptionItems *PetscOptionsObject) diff --git a/src/dm/impls/da/dadestroy.c b/src/dm/impls/da/dadestroy.c index 183608204e8..729f5b95318 100644 --- a/src/dm/impls/da/dadestroy.c +++ b/src/dm/impls/da/dadestroy.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/dadist.c b/src/dm/impls/da/dadist.c index 151ddd8f31f..0b7c0d8092c 100644 --- a/src/dm/impls/da/dadist.c +++ b/src/dm/impls/da/dadist.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/dagetarray.c b/src/dm/impls/da/dagetarray.c index b524e07e71b..0637a2076c1 100644 --- a/src/dm/impls/da/dagetarray.c +++ b/src/dm/impls/da/dagetarray.c @@ -1,4 +1,3 @@ - #include /*I "petscdmda.h" I*/ /*MC diff --git a/src/dm/impls/da/dagetelem.c b/src/dm/impls/da/dagetelem.c index b52798a52af..c5b6f836cf1 100644 --- a/src/dm/impls/da/dagetelem.c +++ b/src/dm/impls/da/dagetelem.c @@ -1,4 +1,3 @@ - #include /*I "petscdmda.h" I*/ static PetscErrorCode DMDAGetElements_1D(DM dm, PetscInt *nel, PetscInt *nen, const PetscInt *e[]) diff --git a/src/dm/impls/da/daghost.c b/src/dm/impls/da/daghost.c index 6c8e0d8fc9d..8554eb8007f 100644 --- a/src/dm/impls/da/daghost.c +++ b/src/dm/impls/da/daghost.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/dagtona.c b/src/dm/impls/da/dagtona.c index 3df8960522e..7a823d24c81 100644 --- a/src/dm/impls/da/dagtona.c +++ b/src/dm/impls/da/dagtona.c @@ -1,4 +1,3 @@ - /* Tools to help solve the coarse grid problem redundantly. Provides two scatter contexts that (1) map from the usual global vector diff --git a/src/dm/impls/da/dainterp.c b/src/dm/impls/da/dainterp.c index 0f782d31507..fcc11d76bd2 100644 --- a/src/dm/impls/da/dainterp.c +++ b/src/dm/impls/da/dainterp.c @@ -1,4 +1,3 @@ - /* Code for interpolating between grids represented by DMDAs */ diff --git a/src/dm/impls/da/dalocal.c b/src/dm/impls/da/dalocal.c index 1cf67e45329..98c1af890a8 100644 --- a/src/dm/impls/da/dalocal.c +++ b/src/dm/impls/da/dalocal.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/daltol.c b/src/dm/impls/da/daltol.c index bf238b839db..6ce9a57879d 100644 --- a/src/dm/impls/da/daltol.c +++ b/src/dm/impls/da/daltol.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/dapf.c b/src/dm/impls/da/dapf.c index c4511496403..ce0cb21723a 100644 --- a/src/dm/impls/da/dapf.c +++ b/src/dm/impls/da/dapf.c @@ -1,4 +1,3 @@ - #include /*I "petscdmda.h" I*/ /*@C diff --git a/src/dm/impls/da/dascatter.c b/src/dm/impls/da/dascatter.c index 5131ad3b38b..daf8d1a67fa 100644 --- a/src/dm/impls/da/dascatter.c +++ b/src/dm/impls/da/dascatter.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/daview.c b/src/dm/impls/da/daview.c index 1d5e9ec1cc2..b1872ce3173 100644 --- a/src/dm/impls/da/daview.c +++ b/src/dm/impls/da/daview.c @@ -1,4 +1,3 @@ - /* Code for manipulating distributed regular arrays in parallel. */ diff --git a/src/dm/impls/da/ftn-custom/zda1f.c b/src/dm/impls/da/ftn-custom/zda1f.c index bef329e2543..e539b38b5d7 100644 --- a/src/dm/impls/da/ftn-custom/zda1f.c +++ b/src/dm/impls/da/ftn-custom/zda1f.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/dm/impls/da/ftn-custom/zda3f.c b/src/dm/impls/da/ftn-custom/zda3f.c index 56fc9480a32..7d15816b857 100644 --- a/src/dm/impls/da/ftn-custom/zda3f.c +++ b/src/dm/impls/da/ftn-custom/zda3f.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/dm/impls/da/ftn-custom/zdacornf.c b/src/dm/impls/da/ftn-custom/zdacornf.c index 51f4da992bc..bd749ff2566 100644 --- a/src/dm/impls/da/ftn-custom/zdacornf.c +++ b/src/dm/impls/da/ftn-custom/zdacornf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/dm/impls/da/ftn-custom/zdagetscatterf.c b/src/dm/impls/da/ftn-custom/zdagetscatterf.c index 50b57849ce4..c68314bfb7f 100644 --- a/src/dm/impls/da/ftn-custom/zdagetscatterf.c +++ b/src/dm/impls/da/ftn-custom/zdagetscatterf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/dm/impls/da/ftn-custom/zdaviewf.c b/src/dm/impls/da/ftn-custom/zdaviewf.c index d3fdf4b613f..7751e074369 100644 --- a/src/dm/impls/da/ftn-custom/zdaviewf.c +++ b/src/dm/impls/da/ftn-custom/zdaviewf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/dm/impls/da/gr1.c b/src/dm/impls/da/gr1.c index aabe37111bb..92a939fb0cf 100644 --- a/src/dm/impls/da/gr1.c +++ b/src/dm/impls/da/gr1.c @@ -1,4 +1,3 @@ - /* Plots vectors obtained with DMDACreate1d() */ diff --git a/src/dm/impls/da/gr2.c b/src/dm/impls/da/gr2.c index f66a681d159..31e52c8975f 100644 --- a/src/dm/impls/da/gr2.c +++ b/src/dm/impls/da/gr2.c @@ -1,4 +1,3 @@ - /* Plots vectors obtained with DMDACreate2d() */ diff --git a/src/dm/impls/da/hypre/mhyp.c b/src/dm/impls/da/hypre/mhyp.c index 0ffb32d10ee..5b6fd32bc36 100644 --- a/src/dm/impls/da/hypre/mhyp.c +++ b/src/dm/impls/da/hypre/mhyp.c @@ -1,4 +1,3 @@ - /* Creates hypre ijmatrix from PETSc matrix */ diff --git a/src/dm/impls/moab/dmmbfem.cxx b/src/dm/impls/moab/dmmbfem.cxx index 4ed2fcdba04..35fcb6d0adc 100644 --- a/src/dm/impls/moab/dmmbfem.cxx +++ b/src/dm/impls/moab/dmmbfem.cxx @@ -1,4 +1,3 @@ - #include #include /*I "petscdt.h" I*/ #include /*I "petscdmmoab.h" I*/ diff --git a/src/dm/impls/network/networkview.c b/src/dm/impls/network/networkview.c index fd49c63ff94..44e17a35997 100644 --- a/src/dm/impls/network/networkview.c +++ b/src/dm/impls/network/networkview.c @@ -29,7 +29,7 @@ static PetscErrorCode DMView_Network_CSV(DM dm, PetscViewer viewer) PetscCall(DMGetCoordinateDM(dm, &dmcoords)); PetscCall(DMGetCoordinateDim(dmcoords, &i)); - PetscCheck(i == 2, PETSC_COMM_WORLD, PETSC_ERR_SUP, "dim %" PetscInt_FMT " != 2 is not supporte yet", i); + PetscCheck(i == 2, PETSC_COMM_WORLD, PETSC_ERR_SUP, "dim %" PetscInt_FMT " != 2 is not supported yet", i); // Get the coordinate vector from dm PetscCall(DMGetCoordinatesLocal(dm, &allVertexCoords)); diff --git a/src/dm/impls/plex/plex.c b/src/dm/impls/plex/plex.c index b041b4531c6..5a68cdeeb25 100644 --- a/src/dm/impls/plex/plex.c +++ b/src/dm/impls/plex/plex.c @@ -9064,7 +9064,7 @@ PetscErrorCode DMPlexCheckGeometry(DM dm) For the complete list of DMPlexCheck* functions, see `DMSetFromOptions()`. - Extra roots can come from priodic cuts, where additional points appear on the boundary + Extra roots can come from periodic cuts, where additional points appear on the boundary .seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetPointSF()`, `DMSetFromOptions()` @*/ diff --git a/src/dm/impls/plex/plexfem.c b/src/dm/impls/plex/plexfem.c index d712bd06eef..715f509598a 100644 --- a/src/dm/impls/plex/plexfem.c +++ b/src/dm/impls/plex/plexfem.c @@ -6195,7 +6195,7 @@ PetscErrorCode DMPlexComputeJacobian_Hybrid_Internal(DM dm, PetscFormKey key[], Input Parameters: + dm - The mesh -. key - The PetscWeakFormKey indcating where integration should happen +. key - The PetscWeakFormKey indicating where integration should happen . cellIS - The cells to integrate over . t - The time . X_tShift - The multiplier for the Jacobian with respect to X_t diff --git a/src/dm/impls/plex/plexgeometry.c b/src/dm/impls/plex/plexgeometry.c index 30bb62e7f67..2775837509a 100644 --- a/src/dm/impls/plex/plexgeometry.c +++ b/src/dm/impls/plex/plexgeometry.c @@ -386,7 +386,7 @@ static PetscErrorCode DMPlexGetPlaneHexIntersection_Internal(DM dm, PetscInt dim + Nint - the number of intersection points, in [0, 4] - intPoints - the coordinates of the intersection points, should be length at least 12 - Note: The `pos` argument is only meaningfull if the number of intersections is 0. The algorithmic idea comes from https://github.com/chrisk314/tet-plane-intersection. + Note: The `pos` argument is only meaningful if the number of intersections is 0. The algorithmic idea comes from https://github.com/chrisk314/tet-plane-intersection. Level: developer @@ -1062,7 +1062,7 @@ static PetscErrorCode DMPlexComputeGridHash_Internal(DM dm, PetscGridHash *local } } /* - In 3 dimensions, if two adjacent planes have at least 3 intersections outside the cell in the apprpriate direction, + In 3 dimensions, if two adjacent planes have at least 3 intersections outside the cell in the appropriate direction, we then check the 3rd planar dimension. If a plane falls between intersection points, the cell belongs to that box. If the planes are on opposite sides of the intersection points, the cell belongs to that box and it passes through the cell. */ diff --git a/src/dm/impls/plex/tests/ex22.c b/src/dm/impls/plex/tests/ex22.c index 3371fc8ea67..f1abf2bb8c7 100644 --- a/src/dm/impls/plex/tests/ex22.c +++ b/src/dm/impls/plex/tests/ex22.c @@ -1,4 +1,3 @@ - const char help[] = "Test DMPlexCoordinatesToReference().\n\n"; #include diff --git a/src/dm/impls/swarm/tests/ex1.c b/src/dm/impls/swarm/tests/ex1.c index ede433af954..2bebd0d8a80 100644 --- a/src/dm/impls/swarm/tests/ex1.c +++ b/src/dm/impls/swarm/tests/ex1.c @@ -141,7 +141,7 @@ static PetscErrorCode CheckPointInsertion(DM sw) /* Checks tie breaking works properly when a particle is located at a shared boundary. The higher rank should - recieve the particle while the lower rank deletes it. + receive the particle while the lower rank deletes it. TODO: Currently only works for 2 procs. */ @@ -181,7 +181,7 @@ static PetscErrorCode CheckPointInsertion_Boundary(DM sw) PetscCall(CheckMigrate(sw)); PetscCall(DMSwarmGetLocalSize(sw, &Np_loc_post)); if (rank == 0) PetscCheck(Np_loc_pre == (Np_loc_post + 1), PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Migration tie breaking failed on rank %d. Particle on boundary not sent.", rank); - if (rank == 1) PetscCheck(Np_loc_pre == (Np_loc_post - 1), PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Migration tie breaking failed on rank %d. Particle on boundary not recieved.", rank); + if (rank == 1) PetscCheck(Np_loc_pre == (Np_loc_post - 1), PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Migration tie breaking failed on rank %d. Particle on boundary not received.", rank); PetscCall(PetscPrintf(comm, "Rank boundary point insertion check passes.\n")); PetscFunctionReturn(PETSC_SUCCESS); } diff --git a/src/dm/interface/dlregisdmdm.c b/src/dm/interface/dlregisdmdm.c index 3cb36a1cc1d..f58e87671b0 100644 --- a/src/dm/interface/dlregisdmdm.c +++ b/src/dm/interface/dlregisdmdm.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/dm/interface/dmregall.c b/src/dm/interface/dmregall.c index 0464219131c..450ad81939d 100644 --- a/src/dm/interface/dmregall.c +++ b/src/dm/interface/dmregall.c @@ -1,4 +1,3 @@ - #include /*I "petscdm.h" I*/ #include /*I "petscdmplex.h" I*/ #include diff --git a/src/dm/partitioner/impls/simple/partsimple.c b/src/dm/partitioner/impls/simple/partsimple.c index 917c5b05b2a..4b23e314a82 100644 --- a/src/dm/partitioner/impls/simple/partsimple.c +++ b/src/dm/partitioner/impls/simple/partsimple.c @@ -1,4 +1,3 @@ - #include #include /*I "petscpartitioner.h" I*/ diff --git a/src/dm/tests/ex1.c b/src/dm/tests/ex1.c index 1540e9918f4..913463e822b 100644 --- a/src/dm/tests/ex1.c +++ b/src/dm/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various DM routines.\n\n"; #include diff --git a/src/dm/tests/ex11.c b/src/dm/tests/ex11.c index f6413058c77..01b70b85448 100644 --- a/src/dm/tests/ex11.c +++ b/src/dm/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various 2-dimensional DMDA routines.\n\n"; #include diff --git a/src/dm/tests/ex12.c b/src/dm/tests/ex12.c index 6d20de29283..d5629a8fbb0 100644 --- a/src/dm/tests/ex12.c +++ b/src/dm/tests/ex12.c @@ -1,4 +1,3 @@ - /* Simple example to show how PETSc programs can be run from MATLAB. See ex12.m. diff --git a/src/dm/tests/ex13.c b/src/dm/tests/ex13.c index 001737e6531..3a3fb739810 100644 --- a/src/dm/tests/ex13.c +++ b/src/dm/tests/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Tests loading DM vector from file.\n\n"; /* diff --git a/src/dm/tests/ex14.c b/src/dm/tests/ex14.c index 442bcc7fe4d..74dcd7a0f93 100644 --- a/src/dm/tests/ex14.c +++ b/src/dm/tests/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Tests saving DMDA vectors to files.\n\n"; /* diff --git a/src/dm/tests/ex15.c b/src/dm/tests/ex15.c index e72e8760a91..1fc1ed18f22 100644 --- a/src/dm/tests/ex15.c +++ b/src/dm/tests/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMDA interpolation.\n\n"; #include diff --git a/src/dm/tests/ex16.c b/src/dm/tests/ex16.c index 4478c14aa0d..22fc433f996 100644 --- a/src/dm/tests/ex16.c +++ b/src/dm/tests/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMComposite routines.\n\n"; #include diff --git a/src/dm/tests/ex19.c b/src/dm/tests/ex19.c index 0e428f947db..cd86356bd79 100644 --- a/src/dm/tests/ex19.c +++ b/src/dm/tests/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMDA with variable multiple degrees of freedom per node.\n\n"; /* diff --git a/src/dm/tests/ex1f.F90 b/src/dm/tests/ex1f.F90 index 36c58bea4cc..d7ac13e4102 100644 --- a/src/dm/tests/ex1f.F90 +++ b/src/dm/tests/ex1f.F90 @@ -44,4 +44,3 @@ program main ! nsize: 9 ! args: -show_gVec !TEST*/ - diff --git a/src/dm/tests/ex2.c b/src/dm/tests/ex2.c index af9a78b6aec..0362097f211 100644 --- a/src/dm/tests/ex2.c +++ b/src/dm/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various 1-dimensional DMDA routines.\n\n"; #include diff --git a/src/dm/tests/ex22.c b/src/dm/tests/ex22.c index a00a6407928..02e21604654 100644 --- a/src/dm/tests/ex22.c +++ b/src/dm/tests/ex22.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatSetValuesBlockedStencil() in 3d.\n\n"; #include diff --git a/src/dm/tests/ex23.c b/src/dm/tests/ex23.c index bb637ce5e9a..564208164c3 100644 --- a/src/dm/tests/ex23.c +++ b/src/dm/tests/ex23.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecView()/VecLoad() for DMDA vectors (this tests DMDAGlobalToNatural()).\n\n"; #include diff --git a/src/dm/tests/ex24.c b/src/dm/tests/ex24.c index e015ce11fd9..c96e00e22f2 100644 --- a/src/dm/tests/ex24.c +++ b/src/dm/tests/ex24.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMLocalToGlobal() for dof > 1\n\n"; #include diff --git a/src/dm/tests/ex25.c b/src/dm/tests/ex25.c index e55d9122e8e..ecbc95e2727 100644 --- a/src/dm/tests/ex25.c +++ b/src/dm/tests/ex25.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMLocalToGlobal() for dof > 1\n\n"; #include diff --git a/src/dm/tests/ex26.c b/src/dm/tests/ex26.c index 166285e8390..45d336f9961 100644 --- a/src/dm/tests/ex26.c +++ b/src/dm/tests/ex26.c @@ -1,4 +1,3 @@ - static char help[] = "Tests error message in DMCreateColoring() with periodic boundary conditions. \n\n"; #include diff --git a/src/dm/tests/ex3.c b/src/dm/tests/ex3.c index fedda0d234e..9949d81b9c3 100644 --- a/src/dm/tests/ex3.c +++ b/src/dm/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the 1-dimensional wave equation.\n\n"; #include diff --git a/src/dm/tests/ex33.c b/src/dm/tests/ex33.c index e4b1c88de77..6d183d10c61 100644 --- a/src/dm/tests/ex33.c +++ b/src/dm/tests/ex33.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecView()/VecLoad() for DMDA vectors (this tests DMDAGlobalToNatural()).\n\n"; #include diff --git a/src/dm/tests/ex35.c b/src/dm/tests/ex35.c index 57764bc0c9f..b537fb2f4e7 100644 --- a/src/dm/tests/ex35.c +++ b/src/dm/tests/ex35.c @@ -1,4 +1,3 @@ - static char help[] = "MatLoad test for loading matrices that are created by DMCreateMatrix() and\n\ stored in binary via MatView_MPI_DA.MatView_MPI_DA stores the matrix\n\ in natural ordering. Hence MatLoad() has to read the matrix first in\n\ diff --git a/src/dm/tests/ex36.c b/src/dm/tests/ex36.c index 6b680a087be..ae3448d2dff 100644 --- a/src/dm/tests/ex36.c +++ b/src/dm/tests/ex36.c @@ -1,4 +1,3 @@ - static char help[] = "Checks the functionality of DMGetInterpolation() on deformed grids.\n\n"; #include diff --git a/src/dm/tests/ex37.c b/src/dm/tests/ex37.c index 1d96e8377bd..b8d2e0c9fa7 100644 --- a/src/dm/tests/ex37.c +++ b/src/dm/tests/ex37.c @@ -1,4 +1,3 @@ - static char help[] = "VecView() with a DMDA1d vector and draw viewer.\n\n"; #include diff --git a/src/dm/tests/ex38.c b/src/dm/tests/ex38.c index fcd4d3e6ddf..1c4a29e3d85 100644 --- a/src/dm/tests/ex38.c +++ b/src/dm/tests/ex38.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMGlobalToLocal() for 3d DA with stencil width of 2.\n\n"; #include diff --git a/src/dm/tests/ex39.c b/src/dm/tests/ex39.c index 746c2b5b09d..07bf5316665 100644 --- a/src/dm/tests/ex39.c +++ b/src/dm/tests/ex39.c @@ -1,4 +1,3 @@ - static char help[] = "Tests mirror boundary conditions in 1-d.\n\n"; #include diff --git a/src/dm/tests/ex4.c b/src/dm/tests/ex4.c index 6d3456b9ef1..f92d90ebcd0 100644 --- a/src/dm/tests/ex4.c +++ b/src/dm/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various 2-dimensional DMDA routines.\n\n"; #include diff --git a/src/dm/tests/ex40.c b/src/dm/tests/ex40.c index e39a4bde448..318b30142a1 100644 --- a/src/dm/tests/ex40.c +++ b/src/dm/tests/ex40.c @@ -1,4 +1,3 @@ - static char help[] = "Tests mirror boundary conditions in 2-d.\n\n"; #include diff --git a/src/dm/tests/ex41.c b/src/dm/tests/ex41.c index 9ab4462f19a..15197bae747 100644 --- a/src/dm/tests/ex41.c +++ b/src/dm/tests/ex41.c @@ -1,4 +1,3 @@ - static char help[] = "Tests mirror boundary conditions in 3-d.\n\n"; #include diff --git a/src/dm/tests/ex44.c b/src/dm/tests/ex44.c index 323388946fe..5db1215c65d 100644 --- a/src/dm/tests/ex44.c +++ b/src/dm/tests/ex44.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various DMComposite routines.\n\n"; #include diff --git a/src/dm/tests/ex51.c b/src/dm/tests/ex51.c index 62a313b8fa6..fd3f8237075 100644 --- a/src/dm/tests/ex51.c +++ b/src/dm/tests/ex51.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMDAGlobalToNaturalAllCreate() using contour plotting for 2d DMDAs.\n\n"; #include diff --git a/src/dm/tests/ex52.c b/src/dm/tests/ex52.c index 5d1f74c993c..dde21ecef3c 100644 --- a/src/dm/tests/ex52.c +++ b/src/dm/tests/ex52.c @@ -1,4 +1,3 @@ - static char help[] = "Tests periodic boundary conditions for DMDA1d with periodic boundary conditions.\n\n"; #include diff --git a/src/dm/tests/ex7.c b/src/dm/tests/ex7.c index 4cebecd5826..e060621e7d4 100644 --- a/src/dm/tests/ex7.c +++ b/src/dm/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMLocalToLocalxxx() for DMDA.\n\n"; #include diff --git a/src/dm/tests/ex9.c b/src/dm/tests/ex9.c index cff4b8068cf..c5fa75855c7 100644 --- a/src/dm/tests/ex9.c +++ b/src/dm/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMCreateMatrix for DMComposite.\n\n"; #include diff --git a/src/dm/tutorials/ex1.c b/src/dm/tutorials/ex1.c index 5cbedaa04ac..c7388c02cbb 100644 --- a/src/dm/tutorials/ex1.c +++ b/src/dm/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecView() contour plotting for 2d DMDAs.\n\n"; /* diff --git a/src/dm/tutorials/ex12.c b/src/dm/tutorials/ex12.c index 1b92e144c47..5f283747646 100644 --- a/src/dm/tutorials/ex12.c +++ b/src/dm/tutorials/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMGetGlobalVector() and DMRestoreGlobalVector().\n\n"; /* diff --git a/src/dm/tutorials/ex14.c b/src/dm/tutorials/ex14.c index b4861aa09dd..727fa98373a 100644 --- a/src/dm/tutorials/ex14.c +++ b/src/dm/tutorials/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMCreateDomainDecomposition.\n\n"; /* diff --git a/src/dm/tutorials/ex15.c b/src/dm/tutorials/ex15.c index 57764c883a6..1a4cc257f15 100644 --- a/src/dm/tutorials/ex15.c +++ b/src/dm/tutorials/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecView() functionality with DMDA objects when using:" "(i) a PetscViewer binary with MPI-IO support; and (ii) when the binary header is skipped.\n\n"; diff --git a/src/dm/tutorials/ex20.c b/src/dm/tutorials/ex20.c index 6af4cd4966d..06189165df5 100644 --- a/src/dm/tutorials/ex20.c +++ b/src/dm/tutorials/ex20.c @@ -1,4 +1,3 @@ - static char help[] = "DMSwarm-PIC demonstrator of inserting points into a cell DM \n\ Options: \n\ -mode {0,1} : 0 ==> DMDA, 1 ==> DMPLEX cell DM \n\ diff --git a/src/dm/tutorials/ex21.c b/src/dm/tutorials/ex21.c index 85db27982df..825712d213b 100644 --- a/src/dm/tutorials/ex21.c +++ b/src/dm/tutorials/ex21.c @@ -1,4 +1,3 @@ - static char help[] = "DMSwarm-PIC demonstrator of advecting points within cell DM defined by a DA or PLEX object \n\ Options: \n\ -ppcell : Number of times to sub-divide the reference cell when layout the initial particle coordinates \n\ diff --git a/src/dm/tutorials/ex25.c b/src/dm/tutorials/ex25.c index 48eecb7b1cd..15713938189 100644 --- a/src/dm/tutorials/ex25.c +++ b/src/dm/tutorials/ex25.c @@ -1,4 +1,3 @@ - static char help[] = "Takes a patch of a large DMDA vector to one process.\n\n"; #include diff --git a/src/dm/tutorials/ex3.c b/src/dm/tutorials/ex3.c index c09df39a834..9d6e1c54137 100644 --- a/src/dm/tutorials/ex3.c +++ b/src/dm/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMCreateInterpolation() for nonuniform DMDA coordinates.\n\n"; #include diff --git a/src/dm/tutorials/ex4.c b/src/dm/tutorials/ex4.c index a0651677181..e11f0e32e15 100644 --- a/src/dm/tutorials/ex4.c +++ b/src/dm/tutorials/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates various vector routines for DMDA.\n\n"; /* diff --git a/src/dm/tutorials/ex5.c b/src/dm/tutorials/ex5.c index b6de81491a2..aa8ad0118a8 100644 --- a/src/dm/tutorials/ex5.c +++ b/src/dm/tutorials/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMDAGetElements() and VecView() contour plotting for 2d DMDAs.\n\n"; #include diff --git a/src/dm/tutorials/ex6.c b/src/dm/tutorials/ex6.c index 1a3ac01b858..19c2325e010 100644 --- a/src/dm/tutorials/ex6.c +++ b/src/dm/tutorials/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "\n\n"; /* diff --git a/src/dm/tutorials/swarm_ex1.c b/src/dm/tutorials/swarm_ex1.c index fc924d4ec72..407990ffd18 100644 --- a/src/dm/tutorials/swarm_ex1.c +++ b/src/dm/tutorials/swarm_ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMSwarm\n\n"; #include diff --git a/src/dm/tutorials/swarm_ex2.c b/src/dm/tutorials/swarm_ex2.c index 9092ae5f3cc..e3316def8cc 100644 --- a/src/dm/tutorials/swarm_ex2.c +++ b/src/dm/tutorials/swarm_ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMSwarm\n\n"; #include diff --git a/src/dm/tutorials/swarm_ex3.c b/src/dm/tutorials/swarm_ex3.c index 85b0bd74dde..a13b0535aaf 100644 --- a/src/dm/tutorials/swarm_ex3.c +++ b/src/dm/tutorials/swarm_ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests DMSwarm with DMShell\n\n"; #include diff --git a/src/ksp/f90-mod/petsckspdefmod.F90 b/src/ksp/f90-mod/petsckspdefmod.F90 index 7ba3e936068..ffb037da1ff 100644 --- a/src/ksp/f90-mod/petsckspdefmod.F90 +++ b/src/ksp/f90-mod/petsckspdefmod.F90 @@ -1,4 +1,3 @@ - module petscpcdefdummy use petscdmdef use petscmatdef @@ -73,4 +72,3 @@ function kspequals(A,B) type(tKSP), intent(in) :: A,B kspequals = (A%v .eq. B%v) end function - diff --git a/src/ksp/f90-mod/petsckspmod.F90 b/src/ksp/f90-mod/petsckspmod.F90 index fae48e44c9f..2511b4f46ec 100644 --- a/src/ksp/f90-mod/petsckspmod.F90 +++ b/src/ksp/f90-mod/petsckspmod.F90 @@ -8,4 +8,3 @@ module petscksp #include <../src/ksp/f90-mod/ftn-auto-interfaces/petscksp.h90> end interface end module petscksp - diff --git a/src/ksp/f90-mod/petscpc.h b/src/ksp/f90-mod/petscpc.h index 40b2f7256f9..3cc669a5834 100644 --- a/src/ksp/f90-mod/petscpc.h +++ b/src/ksp/f90-mod/petscpc.h @@ -129,4 +129,3 @@ PetscEnum, parameter :: PC_SUBPC_ERROR=6 external PCMGRESIDUALDEFAULT - diff --git a/src/ksp/f90-mod/petscpcmod.F90 b/src/ksp/f90-mod/petscpcmod.F90 index 036e883e69b..a011827db0d 100644 --- a/src/ksp/f90-mod/petscpcmod.F90 +++ b/src/ksp/f90-mod/petscpcmod.F90 @@ -9,4 +9,3 @@ module petscpc #include <../src/ksp/f90-mod/ftn-auto-interfaces/petscpc.h90> end interface end module petscpc - diff --git a/src/ksp/ksp/impls/bcgs/bcgs.c b/src/ksp/ksp/impls/bcgs/bcgs.c index 7c5a2cf3f55..c45f6118c2a 100644 --- a/src/ksp/ksp/impls/bcgs/bcgs.c +++ b/src/ksp/ksp/impls/bcgs/bcgs.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/bcgs/bcgsimpl.h> /*I "petscksp.h" I*/ PetscErrorCode KSPSetFromOptions_BCGS(KSP ksp, PetscOptionItems *PetscOptionsObject) diff --git a/src/ksp/ksp/impls/bcgs/fbcgs/fbcgs.c b/src/ksp/ksp/impls/bcgs/fbcgs/fbcgs.c index 7ad9e37564a..58eb157066f 100644 --- a/src/ksp/ksp/impls/bcgs/fbcgs/fbcgs.c +++ b/src/ksp/ksp/impls/bcgs/fbcgs/fbcgs.c @@ -1,4 +1,3 @@ - /* This file implements flexible BiCGStab (FBiCGStab). */ diff --git a/src/ksp/ksp/impls/bcgs/fbcgsr/fbcgsr.c b/src/ksp/ksp/impls/bcgs/fbcgsr/fbcgsr.c index 4857fd7a3cf..1bc943904a9 100644 --- a/src/ksp/ksp/impls/bcgs/fbcgsr/fbcgsr.c +++ b/src/ksp/ksp/impls/bcgs/fbcgsr/fbcgsr.c @@ -1,4 +1,3 @@ - /* This file implements FBiCGStab-R. FBiCGStab-R is a mathematically equivalent variant of FBiCGStab. Differences are: diff --git a/src/ksp/ksp/impls/bcgs/pipebcgs/pipebcgs.c b/src/ksp/ksp/impls/bcgs/pipebcgs/pipebcgs.c index 85c0c636635..6e91727cdbc 100644 --- a/src/ksp/ksp/impls/bcgs/pipebcgs/pipebcgs.c +++ b/src/ksp/ksp/impls/bcgs/pipebcgs/pipebcgs.c @@ -1,4 +1,3 @@ - /* This file implements pipelined BiCGStab (pipe-BiCGStab). */ diff --git a/src/ksp/ksp/impls/bcgs/qmrcgs/qmrcgs.c b/src/ksp/ksp/impls/bcgs/qmrcgs/qmrcgs.c index 6d18803d998..1d537947508 100644 --- a/src/ksp/ksp/impls/bcgs/qmrcgs/qmrcgs.c +++ b/src/ksp/ksp/impls/bcgs/qmrcgs/qmrcgs.c @@ -1,4 +1,3 @@ - /* This file implements QMRCGS (QMRCGStab). diff --git a/src/ksp/ksp/impls/bicg/bicg.c b/src/ksp/ksp/impls/bicg/bicg.c index 582b0057423..d549f5baa98 100644 --- a/src/ksp/ksp/impls/bicg/bicg.c +++ b/src/ksp/ksp/impls/bicg/bicg.c @@ -1,4 +1,3 @@ - #include static PetscErrorCode KSPSetUp_BiCG(KSP ksp) diff --git a/src/ksp/ksp/impls/cg/cg.c b/src/ksp/ksp/impls/cg/cg.c index 04d2b74e756..7722739b013 100644 --- a/src/ksp/ksp/impls/cg/cg.c +++ b/src/ksp/ksp/impls/cg/cg.c @@ -1,4 +1,3 @@ - /* This file implements the conjugate gradient method in PETSc as part of KSP. You can use this as a starting point for implementing your own diff --git a/src/ksp/ksp/impls/cg/cgeig.c b/src/ksp/ksp/impls/cg/cgeig.c index 2585fa4e771..da8276fa259 100644 --- a/src/ksp/ksp/impls/cg/cgeig.c +++ b/src/ksp/ksp/impls/cg/cgeig.c @@ -1,4 +1,3 @@ - /* Code for calculating extreme eigenvalues via the Lanczo method running with CG. Note this only works for symmetric real and Hermitian diff --git a/src/ksp/ksp/impls/cg/cgne/cgne.c b/src/ksp/ksp/impls/cg/cgne/cgne.c index 3ea6b52f62c..6b35a9e3d27 100644 --- a/src/ksp/ksp/impls/cg/cgne/cgne.c +++ b/src/ksp/ksp/impls/cg/cgne/cgne.c @@ -1,4 +1,3 @@ - /* cgimpl.h defines the simple data structured used to store information related to the type of matrix (e.g. complex symmetric) being solved and diff --git a/src/ksp/ksp/impls/cg/cgtype.c b/src/ksp/ksp/impls/cg/cgtype.c index 90d3ce10949..8760936fdea 100644 --- a/src/ksp/ksp/impls/cg/cgtype.c +++ b/src/ksp/ksp/impls/cg/cgtype.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/cg/cgimpl.h> /*I "petscksp.h" I*/ /*@ diff --git a/src/ksp/ksp/impls/cg/gltr/gltr.c b/src/ksp/ksp/impls/cg/gltr/gltr.c index a48965db063..f782de56dfe 100644 --- a/src/ksp/ksp/impls/cg/gltr/gltr.c +++ b/src/ksp/ksp/impls/cg/gltr/gltr.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/cg/gltr/gltrimpl.h> /*I "petscksp.h" I*/ #include diff --git a/src/ksp/ksp/impls/cg/nash/nash.c b/src/ksp/ksp/impls/cg/nash/nash.c index 86a4c72b6f8..cb6c8587558 100644 --- a/src/ksp/ksp/impls/cg/nash/nash.c +++ b/src/ksp/ksp/impls/cg/nash/nash.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/cg/nash/nashimpl.h> /*I "petscksp.h" I*/ #define NASH_PRECONDITIONED_DIRECTION 0 diff --git a/src/ksp/ksp/impls/cg/pipecg/pipecg.c b/src/ksp/ksp/impls/cg/pipecg/pipecg.c index dc72c3833a2..b5c055b322f 100644 --- a/src/ksp/ksp/impls/cg/pipecg/pipecg.c +++ b/src/ksp/ksp/impls/cg/pipecg/pipecg.c @@ -1,4 +1,3 @@ - #include /* diff --git a/src/ksp/ksp/impls/cg/pipecgrr/pipecgrr.c b/src/ksp/ksp/impls/cg/pipecgrr/pipecgrr.c index dd79e59035e..9b4e96e3ffa 100644 --- a/src/ksp/ksp/impls/cg/pipecgrr/pipecgrr.c +++ b/src/ksp/ksp/impls/cg/pipecgrr/pipecgrr.c @@ -1,4 +1,3 @@ - #include /* diff --git a/src/ksp/ksp/impls/cg/stcg/stcg.c b/src/ksp/ksp/impls/cg/stcg/stcg.c index 9055aa8a97e..eee957b89db 100644 --- a/src/ksp/ksp/impls/cg/stcg/stcg.c +++ b/src/ksp/ksp/impls/cg/stcg/stcg.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/cg/stcg/stcgimpl.h> /*I "petscksp.h" I*/ #define STCG_PRECONDITIONED_DIRECTION 0 diff --git a/src/ksp/ksp/impls/cgs/cgs.c b/src/ksp/ksp/impls/cgs/cgs.c index 348d66e93c3..e648f731aa8 100644 --- a/src/ksp/ksp/impls/cgs/cgs.c +++ b/src/ksp/ksp/impls/cgs/cgs.c @@ -1,4 +1,3 @@ - /* Note that for the complex numbers version, the VecDot() arguments within the code MUST remain in the order given for correct computation diff --git a/src/ksp/ksp/impls/cr/cr.c b/src/ksp/ksp/impls/cr/cr.c index ef96a1eb205..235d3703ff1 100644 --- a/src/ksp/ksp/impls/cr/cr.c +++ b/src/ksp/ksp/impls/cr/cr.c @@ -1,4 +1,3 @@ - #include static PetscErrorCode KSPSetUp_CR(KSP ksp) diff --git a/src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c b/src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c index 585624ed319..e21d16df73f 100644 --- a/src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c +++ b/src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/fcg/pipefcg/pipefcgimpl.h> /*I "petscksp.h" I*/ static PetscBool cited = PETSC_FALSE; diff --git a/src/ksp/ksp/impls/fetidp/fetidp.c b/src/ksp/ksp/impls/fetidp/fetidp.c index f48134752f1..459c0d1547e 100644 --- a/src/ksp/ksp/impls/fetidp/fetidp.c +++ b/src/ksp/ksp/impls/fetidp/fetidp.c @@ -970,7 +970,7 @@ static PetscErrorCode KSPFETIDPSetUpOperators(KSP ksp) PetscCall(MatDestroy(&B)); PetscCall(ISDestroy(&l2l)); } - if (A != Ap) { /* user has provided a different Pmat, this always superseeds the setter (TODO: is it OK?) */ + if (A != Ap) { /* user has provided a different Pmat, this always supersedes the setter (TODO: is it OK?) */ /* use monolithic operator, we restrict later */ PetscCall(KSPFETIDPSetPressureOperator(ksp, Ap)); } diff --git a/src/ksp/ksp/impls/gcr/gcr.c b/src/ksp/ksp/impls/gcr/gcr.c index 998d1fe6590..8a374cd1885 100644 --- a/src/ksp/ksp/impls/gcr/gcr.c +++ b/src/ksp/ksp/impls/gcr/gcr.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ typedef struct { diff --git a/src/ksp/ksp/impls/gcr/pipegcr/pipegcr.c b/src/ksp/ksp/impls/gcr/pipegcr/pipegcr.c index db00456074c..8c1901093ab 100644 --- a/src/ksp/ksp/impls/gcr/pipegcr/pipegcr.c +++ b/src/ksp/ksp/impls/gcr/pipegcr/pipegcr.c @@ -1,4 +1,3 @@ - #include "petscsys.h" #include <../src/ksp/ksp/impls/gcr/pipegcr/pipegcrimpl.h> /*I "petscksp.h" I*/ diff --git a/src/ksp/ksp/impls/gmres/agmres/agmres.c b/src/ksp/ksp/impls/gmres/agmres/agmres.c index 7bfa544f9f6..1756d60bddd 100644 --- a/src/ksp/ksp/impls/gmres/agmres/agmres.c +++ b/src/ksp/ksp/impls/gmres/agmres/agmres.c @@ -1,4 +1,3 @@ - #define PETSCKSP_DLL #include <../src/ksp/ksp/impls/gmres/agmres/agmresimpl.h> diff --git a/src/ksp/ksp/impls/gmres/borthog.c b/src/ksp/ksp/impls/gmres/borthog.c index 663932f3c81..c521ada10f0 100644 --- a/src/ksp/ksp/impls/gmres/borthog.c +++ b/src/ksp/ksp/impls/gmres/borthog.c @@ -1,4 +1,3 @@ - /* Routines used for the orthogonalization of the Hessenberg matrix. diff --git a/src/ksp/ksp/impls/gmres/borthog2.c b/src/ksp/ksp/impls/gmres/borthog2.c index f1b41695a63..5aa38756fad 100644 --- a/src/ksp/ksp/impls/gmres/borthog2.c +++ b/src/ksp/ksp/impls/gmres/borthog2.c @@ -1,4 +1,3 @@ - /* Routines used for the orthogonalization of the Hessenberg matrix. diff --git a/src/ksp/ksp/impls/gmres/fgmres/fgmres.c b/src/ksp/ksp/impls/gmres/fgmres/fgmres.c index 364375eefe8..8ab2425c2b9 100644 --- a/src/ksp/ksp/impls/gmres/fgmres/fgmres.c +++ b/src/ksp/ksp/impls/gmres/fgmres/fgmres.c @@ -1,4 +1,3 @@ - /* This file implements FGMRES (a Generalized Minimal Residual) method. Reference: Saad, 1993. diff --git a/src/ksp/ksp/impls/gmres/fgmres/modpcf.c b/src/ksp/ksp/impls/gmres/fgmres/modpcf.c index 9e3a9403a34..12d50c0184e 100644 --- a/src/ksp/ksp/impls/gmres/fgmres/modpcf.c +++ b/src/ksp/ksp/impls/gmres/fgmres/modpcf.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ /*@C diff --git a/src/ksp/ksp/impls/gmres/gmpre.c b/src/ksp/ksp/impls/gmres/gmpre.c index 47cbfb72ff3..824785a5ea4 100644 --- a/src/ksp/ksp/impls/gmres/gmpre.c +++ b/src/ksp/ksp/impls/gmres/gmpre.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/gmres/gmresimpl.h> /*I "petscksp.h" I*/ /*@ diff --git a/src/ksp/ksp/impls/gmres/gmreig.c b/src/ksp/ksp/impls/gmres/gmreig.c index 8b421063242..853ab7e9127 100644 --- a/src/ksp/ksp/impls/gmres/gmreig.c +++ b/src/ksp/ksp/impls/gmres/gmreig.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/gmres/gmresimpl.h> #include diff --git a/src/ksp/ksp/impls/gmres/gmres2.c b/src/ksp/ksp/impls/gmres/gmres2.c index 866065ba6c8..f9b0165a3fa 100644 --- a/src/ksp/ksp/impls/gmres/gmres2.c +++ b/src/ksp/ksp/impls/gmres/gmres2.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/gmres/gmresimpl.h> /*I "petscksp.h" I*/ /*@C diff --git a/src/ksp/ksp/impls/gmres/lgmres/lgmres.c b/src/ksp/ksp/impls/gmres/lgmres/lgmres.c index 8003a977f0b..44ab4aa64fc 100644 --- a/src/ksp/ksp/impls/gmres/lgmres/lgmres.c +++ b/src/ksp/ksp/impls/gmres/lgmres/lgmres.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/gmres/lgmres/lgmresimpl.h> /*I "petscksp.h" I*/ static PetscErrorCode KSPLGMRESGetNewVectors(KSP, PetscInt); diff --git a/src/ksp/ksp/impls/gmres/pgmres/pgmres.c b/src/ksp/ksp/impls/gmres/pgmres/pgmres.c index 2a73e205b75..85396427629 100644 --- a/src/ksp/ksp/impls/gmres/pgmres/pgmres.c +++ b/src/ksp/ksp/impls/gmres/pgmres/pgmres.c @@ -1,4 +1,3 @@ - /* This file implements PGMRES (a Pipelined Generalized Minimal Residual method) */ diff --git a/src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c b/src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c index 0ec4ed9a97a..c0598103eba 100644 --- a/src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c +++ b/src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/gmres/pipefgmres/pipefgmresimpl.h> /*I "petscksp.h" I*/ static PetscBool cited = PETSC_FALSE; diff --git a/src/ksp/ksp/impls/ibcgs/ibcgs.c b/src/ksp/ksp/impls/ibcgs/ibcgs.c index 7edd001eb43..1b8a90ca2f0 100644 --- a/src/ksp/ksp/impls/ibcgs/ibcgs.c +++ b/src/ksp/ksp/impls/ibcgs/ibcgs.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/ksp/ksp/impls/lcd/lcd.c b/src/ksp/ksp/impls/lcd/lcd.c index 7adb5da26d5..5fa33654e5b 100644 --- a/src/ksp/ksp/impls/lcd/lcd.c +++ b/src/ksp/ksp/impls/lcd/lcd.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/lcd/lcdimpl.h> static PetscErrorCode KSPSetUp_LCD(KSP ksp) diff --git a/src/ksp/ksp/impls/lsqr/lsqr.c b/src/ksp/ksp/impls/lsqr/lsqr.c index bb9b25eb060..6f05776ab80 100644 --- a/src/ksp/ksp/impls/lsqr/lsqr.c +++ b/src/ksp/ksp/impls/lsqr/lsqr.c @@ -1,4 +1,3 @@ - /* lourens.vanzanen@shell.com contributed the standard error estimates of the solution, Jul 25, 2006 */ /* Bas van't Hof contributed the preconditioned aspects Feb 10, 2010 */ diff --git a/src/ksp/ksp/impls/preonly/preonly.c b/src/ksp/ksp/impls/preonly/preonly.c index d6f166f8036..5f86abd0c0c 100644 --- a/src/ksp/ksp/impls/preonly/preonly.c +++ b/src/ksp/ksp/impls/preonly/preonly.c @@ -1,4 +1,3 @@ - #include static PetscErrorCode KSPSetUp_PREONLY(KSP ksp) @@ -77,6 +76,21 @@ static PetscErrorCode KSPMatSolve_PREONLY(KSP ksp, Mat B, Mat X) PetscFunctionReturn(PETSC_SUCCESS); } +/*MC + KSPNONE - An alias for `KSPPREONLY` + + Options Database Key: +. -ksp_type none - use a single application of the preconditioner only + + Level: beginner + + Note: + See `KSPPREONLY` for more details + +.seealso: [](ch_ksp), `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSPPREONLY`, `KSP`, `KSPRICHARDSON`, `KSPCHEBYSHEV`, `KSPGetPC()`, `KSPSetInitialGuessNonzero()`, + `PCREDISTRIBUTE`, `PCRedistributeGetKSP()` +M*/ + /*MC KSPPREONLY - This implements a method that applies ONLY the preconditioner exactly once. This may be used in inner iterations, where it is desired to @@ -85,7 +99,7 @@ static PetscErrorCode KSPMatSolve_PREONLY(KSP ksp, Mat B, Mat X) There is an alias of this with the name `KSPNONE`. Options Database Key: -. -ksp_type preonly - use preconditioner only +. -ksp_type preonly - use a single application of the preconditioner only Level: beginner @@ -106,7 +120,7 @@ static PetscErrorCode KSPMatSolve_PREONLY(KSP ksp, Mat B, Mat X) This is so the users does not have to change `KSPNormType` options when they switch from other `KSP` methods to this one. .seealso: [](ch_ksp), `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSP`, `KSPRICHARDSON`, `KSPCHEBYSHEV`, `KSPGetPC()`, `KSPSetInitialGuessNonzero()`, - `PCREDISTRIBUTE`, `PCRedistributedGetKSP()` + `PCREDISTRIBUTE`, `PCRedistributeGetKSP()` M*/ PETSC_EXTERN PetscErrorCode KSPCreate_PREONLY(KSP ksp) diff --git a/src/ksp/ksp/impls/qcg/qcg.c b/src/ksp/ksp/impls/qcg/qcg.c index 14b40243ce0..54336a4de1b 100644 --- a/src/ksp/ksp/impls/qcg/qcg.c +++ b/src/ksp/ksp/impls/qcg/qcg.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/qcg/qcgimpl.h> /*I "petscksp.h" I*/ /* @@ -126,7 +125,7 @@ PetscErrorCode KSPQCGGetQuadratic(KSP ksp, PetscReal *quadratic) static PetscErrorCode KSPSolve_QCG(KSP ksp) { /* - Correpondence with documentation above: + Correspondence with documentation above: B = g = gradient, X = s = step Note: This is not coded correctly for complex arithmetic! diff --git a/src/ksp/ksp/impls/rich/rich.c b/src/ksp/ksp/impls/rich/rich.c index c85f05a089d..24018f5fdf8 100644 --- a/src/ksp/ksp/impls/rich/rich.c +++ b/src/ksp/ksp/impls/rich/rich.c @@ -1,4 +1,3 @@ - /* This implements Richardson Iteration. */ diff --git a/src/ksp/ksp/impls/rich/richscale.c b/src/ksp/ksp/impls/rich/richscale.c index 03739d6aa60..c7d6a8bc93c 100644 --- a/src/ksp/ksp/impls/rich/richscale.c +++ b/src/ksp/ksp/impls/rich/richscale.c @@ -1,4 +1,3 @@ - #include <../src/ksp/ksp/impls/rich/richardsonimpl.h> /*I "petscksp.h" I*/ /*@ diff --git a/src/ksp/ksp/impls/symmlq/symmlq.c b/src/ksp/ksp/impls/symmlq/symmlq.c index 44dd9521aa6..ae9b5b46314 100644 --- a/src/ksp/ksp/impls/symmlq/symmlq.c +++ b/src/ksp/ksp/impls/symmlq/symmlq.c @@ -1,4 +1,3 @@ - #include typedef struct { diff --git a/src/ksp/ksp/impls/tcqmr/tcqmr.c b/src/ksp/ksp/impls/tcqmr/tcqmr.c index 986e78a53ce..7380bea0a0f 100644 --- a/src/ksp/ksp/impls/tcqmr/tcqmr.c +++ b/src/ksp/ksp/impls/tcqmr/tcqmr.c @@ -1,4 +1,3 @@ - /* This file contains an implementation of Tony Chan's transpose-free QMR. diff --git a/src/ksp/ksp/impls/tfqmr/tfqmr.c b/src/ksp/ksp/impls/tfqmr/tfqmr.c index b6747ce5e5b..4dc4804c5ff 100644 --- a/src/ksp/ksp/impls/tfqmr/tfqmr.c +++ b/src/ksp/ksp/impls/tfqmr/tfqmr.c @@ -1,4 +1,3 @@ - #include static PetscErrorCode KSPSetUp_TFQMR(KSP ksp) diff --git a/src/ksp/ksp/impls/tsirm/tsirm.c b/src/ksp/ksp/impls/tsirm/tsirm.c index 48bb6daffae..facd4a03ea9 100644 --- a/src/ksp/ksp/impls/tsirm/tsirm.c +++ b/src/ksp/ksp/impls/tsirm/tsirm.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ typedef struct { diff --git a/src/ksp/ksp/interface/dlregisksp.c b/src/ksp/ksp/interface/dlregisksp.c index e4bcfa2c6e6..6b1e149d2f9 100644 --- a/src/ksp/ksp/interface/dlregisksp.c +++ b/src/ksp/ksp/interface/dlregisksp.c @@ -1,4 +1,3 @@ - #include #include /* For new events */ #include diff --git a/src/ksp/ksp/interface/eige.c b/src/ksp/ksp/interface/eige.c index 16a1d025fa8..5f2f5fcd781 100644 --- a/src/ksp/ksp/interface/eige.c +++ b/src/ksp/ksp/interface/eige.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ #include #include diff --git a/src/ksp/ksp/interface/f90-custom/zitfuncf90.c b/src/ksp/ksp/interface/f90-custom/zitfuncf90.c index 02e2438fd1e..152b134a650 100644 --- a/src/ksp/ksp/interface/f90-custom/zitfuncf90.c +++ b/src/ksp/ksp/interface/f90-custom/zitfuncf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/ksp/ksp/interface/itcl.c b/src/ksp/ksp/interface/itcl.c index f8c2ce06fe4..faaa8cb5f8b 100644 --- a/src/ksp/ksp/interface/itcl.c +++ b/src/ksp/ksp/interface/itcl.c @@ -1,4 +1,3 @@ - /* Code for setting KSP options from the options database. */ @@ -292,7 +291,7 @@ PETSC_INTERN PetscErrorCode KSPCheckPCMPI(KSP); Options Database Keys: + -ksp_max_it - maximum number of linear iterations -. -ksp_min_it - miminum number of linear iterations to use, defaults to zero +. -ksp_min_it - minimum number of linear iterations to use, defaults to zero . -ksp_rtol rtol - relative tolerance used in default determination of convergence, i.e. if residual norm decreases by this factor than convergence is declared . -ksp_atol abstol - absolute tolerance used in default convergence test, i.e. if residual diff --git a/src/ksp/ksp/interface/iterativ.c b/src/ksp/ksp/interface/iterativ.c index aaece7d5360..34923fe8961 100644 --- a/src/ksp/ksp/interface/iterativ.c +++ b/src/ksp/ksp/interface/iterativ.c @@ -1704,7 +1704,7 @@ PetscErrorCode KSPBuildSolutionDefault(KSP ksp, Vec v, Vec *V) Note: Some `KSP` methods such as `KSPGMRES` do not compute the explicit residual at each iteration, this routine takes the information - they have computed during the previous iterations and uses it to compute the explicit residual vai the formula r = b - A*x. + they have computed during the previous iterations and uses it to compute the explicit residual via the formula r = b - A*x. Developer Notes: This is PETSC_EXTERN because it may be used by user written plugin `KSPType` implementations diff --git a/src/ksp/ksp/interface/itres.c b/src/ksp/ksp/interface/itres.c index 15896784666..7ad1bf238fd 100644 --- a/src/ksp/ksp/interface/itres.c +++ b/src/ksp/ksp/interface/itres.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ /*@ diff --git a/src/ksp/ksp/interface/xmon.c b/src/ksp/ksp/interface/xmon.c index c8d41664654..c864b0d4b3e 100644 --- a/src/ksp/ksp/interface/xmon.c +++ b/src/ksp/ksp/interface/xmon.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ #include diff --git a/src/ksp/ksp/tests/benchmarkscatters/ex1.c b/src/ksp/ksp/tests/benchmarkscatters/ex1.c index a1c939f28ec..7b5ea831ac8 100644 --- a/src/ksp/ksp/tests/benchmarkscatters/ex1.c +++ b/src/ksp/ksp/tests/benchmarkscatters/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Used to benchmark changes to the PETSc VecScatter routines\n\n"; #include extern PetscErrorCode PetscLogView_VecScatter(PetscViewer); diff --git a/src/ksp/ksp/tests/benchmarkscatters/ex2.c b/src/ksp/ksp/tests/benchmarkscatters/ex2.c index 79713c21ec6..cf66331f673 100644 --- a/src/ksp/ksp/tests/benchmarkscatters/ex2.c +++ b/src/ksp/ksp/tests/benchmarkscatters/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests shared memory subcommunicators\n\n"; #include #include diff --git a/src/ksp/ksp/tests/ex1.c b/src/ksp/ksp/tests/ex1.c index c6d1ad37b06..5dc8ab7a2eb 100644 --- a/src/ksp/ksp/tests/ex1.c +++ b/src/ksp/ksp/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests solving linear system on 0 by 0 matrix, and KSPLSQR convergence test handling.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex10.c b/src/ksp/ksp/tests/ex10.c index 6a339510686..16fa4e50dee 100644 --- a/src/ksp/ksp/tests/ex10.c +++ b/src/ksp/ksp/tests/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Linear elastiticty with dimensions using 20 node serendipity elements.\n\ This also demonstrates use of block\n\ diagonal data structure. Input arguments are:\n\ diff --git a/src/ksp/ksp/tests/ex11.c b/src/ksp/ksp/tests/ex11.c index d0d1dd3f190..34c7f6e17a1 100644 --- a/src/ksp/ksp/tests/ex11.c +++ b/src/ksp/ksp/tests/ex11.c @@ -1,6 +1,6 @@ static const char help[] = "Solves a Q1-P0 Stokes problem from Underworld.\n\ \n\ -You can obtain a sample matrix from http://ftp.mcs.anl.gov/pub/petsc/Datafiles/matrices/underworld32.gz\n\ +You can obtain a sample matrix from https://web.cels.anl.gov/projects/petsc/download/Datafiles/matrices/underworld32.gz\n\ and run with -f underworld32.gz\n\n"; #include @@ -279,7 +279,7 @@ int main(int argc, char **argv) /*TEST test: - args: -f ${DATAFILESPATH}/matrices/underworld32.gz -fc_ksp_view -fc_ksp_monitor_short -fc_ksp_type fgmres -fc_ksp_max_it 4000 -fc_ksp_diagonal_scale -fc_pc_type fieldsplit -fc_pc_fieldsplit_type SCHUR -fc_pc_fieldsplit_schur_fact_type UPPER -fc_fieldsplit_velocity_ksp_type cg -fc_fieldsplit_velocity_pc_type cholesky -fc_fieldsplit_velocity_pc_factor_mat_ordering_type nd -fc_fieldsplit_pressure_ksp_max_it 100 -fc_fieldsplit_pressure_ksp_constant_null_space -fc_fieldsplit_pressure_ksp_monitor_short -fc_fieldsplit_pressure_pc_type lsc -fc_fieldsplit_pressure_lsc_ksp_type cg -fc_fieldsplit_pressure_lsc_ksp_max_it 100 -fc_fieldsplit_pressure_lsc_ksp_constant_null_space -fc_fieldsplit_pressure_lsc_ksp_converged_reason -fc_fieldsplit_pressure_lsc_pc_type icc -test_fs {{0 1}separate output} -fc_pc_fieldsplit_off_diag_use_amat {{0 1}separate output} -fc_pc_fieldsplit_diag_use_amat {{0 1}separate output} + args: -f ${DATAFILESPATH}/matrices/underworld32.gz -fc_ksp_view -fc_ksp_monitor_short -fc_ksp_type fgmres -fc_ksp_max_it 4000 -fc_ksp_diagonal_scale -fc_pc_type fieldsplit -fc_pc_fieldsplit_type SCHUR -fc_pc_fieldsplit_schur_fact_type UPPER -fc_fieldsplit_velocity_ksp_type cg -fc_fieldsplit_velocity_pc_type cholesky -fc_fieldsplit_velocity_pc_factor_mat_ordering_type nd -fc_fieldsplit_pressure_ksp_max_it 100 -fc_fieldsplit_pressure_ksp_constant_null_space -fc_fieldsplit_pressure_ksp_monitor_short -fc_fieldsplit_pressure_pc_type lsc -fc_fieldsplit_pressure_lsc_ksp_type cg -fc_fieldsplit_pressure_lsc_ksp_max_it 100 -fc_fieldsplit_pressure_lsc_ksp_constant_null_space -fc_fieldsplit_pressure_lsc_ksp_converged_reason -fc_fieldsplit_pressure_lsc_pc_type icc -test_fs {{0 1}separate output} -fc_pc_fieldsplit_off_diag_use_amat {{0 1}separate output} -fc_pc_fieldsplit_diag_use_amat {{0 1}separate output} -fc_fieldsplit_velocity_mat_block_size 2 requires: datafilespath double !complex !defined(PETSC_USE_64BIT_INDICES) test: diff --git a/src/ksp/ksp/tests/ex14.c b/src/ksp/ksp/tests/ex14.c index 4c858dddec6..b373209f1bb 100644 --- a/src/ksp/ksp/tests/ex14.c +++ b/src/ksp/ksp/tests/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a nonlinear system in parallel with a user-defined Newton method.\n\ Uses KSP to solve the linearized Newton systems. This solver\n\ is a very simplistic inexact Newton method. The intent of this code is to\n\ diff --git a/src/ksp/ksp/tests/ex15.c b/src/ksp/ksp/tests/ex15.c index 93ac49eab58..91dd5ed60bc 100644 --- a/src/ksp/ksp/tests/ex15.c +++ b/src/ksp/ksp/tests/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "KSP linear solver on an operator with a null space.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex17.c b/src/ksp/ksp/tests/ex17.c index 08f4c43cd31..5b57e823697 100644 --- a/src/ksp/ksp/tests/ex17.c +++ b/src/ksp/ksp/tests/ex17.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system with KSP. This problem is\n\ intended to test the complex numbers version of various solvers.\n\n"; diff --git a/src/ksp/ksp/tests/ex18.c b/src/ksp/ksp/tests/ex18.c index 2120b11200b..dc6e0b1b7a8 100644 --- a/src/ksp/ksp/tests/ex18.c +++ b/src/ksp/ksp/tests/ex18.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file and solves a linear system.\n\ Input arguments are:\n\ -f : file to load. For example see $PETSC_DIR/share/petsc/datafiles/matrices\n\n"; diff --git a/src/ksp/ksp/tests/ex19.c b/src/ksp/ksp/tests/ex19.c index c6ec62f7ef4..6125850f204 100644 --- a/src/ksp/ksp/tests/ex19.c +++ b/src/ksp/ksp/tests/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Solvers Laplacian with multigrid, bad way.\n\ -mx , where = number of grid points in the x-direction\n\ -my , where = number of grid points in the y-direction\n\ diff --git a/src/ksp/ksp/tests/ex2.c b/src/ksp/ksp/tests/ex2.c index da2c32d0162..03055c7d916 100644 --- a/src/ksp/ksp/tests/ex2.c +++ b/src/ksp/ksp/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests repeated solving linear system on 2 by 2 matrix provided by MUMPS developer, Dec 17, 2012.\n\n"; /* We have investigated the problem further, and we have diff --git a/src/ksp/ksp/tests/ex20.c b/src/ksp/ksp/tests/ex20.c index f6a7d4ab375..fcbabf65b09 100644 --- a/src/ksp/ksp/tests/ex20.c +++ b/src/ksp/ksp/tests/ex20.c @@ -1,4 +1,3 @@ - static char help[] = "Bilinear elements on the unit square for Laplacian. To test the parallel\n\ matrix assembly,the matrix is intentionally laid out across processors\n\ differently from the way it is assembled. Input arguments are:\n\ diff --git a/src/ksp/ksp/tests/ex24.c b/src/ksp/ksp/tests/ex24.c index c4021a6ca06..8097ded92ee 100644 --- a/src/ksp/ksp/tests/ex24.c +++ b/src/ksp/ksp/tests/ex24.c @@ -1,4 +1,3 @@ - static char help[] = "Tests CG, MINRES and SYMMLQ on symmetric matrices with SBAIJ format. The preconditioner ICC only works on sequential SBAIJ format. \n\n"; #include diff --git a/src/ksp/ksp/tests/ex27.c b/src/ksp/ksp/tests/ex27.c index 227d1e2fc4b..fcf6b8ff3f2 100644 --- a/src/ksp/ksp/tests/ex27.c +++ b/src/ksp/ksp/tests/ex27.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file and solves a linear system.\n\ Test MatMatSolve(). Input parameters include\n\ -f : file to load \n\n"; @@ -74,7 +73,7 @@ int main(int argc, char **args) PetscCall(VecDuplicate(b, &u)); PetscCall(VecSet(x, 0.0)); - /* Create dense matric B and X. Set B as an identity matrix */ + /* Create dense matrices B and X. Set B as an identity matrix */ PetscCall(MatGetSize(A, &M, &N)); PetscCall(MatCreate(MPI_COMM_SELF, &B)); PetscCall(MatSetSizes(B, M, N, M, N)); diff --git a/src/ksp/ksp/tests/ex28.c b/src/ksp/ksp/tests/ex28.c index 45d2ca872e5..a8904dd4a8f 100644 --- a/src/ksp/ksp/tests/ex28.c +++ b/src/ksp/ksp/tests/ex28.c @@ -1,4 +1,3 @@ - static char help[] = "Test procedural KSPSetFromOptions() or at runtime; Test PCREDUNDANT.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex29.c b/src/ksp/ksp/tests/ex29.c index 4465a98103c..4fb7df6f6e8 100644 --- a/src/ksp/ksp/tests/ex29.c +++ b/src/ksp/ksp/tests/ex29.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ML interface. Modified from ~src/ksp/ksp/tests/ex19.c \n\ -mx , where = number of grid points in the x-direction\n\ -my , where = number of grid points in the y-direction\n\ diff --git a/src/ksp/ksp/tests/ex3.c b/src/ksp/ksp/tests/ex3.c index b91548904e4..c68895c82d3 100644 --- a/src/ksp/ksp/tests/ex3.c +++ b/src/ksp/ksp/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Bilinear elements on the unit square for Laplacian. To test the parallel\n\ matrix assembly, the matrix is intentionally laid out across processors\n\ differently from the way it is assembled. Input arguments are:\n\ diff --git a/src/ksp/ksp/tests/ex30.c b/src/ksp/ksp/tests/ex30.c index 2b2c9be5581..d05b41e8580 100644 --- a/src/ksp/ksp/tests/ex30.c +++ b/src/ksp/ksp/tests/ex30.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file and solves a linear system.\n\ It is copied and intended to move dirty codes from ksp/tutorials/ex10.c and simplify ex10.c.\n\ Input parameters include\n\ diff --git a/src/ksp/ksp/tests/ex31.c b/src/ksp/ksp/tests/ex31.c index b795af354ff..c1155015407 100644 --- a/src/ksp/ksp/tests/ex31.c +++ b/src/ksp/ksp/tests/ex31.c @@ -1,4 +1,3 @@ - static char help[] = "Test partition. Reads a PETSc matrix and vector from a file and solves a linear system.\n\ This Input parameters include\n\ -f : file to load \n\ diff --git a/src/ksp/ksp/tests/ex34.c b/src/ksp/ksp/tests/ex34.c index 39fc8738113..da2070553d1 100644 --- a/src/ksp/ksp/tests/ex34.c +++ b/src/ksp/ksp/tests/ex34.c @@ -1,4 +1,3 @@ - static char help[] = "Tests solving linear system with KSPFGMRES + PCSOR (omega != 1) on a matrix obtained from MatTransposeMatMult.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex37.c b/src/ksp/ksp/tests/ex37.c index 1b66c76dca3..2a2317f2e6d 100644 --- a/src/ksp/ksp/tests/ex37.c +++ b/src/ksp/ksp/tests/ex37.c @@ -1,4 +1,3 @@ - static char help[] = "Test MatGetMultiProcBlock() and MatCreateRedundantMatrix() \n\ Reads a PETSc matrix and vector from a file and solves a linear system.\n\n"; /* diff --git a/src/ksp/ksp/tests/ex4.c b/src/ksp/ksp/tests/ex4.c index fe3a8c3d04e..bc8aafcb527 100644 --- a/src/ksp/ksp/tests/ex4.c +++ b/src/ksp/ksp/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Bilinear elements on the unit square for the Laplacian. Input arguments are:\n\ -m : problem size\n\n"; diff --git a/src/ksp/ksp/tests/ex40.c b/src/ksp/ksp/tests/ex40.c index c8b269d7fc3..1c0c4594afa 100644 --- a/src/ksp/ksp/tests/ex40.c +++ b/src/ksp/ksp/tests/ex40.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP.\n\ Input parameters include:\n\ -random_exact_sol : use a random exact solution vector\n\ diff --git a/src/ksp/ksp/tests/ex42.c b/src/ksp/ksp/tests/ex42.c index 5736caf8960..77c974e9558 100644 --- a/src/ksp/ksp/tests/ex42.c +++ b/src/ksp/ksp/tests/ex42.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with MINRES.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex44.c b/src/ksp/ksp/tests/ex44.c index 67ac9987c75..aec05eef29b 100644 --- a/src/ksp/ksp/tests/ex44.c +++ b/src/ksp/ksp/tests/ex44.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a tridiagonal linear system. Designed to compare SOR for different Mat impls.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex49.c b/src/ksp/ksp/tests/ex49.c index 52a0a56d556..fce2bba45f6 100644 --- a/src/ksp/ksp/tests/ex49.c +++ b/src/ksp/ksp/tests/ex49.c @@ -1,4 +1,3 @@ - static char help[] = "Tests SeqSBAIJ factorizations for different block sizes\n\n"; #include diff --git a/src/ksp/ksp/tests/ex5.c b/src/ksp/ksp/tests/ex5.c index e972b3c8bbe..66edb7c9d1b 100644 --- a/src/ksp/ksp/tests/ex5.c +++ b/src/ksp/ksp/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MATLMVM classes.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex50.c b/src/ksp/ksp/tests/ex50.c index 34249703cb1..2f44a168f39 100644 --- a/src/ksp/ksp/tests/ex50.c +++ b/src/ksp/ksp/tests/ex50.c @@ -1,4 +1,3 @@ - static char help[] = "Tests point block Jacobi and ILU for different block sizes\n\n"; #include diff --git a/src/ksp/ksp/tests/ex53.c b/src/ksp/ksp/tests/ex53.c index 2106b65ea81..fbfdd15bbce 100644 --- a/src/ksp/ksp/tests/ex53.c +++ b/src/ksp/ksp/tests/ex53.c @@ -1,4 +1,3 @@ - static char help[] = "Tests setup PCFIELDSPLIT with blocked IS.\n\n"; /* Contributed by Hoang Giang Bui, June 2017. diff --git a/src/ksp/ksp/tests/ex57.c b/src/ksp/ksp/tests/ex57.c index 80da6ee93ce..188546a7aa0 100644 --- a/src/ksp/ksp/tests/ex57.c +++ b/src/ksp/ksp/tests/ex57.c @@ -1,4 +1,3 @@ - /* Tests PCFIELDSPLIT and hence VecGetRestoreArray_Nest() usage in VecScatter diff --git a/src/ksp/ksp/tests/ex58.c b/src/ksp/ksp/tests/ex58.c index db1d6949b1b..c701281aa1f 100644 --- a/src/ksp/ksp/tests/ex58.c +++ b/src/ksp/ksp/tests/ex58.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a tridiagonal linear system with KSP.\n\n"; /* diff --git a/src/ksp/ksp/tests/ex7.c b/src/ksp/ksp/tests/ex7.c index 48fed888975..8dad87060e6 100644 --- a/src/ksp/ksp/tests/ex7.c +++ b/src/ksp/ksp/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Illustrate how to solves a matrix-free linear system with KSP.\n\n"; /* diff --git a/src/ksp/ksp/tests/ex70.c b/src/ksp/ksp/tests/ex70.c index d7a60f13624..4d7eea7eb64 100644 --- a/src/ksp/ksp/tests/ex70.c +++ b/src/ksp/ksp/tests/ex70.c @@ -1,4 +1,3 @@ - static char help[] = "Solves an ill-conditioned tridiagonal linear system with KSP for testing GMRES breakdown tolerance.\n\n"; #include diff --git a/src/ksp/ksp/tests/ex71f.F90 b/src/ksp/ksp/tests/ex71f.F90 index 6c8ff9852bf..e301049a65a 100644 --- a/src/ksp/ksp/tests/ex71f.F90 +++ b/src/ksp/ksp/tests/ex71f.F90 @@ -1,4 +1,3 @@ - ! Contributed by leonardo.mutti01@universitadipavia.it program main #include diff --git a/src/ksp/ksp/tests/ex8.c b/src/ksp/ksp/tests/ex8.c index 8e17c0fe9c4..036ee0952e8 100644 --- a/src/ksp/ksp/tests/ex8.c +++ b/src/ksp/ksp/tests/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP. \n\ Contributed by Jose E. Roman, SLEPc developer, for testing repeated call of KSPSetOperators(), 2014 \n\n"; diff --git a/src/ksp/ksp/tests/ex9.c b/src/ksp/ksp/tests/ex9.c index 663f6cd4860..0dc751905ec 100644 --- a/src/ksp/ksp/tests/ex9.c +++ b/src/ksp/ksp/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Tests repeated setups and solves of PCFIELDSPLIT.\n\n"; #include diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out index 8fdfbeabcf0..860a0a725a2 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out @@ -107,7 +107,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -286,7 +286,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out index 8fdfbeabcf0..860a0a725a2 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out @@ -107,7 +107,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -286,7 +286,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out index 8fdfbeabcf0..860a0a725a2 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out @@ -107,7 +107,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -286,7 +286,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out index 8fdfbeabcf0..860a0a725a2 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-0_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out @@ -107,7 +107,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -286,7 +286,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out index 10ee26f5546..661282676b6 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-0.out @@ -107,7 +107,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -296,7 +296,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out index 3056e1744b2..ef49a98642b 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-0_fc_pc_fieldsplit_diag_use_amat-1.out @@ -107,13 +107,13 @@ PC Object: (fc_) 1 MPI process linear system matrix followed by preconditioner matrix: Mat Object: (a11_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -302,13 +302,13 @@ PC Object: (fc_) 1 MPI process linear system matrix followed by preconditioner matrix: Mat Object: (a11_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out index 10ee26f5546..661282676b6 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-0.out @@ -107,7 +107,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -296,7 +296,7 @@ PC Object: (fc_) 1 MPI process linear system matrix = precond matrix: Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out index 3056e1744b2..ef49a98642b 100644 --- a/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out +++ b/src/ksp/ksp/tests/output/ex11_test_fs-1_fc_pc_fieldsplit_off_diag_use_amat-1_fc_pc_fieldsplit_diag_use_amat-1.out @@ -107,13 +107,13 @@ PC Object: (fc_) 1 MPI process linear system matrix followed by preconditioner matrix: Mat Object: (a11_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 @@ -302,13 +302,13 @@ PC Object: (fc_) 1 MPI process linear system matrix followed by preconditioner matrix: Mat Object: (a11_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 Mat Object: (fc_fieldsplit_velocity_) 1 MPI process type: seqaij - rows=2046, cols=2046 + rows=2046, cols=2046, bs=2 total: nonzeros=34952, allocated nonzeros=34952 total number of mallocs used during MatSetValues calls=0 using I-node routines: found 1085 nodes, limit used is 5 diff --git a/src/ksp/ksp/tutorials/amrex/initEB.cpp b/src/ksp/ksp/tutorials/amrex/initEB.cpp index e77d26793d3..cdbc8f8b3ea 100644 --- a/src/ksp/ksp/tutorials/amrex/initEB.cpp +++ b/src/ksp/ksp/tutorials/amrex/initEB.cpp @@ -1,4 +1,3 @@ - #include #include diff --git a/src/ksp/ksp/tutorials/amrex/main.cpp b/src/ksp/ksp/tutorials/amrex/main.cpp index e2a48c02d41..d6b867d6ff9 100644 --- a/src/ksp/ksp/tutorials/amrex/main.cpp +++ b/src/ksp/ksp/tutorials/amrex/main.cpp @@ -1,4 +1,3 @@ - #include #include "MyTest.H" diff --git a/src/ksp/ksp/tutorials/ex1.c b/src/ksp/ksp/tutorials/ex1.c index b9668a723f1..cef82c32f77 100644 --- a/src/ksp/ksp/tutorials/ex1.c +++ b/src/ksp/ksp/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a tridiagonal linear system with KSP.\n\n"; /* @@ -147,7 +146,7 @@ int main(int argc, char **args) */ PetscCall(KSPDestroy(&ksp)); - /* test if prefixes properly propogate to PCMPI objects */ + /* test if prefixes properly propagate to PCMPI objects */ if (PCMPIServerActive) { PetscCall(KSPCreate(PETSC_COMM_SELF, &ksp)); PetscCall(KSPSetOptionsPrefix(ksp, "prefix_test_")); diff --git a/src/ksp/ksp/tutorials/ex10.c b/src/ksp/ksp/tutorials/ex10.c index 3751f6a6d0d..06ec831e5c1 100644 --- a/src/ksp/ksp/tutorials/ex10.c +++ b/src/ksp/ksp/tutorials/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Solve a small system and a large system through preloading\n\ Input arguments are:\n\ -permute : solve system in permuted indexing\n\ diff --git a/src/ksp/ksp/tutorials/ex11.c b/src/ksp/ksp/tutorials/ex11.c index 93901529648..51374e7f9e2 100644 --- a/src/ksp/ksp/tutorials/ex11.c +++ b/src/ksp/ksp/tutorials/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP.\n\n"; /* diff --git a/src/ksp/ksp/tutorials/ex12.c b/src/ksp/ksp/tutorials/ex12.c index 095b3a0da8f..455c14230a5 100644 --- a/src/ksp/ksp/tutorials/ex12.c +++ b/src/ksp/ksp/tutorials/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP,\n\ demonstrating how to register a new preconditioner (PC) type.\n\ Input parameters include:\n\ diff --git a/src/ksp/ksp/tutorials/ex13.c b/src/ksp/ksp/tutorials/ex13.c index a2621a03b0f..dceda76a39c 100644 --- a/src/ksp/ksp/tutorials/ex13.c +++ b/src/ksp/ksp/tutorials/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a variable Poisson problem with KSP.\n\n"; /* diff --git a/src/ksp/ksp/tutorials/ex13f90.F90 b/src/ksp/ksp/tutorials/ex13f90.F90 index 69ac429f06f..f8227874baf 100644 --- a/src/ksp/ksp/tutorials/ex13f90.F90 +++ b/src/ksp/ksp/tutorials/ex13f90.F90 @@ -1,4 +1,3 @@ - module ex13f90module #include use petscksp diff --git a/src/ksp/ksp/tutorials/ex15.c b/src/ksp/ksp/tutorials/ex15.c index 5d16f6c45a0..42e97d22f79 100644 --- a/src/ksp/ksp/tutorials/ex15.c +++ b/src/ksp/ksp/tutorials/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP. Also\n\ illustrates setting a user-defined shell preconditioner and using the\n\ Input parameters include:\n\ diff --git a/src/ksp/ksp/tutorials/ex16.c b/src/ksp/ksp/tutorials/ex16.c index 7d8c6d249a7..3a22547c1a7 100644 --- a/src/ksp/ksp/tutorials/ex16.c +++ b/src/ksp/ksp/tutorials/ex16.c @@ -1,4 +1,3 @@ - /* Usage: mpiexec ex16 [-help] [all PETSc options] */ static char help[] = "Solves a sequence of linear systems with different right-hand-side vectors.\n\ diff --git a/src/ksp/ksp/tutorials/ex19.c b/src/ksp/ksp/tutorials/ex19.c index dce5e2426ec..dff324e958f 100644 --- a/src/ksp/ksp/tutorials/ex19.c +++ b/src/ksp/ksp/tutorials/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Solve a 2D 5-point stencil in parallel with Kokkos batched KSP and ASM solvers.\n\ Input parameters include:\n\ -n : number of mesh points in x direction\n\ @@ -85,22 +84,22 @@ int main(int argc, char **args) PetscCall(MatMPIAIJGetSeqAIJ(A, &Aseq, NULL, NULL)); } PetscCall(PCASMCreateSubdomains(Aseq, nblocks, &loc_blocks)); // A - Mat nest, arrray[10000]; - for (Ii = 0; Ii < 10000; Ii++) arrray[Ii] = NULL; + Mat nest, array[10000]; + for (Ii = 0; Ii < 10000; Ii++) array[Ii] = NULL; for (PetscInt bid = 0; bid < nblocks; bid++) { Mat matblock; PetscCall(MatCreateSubMatrix(Aseq, loc_blocks[bid], loc_blocks[bid], MAT_INITIAL_MATRIX, &matblock)); //PetscCall(MatViewFromOptions(matblock, NULL, "-view_b")); - arrray[bid * nblocks + bid] = matblock; + array[bid * nblocks + bid] = matblock; } PetscCall(MatCreate(PETSC_COMM_SELF, &nest)); PetscCall(MatSetFromOptions(nest)); PetscCall(MatSetType(nest, MATNEST)); - PetscCall(MatNestSetSubMats(nest, nblocks, NULL, nblocks, NULL, arrray)); + PetscCall(MatNestSetSubMats(nest, nblocks, NULL, nblocks, NULL, array)); PetscCall(MatSetUp(nest)); PetscCall(MatConvert(nest, MATAIJKOKKOS, MAT_INITIAL_MATRIX, &AA)); PetscCall(MatDestroy(&nest)); - for (PetscInt bid = 0; bid < nblocks; bid++) PetscCall(MatDestroy(&arrray[bid * nblocks + bid])); + for (PetscInt bid = 0; bid < nblocks; bid++) PetscCall(MatDestroy(&array[bid * nblocks + bid])); if (ismpi) { Mat AAseq; PetscCall(MatCreate(PETSC_COMM_WORLD, &Pmat)); diff --git a/src/ksp/ksp/tutorials/ex2.c b/src/ksp/ksp/tutorials/ex2.c index 32dfc56cab5..f831615b9c3 100644 --- a/src/ksp/ksp/tutorials/ex2.c +++ b/src/ksp/ksp/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP.\n\ Input parameters include:\n\ -view_exact_sol : write exact solution vector to stdout\n\ diff --git a/src/ksp/ksp/tutorials/ex21.c b/src/ksp/ksp/tutorials/ex21.c index 14293562abf..7815b6e04ae 100644 --- a/src/ksp/ksp/tutorials/ex21.c +++ b/src/ksp/ksp/tutorials/ex21.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a RBF kernel matrix with KSP and PCH2OPUS.\n\n"; #include diff --git a/src/ksp/ksp/tutorials/ex23.c b/src/ksp/ksp/tutorials/ex23.c index 38ba19094d2..015e3619edc 100644 --- a/src/ksp/ksp/tutorials/ex23.c +++ b/src/ksp/ksp/tutorials/ex23.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a tridiagonal linear system.\n\n"; /* diff --git a/src/ksp/ksp/tutorials/ex25.c b/src/ksp/ksp/tutorials/ex25.c index 22626cc4dd7..9f2bb70ac47 100644 --- a/src/ksp/ksp/tutorials/ex25.c +++ b/src/ksp/ksp/tutorials/ex25.c @@ -1,4 +1,3 @@ - /* Partial differential equation diff --git a/src/ksp/ksp/tutorials/ex27.c b/src/ksp/ksp/tutorials/ex27.c index b811f32f8ec..198b7473cf2 100644 --- a/src/ksp/ksp/tutorials/ex27.c +++ b/src/ksp/ksp/tutorials/ex27.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file and solves the normal equations.\n\n"; /* diff --git a/src/ksp/ksp/tutorials/ex28.c b/src/ksp/ksp/tutorials/ex28.c index a928deea7a4..edb2bc983e8 100644 --- a/src/ksp/ksp/tutorials/ex28.c +++ b/src/ksp/ksp/tutorials/ex28.c @@ -1,4 +1,3 @@ - static char help[] = "Solves 1D wave equation using multigrid.\n\n"; #include diff --git a/src/ksp/ksp/tutorials/ex29.c b/src/ksp/ksp/tutorials/ex29.c index bca415b5fdb..bd4979b40b4 100644 --- a/src/ksp/ksp/tutorials/ex29.c +++ b/src/ksp/ksp/tutorials/ex29.c @@ -1,4 +1,3 @@ - /* Added at the request of Marc Garbey. diff --git a/src/ksp/ksp/tutorials/ex3.c b/src/ksp/ksp/tutorials/ex3.c index bdecf0b3799..80ae7fb7012 100644 --- a/src/ksp/ksp/tutorials/ex3.c +++ b/src/ksp/ksp/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Bilinear elements on the unit square for Laplacian. To test the parallel\n\ matrix assembly, the matrix is intentionally laid out across processors\n\ differently from the way it is assembled. Input arguments are:\n\ diff --git a/src/ksp/ksp/tutorials/ex32.c b/src/ksp/ksp/tutorials/ex32.c index 118489b470e..8623d5a1eac 100644 --- a/src/ksp/ksp/tutorials/ex32.c +++ b/src/ksp/ksp/tutorials/ex32.c @@ -1,4 +1,3 @@ - /* Laplacian in 2D. Modeled by the partial differential equation diff --git a/src/ksp/ksp/tutorials/ex34.c b/src/ksp/ksp/tutorials/ex34.c index 23bcb76d215..25738233e44 100644 --- a/src/ksp/ksp/tutorials/ex34.c +++ b/src/ksp/ksp/tutorials/ex34.c @@ -1,4 +1,3 @@ - /* Laplacian in 3D. Modeled by the partial differential equation diff --git a/src/ksp/ksp/tutorials/ex35.cxx b/src/ksp/ksp/tutorials/ex35.cxx index f0b158727d4..4f56dcf3459 100644 --- a/src/ksp/ksp/tutorials/ex35.cxx +++ b/src/ksp/ksp/tutorials/ex35.cxx @@ -1,4 +1,3 @@ - /* Inhomogeneous Laplacian in 2D. Modeled by the partial differential equation diff --git a/src/ksp/ksp/tutorials/ex36.cxx b/src/ksp/ksp/tutorials/ex36.cxx index b072c92a730..e4e6efbc336 100644 --- a/src/ksp/ksp/tutorials/ex36.cxx +++ b/src/ksp/ksp/tutorials/ex36.cxx @@ -1,4 +1,3 @@ - /* Inhomogeneous Laplacian in 3-D. Modeled by the partial differential equation diff --git a/src/ksp/ksp/tutorials/ex4.c b/src/ksp/ksp/tutorials/ex4.c index 283d8b3c2f6..4e3907891f7 100644 --- a/src/ksp/ksp/tutorials/ex4.c +++ b/src/ksp/ksp/tutorials/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP and HMG.\n\ Input parameters include:\n\ -view_exact_sol : write exact solution vector to stdout\n\ diff --git a/src/ksp/ksp/tutorials/ex41.c b/src/ksp/ksp/tutorials/ex41.c index 0c902376431..a0ecb21b325 100644 --- a/src/ksp/ksp/tutorials/ex41.c +++ b/src/ksp/ksp/tutorials/ex41.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a socket connection, solves a linear system and sends the result back.\n"; /* diff --git a/src/ksp/ksp/tutorials/ex43-solcx.h b/src/ksp/ksp/tutorials/ex43-solcx.h index e90b6ba68ca..b7ec53ef0d1 100644 --- a/src/ksp/ksp/tutorials/ex43-solcx.h +++ b/src/ksp/ksp/tutorials/ex43-solcx.h @@ -2,7 +2,7 @@ static void evaluate_solCx(PetscReal pos[], PetscReal _eta_A, PetscReal _eta_B, /* Input parameters: density, viscosity A, viscosity B */ PetscReal _x_c, int _n, /* Input parameters: viscosity jump location, wavenumber in z */ - PetscReal vel[], PetscReal *presssure, PetscReal total_stress[], PetscReal strain_rate[]) + PetscReal vel[], PetscReal *pressure, PetscReal total_stress[], PetscReal strain_rate[]) { PetscReal Z, u1, u2, u3, u4, u5, u6, ZA, ZB; PetscReal sum1, sum2, sum3, sum4, sum5, sum6, x, z, xc; @@ -2254,7 +2254,7 @@ static void evaluate_solCx(PetscReal pos[], PetscReal _eta_A, PetscReal _eta_B, vel[0] = sum1; vel[1] = sum2; } - if (presssure) (*presssure) = sum5; + if (pressure) (*pressure) = sum5; if (total_stress) { total_stress[0] = sum3; diff --git a/src/ksp/ksp/tutorials/ex45.c b/src/ksp/ksp/tutorials/ex45.c index 41b02bc3e4b..9714ad48fc7 100644 --- a/src/ksp/ksp/tutorials/ex45.c +++ b/src/ksp/ksp/tutorials/ex45.c @@ -1,4 +1,3 @@ - /* Laplacian in 3D. Modeled by the partial differential equation diff --git a/src/ksp/ksp/tutorials/ex46.c b/src/ksp/ksp/tutorials/ex46.c index ef5b90f9840..b8f9afa8227 100644 --- a/src/ksp/ksp/tutorials/ex46.c +++ b/src/ksp/ksp/tutorials/ex46.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP and DM.\n\ Compare this to ex2 which solves the same problem without a DM.\n\n"; diff --git a/src/ksp/ksp/tutorials/ex5.c b/src/ksp/ksp/tutorials/ex5.c index 4175bedfe02..b3f3c59d3c1 100644 --- a/src/ksp/ksp/tutorials/ex5.c +++ b/src/ksp/ksp/tutorials/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Solves two linear systems in parallel with KSP. The code\n\ illustrates repeated solution of linear systems with the same preconditioner\n\ method but different matrices (having the same nonzero structure). The code\n\ diff --git a/src/ksp/ksp/tutorials/ex51.c b/src/ksp/ksp/tutorials/ex51.c index a6ec721da57..744d74809c5 100644 --- a/src/ksp/ksp/tutorials/ex51.c +++ b/src/ksp/ksp/tutorials/ex51.c @@ -1,4 +1,3 @@ - static char help[] = "This example solves a linear system in parallel with KSP. The matrix\n\ uses arbitrary order polynomials for finite elements on the unit square. To test the parallel\n\ matrix assembly, the matrix is intentionally laid out across processors\n\ diff --git a/src/ksp/ksp/tutorials/ex52.c b/src/ksp/ksp/tutorials/ex52.c index c2a4553e00e..5a932f91208 100644 --- a/src/ksp/ksp/tutorials/ex52.c +++ b/src/ksp/ksp/tutorials/ex52.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a linear system in parallel with KSP. Modified from ex2.c \n\ Illustrate how to use external packages MUMPS, SUPERLU and STRUMPACK \n\ Input parameters include:\n\ diff --git a/src/ksp/ksp/tutorials/ex53.c b/src/ksp/ksp/tutorials/ex53.c index 143b10b289e..26f8f8799d0 100644 --- a/src/ksp/ksp/tutorials/ex53.c +++ b/src/ksp/ksp/tutorials/ex53.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a tridiagonal linear system with KSP. \n\ Modified from ex1.c to illustrate reuse of preconditioner \n\ Written as requested by [petsc-maint #63875] \n\n"; diff --git a/src/ksp/ksp/tutorials/ex54.c b/src/ksp/ksp/tutorials/ex54.c index e84e5f38015..1b08471630a 100644 --- a/src/ksp/ksp/tutorials/ex54.c +++ b/src/ksp/ksp/tutorials/ex54.c @@ -1,4 +1,3 @@ - static char help[] = "Creates a matrix from quadrilateral finite elements in 2D, Laplacian \n\ -ne : problem size in number of elements (eg, -ne 31 gives 32^2 grid)\n\ -alpha : scaling of material coefficient in embedded circle\n\n"; diff --git a/src/ksp/ksp/tutorials/ex57f.F90 b/src/ksp/ksp/tutorials/ex57f.F90 index 78802e7e3a2..58471dc2f2e 100644 --- a/src/ksp/ksp/tutorials/ex57f.F90 +++ b/src/ksp/ksp/tutorials/ex57f.F90 @@ -335,4 +335,3 @@ subroutine MyKSPConverged(ksp,n,rnorm,flag,dummy,ierr) ! test: ! !TEST*/ - diff --git a/src/ksp/ksp/tutorials/ex6.c b/src/ksp/ksp/tutorials/ex6.c index 85b564cf8fc..1e4fd61c1a8 100644 --- a/src/ksp/ksp/tutorials/ex6.c +++ b/src/ksp/ksp/tutorials/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a tridiagonal linear system with KSP. \n\ It illustrates how to do one symbolic factorization and multiple numeric factorizations using same matrix structure. \n\n"; diff --git a/src/ksp/ksp/tutorials/ex65.c b/src/ksp/ksp/tutorials/ex65.c index 39219b75119..aa4c57a8046 100644 --- a/src/ksp/ksp/tutorials/ex65.c +++ b/src/ksp/ksp/tutorials/ex65.c @@ -1,4 +1,3 @@ - /* Partial differential equation diff --git a/src/ksp/ksp/tutorials/ex67.c b/src/ksp/ksp/tutorials/ex67.c index f3dab782053..32184dedbfd 100644 --- a/src/ksp/ksp/tutorials/ex67.c +++ b/src/ksp/ksp/tutorials/ex67.c @@ -1,4 +1,3 @@ - static char help[] = "Krylov methods to solve u'' = f in parallel with periodic boundary conditions,\n\ with a singular, inconsistent system.\n\n"; diff --git a/src/ksp/ksp/tutorials/ex68.c b/src/ksp/ksp/tutorials/ex68.c index 037d53e12a0..8cbffc66146 100644 --- a/src/ksp/ksp/tutorials/ex68.c +++ b/src/ksp/ksp/tutorials/ex68.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/ksp/ksp/tutorials/ex69.c b/src/ksp/ksp/tutorials/ex69.c index 86218ceb98d..d9a23c9ab7c 100644 --- a/src/ksp/ksp/tutorials/ex69.c +++ b/src/ksp/ksp/tutorials/ex69.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/ksp/ksp/tutorials/ex72.c b/src/ksp/ksp/tutorials/ex72.c index 0a849536394..dfe7144d9ae 100644 --- a/src/ksp/ksp/tutorials/ex72.c +++ b/src/ksp/ksp/tutorials/ex72.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file and solves a linear system.\n\ This version first preloads and solves a small system, then loads \n\ another (larger) system and solves it as well. This example illustrates\n\ diff --git a/src/ksp/ksp/tutorials/ex73.c b/src/ksp/ksp/tutorials/ex73.c index 955303d075d..43afd75057f 100644 --- a/src/ksp/ksp/tutorials/ex73.c +++ b/src/ksp/ksp/tutorials/ex73.c @@ -1,4 +1,3 @@ - /* This example was derived from src/ksp/ksp/tutorials ex29.c diff --git a/src/ksp/ksp/tutorials/ex7f.F90 b/src/ksp/ksp/tutorials/ex7f.F90 index 6342ae3b361..6dde72606ff 100644 --- a/src/ksp/ksp/tutorials/ex7f.F90 +++ b/src/ksp/ksp/tutorials/ex7f.F90 @@ -1,4 +1,3 @@ - ! Block Jacobi preconditioner for solving a linear system in parallel with KSP ! The code indicates the procedures for setting the particular block sizes and ! for using different linear solvers on the individual blocks diff --git a/src/ksp/ksp/tutorials/ex8.c b/src/ksp/ksp/tutorials/ex8.c index 86d1cec52a7..72ea2734224 100644 --- a/src/ksp/ksp/tutorials/ex8.c +++ b/src/ksp/ksp/tutorials/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Illustrates use of the preconditioner ASM.\n\ The Additive Schwarz Method for solving a linear system in parallel with KSP. The\n\ code indicates the procedure for setting user-defined subdomains. Input\n\ diff --git a/src/ksp/ksp/tutorials/ex83f.F90 b/src/ksp/ksp/tutorials/ex83f.F90 index 0b9789ad771..cbcf14a373e 100644 --- a/src/ksp/ksp/tutorials/ex83f.F90 +++ b/src/ksp/ksp/tutorials/ex83f.F90 @@ -126,4 +126,3 @@ program main ! args: -ksp_monitor -ksp_view ! !TEST*/ - diff --git a/src/ksp/ksp/tutorials/ex86.c b/src/ksp/ksp/tutorials/ex86.c index 3885e4dd295..8274c41643b 100644 --- a/src/ksp/ksp/tutorials/ex86.c +++ b/src/ksp/ksp/tutorials/ex86.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a one-dimensional steady upwind advection system with KSP.\n\n"; /* diff --git a/src/ksp/ksp/tutorials/ex87.c b/src/ksp/ksp/tutorials/ex87.c index 8bf7fdd106a..3c344fc8c4d 100644 --- a/src/ksp/ksp/tutorials/ex87.c +++ b/src/ksp/ksp/tutorials/ex87.c @@ -162,18 +162,18 @@ PetscErrorCode MatAndISLoad(const char *prefix, const char *identifier, Mat A, I testset: requires: datafilespath nsize: 4 - args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -ksp_monitor -ksp_rtol 1e-4 -fieldsplit_pc_hpddm_levels_1_eps_nev 10 -fieldsplit_pc_hpddm_levels_1_st_share_sub_ksp -fieldsplit_pc_hpddm_has_neumann -fieldsplit_pc_hpddm_define_subdomains -fieldsplit_1_pc_hpddm_schur_precondition geneo -fieldsplit_pc_hpddm_coarse_pc_type redundant -fieldsplit_pc_hpddm_coarse_redundant_pc_type cholesky -fieldsplit_pc_hpddm_levels_1_sub_pc_type lu -fieldsplit_ksp_type fgmres -ksp_type fgmres -ksp_max_it 10 -fieldsplit_1_pc_hpddm_coarse_correction balanced -fieldsplit_1_pc_hpddm_levels_1_eps_gen_non_hermitian -fieldsplit_1_pc_hpddm_coarse_p 2 + args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -ksp_monitor -ksp_rtol 1e-4 -fieldsplit_ksp_max_it 100 -fieldsplit_pc_hpddm_levels_1_eps_nev 10 -fieldsplit_pc_hpddm_levels_1_st_share_sub_ksp -fieldsplit_pc_hpddm_has_neumann -fieldsplit_pc_hpddm_define_subdomains -fieldsplit_1_pc_hpddm_schur_precondition geneo -fieldsplit_pc_hpddm_coarse_pc_type redundant -fieldsplit_pc_hpddm_coarse_redundant_pc_type cholesky -fieldsplit_pc_hpddm_levels_1_sub_pc_type lu -fieldsplit_ksp_type fgmres -ksp_type fgmres -ksp_max_it 10 -fieldsplit_1_pc_hpddm_coarse_correction balanced -fieldsplit_1_pc_hpddm_levels_1_eps_gen_non_hermitian -fieldsplit_1_pc_hpddm_coarse_p 2 test: requires: mumps suffix: 1 - args: -viewer -system {{elasticity stokes}separate output} -fieldsplit_1_pc_hpddm_ksp_pc_side left - filter: grep -v -e "action of " -e " " -e "block size" -e "total: nonzeros=" -e "using I-node" -e "aij" -e "transpose" -e "total number of" -e " rows=" + args: -viewer -system {{elasticity stokes}separate output} -fieldsplit_1_pc_hpddm_ksp_pc_side left -fieldsplit_1_pc_hpddm_levels_1_sub_mat_mumps_icntl_26 1 + filter: grep -v -e "action of " -e " " -e "block size" -e "total: nonzeros=" -e "using I-node" -e "aij" -e "transpose" -e "diagonal" -e "total number of" -e " rows=" test: requires: mumps suffix: 2 output_file: output/ex87_1_system-stokes.out - args: -viewer -system stokes -empty_A11 -transpose {{false true}shared output} -permute {{false true}shared output} -fieldsplit_1_pc_hpddm_ksp_pc_side right -fieldsplit_1_pc_hpddm_coarse_mat_type baij - filter: grep -v -e "action of " -e " " -e "block size" -e "total: nonzeros=" -e "using I-node" -e "aij" -e "transpose" -e "total number of" -e " rows=" | sed -e "s/ right preconditioning/ left preconditioning/g" -e "s/ using UNPRECONDITIONED/ using PRECONDITIONED/g" + args: -viewer -system stokes -empty_A11 -transpose {{false true}shared output} -permute {{false true}shared output} -fieldsplit_1_pc_hpddm_ksp_pc_side right -fieldsplit_1_pc_hpddm_coarse_mat_type baij -fieldsplit_1_pc_hpddm_levels_1_sub_mat_mumps_icntl_26 1 + filter: grep -v -e "action of " -e " " -e "block size" -e "total: nonzeros=" -e "using I-node" -e "aij" -e "transpose" -e "diagonal" -e "total number of" -e " rows=" | sed -e "s/ right preconditioning/ left preconditioning/g" -e "s/ using UNPRECONDITIONED/ using PRECONDITIONED/g" test: suffix: 1_petsc args: -system {{elasticity stokes}separate output} -fieldsplit_1_pc_hpddm_ksp_pc_side left -fieldsplit_1_pc_hpddm_levels_1_sub_pc_factor_mat_solver_type petsc -fieldsplit_1_pc_hpddm_levels_1_eps_threshold 0.3 -permute diff --git a/src/ksp/ksp/tutorials/ex9.c b/src/ksp/ksp/tutorials/ex9.c index b3450c1d1c0..99825bebc1f 100644 --- a/src/ksp/ksp/tutorials/ex9.c +++ b/src/ksp/ksp/tutorials/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "The solution of 2 different linear systems with different linear solvers.\n\ Also, this example illustrates the repeated\n\ solution of linear systems, while reusing matrix, vector, and solver data\n\ diff --git a/src/ksp/ksp/utils/dmproject.c b/src/ksp/ksp/utils/dmproject.c index 34521ffea23..938d2060ae8 100644 --- a/src/ksp/ksp/utils/dmproject.c +++ b/src/ksp/ksp/utils/dmproject.c @@ -1,4 +1,3 @@ - #include #include /*I "petscdm.h" I*/ #include /*I "petscdmda.h" I*/ diff --git a/src/ksp/pc/impls/bjacobi/bjacobi.c b/src/ksp/pc/impls/bjacobi/bjacobi.c index 330975662e7..2e2bb9e19f0 100644 --- a/src/ksp/pc/impls/bjacobi/bjacobi.c +++ b/src/ksp/pc/impls/bjacobi/bjacobi.c @@ -1,4 +1,3 @@ - /* Defines a block Jacobi preconditioner. */ diff --git a/src/ksp/pc/impls/chowiluviennacl/chowiluviennacl.cxx b/src/ksp/pc/impls/chowiluviennacl/chowiluviennacl.cxx index e0da51def0c..162b84fb81f 100644 --- a/src/ksp/pc/impls/chowiluviennacl/chowiluviennacl.cxx +++ b/src/ksp/pc/impls/chowiluviennacl/chowiluviennacl.cxx @@ -1,4 +1,3 @@ - /* Include files needed for the ViennaCL Chow-Patel parallel ILU preconditioner: pcimpl.h - private include file intended for use by all preconditioners diff --git a/src/ksp/pc/impls/composite/composite.c b/src/ksp/pc/impls/composite/composite.c index 25f09ac4854..bc896933b54 100644 --- a/src/ksp/pc/impls/composite/composite.c +++ b/src/ksp/pc/impls/composite/composite.c @@ -1,4 +1,3 @@ - /* Defines a preconditioner that can consist of a collection of PCs */ diff --git a/src/ksp/pc/impls/cp/cp.c b/src/ksp/pc/impls/cp/cp.c index f86df097339..a1d110d5916 100644 --- a/src/ksp/pc/impls/cp/cp.c +++ b/src/ksp/pc/impls/cp/cp.c @@ -1,4 +1,3 @@ - #include /*I "petscpc.h" I*/ #include <../src/mat/impls/aij/seq/aij.h> diff --git a/src/ksp/pc/impls/eisens/eisen.c b/src/ksp/pc/impls/eisens/eisen.c index fe3a6a90a70..69851cf61ca 100644 --- a/src/ksp/pc/impls/eisens/eisen.c +++ b/src/ksp/pc/impls/eisens/eisen.c @@ -1,4 +1,3 @@ - /* Defines a Eisenstat trick SSOR preconditioner. This uses about %50 of the usual amount of floating point ops used for SSOR + Krylov diff --git a/src/ksp/pc/impls/factor/cholesky/cholesky.c b/src/ksp/pc/impls/factor/cholesky/cholesky.c index fb7d4ead552..ebc5e914540 100644 --- a/src/ksp/pc/impls/factor/cholesky/cholesky.c +++ b/src/ksp/pc/impls/factor/cholesky/cholesky.c @@ -1,4 +1,3 @@ - /* Defines a direct factorization preconditioner for any Mat implementation Note: this need not be consided a preconditioner since it supplies diff --git a/src/ksp/pc/impls/factor/factimpl.c b/src/ksp/pc/impls/factor/factimpl.c index 573f2ba5c71..4f7787bb920 100644 --- a/src/ksp/pc/impls/factor/factimpl.c +++ b/src/ksp/pc/impls/factor/factimpl.c @@ -1,4 +1,3 @@ - #include <../src/ksp/pc/impls/factor/factor.h> /*I "petscpc.h" I*/ PetscErrorCode PCFactorSetUpMatSolverType_Factor(PC pc) diff --git a/src/ksp/pc/impls/factor/factor.c b/src/ksp/pc/impls/factor/factor.c index f90c3c3d8eb..47fe3e28342 100644 --- a/src/ksp/pc/impls/factor/factor.c +++ b/src/ksp/pc/impls/factor/factor.c @@ -1,4 +1,3 @@ - #include <../src/ksp/pc/impls/factor/factor.h> /*I "petscpc.h" I*/ #include diff --git a/src/ksp/pc/impls/factor/icc/icc.c b/src/ksp/pc/impls/factor/icc/icc.c index d5230aeaa78..a22a6aeb6d2 100644 --- a/src/ksp/pc/impls/factor/icc/icc.c +++ b/src/ksp/pc/impls/factor/icc/icc.c @@ -1,4 +1,3 @@ - #include <../src/ksp/pc/impls/factor/icc/icc.h> /*I "petscpc.h" I*/ static PetscErrorCode PCSetUp_ICC(PC pc) diff --git a/src/ksp/pc/impls/factor/ilu/ilu.c b/src/ksp/pc/impls/factor/ilu/ilu.c index 9a175027c4a..676562d944c 100644 --- a/src/ksp/pc/impls/factor/ilu/ilu.c +++ b/src/ksp/pc/impls/factor/ilu/ilu.c @@ -1,4 +1,3 @@ - /* Defines a ILU factorization preconditioner for any Mat implementation */ diff --git a/src/ksp/pc/impls/factor/lu/lu.c b/src/ksp/pc/impls/factor/lu/lu.c index 9cc3935b57d..27ac7358c18 100644 --- a/src/ksp/pc/impls/factor/lu/lu.c +++ b/src/ksp/pc/impls/factor/lu/lu.c @@ -1,4 +1,3 @@ - /* Defines a direct factorization preconditioner for any Mat implementation Note: this need not be consided a preconditioner since it supplies diff --git a/src/ksp/pc/impls/factor/qr/qr.c b/src/ksp/pc/impls/factor/qr/qr.c index a77b777f15c..72860294270 100644 --- a/src/ksp/pc/impls/factor/qr/qr.c +++ b/src/ksp/pc/impls/factor/qr/qr.c @@ -1,4 +1,3 @@ - /* Defines a direct QR factorization preconditioner for any Mat implementation Note: this need not be considered a preconditioner since it supplies diff --git a/src/ksp/pc/impls/fieldsplit/fieldsplit.c b/src/ksp/pc/impls/fieldsplit/fieldsplit.c index 6b4467272ac..26a1d6bd763 100644 --- a/src/ksp/pc/impls/fieldsplit/fieldsplit.c +++ b/src/ksp/pc/impls/fieldsplit/fieldsplit.c @@ -661,6 +661,7 @@ static PetscErrorCode PCSetUp_FieldSplit(PC pc) PetscCall(MatCreateSubMatrix(pc->pmat, ilink->is, ilink->is_col, MAT_INITIAL_MATRIX, &jac->pmat[i])); PetscCall(KSPGetOptionsPrefix(ilink->ksp, &prefix)); PetscCall(MatSetOptionsPrefix(jac->pmat[i], prefix)); + PetscCall(MatSetFromOptions(jac->pmat[i])); PetscCall(MatViewFromOptions(jac->pmat[i], NULL, "-mat_view")); } /* create work vectors for each split */ diff --git a/src/ksp/pc/impls/galerkin/galerkin.c b/src/ksp/pc/impls/galerkin/galerkin.c index 2920ea57099..f25912d1c20 100644 --- a/src/ksp/pc/impls/galerkin/galerkin.c +++ b/src/ksp/pc/impls/galerkin/galerkin.c @@ -1,4 +1,3 @@ - /* Defines a preconditioner defined by R^T S R */ diff --git a/src/ksp/pc/impls/gamg/agg.c b/src/ksp/pc/impls/gamg/agg.c index 35c14c2cc99..f9e20bdaf2a 100644 --- a/src/ksp/pc/impls/gamg/agg.c +++ b/src/ksp/pc/impls/gamg/agg.c @@ -996,7 +996,7 @@ static PetscErrorCode PCGAMGCoarsen_AGG(PC a_pc, Mat *a_Gmat1, PetscCoarsenData PetscCall(MatDestroy(&Gmat1)); *a_Gmat1 = Gmat2; /* output */ PetscCall(PetscCDGetMat(llist, &mat)); - PetscCheck(!mat, comm, PETSC_ERR_ARG_WRONG, "Unexpected auxilary matrix with squared graph"); + PetscCheck(!mat, comm, PETSC_ERR_ARG_WRONG, "Unexpected auxiliary matrix with squared graph"); } else { PetscCoarsenData *llist = *agg_lists; /* see if we have a matrix that takes precedence (returned from MatCoarsenApply) */ diff --git a/src/ksp/pc/impls/hpddm/pchpddm.cxx b/src/ksp/pc/impls/hpddm/pchpddm.cxx index 0cbf7f4cb78..6d4f604f2c5 100644 --- a/src/ksp/pc/impls/hpddm/pchpddm.cxx +++ b/src/ksp/pc/impls/hpddm/pchpddm.cxx @@ -1275,7 +1275,7 @@ static PetscErrorCode PCApply_Nest(PC pc, Vec x, Vec y) PetscCall(PCFactorGetMatSolverType(p->first, &type)); PetscCall(PCFactorGetMatrix(p->first, &A)); PetscCall(PetscStrcmp(type, MATSOLVERMUMPS, &flg)); - if (flg) { + if (flg && A->schur) { #if PetscDefined(HAVE_MUMPS) PetscCall(MatMumpsSetIcntl(A, 26, 1)); /* reduction/condensation phase followed by Schur complement solve */ #endif @@ -1665,10 +1665,7 @@ static PetscErrorCode PCSetUp_HPDDM(PC pc) PetscCall(VecRestoreArrayRead(x, &read)); PetscCall(VecRestoreArrayWrite(v, &write)); PetscCall(VecDestroy(&x)); - PetscCall(MatCreateSeqAIJ(PETSC_COMM_SELF, n, n, 1, nullptr, &data->aux)); - PetscCall(MatSetOption(data->aux, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE)); - PetscCall(MatDiagonalSet(data->aux, v, ADD_VALUES)); - PetscCall(MatSetOption(data->aux, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_TRUE)); + PetscCall(MatCreateDiagonal(v, &data->aux)); PetscCall(VecDestroy(&v)); } uis = data->is; @@ -2270,8 +2267,12 @@ static PetscErrorCode PCSetUp_HPDDM(PC pc) PetscCall(PCSetOperators(s, N, N)); PetscCall(PCFactorGetMatrix(s, &T)); PetscCall(MatSetOptionsPrefix(T, ((PetscObject)s)->prefix)); - PetscCall(MatNestGetISs(N, is, nullptr)); - PetscCall(MatFactorSetSchurIS(T, is[1])); + n = -1; + PetscCall(PetscOptionsGetInt(nullptr, ((PetscObject)s)->prefix, "-mat_mumps_icntl_26", &n, nullptr)); + if (n == 1) { + PetscCall(MatNestGetISs(N, is, nullptr)); /* allocates a square MatDense of size is[1]->map->n, so one */ + PetscCall(MatFactorSetSchurIS(T, is[1])); /* needs to be able to deactivate this path when dealing */ + } /* with a large constraint space in order to avoid OOM */ } else { PetscCall(MatConvert(N, MATAIJ, MAT_INITIAL_MATRIX, &T)); PetscCall(PCSetOperators(s, N, T)); diff --git a/src/ksp/pc/impls/is/nn/nn.c b/src/ksp/pc/impls/is/nn/nn.c index bf82d9de134..ef1dce467a4 100644 --- a/src/ksp/pc/impls/is/nn/nn.c +++ b/src/ksp/pc/impls/is/nn/nn.c @@ -1,4 +1,3 @@ - #include <../src/ksp/pc/impls/is/nn/nn.h> /* diff --git a/src/ksp/pc/impls/is/pcis.c b/src/ksp/pc/impls/is/pcis.c index e806ba394f6..81538e4671e 100644 --- a/src/ksp/pc/impls/is/pcis.c +++ b/src/ksp/pc/impls/is/pcis.c @@ -1,4 +1,3 @@ - #include /*I "petscpc.h" I*/ static PetscErrorCode PCISSetUseStiffnessScaling_IS(PC pc, PetscBool use) diff --git a/src/ksp/pc/impls/jacobi/jacobi.c b/src/ksp/pc/impls/jacobi/jacobi.c index e53ed118561..de6d8c1c9ac 100644 --- a/src/ksp/pc/impls/jacobi/jacobi.c +++ b/src/ksp/pc/impls/jacobi/jacobi.c @@ -1,4 +1,3 @@ - /* This file implements a Jacobi preconditioner in PETSc as part of PC. You can use this as a starting point for implementing your own diff --git a/src/ksp/pc/impls/mat/pcmat.c b/src/ksp/pc/impls/mat/pcmat.c index 85f2c34e128..4866aad5ac2 100644 --- a/src/ksp/pc/impls/mat/pcmat.c +++ b/src/ksp/pc/impls/mat/pcmat.c @@ -1,4 +1,3 @@ - #include /*I "petscpc.h" I*/ typedef enum { diff --git a/src/ksp/pc/impls/mg/mg.c b/src/ksp/pc/impls/mg/mg.c index 64a2bf3c2e4..65f1c9b86d3 100644 --- a/src/ksp/pc/impls/mg/mg.c +++ b/src/ksp/pc/impls/mg/mg.c @@ -1,4 +1,3 @@ - /* Defines the multigrid preconditioner interface. */ diff --git a/src/ksp/pc/impls/mg/mgfunc.c b/src/ksp/pc/impls/mg/mgfunc.c index e44641b5753..b5715692c44 100644 --- a/src/ksp/pc/impls/mg/mgfunc.c +++ b/src/ksp/pc/impls/mg/mgfunc.c @@ -1,4 +1,3 @@ - #include /*I "petscksp.h" I*/ /*@C diff --git a/src/ksp/pc/impls/mg/smg.c b/src/ksp/pc/impls/mg/smg.c index 4327926bd70..e97e86d1927 100644 --- a/src/ksp/pc/impls/mg/smg.c +++ b/src/ksp/pc/impls/mg/smg.c @@ -1,4 +1,3 @@ - /* Additive Multigrid V Cycle routine */ diff --git a/src/ksp/pc/impls/ml/ml.c b/src/ksp/pc/impls/ml/ml.c index 02ae931843d..999f02d09fe 100644 --- a/src/ksp/pc/impls/ml/ml.c +++ b/src/ksp/pc/impls/ml/ml.c @@ -1,4 +1,3 @@ - /* Provides an interface to the ML smoothed Aggregation Note: Something non-obvious breaks -pc_mg_type ADDITIVE for parallel runs diff --git a/src/ksp/pc/impls/mpi/pcmpi.c b/src/ksp/pc/impls/mpi/pcmpi.c index 32b7ef44ace..a53378b919b 100644 --- a/src/ksp/pc/impls/mpi/pcmpi.c +++ b/src/ksp/pc/impls/mpi/pcmpi.c @@ -415,7 +415,7 @@ PetscBool PCMPIServerActive = PETSC_FALSE; This could be implemented directly at the `KSP` level instead of using the `PCMPI` wrapper object - The code could be extended to allow an MPI + OpenMP application to use the linear solver server concept accross all shared-memory + The code could be extended to allow an MPI + OpenMP application to use the linear solver server concept across all shared-memory nodes with a single MPI process per node for the user application but multiple MPI processes per node for the linear solver. The concept could also be extended for users's callbacks for `SNES`, `TS`, and `Tao` where the `SNESSolve()` for example, runs on diff --git a/src/ksp/pc/impls/none/none.c b/src/ksp/pc/impls/none/none.c index 5ae53d486fa..50f13f7c650 100644 --- a/src/ksp/pc/impls/none/none.c +++ b/src/ksp/pc/impls/none/none.c @@ -1,4 +1,3 @@ - /* Identity preconditioner, simply copies vector x to y. */ diff --git a/src/ksp/pc/impls/redistribute/redistribute.c b/src/ksp/pc/impls/redistribute/redistribute.c index 5d47ca9490c..5b21060448a 100644 --- a/src/ksp/pc/impls/redistribute/redistribute.c +++ b/src/ksp/pc/impls/redistribute/redistribute.c @@ -1,4 +1,3 @@ - /* This file defines a "solve the problem redistributely on each subgroup of processor" preconditioner. */ @@ -455,7 +454,7 @@ PetscErrorCode PCRedistributeGetKSP(PC pc, KSP *innerksp) If you have used `MatZeroRows()` to eliminate (for example, Dirichlet) boundary conditions for a symmetric problem then you can use, for example, `-ksp_type preonly -pc_type redistribute -redistribute_ksp_type cg -redistribute_pc_type bjacobi -redistribute_sub_pc_type icc` to take advantage of the symmetry. - Supports the function `PCFieldSplitSetIS()`; passs the appropriate reduced field indices to an inner `PCFIELDSPLIT`, set with, for example + Supports the function `PCFieldSplitSetIS()`; pass the appropriate reduced field indices to an inner `PCFIELDSPLIT`, set with, for example `-ksp_type preonly -pc_type redistribute -redistribute_pc_type fieldsplit. Does not support the `PCFIELDSPLIT` options database keys. This does NOT call a partitioner to reorder rows to lower communication; the ordering of the rows in the original matrix and redistributed matrix is the same. Rows are moved diff --git a/src/ksp/pc/impls/rowscalingviennacl/rowscalingviennacl.cxx b/src/ksp/pc/impls/rowscalingviennacl/rowscalingviennacl.cxx index 28596f3334b..d08d4665a96 100644 --- a/src/ksp/pc/impls/rowscalingviennacl/rowscalingviennacl.cxx +++ b/src/ksp/pc/impls/rowscalingviennacl/rowscalingviennacl.cxx @@ -1,4 +1,3 @@ - /* Include files needed for the ViennaCL row-scaling preconditioner: pcimpl.h - private include file intended for use by all preconditioners diff --git a/src/ksp/pc/impls/saviennacl/saviennacl.cxx b/src/ksp/pc/impls/saviennacl/saviennacl.cxx index 9a69cc1739a..93ef430f287 100644 --- a/src/ksp/pc/impls/saviennacl/saviennacl.cxx +++ b/src/ksp/pc/impls/saviennacl/saviennacl.cxx @@ -1,4 +1,3 @@ - /* Include files needed for the ViennaCL Smoothed Aggregation preconditioner: pcimpl.h - private include file intended for use by all preconditioners diff --git a/src/ksp/pc/impls/shell/shellpc.c b/src/ksp/pc/impls/shell/shellpc.c index 3423f1a51cc..bafd6c03634 100644 --- a/src/ksp/pc/impls/shell/shellpc.c +++ b/src/ksp/pc/impls/shell/shellpc.c @@ -749,7 +749,7 @@ PetscErrorCode PCShellSetPostSolve(PC pc, PetscErrorCode (*postsolve)(PC pc, KSP Level: intermediate Note: - This is seperate from the name you can provide with `PetscObjectSetName()` + This is separate from the name you can provide with `PetscObjectSetName()` .seealso: `PCSHELL`, `PCShellGetName()`, `PetscObjectSetName()`, `PetscObjectGetName()` @*/ diff --git a/src/ksp/pc/impls/spai/dspai.c b/src/ksp/pc/impls/spai/dspai.c index 3e625851e98..e72ef2eb859 100644 --- a/src/ksp/pc/impls/spai/dspai.c +++ b/src/ksp/pc/impls/spai/dspai.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/ksp/pc/impls/spai/ispai.c b/src/ksp/pc/impls/spai/ispai.c index af33dde6d28..e1f0d3b8804 100644 --- a/src/ksp/pc/impls/spai/ispai.c +++ b/src/ksp/pc/impls/spai/ispai.c @@ -1,4 +1,3 @@ - /* 3/99 Modified by Stephen Barnard to support SPAI version 3.0 */ diff --git a/src/ksp/pc/impls/svd/svd.c b/src/ksp/pc/impls/svd/svd.c index b527978db41..90d3942b596 100644 --- a/src/ksp/pc/impls/svd/svd.c +++ b/src/ksp/pc/impls/svd/svd.c @@ -1,4 +1,3 @@ - #include /*I "petscpc.h" I*/ #include diff --git a/src/ksp/pc/impls/telescope/telescope_coarsedm.c b/src/ksp/pc/impls/telescope/telescope_coarsedm.c index 668affb68d0..06a095937f4 100644 --- a/src/ksp/pc/impls/telescope/telescope_coarsedm.c +++ b/src/ksp/pc/impls/telescope/telescope_coarsedm.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/ksp/pc/impls/telescope/telescope_dmda.c b/src/ksp/pc/impls/telescope/telescope_dmda.c index 4297917aec7..df74379091c 100644 --- a/src/ksp/pc/impls/telescope/telescope_dmda.c +++ b/src/ksp/pc/impls/telescope/telescope_dmda.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/ksp/pc/impls/tfs/bitmask.c b/src/ksp/pc/impls/tfs/bitmask.c index 89786c34878..9a087b46f3b 100644 --- a/src/ksp/pc/impls/tfs/bitmask.c +++ b/src/ksp/pc/impls/tfs/bitmask.c @@ -1,4 +1,3 @@ - /********************************bit_mask.c************************************ Author: Henry M. Tufo III diff --git a/src/ksp/pc/impls/tfs/comm.c b/src/ksp/pc/impls/tfs/comm.c index 83096cef8f4..54e9bd4aac9 100644 --- a/src/ksp/pc/impls/tfs/comm.c +++ b/src/ksp/pc/impls/tfs/comm.c @@ -1,4 +1,3 @@ - /***********************************comm.c************************************* Author: Henry M. Tufo III diff --git a/src/ksp/pc/impls/tfs/gs.c b/src/ksp/pc/impls/tfs/gs.c index 5be3dc373b5..6d6ae25e1e9 100644 --- a/src/ksp/pc/impls/tfs/gs.c +++ b/src/ksp/pc/impls/tfs/gs.c @@ -1,4 +1,3 @@ - /***********************************gs.c*************************************** Author: Henry M. Tufo III @@ -60,7 +59,7 @@ typedef struct gather_scatter_id { PetscInt num_loads; /* repeats == true -> local info */ - PetscInt nel; /* number of unique elememts */ + PetscInt nel; /* number of unique elements */ PetscInt *elms; /* of size nel */ PetscInt nel_total; PetscInt *local_elms; /* of size nel_total */ diff --git a/src/ksp/pc/impls/tfs/ivec.c b/src/ksp/pc/impls/tfs/ivec.c index dd5c9382e43..3855653e24b 100644 --- a/src/ksp/pc/impls/tfs/ivec.c +++ b/src/ksp/pc/impls/tfs/ivec.c @@ -1,4 +1,3 @@ - /**********************************ivec.c************************************** Author: Henry M. Tufo III diff --git a/src/ksp/pc/impls/tfs/xxt.c b/src/ksp/pc/impls/tfs/xxt.c index 0d5fe239d1d..65eb6303cc0 100644 --- a/src/ksp/pc/impls/tfs/xxt.c +++ b/src/ksp/pc/impls/tfs/xxt.c @@ -1,4 +1,3 @@ - /* Module Name: xxt Module Info: diff --git a/src/ksp/pc/impls/tfs/xyt.c b/src/ksp/pc/impls/tfs/xyt.c index e48d6fb65de..cc4ce8a7c96 100644 --- a/src/ksp/pc/impls/tfs/xyt.c +++ b/src/ksp/pc/impls/tfs/xyt.c @@ -1,4 +1,3 @@ - /* Module Name: xyt Module Info: diff --git a/src/ksp/pc/impls/wb/wb.c b/src/ksp/pc/impls/wb/wb.c index 90d18cb59f9..b5227be681a 100644 --- a/src/ksp/pc/impls/wb/wb.c +++ b/src/ksp/pc/impls/wb/wb.c @@ -1,4 +1,3 @@ - #include /*I "petscdmda.h" I*/ #include /*I "petscksp.h" I*/ #include diff --git a/src/ksp/pc/interface/pcregis.c b/src/ksp/pc/interface/pcregis.c index 9e2dc72b570..ddddae03cb4 100644 --- a/src/ksp/pc/interface/pcregis.c +++ b/src/ksp/pc/interface/pcregis.c @@ -1,4 +1,3 @@ - #include /*I "petscpc.h" I*/ PETSC_EXTERN PetscErrorCode PCCreate_Jacobi(PC); diff --git a/src/ksp/pc/interface/pcset.c b/src/ksp/pc/interface/pcset.c index 790766ea4a6..89d72297b3f 100644 --- a/src/ksp/pc/interface/pcset.c +++ b/src/ksp/pc/interface/pcset.c @@ -1,4 +1,3 @@ - /* Routines to set PC methods and options. */ diff --git a/src/ksp/pc/interface/precon.c b/src/ksp/pc/interface/precon.c index 055693eab4a..6ab94f5f637 100644 --- a/src/ksp/pc/interface/precon.c +++ b/src/ksp/pc/interface/precon.c @@ -1,4 +1,3 @@ - /* The PC (preconditioner) interface routines, callable by users. */ diff --git a/src/ksp/pc/tests/ex1.c b/src/ksp/pc/tests/ex1.c index d41bf6c7a7b..ca175ad7270 100644 --- a/src/ksp/pc/tests/ex1.c +++ b/src/ksp/pc/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the creation of a PC context.\n\n"; #include diff --git a/src/ksp/pc/tests/ex2.c b/src/ksp/pc/tests/ex2.c index e48cbc68841..2e6c1efc79c 100644 --- a/src/ksp/pc/tests/ex2.c +++ b/src/ksp/pc/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PC and KSP on a tridiagonal matrix. Note that most\n\ users should employ the KSP interface instead of using PC directly.\n\n"; diff --git a/src/ksp/pc/tests/ex3.c b/src/ksp/pc/tests/ex3.c index 160f575ae94..fa34c84e02e 100644 --- a/src/ksp/pc/tests/ex3.c +++ b/src/ksp/pc/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates the use of fast Richardson for SOR. And\n\ also tests the MatSOR() routines. Input parameters are:\n\ -n : problem dimension\n\n"; diff --git a/src/ksp/pc/tests/ex4.c b/src/ksp/pc/tests/ex4.c index 5c2a19af889..d462dfc26a3 100644 --- a/src/ksp/pc/tests/ex4.c +++ b/src/ksp/pc/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates the use of fast Richardson for SOR. And tests\n\ the MatSOR() routines.\n\n"; diff --git a/src/ksp/pc/tests/ex5.c b/src/ksp/pc/tests/ex5.c index 81d522014a6..b50c792ba01 100644 --- a/src/ksp/pc/tests/ex5.c +++ b/src/ksp/pc/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the multigrid code. The input parameters are:\n\ -x N Use a mesh in the x direction of N. \n\ -c N Use N V-cycles. \n\ diff --git a/src/ksp/pc/tests/ex6.c b/src/ksp/pc/tests/ex6.c index 582ecfe1ce7..288ebadc876 100644 --- a/src/ksp/pc/tests/ex6.c +++ b/src/ksp/pc/tests/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Creates a matrix using 9 pt stencil, and uses it to test MatIncreaseOverlap (needed for additive Schwarz preconditioner). \n\ -m : problem size\n\ -x1, -x2 : no of subdomains in x and y directions\n\n"; diff --git a/src/ksp/pc/tests/ex7.c b/src/ksp/pc/tests/ex7.c index 334ccc219a3..91b657e25bc 100644 --- a/src/ksp/pc/tests/ex7.c +++ b/src/ksp/pc/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatILUFactorSymbolic() on matrix with missing diagonal.\n\n"; #include diff --git a/src/ksp/pc/tests/ex8.c b/src/ksp/pc/tests/ex8.c index 9e99e0eb220..e02976eae0a 100644 --- a/src/ksp/pc/tests/ex8.c +++ b/src/ksp/pc/tests/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PCView() before PCSetup() with -pc_type lu.\n\n"; #include diff --git a/src/ksp/pc/tutorials/ex3.c b/src/ksp/pc/tutorials/ex3.c index 64d1481059c..385282ac7d0 100644 --- a/src/ksp/pc/tutorials/ex3.c +++ b/src/ksp/pc/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Test PC redistribute on matrix with load imbalance. \n\ Modified from src/ksp/ksp/tutorials/ex2.c.\n\ Input parameters include:\n\ diff --git a/src/mat/coarsen/coarsen.c b/src/mat/coarsen/coarsen.c index cf8ac594cf6..0eafb536748 100644 --- a/src/mat/coarsen/coarsen.c +++ b/src/mat/coarsen/coarsen.c @@ -1,4 +1,3 @@ - #include /*I "petscmatcoarsen.h" I*/ /* Logging support */ diff --git a/src/mat/coarsen/impls/hem/hem.c b/src/mat/coarsen/impls/hem/hem.c index d5634604a6b..acbcb8c28ae 100644 --- a/src/mat/coarsen/impls/hem/hem.c +++ b/src/mat/coarsen/impls/hem/hem.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ #include <../src/mat/impls/aij/seq/aij.h> #include <../src/mat/impls/aij/mpi/mpiaij.h> diff --git a/src/mat/coarsen/scoarsen.c b/src/mat/coarsen/scoarsen.c index aca63718419..8e0d52f85bb 100644 --- a/src/mat/coarsen/scoarsen.c +++ b/src/mat/coarsen/scoarsen.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/color/impls/jp/jp.c b/src/mat/color/impls/jp/jp.c index 382b815e0b5..8eff66e34af 100644 --- a/src/mat/color/impls/jp/jp.c +++ b/src/mat/color/impls/jp/jp.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/mpi/mpiaij.h> /*I "petscmat.h" I*/ #include diff --git a/src/mat/color/impls/minpack/color.c b/src/mat/color/impls/minpack/color.c index 92fb8934538..3962d8e84b2 100644 --- a/src/mat/color/impls/minpack/color.c +++ b/src/mat/color/impls/minpack/color.c @@ -1,4 +1,3 @@ - /* Routines that call the kernel minpack coloring subroutines */ diff --git a/src/mat/color/impls/minpack/degr.c b/src/mat/color/impls/minpack/degr.c index ea1ffb39f34..d3038e0e1d0 100644 --- a/src/mat/color/impls/minpack/degr.c +++ b/src/mat/color/impls/minpack/degr.c @@ -1,4 +1,3 @@ - /* degr.f -- translated by f2c (version of 25 March 1992 12:58:56). */ #include <../src/mat/color/impls/minpack/color.h> diff --git a/src/mat/color/impls/minpack/seq.c b/src/mat/color/impls/minpack/seq.c index 99fb3a14982..b011eb7194a 100644 --- a/src/mat/color/impls/minpack/seq.c +++ b/src/mat/color/impls/minpack/seq.c @@ -1,4 +1,3 @@ - /* seq.f -- translated by f2c (version of 25 March 1992 12:58:56). */ #include <../src/mat/color/impls/minpack/color.h> diff --git a/src/mat/color/impls/minpack/setr.c b/src/mat/color/impls/minpack/setr.c index fe53bda379f..cf1c4b2cb63 100644 --- a/src/mat/color/impls/minpack/setr.c +++ b/src/mat/color/impls/minpack/setr.c @@ -1,4 +1,3 @@ - /* setr.f -- translated by f2c (version of 25 March 1992 12:58:56). */ #include <../src/mat/color/impls/minpack/color.h> diff --git a/src/mat/color/impls/minpack/slo.c b/src/mat/color/impls/minpack/slo.c index 5dfc19538e9..818a35b6b6c 100644 --- a/src/mat/color/impls/minpack/slo.c +++ b/src/mat/color/impls/minpack/slo.c @@ -1,4 +1,3 @@ - /* slo.f -- translated by f2c (version of 25 March 1992 12:58:56). */ #include <../src/mat/color/impls/minpack/color.h> diff --git a/src/mat/color/interface/matcoloringregi.c b/src/mat/color/interface/matcoloringregi.c index 517fba8bc5b..024770589c2 100644 --- a/src/mat/color/interface/matcoloringregi.c +++ b/src/mat/color/interface/matcoloringregi.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/f90-mod/petscmatmod.F90 b/src/mat/f90-mod/petscmatmod.F90 index 8a05d6998c8..15ca1a83137 100644 --- a/src/mat/f90-mod/petscmatmod.F90 +++ b/src/mat/f90-mod/petscmatmod.F90 @@ -1,4 +1,3 @@ - module petscmatdefdummy use petscvecdef #include <../src/mat/f90-mod/petscmat.h> @@ -106,4 +105,3 @@ module petscmat #include <../src/mat/f90-mod/ftn-auto-interfaces/petscmat.h90> end interface end module - diff --git a/src/mat/ftn-custom/zmat.c b/src/mat/ftn-custom/zmat.c index 3adea2d0da2..19625c3ef11 100644 --- a/src/mat/ftn-custom/zmat.c +++ b/src/mat/ftn-custom/zmat.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/impls/adj/mpi/mpiadj.c b/src/mat/impls/adj/mpi/mpiadj.c index c619e42d032..a85278810ef 100644 --- a/src/mat/impls/adj/mpi/mpiadj.c +++ b/src/mat/impls/adj/mpi/mpiadj.c @@ -1,4 +1,3 @@ - /* Defines the basic matrix operations for the ADJ adjacency list matrix data-structure. */ diff --git a/src/mat/impls/aij/mpi/aijperm/mpiaijperm.c b/src/mat/impls/aij/mpi/aijperm/mpiaijperm.c index f8c7098e42d..b15d0dea000 100644 --- a/src/mat/impls/aij/mpi/aijperm/mpiaijperm.c +++ b/src/mat/impls/aij/mpi/aijperm/mpiaijperm.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/mpi/mpiaij.h> /*@C MatCreateMPIAIJPERM - Creates a sparse parallel matrix whose local diff --git a/src/mat/impls/aij/mpi/crl/mcrl.c b/src/mat/impls/aij/mpi/crl/mcrl.c index eb0c2738cfa..1696a21e688 100644 --- a/src/mat/impls/aij/mpi/crl/mcrl.c +++ b/src/mat/impls/aij/mpi/crl/mcrl.c @@ -1,4 +1,3 @@ - /* Defines a matrix-vector product for the MATMPIAIJCRL matrix class. This class is derived from the MATMPIAIJ class and retains the diff --git a/src/mat/impls/aij/mpi/mkl_cpardiso/mkl_cpardiso.c b/src/mat/impls/aij/mpi/mkl_cpardiso/mkl_cpardiso.c index 0aab31df9e6..4b4c26b3068 100644 --- a/src/mat/impls/aij/mpi/mkl_cpardiso/mkl_cpardiso.c +++ b/src/mat/impls/aij/mpi/mkl_cpardiso/mkl_cpardiso.c @@ -1,4 +1,3 @@ - #include #include <../src/mat/impls/aij/mpi/mpiaij.h> /*I "petscmat.h" I*/ #include <../src/mat/impls/sbaij/mpi/mpisbaij.h> diff --git a/src/mat/impls/aij/mpi/mmaij.c b/src/mat/impls/aij/mpi/mmaij.c index 14cf5d9b260..37e4a7eddaf 100644 --- a/src/mat/impls/aij/mpi/mmaij.c +++ b/src/mat/impls/aij/mpi/mmaij.c @@ -1,4 +1,3 @@ - /* Support for the parallel AIJ matrix vector multiply */ diff --git a/src/mat/impls/aij/mpi/mpiaij.c b/src/mat/impls/aij/mpi/mpiaij.c index 871114efe64..557df11b6bc 100644 --- a/src/mat/impls/aij/mpi/mpiaij.c +++ b/src/mat/impls/aij/mpi/mpiaij.c @@ -3466,7 +3466,7 @@ PetscErrorCode MatCreateMPIAIJWithSeqAIJ(MPI_Comm comm, Mat A, Mat B, const Pets PetscCall(MatCreate(comm, mat)); PetscCall(MatGetSize(A, &m, &n)); PetscCheck(m == B->rmap->N, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE, "Am %" PetscInt_FMT " != Bm %" PetscInt_FMT, m, B->rmap->N); - PetscCheck(A->rmap->bs == B->rmap->bs, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE, "A row bs %" PetscInt_FMT " != B row bs %" PetscInt_FMT, A->rmap->bs, B->rmap->bs); + PetscCheck(PetscAbs(A->rmap->bs) == PetscAbs(B->rmap->bs), PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE, "A row bs %" PetscInt_FMT " != B row bs %" PetscInt_FMT, A->rmap->bs, B->rmap->bs); /* remove check below; When B is created using iscol_o from ISGetSeqIS_SameColDist_Private(), its bs may not be same as A */ /* PetscCheck(A->cmap->bs == B->cmap->bs,PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"A column bs %" PetscInt_FMT " != B column bs %" PetscInt_FMT,A->cmap->bs,B->cmap->bs); */ @@ -3478,7 +3478,7 @@ PetscErrorCode MatCreateMPIAIJWithSeqAIJ(MPI_Comm comm, Mat A, Mat B, const Pets PetscCall(MatGetMPIMatType_Private(A, &mpi_mat_type)); PetscCall(MatSetType(*mat, mpi_mat_type)); - PetscCall(MatSetBlockSizes(*mat, A->rmap->bs, A->cmap->bs)); + if (A->rmap->bs > 1 || A->cmap->bs > 1) PetscCall(MatSetBlockSizes(*mat, A->rmap->bs, A->cmap->bs)); maij = (Mat_MPIAIJ *)(*mat)->data; (*mat)->preallocated = PETSC_TRUE; diff --git a/src/mat/impls/aij/mpi/mpiaijpc.c b/src/mat/impls/aij/mpi/mpiaijpc.c index c00344bebb9..320e89f16e1 100644 --- a/src/mat/impls/aij/mpi/mpiaijpc.c +++ b/src/mat/impls/aij/mpi/mpiaijpc.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/mpi/mpiaij.h> PetscErrorCode MatGetDiagonalBlock_MPIAIJ(Mat A, Mat *a) diff --git a/src/mat/impls/aij/mpi/mpimatmatmult.c b/src/mat/impls/aij/mpi/mpimatmatmult.c index 8a3758af228..cb3dc2cdff1 100644 --- a/src/mat/impls/aij/mpi/mpimatmatmult.c +++ b/src/mat/impls/aij/mpi/mpimatmatmult.c @@ -1,4 +1,3 @@ - /* Defines matrix-matrix product routines for pairs of MPIAIJ matrices C = A * B diff --git a/src/mat/impls/aij/mpi/mpimattransposematmult.c b/src/mat/impls/aij/mpi/mpimattransposematmult.c index b3a6bd63756..8ee05444ae6 100644 --- a/src/mat/impls/aij/mpi/mpimattransposematmult.c +++ b/src/mat/impls/aij/mpi/mpimattransposematmult.c @@ -1,4 +1,3 @@ - /* Defines matrix-matrix product routines for pairs of MPIAIJ matrices C = A^T * B diff --git a/src/mat/impls/aij/mpi/mpiov.c b/src/mat/impls/aij/mpi/mpiov.c index 40ba623b0e1..898c8f0c8ea 100644 --- a/src/mat/impls/aij/mpi/mpiov.c +++ b/src/mat/impls/aij/mpi/mpiov.c @@ -1618,7 +1618,7 @@ PetscErrorCode MatCreateSubMatrices_MPIAIJ_SingleIS_Local(Mat C, PetscInt ismax, PetscCall(ISGetBlockSize(isrow[0], &i)); PetscCall(ISGetBlockSize(iscol[0], &j)); - PetscCall(MatSetBlockSizes(submat, i, j)); + if (i > 1 || j > 1) PetscCall(MatSetBlockSizes(submat, i, j)); PetscCall(MatSetType(submat, ((PetscObject)A)->type_name)); PetscCall(MatSeqAIJSetPreallocation(submat, 0, lens)); @@ -2534,7 +2534,7 @@ PetscErrorCode MatCreateSubMatrices_MPIAIJ_Local(Mat C, PetscInt ismax, const IS PetscCall(MatCreate(PETSC_COMM_SELF, submats + i)); PetscCall(MatSetSizes(submats[i], nrow[i], ncol[i], PETSC_DETERMINE, PETSC_DETERMINE)); - PetscCall(MatSetBlockSizes(submats[i], rbs, cbs)); + if (rbs > 1 || cbs > 1) PetscCall(MatSetBlockSizes(submats[i], rbs, cbs)); PetscCall(MatSetType(submats[i], ((PetscObject)A)->type_name)); PetscCall(MatSeqAIJSetPreallocation(submats[i], 0, lens[i])); @@ -2768,8 +2768,8 @@ PetscErrorCode MatCreateSubMatrices_MPIAIJ_Local(Mat C, PetscInt ismax, const IS #endif ilen = imat_ilen[row]; mat_i = imat_i[row]; - mat_a = imat_a + mat_i; - mat_j = imat_j + mat_i; + mat_a = imat_a ? imat_a + mat_i : NULL; + mat_j = imat_j ? imat_j + mat_i : NULL; max2 = rbuf2_i[ct1]; if (!allcolumns[is_no]) { for (l = 0; l < max2; l++, ct2++) { diff --git a/src/mat/impls/aij/mpi/mpiptap.c b/src/mat/impls/aij/mpi/mpiptap.c index 9c5c7a99c54..1acdc86c0af 100644 --- a/src/mat/impls/aij/mpi/mpiptap.c +++ b/src/mat/impls/aij/mpi/mpiptap.c @@ -1,4 +1,3 @@ - /* Defines projective product routines where A is a MPIAIJ matrix C = P^T * A * P diff --git a/src/mat/impls/aij/mpi/mumps/mumps.c b/src/mat/impls/aij/mpi/mumps/mumps.c index 2f20566b4a9..609b72c0e22 100644 --- a/src/mat/impls/aij/mpi/mumps/mumps.c +++ b/src/mat/impls/aij/mpi/mumps/mumps.c @@ -1,4 +1,3 @@ - /* Provides an interface to the MUMPS sparse solver */ @@ -982,6 +981,32 @@ static PetscErrorCode MatConvertToTriples_mpiaij_mpisbaij(Mat A, PetscInt shift, PetscFunctionReturn(PETSC_SUCCESS); } +static PetscErrorCode MatConvertToTriples_diagonal_xaij(Mat A, PetscInt shift, MatReuse reuse, Mat_MUMPS *mumps) +{ + const PetscScalar *av; + const PetscInt M = A->rmap->n; + PetscInt64 i; + PetscMUMPSInt *row, *col; + Vec v; + + PetscFunctionBegin; + PetscCall(MatDiagonalGetDiagonal(A, &v)); + PetscCall(VecGetArrayRead(v, &av)); + if (reuse == MAT_INITIAL_MATRIX) { + PetscCall(PetscMalloc2(M, &row, M, &col)); + for (i = 0; i < M; i++) { + PetscCall(PetscMUMPSIntCast(i + A->rmap->rstart, &row[i])); + col[i] = row[i]; + } + mumps->val = (PetscScalar *)av; + mumps->irn = row; + mumps->jcn = col; + mumps->nnz = M; + } else PetscCall(PetscArraycpy(mumps->val, av, M)); + PetscCall(VecRestoreArrayRead(v, &av)); + PetscFunctionReturn(PETSC_SUCCESS); +} + static PetscErrorCode MatConvertToTriples_nest_xaij(Mat A, PetscInt shift, MatReuse reuse, Mat_MUMPS *mumps) { Mat **mats; @@ -1009,7 +1034,7 @@ static PetscErrorCode MatConvertToTriples_nest_xaij(Mat A, PetscInt shift, MatRe if (chol && c < r) continue; /* skip lower-triangular block for Cholesky */ if (sub) { PetscErrorCode (*convert_to_triples)(Mat, PetscInt, MatReuse, Mat_MUMPS *) = NULL; - PetscBool isSeqAIJ, isMPIAIJ, isSeqBAIJ, isMPIBAIJ, isSeqSBAIJ, isMPISBAIJ, isTrans, isHTrans = PETSC_FALSE; + PetscBool isSeqAIJ, isMPIAIJ, isSeqBAIJ, isMPIBAIJ, isSeqSBAIJ, isMPISBAIJ, isTrans, isHTrans = PETSC_FALSE, isDiag; MatInfo info; PetscCall(PetscObjectTypeCompare((PetscObject)sub, MATTRANSPOSEVIRTUAL, &isTrans)); @@ -1024,6 +1049,7 @@ static PetscErrorCode MatConvertToTriples_nest_xaij(Mat A, PetscInt shift, MatRe PetscCall(PetscObjectBaseTypeCompare((PetscObject)sub, MATMPIBAIJ, &isMPIBAIJ)); PetscCall(PetscObjectBaseTypeCompare((PetscObject)sub, MATSEQSBAIJ, &isSeqSBAIJ)); PetscCall(PetscObjectBaseTypeCompare((PetscObject)sub, MATMPISBAIJ, &isMPISBAIJ)); + PetscCall(PetscObjectTypeCompare((PetscObject)sub, MATDIAGONAL, &isDiag)); if (chol) { if (r == c) { @@ -1031,17 +1057,20 @@ static PetscErrorCode MatConvertToTriples_nest_xaij(Mat A, PetscInt shift, MatRe else if (isMPIAIJ) convert_to_triples = MatConvertToTriples_mpiaij_mpisbaij; else if (isSeqSBAIJ) convert_to_triples = MatConvertToTriples_seqsbaij_seqsbaij; else if (isMPISBAIJ) convert_to_triples = MatConvertToTriples_mpisbaij_mpisbaij; + else if (isDiag) convert_to_triples = MatConvertToTriples_diagonal_xaij; } else { if (isSeqAIJ) convert_to_triples = MatConvertToTriples_seqaij_seqaij; else if (isMPIAIJ) convert_to_triples = MatConvertToTriples_mpiaij_mpiaij; else if (isSeqBAIJ) convert_to_triples = MatConvertToTriples_seqbaij_seqaij; else if (isMPIBAIJ) convert_to_triples = MatConvertToTriples_mpibaij_mpiaij; + else if (isDiag) convert_to_triples = MatConvertToTriples_diagonal_xaij; } } else { if (isSeqAIJ) convert_to_triples = MatConvertToTriples_seqaij_seqaij; else if (isMPIAIJ) convert_to_triples = MatConvertToTriples_mpiaij_mpiaij; else if (isSeqBAIJ) convert_to_triples = MatConvertToTriples_seqbaij_seqaij; else if (isMPIBAIJ) convert_to_triples = MatConvertToTriples_mpibaij_mpiaij; + else if (isDiag) convert_to_triples = MatConvertToTriples_diagonal_xaij; } PetscCheck(convert_to_triples, PetscObjectComm((PetscObject)sub), PETSC_ERR_SUP, "Not for block of type %s", ((PetscObject)sub)->type_name); mumps->nest_convert_to_triples[r * nc + c] = convert_to_triples; @@ -3323,7 +3352,7 @@ static PetscErrorCode MatGetFactor_aij_mumps(Mat A, MatFactorType ftype, Mat *F) { Mat B; Mat_MUMPS *mumps; - PetscBool isSeqAIJ; + PetscBool isSeqAIJ, isDiag; PetscMPIInt size; PetscFunctionBegin; @@ -3336,6 +3365,7 @@ static PetscErrorCode MatGetFactor_aij_mumps(Mat A, MatFactorType ftype, Mat *F) #endif /* Create the factorization matrix */ PetscCall(PetscObjectBaseTypeCompare((PetscObject)A, MATSEQAIJ, &isSeqAIJ)); + PetscCall(PetscObjectBaseTypeCompare((PetscObject)A, MATDIAGONAL, &isDiag)); PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &B)); PetscCall(MatSetSizes(B, A->rmap->n, A->cmap->n, A->rmap->N, A->cmap->N)); PetscCall(PetscStrallocpy("mumps", &((PetscObject)B)->type_name)); @@ -3365,6 +3395,7 @@ static PetscErrorCode MatGetFactor_aij_mumps(Mat A, MatFactorType ftype, Mat *F) B->ops->lufactorsymbolic = MatLUFactorSymbolic_AIJMUMPS; B->factortype = MAT_FACTOR_LU; if (isSeqAIJ) mumps->ConvertToTriples = MatConvertToTriples_seqaij_seqaij; + else if (isDiag) mumps->ConvertToTriples = MatConvertToTriples_diagonal_xaij; else mumps->ConvertToTriples = MatConvertToTriples_mpiaij_mpiaij; PetscCall(PetscStrallocpy(MATORDERINGEXTERNAL, (char **)&B->preferredordering[MAT_FACTOR_LU])); mumps->sym = 0; @@ -3372,6 +3403,7 @@ static PetscErrorCode MatGetFactor_aij_mumps(Mat A, MatFactorType ftype, Mat *F) B->ops->choleskyfactorsymbolic = MatCholeskyFactorSymbolic_MUMPS; B->factortype = MAT_FACTOR_CHOLESKY; if (isSeqAIJ) mumps->ConvertToTriples = MatConvertToTriples_seqaij_seqsbaij; + else if (isDiag) mumps->ConvertToTriples = MatConvertToTriples_diagonal_xaij; else mumps->ConvertToTriples = MatConvertToTriples_mpiaij_mpisbaij; PetscCall(PetscStrallocpy(MATORDERINGEXTERNAL, (char **)&B->preferredordering[MAT_FACTOR_CHOLESKY])); #if defined(PETSC_USE_COMPLEX) @@ -3651,7 +3683,7 @@ static PetscErrorCode MatGetFactor_nest_mumps(Mat A, MatFactorType ftype, Mat *F for (PetscInt r = 0; r < nr; r++) { for (PetscInt c = 0; c < nc; c++) { Mat sub = mats[r][c]; - PetscBool isSeqAIJ, isMPIAIJ, isSeqBAIJ, isMPIBAIJ, isSeqSBAIJ, isMPISBAIJ, isTrans; + PetscBool isSeqAIJ, isMPIAIJ, isSeqBAIJ, isMPIBAIJ, isSeqSBAIJ, isMPISBAIJ, isTrans, isDiag; if (!sub || (ftype == MAT_FACTOR_CHOLESKY && c < r)) continue; PetscCall(PetscObjectTypeCompare((PetscObject)sub, MATTRANSPOSEVIRTUAL, &isTrans)); @@ -3666,17 +3698,18 @@ static PetscErrorCode MatGetFactor_nest_mumps(Mat A, MatFactorType ftype, Mat *F PetscCall(PetscObjectBaseTypeCompare((PetscObject)sub, MATMPIBAIJ, &isMPIBAIJ)); PetscCall(PetscObjectBaseTypeCompare((PetscObject)sub, MATSEQSBAIJ, &isSeqSBAIJ)); PetscCall(PetscObjectBaseTypeCompare((PetscObject)sub, MATMPISBAIJ, &isMPISBAIJ)); + PetscCall(PetscObjectTypeCompare((PetscObject)sub, MATDIAGONAL, &isDiag)); if (ftype == MAT_FACTOR_CHOLESKY) { if (r == c) { - if (!isSeqAIJ && !isMPIAIJ && !isSeqBAIJ && !isMPIBAIJ && !isSeqSBAIJ && !isMPISBAIJ) { + if (!isSeqAIJ && !isMPIAIJ && !isSeqBAIJ && !isMPIBAIJ && !isSeqSBAIJ && !isMPISBAIJ && !isDiag) { PetscCall(PetscInfo(sub, "MAT_CHOLESKY_FACTOR not supported for diagonal block of type %s.\n", ((PetscObject)sub)->type_name)); flg = PETSC_FALSE; } - } else if (!isSeqAIJ && !isMPIAIJ && !isSeqBAIJ && !isMPIBAIJ) { + } else if (!isSeqAIJ && !isMPIAIJ && !isSeqBAIJ && !isMPIBAIJ && !isDiag) { PetscCall(PetscInfo(sub, "MAT_CHOLESKY_FACTOR not supported for off-diagonal block of type %s.\n", ((PetscObject)sub)->type_name)); flg = PETSC_FALSE; } - } else if (!isSeqAIJ && !isMPIAIJ && !isSeqBAIJ && !isMPIBAIJ) { + } else if (!isSeqAIJ && !isMPIAIJ && !isSeqBAIJ && !isMPIBAIJ && !isDiag) { PetscCall(PetscInfo(sub, "MAT_LU_FACTOR not supported for block of type %s.\n", ((PetscObject)sub)->type_name)); flg = PETSC_FALSE; } @@ -3761,6 +3794,8 @@ PETSC_EXTERN PetscErrorCode MatSolverTypeRegister_MUMPS(void) PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATSEQBAIJ, MAT_FACTOR_CHOLESKY, MatGetFactor_baij_mumps)); PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATSEQSBAIJ, MAT_FACTOR_CHOLESKY, MatGetFactor_sbaij_mumps)); PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATSEQSELL, MAT_FACTOR_LU, MatGetFactor_sell_mumps)); + PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATDIAGONAL, MAT_FACTOR_LU, MatGetFactor_aij_mumps)); + PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATDIAGONAL, MAT_FACTOR_CHOLESKY, MatGetFactor_aij_mumps)); PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATNEST, MAT_FACTOR_LU, MatGetFactor_nest_mumps)); PetscCall(MatSolverTypeRegister(MATSOLVERMUMPS, MATNEST, MAT_FACTOR_CHOLESKY, MatGetFactor_nest_mumps)); PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/aij/seq/aij.c b/src/mat/impls/aij/seq/aij.c index 6467264c1af..8252ecb009c 100644 --- a/src/mat/impls/aij/seq/aij.c +++ b/src/mat/impls/aij/seq/aij.c @@ -2257,9 +2257,6 @@ PetscErrorCode MatGetRow_SeqAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt **id PetscErrorCode MatRestoreRow_SeqAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt **idx, PetscScalar **v) { PetscFunctionBegin; - if (nz) *nz = 0; - if (idx) *idx = NULL; - if (v) *v = NULL; PetscFunctionReturn(PETSC_SUCCESS); } @@ -2588,7 +2585,7 @@ PetscErrorCode MatCreateSubMatrix_SeqAIJ(Mat A, IS isrow, IS iscol, PetscInt csi PetscCall(MatSetSizes(C, nrows, ncols, PETSC_DETERMINE, PETSC_DETERMINE)); PetscCall(ISGetBlockSize(isrow, &rbs)); PetscCall(ISGetBlockSize(iscol, &cbs)); - PetscCall(MatSetBlockSizes(C, rbs, cbs)); + if (rbs > 1 || cbs > 1) PetscCall(MatSetBlockSizes(C, rbs, cbs)); PetscCall(MatSetType(C, ((PetscObject)A)->type_name)); PetscCall(MatSeqAIJSetPreallocation_SeqAIJ(C, 0, lens)); } diff --git a/src/mat/impls/aij/seq/aijhdf5.c b/src/mat/impls/aij/seq/aijhdf5.c index aa937484afd..933575f6b33 100644 --- a/src/mat/impls/aij/seq/aijhdf5.c +++ b/src/mat/impls/aij/seq/aijhdf5.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/seq/aij.h> #include #include diff --git a/src/mat/impls/aij/seq/aijmkl/aijmkl.c b/src/mat/impls/aij/seq/aijmkl/aijmkl.c index 32379f38c42..f0bdae9fde5 100644 --- a/src/mat/impls/aij/seq/aijmkl/aijmkl.c +++ b/src/mat/impls/aij/seq/aijmkl/aijmkl.c @@ -1,4 +1,3 @@ - /* Defines basic operations for the MATSEQAIJMKL matrix class. This class is derived from the MATSEQAIJ class and retains the diff --git a/src/mat/impls/aij/seq/aijperm/aijperm.c b/src/mat/impls/aij/seq/aijperm/aijperm.c index c63b6e4394c..e1a3a66fd08 100644 --- a/src/mat/impls/aij/seq/aijperm/aijperm.c +++ b/src/mat/impls/aij/seq/aijperm/aijperm.c @@ -1,4 +1,3 @@ - /* Defines basic operations for the MATSEQAIJPERM matrix class. This class is derived from the MATSEQAIJ class and retains the diff --git a/src/mat/impls/aij/seq/bas/basfactor.c b/src/mat/impls/aij/seq/bas/basfactor.c index c245072cd3f..042aa146ae8 100644 --- a/src/mat/impls/aij/seq/bas/basfactor.c +++ b/src/mat/impls/aij/seq/bas/basfactor.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/seq/aij.h> #include <../src/mat/impls/sbaij/seq/sbaij.h> #include <../src/mat/impls/aij/seq/bas/spbas.h> diff --git a/src/mat/impls/aij/seq/cholmod/aijcholmod.c b/src/mat/impls/aij/seq/cholmod/aijcholmod.c index a41c19bf91b..8c794c761d2 100644 --- a/src/mat/impls/aij/seq/cholmod/aijcholmod.c +++ b/src/mat/impls/aij/seq/cholmod/aijcholmod.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/seq/aij.h> #include <../src/mat/impls/sbaij/seq/cholmod/cholmodimpl.h> diff --git a/src/mat/impls/aij/seq/crl/crl.c b/src/mat/impls/aij/seq/crl/crl.c index a8c578ca8fe..a535662968b 100644 --- a/src/mat/impls/aij/seq/crl/crl.c +++ b/src/mat/impls/aij/seq/crl/crl.c @@ -1,4 +1,3 @@ - /* Defines a matrix-vector product for the MATSEQAIJCRL matrix class. This class is derived from the MATSEQAIJ class and retains the diff --git a/src/mat/impls/aij/seq/crl/ftn-kernels/fmultcrl.F90 b/src/mat/impls/aij/seq/crl/ftn-kernels/fmultcrl.F90 index eee34efe9fc..45f384906be 100644 --- a/src/mat/impls/aij/seq/crl/ftn-kernels/fmultcrl.F90 +++ b/src/mat/impls/aij/seq/crl/ftn-kernels/fmultcrl.F90 @@ -24,4 +24,3 @@ subroutine FortranMultCRL(m,rmax,x,y,icols,acols) return end - diff --git a/src/mat/impls/aij/seq/essl/essl.c b/src/mat/impls/aij/seq/essl/essl.c index c2cff222002..7a61d4adcad 100644 --- a/src/mat/impls/aij/seq/essl/essl.c +++ b/src/mat/impls/aij/seq/essl/essl.c @@ -1,4 +1,3 @@ - /* Provides an interface to the IBM RS6000 Essl sparse solver diff --git a/src/mat/impls/aij/seq/ftn-kernels/fmult.F90 b/src/mat/impls/aij/seq/ftn-kernels/fmult.F90 index f7a1145fa53..101f44f8972 100644 --- a/src/mat/impls/aij/seq/ftn-kernels/fmult.F90 +++ b/src/mat/impls/aij/seq/ftn-kernels/fmult.F90 @@ -46,4 +46,3 @@ subroutine FortranMultAIJ(n,x,ii,jj,a,y) return end - diff --git a/src/mat/impls/aij/seq/ftn-kernels/fmultadd.F90 b/src/mat/impls/aij/seq/ftn-kernels/fmultadd.F90 index e1033923ea2..39b0344d5af 100644 --- a/src/mat/impls/aij/seq/ftn-kernels/fmultadd.F90 +++ b/src/mat/impls/aij/seq/ftn-kernels/fmultadd.F90 @@ -25,4 +25,3 @@ subroutine FortranMultAddAIJ(n,x,ii,jj,a,y,z) return end - diff --git a/src/mat/impls/aij/seq/ftn-kernels/frelax.F90 b/src/mat/impls/aij/seq/ftn-kernels/frelax.F90 index 2beafe2dd2c..a6fb0fe4f87 100644 --- a/src/mat/impls/aij/seq/ftn-kernels/frelax.F90 +++ b/src/mat/impls/aij/seq/ftn-kernels/frelax.F90 @@ -114,4 +114,3 @@ subroutine FortranRelaxAIJBackward(n,omega,x,ai,aj,adiag,aa,b) 40 continue return end - diff --git a/src/mat/impls/aij/seq/ftn-kernels/fsolve.F90 b/src/mat/impls/aij/seq/ftn-kernels/fsolve.F90 index c24f81bdb85..d887c1d06c8 100644 --- a/src/mat/impls/aij/seq/ftn-kernels/fsolve.F90 +++ b/src/mat/impls/aij/seq/ftn-kernels/fsolve.F90 @@ -42,4 +42,3 @@ subroutine FortranSolveAIJ(n,x,ai,aj,adiag,aa,b) 40 continue return end - diff --git a/src/mat/impls/aij/seq/ij.c b/src/mat/impls/aij/seq/ij.c index 92344fdc851..b8bc4da53d9 100644 --- a/src/mat/impls/aij/seq/ij.c +++ b/src/mat/impls/aij/seq/ij.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/seq/aij.h> /* diff --git a/src/mat/impls/aij/seq/inode.c b/src/mat/impls/aij/seq/inode.c index eaacec8a5b2..bec022f4f56 100644 --- a/src/mat/impls/aij/seq/inode.c +++ b/src/mat/impls/aij/seq/inode.c @@ -1,4 +1,3 @@ - /* This file provides high performance routines for the Inode format (compressed sparse row) by taking advantage of rows with identical nonzero structure (I-nodes). @@ -4529,7 +4528,7 @@ PetscErrorCode MatInodeAdjustForInodes_SeqAIJ_Inode(Mat A, IS *rperm, IS *cperm) PetscCall(ISGetIndices(ris, &ridx)); PetscCall(ISGetIndices(cis, &cidx)); - /* Form the inode structure for the rows of permuted matric using inv perm*/ + /* Form the inode structure for the rows of permuted matrix using inv perm*/ for (i = 0, tns[0] = 0; i < nslim_row; ++i) tns[i + 1] = tns[i] + ns_row[i]; /* Construct the permutations for rows*/ diff --git a/src/mat/impls/aij/seq/inode2.c b/src/mat/impls/aij/seq/inode2.c index 53e77ebf16f..ab77c0ccaae 100644 --- a/src/mat/impls/aij/seq/inode2.c +++ b/src/mat/impls/aij/seq/inode2.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/seq/aij.h> extern PetscErrorCode MatInodeAdjustForInodes_SeqAIJ_Inode(Mat, IS *, IS *); diff --git a/src/mat/impls/aij/seq/klu/klu.c b/src/mat/impls/aij/seq/klu/klu.c index 47c6e06a728..ec08ad8af01 100644 --- a/src/mat/impls/aij/seq/klu/klu.c +++ b/src/mat/impls/aij/seq/klu/klu.c @@ -1,4 +1,3 @@ - /* Provides an interface to the KLUv1.2 sparse solver diff --git a/src/mat/impls/aij/seq/lusol/lusol.c b/src/mat/impls/aij/seq/lusol/lusol.c index d2cecfd6132..c557a6650cb 100644 --- a/src/mat/impls/aij/seq/lusol/lusol.c +++ b/src/mat/impls/aij/seq/lusol/lusol.c @@ -1,4 +1,3 @@ - /* Provides an interface to the LUSOL package of .... diff --git a/src/mat/impls/aij/seq/matlab/aijmatlab.c b/src/mat/impls/aij/seq/matlab/aijmatlab.c index c5fcd3d796d..7d5767cd723 100644 --- a/src/mat/impls/aij/seq/matlab/aijmatlab.c +++ b/src/mat/impls/aij/seq/matlab/aijmatlab.c @@ -1,4 +1,3 @@ - /* Provides an interface for the MATLAB engine sparse solver diff --git a/src/mat/impls/aij/seq/matmatmult.c b/src/mat/impls/aij/seq/matmatmult.c index 851d36a1048..c1b2c401e53 100644 --- a/src/mat/impls/aij/seq/matmatmult.c +++ b/src/mat/impls/aij/seq/matmatmult.c @@ -1,4 +1,3 @@ - /* Defines matrix-matrix product routines for pairs of SeqAIJ matrices C = A * B diff --git a/src/mat/impls/aij/seq/matptap.c b/src/mat/impls/aij/seq/matptap.c index 10ff718986e..ec6149eec8f 100644 --- a/src/mat/impls/aij/seq/matptap.c +++ b/src/mat/impls/aij/seq/matptap.c @@ -1,4 +1,3 @@ - /* Defines projective product routines where A is a SeqAIJ matrix C = P^T * A * P diff --git a/src/mat/impls/aij/seq/matrart.c b/src/mat/impls/aij/seq/matrart.c index de5d781ea55..fe1256a2134 100644 --- a/src/mat/impls/aij/seq/matrart.c +++ b/src/mat/impls/aij/seq/matrart.c @@ -1,4 +1,3 @@ - /* Defines projective product routines where A is a SeqAIJ matrix C = R * A * R^T diff --git a/src/mat/impls/aij/seq/mattransposematmult.c b/src/mat/impls/aij/seq/mattransposematmult.c index 8242060d360..364009be924 100644 --- a/src/mat/impls/aij/seq/mattransposematmult.c +++ b/src/mat/impls/aij/seq/mattransposematmult.c @@ -1,4 +1,3 @@ - /* Defines matrix-matrix product routines for C = A^T * B and C = A * B^t diff --git a/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp b/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp index af675269516..45b56a95bd5 100644 --- a/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp +++ b/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp @@ -1258,7 +1258,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Vec x) /* Solve L*y = b */ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, (void *)barray)); PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_Y, fs->Y)); - #if PETSC_PKG_HIP_VERSION_GE(5, 6, 0) + #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 0) PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* L Y = X */ fs->dnVecDescr_X, fs->dnVecDescr_Y, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_L)); // hipsparseSpSV_solve() secretely uses the external buffer used in hipsparseSpSV_analysis()! #else @@ -1267,7 +1267,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Vec x) #endif /* Solve U*x = y */ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, xarray)); - #if PETSC_PKG_HIP_VERSION_GE(5, 6, 0) + #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 0) PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_U, /* U X = Y */ fs->dnVecDescr_Y, fs->dnVecDescr_X, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_U)); #else @@ -1316,7 +1316,7 @@ static PetscErrorCode MatSolveTranspose_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Ve /* Solve Ut*y = b */ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, (void *)barray)); PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_Y, fs->Y)); - #if PETSC_PKG_HIP_VERSION_GE(5, 6, 0) + #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 0) PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_U, /* Ut Y = X */ fs->dnVecDescr_X, fs->dnVecDescr_Y, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_Ut)); #else @@ -1325,7 +1325,7 @@ static PetscErrorCode MatSolveTranspose_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Ve #endif /* Solve Lt*x = y */ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, xarray)); - #if PETSC_PKG_HIP_VERSION_GE(5, 6, 0) + #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 0) PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* Lt X = Y */ fs->dnVecDescr_Y, fs->dnVecDescr_X, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_Lt)); #else @@ -1559,7 +1559,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ICC0(Mat fact, Vec b, Vec x) /* Solve L*y = b */ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, (void *)barray)); PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_Y, fs->Y)); - #if PETSC_PKG_HIP_VERSION_GE(5, 6, 0) + #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 0) PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* L Y = X */ fs->dnVecDescr_X, fs->dnVecDescr_Y, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_L)); #else @@ -1568,7 +1568,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ICC0(Mat fact, Vec b, Vec x) #endif /* Solve Lt*x = y */ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, xarray)); - #if PETSC_PKG_HIP_VERSION_GE(5, 6, 0) + #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 0) PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* Lt X = Y */ fs->dnVecDescr_Y, fs->dnVecDescr_X, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_Lt)); #else diff --git a/src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx b/src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx index feb51f440b3..7054add0576 100644 --- a/src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx +++ b/src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx @@ -1,4 +1,3 @@ - /* Defines the basic matrix operations for the AIJ (compressed row) matrix storage format. diff --git a/src/mat/impls/aij/seq/spqr/aijspqr.c b/src/mat/impls/aij/seq/spqr/aijspqr.c index c7c03cff75c..bd8f74f4728 100644 --- a/src/mat/impls/aij/seq/spqr/aijspqr.c +++ b/src/mat/impls/aij/seq/spqr/aijspqr.c @@ -1,4 +1,3 @@ - #include #include <../src/mat/impls/aij/seq/aij.h> #include <../src/mat/impls/sbaij/seq/cholmod/cholmodimpl.h> diff --git a/src/mat/impls/aij/seq/superlu/superlu.c b/src/mat/impls/aij/seq/superlu/superlu.c index 59a94b694ce..d932f34c5b3 100644 --- a/src/mat/impls/aij/seq/superlu/superlu.c +++ b/src/mat/impls/aij/seq/superlu/superlu.c @@ -1,4 +1,3 @@ - /* This file implements a subclass of the SeqAIJ matrix class that uses the SuperLU sparse solver. diff --git a/src/mat/impls/aij/seq/symtranspose.c b/src/mat/impls/aij/seq/symtranspose.c index 3972cabd813..1245f8d46e3 100644 --- a/src/mat/impls/aij/seq/symtranspose.c +++ b/src/mat/impls/aij/seq/symtranspose.c @@ -1,4 +1,3 @@ - /* Defines transpose routines for SeqAIJ matrices. */ diff --git a/src/mat/impls/aij/seq/umfpack/umfpack.c b/src/mat/impls/aij/seq/umfpack/umfpack.c index 07958f91778..ffd9ebe5275 100644 --- a/src/mat/impls/aij/seq/umfpack/umfpack.c +++ b/src/mat/impls/aij/seq/umfpack/umfpack.c @@ -1,4 +1,3 @@ - /* Provides an interface to the UMFPACK sparse solver available through SuiteSparse version 4.2.1 diff --git a/src/mat/impls/baij/mpi/baijov.c b/src/mat/impls/baij/mpi/baijov.c index bcdc69addbe..efc23cbbe93 100644 --- a/src/mat/impls/baij/mpi/baijov.c +++ b/src/mat/impls/baij/mpi/baijov.c @@ -1,4 +1,3 @@ - /* Routines to compute overlapping regions of a parallel MPI matrix and to find submatrices that were shared across processors. diff --git a/src/mat/impls/baij/mpi/mmbaij.c b/src/mat/impls/baij/mpi/mmbaij.c index fdcab4722b7..9f5093be496 100644 --- a/src/mat/impls/baij/mpi/mmbaij.c +++ b/src/mat/impls/baij/mpi/mmbaij.c @@ -1,4 +1,3 @@ - /* Support for the parallel BAIJ matrix vector multiply */ diff --git a/src/mat/impls/baij/mpi/mpiaijbaij.c b/src/mat/impls/baij/mpi/mpiaijbaij.c index 4d752b40e37..a3aaf7011f4 100644 --- a/src/mat/impls/baij/mpi/mpiaijbaij.c +++ b/src/mat/impls/baij/mpi/mpiaijbaij.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/baij/mpi/mpibaij.h> /*I "petscmat.h" I*/ #include <../src/mat/impls/aij/mpi/mpiaij.h> #include diff --git a/src/mat/impls/baij/seq/aijbaij.c b/src/mat/impls/baij/seq/aijbaij.c index a653c45da23..9445d27da21 100644 --- a/src/mat/impls/baij/seq/aijbaij.c +++ b/src/mat/impls/baij/seq/aijbaij.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/baij/seq/baij.h> PETSC_INTERN PetscErrorCode MatConvert_SeqBAIJ_SeqAIJ(Mat A, MatType newtype, MatReuse reuse, Mat *newmat) diff --git a/src/mat/impls/baij/seq/baij.c b/src/mat/impls/baij/seq/baij.c index da91e15c8ab..0885a7f88ae 100644 --- a/src/mat/impls/baij/seq/baij.c +++ b/src/mat/impls/baij/seq/baij.c @@ -1,4 +1,3 @@ - /* Defines the basic matrix operations for the BAIJ (compressed row) matrix storage format. @@ -1705,7 +1704,6 @@ PetscErrorCode MatGetRow_SeqBAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt **i PetscErrorCode MatRestoreRow_SeqBAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt **idx, PetscScalar **v) { PetscFunctionBegin; - if (nz) *nz = 0; if (idx) PetscCall(PetscFree(*idx)); if (v) PetscCall(PetscFree(*v)); PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/baij/seq/baijfact.c b/src/mat/impls/baij/seq/baijfact.c index d95caf9c7ef..38a7b5e572b 100644 --- a/src/mat/impls/baij/seq/baijfact.c +++ b/src/mat/impls/baij/seq/baijfact.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact11.c b/src/mat/impls/baij/seq/baijfact11.c index f6b7015693b..9a4b551b8a3 100644 --- a/src/mat/impls/baij/seq/baijfact11.c +++ b/src/mat/impls/baij/seq/baijfact11.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact13.c b/src/mat/impls/baij/seq/baijfact13.c index 8b1af121f95..4c495900646 100644 --- a/src/mat/impls/baij/seq/baijfact13.c +++ b/src/mat/impls/baij/seq/baijfact13.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact2.c b/src/mat/impls/baij/seq/baijfact2.c index cdce434ff89..263277d7108 100644 --- a/src/mat/impls/baij/seq/baijfact2.c +++ b/src/mat/impls/baij/seq/baijfact2.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact3.c b/src/mat/impls/baij/seq/baijfact3.c index e67f8757d29..872b51c9b8c 100644 --- a/src/mat/impls/baij/seq/baijfact3.c +++ b/src/mat/impls/baij/seq/baijfact3.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact4.c b/src/mat/impls/baij/seq/baijfact4.c index 13b189ef2bd..be9c7a2c286 100644 --- a/src/mat/impls/baij/seq/baijfact4.c +++ b/src/mat/impls/baij/seq/baijfact4.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact5.c b/src/mat/impls/baij/seq/baijfact5.c index ec8509c7ec6..4690cb52b9a 100644 --- a/src/mat/impls/baij/seq/baijfact5.c +++ b/src/mat/impls/baij/seq/baijfact5.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact7.c b/src/mat/impls/baij/seq/baijfact7.c index ab7b2dc9a62..749a2ebd07e 100644 --- a/src/mat/impls/baij/seq/baijfact7.c +++ b/src/mat/impls/baij/seq/baijfact7.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact81.c b/src/mat/impls/baij/seq/baijfact81.c index 6b547674a65..39d1c6fedc4 100644 --- a/src/mat/impls/baij/seq/baijfact81.c +++ b/src/mat/impls/baij/seq/baijfact81.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/baijfact9.c b/src/mat/impls/baij/seq/baijfact9.c index e094605be93..4b034dcaae5 100644 --- a/src/mat/impls/baij/seq/baijfact9.c +++ b/src/mat/impls/baij/seq/baijfact9.c @@ -1,4 +1,3 @@ - /* Factorization code for BAIJ format. */ diff --git a/src/mat/impls/baij/seq/dgedi.c b/src/mat/impls/baij/seq/dgedi.c index 0107e05b2d4..21ae967736f 100644 --- a/src/mat/impls/baij/seq/dgedi.c +++ b/src/mat/impls/baij/seq/dgedi.c @@ -1,4 +1,3 @@ - /* This file creating by running f2c linpack. this version dated 08/14/78 diff --git a/src/mat/impls/baij/seq/dgefa.c b/src/mat/impls/baij/seq/dgefa.c index a1fc573e8a6..a2f2d8ada7d 100644 --- a/src/mat/impls/baij/seq/dgefa.c +++ b/src/mat/impls/baij/seq/dgefa.c @@ -1,4 +1,3 @@ - /* This routine was converted by f2c from Linpack source linpack. this version dated 08/14/78 diff --git a/src/mat/impls/baij/seq/dgefa2.c b/src/mat/impls/baij/seq/dgefa2.c index aa1b52e12f9..b03b462c718 100644 --- a/src/mat/impls/baij/seq/dgefa2.c +++ b/src/mat/impls/baij/seq/dgefa2.c @@ -1,4 +1,3 @@ - /* Inverts 2 by 2 matrix using gaussian elimination with partial pivoting. diff --git a/src/mat/impls/baij/seq/dgefa3.c b/src/mat/impls/baij/seq/dgefa3.c index dcaa43ecfb7..78470d848a3 100644 --- a/src/mat/impls/baij/seq/dgefa3.c +++ b/src/mat/impls/baij/seq/dgefa3.c @@ -1,4 +1,3 @@ - /* Inverts 3 by 3 matrix using gaussian elimination with partial pivoting. diff --git a/src/mat/impls/baij/seq/dgefa4.c b/src/mat/impls/baij/seq/dgefa4.c index f9590a823ca..0ee3102fa2b 100644 --- a/src/mat/impls/baij/seq/dgefa4.c +++ b/src/mat/impls/baij/seq/dgefa4.c @@ -1,4 +1,3 @@ - /* Inverts 4 by 4 matrix using gaussian elimination with partial pivoting. diff --git a/src/mat/impls/baij/seq/dgefa5.c b/src/mat/impls/baij/seq/dgefa5.c index afacf488e8f..8516673f3e3 100644 --- a/src/mat/impls/baij/seq/dgefa5.c +++ b/src/mat/impls/baij/seq/dgefa5.c @@ -1,4 +1,3 @@ - /* Inverts 5 by 5 matrix using gaussian elimination with partial pivoting. diff --git a/src/mat/impls/baij/seq/dgefa6.c b/src/mat/impls/baij/seq/dgefa6.c index e0d09bf05d5..b04608df129 100644 --- a/src/mat/impls/baij/seq/dgefa6.c +++ b/src/mat/impls/baij/seq/dgefa6.c @@ -1,4 +1,3 @@ - /* Inverts 6 by 6 matrix using gaussian elimination with partial pivoting. diff --git a/src/mat/impls/baij/seq/dgefa7.c b/src/mat/impls/baij/seq/dgefa7.c index ccc03582240..4079e561d37 100644 --- a/src/mat/impls/baij/seq/dgefa7.c +++ b/src/mat/impls/baij/seq/dgefa7.c @@ -1,4 +1,3 @@ - /* Inverts 7 by 7 matrix using gaussian elimination with partial pivoting. diff --git a/src/mat/impls/baij/seq/ftn-kernels/fsolvebaij.F90 b/src/mat/impls/baij/seq/ftn-kernels/fsolvebaij.F90 index 06b992816d1..f05b1b878fb 100644 --- a/src/mat/impls/baij/seq/ftn-kernels/fsolvebaij.F90 +++ b/src/mat/impls/baij/seq/ftn-kernels/fsolvebaij.F90 @@ -212,4 +212,3 @@ subroutine FortranSolveBAIJ4(n,x,ai,aj,adiag,a,b,w) return end - diff --git a/src/mat/impls/blockmat/seq/blockmat.c b/src/mat/impls/blockmat/seq/blockmat.c index d29ebbd17cf..bda46743b2c 100644 --- a/src/mat/impls/blockmat/seq/blockmat.c +++ b/src/mat/impls/blockmat/seq/blockmat.c @@ -1,4 +1,3 @@ - /* This provides a matrix that consists of Mats */ diff --git a/src/mat/impls/cdiagonal/cdiagonal.c b/src/mat/impls/cdiagonal/cdiagonal.c index 259b5a56db1..b49d5e11805 100644 --- a/src/mat/impls/cdiagonal/cdiagonal.c +++ b/src/mat/impls/cdiagonal/cdiagonal.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { @@ -45,7 +44,6 @@ static PetscErrorCode MatGetRow_ConstantDiagonal(Mat A, PetscInt row, PetscInt * static PetscErrorCode MatRestoreRow_ConstantDiagonal(Mat A, PetscInt row, PetscInt *ncols, PetscInt *cols[], PetscScalar *vals[]) { PetscFunctionBegin; - if (ncols) *ncols = 0; if (cols) PetscCall(PetscFree(*cols)); if (vals) PetscCall(PetscFree(*vals)); PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/centering/centering.c b/src/mat/impls/centering/centering.c index b07458b52a6..666eef6efa2 100644 --- a/src/mat/impls/centering/centering.c +++ b/src/mat/impls/centering/centering.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ static PetscErrorCode MatMult_Centering(Mat A, Vec xx, Vec yy) diff --git a/src/mat/impls/composite/mcomposite.c b/src/mat/impls/composite/mcomposite.c index 161b04f7256..0d0b062f9b3 100644 --- a/src/mat/impls/composite/mcomposite.c +++ b/src/mat/impls/composite/mcomposite.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ const char *const MatCompositeMergeTypes[] = {"left", "right", "MatCompositeMergeType", "MAT_COMPOSITE_", NULL}; diff --git a/src/mat/impls/cufft/cufft.cu b/src/mat/impls/cufft/cufft.cu index 4610de08226..2b31f1ddf2d 100644 --- a/src/mat/impls/cufft/cufft.cu +++ b/src/mat/impls/cufft/cufft.cu @@ -1,4 +1,3 @@ - /* Provides an interface to the CUFFT package. Testing examples can be found in ~src/mat/tests diff --git a/src/mat/impls/dense/mpi/mmdense.c b/src/mat/impls/dense/mpi/mmdense.c index cc30a5b3b20..7f3d56c096c 100644 --- a/src/mat/impls/dense/mpi/mmdense.c +++ b/src/mat/impls/dense/mpi/mmdense.c @@ -1,4 +1,3 @@ - /* Support for the parallel dense matrix vector multiply */ diff --git a/src/mat/impls/dense/mpi/mpidense.c b/src/mat/impls/dense/mpi/mpidense.c index 9a6c99c4bf0..ff08feb7625 100644 --- a/src/mat/impls/dense/mpi/mpidense.c +++ b/src/mat/impls/dense/mpi/mpidense.c @@ -1,4 +1,3 @@ - /* Basic functions for basic parallel dense matrices. Portions of this code are under: @@ -1339,9 +1338,10 @@ static PetscErrorCode MatConvert_MPIDense_MPIAIJ(Mat A, MatType newtype, MatReus #if defined(PETSC_HAVE_ELEMENTAL) PETSC_INTERN PetscErrorCode MatConvert_MPIDense_Elemental(Mat A, MatType newtype, MatReuse reuse, Mat *newmat) { - Mat mat_elemental; - PetscScalar *v; - PetscInt m = A->rmap->n, N = A->cmap->N, rstart = A->rmap->rstart, i, *rows, *cols; + Mat_MPIDense *a = (Mat_MPIDense *)A->data; + Mat mat_elemental; + PetscScalar *v; + PetscInt m = A->rmap->n, N = A->cmap->N, rstart = A->rmap->rstart, i, *rows, *cols, lda; PetscFunctionBegin; if (reuse == MAT_REUSE_MATRIX) { @@ -1361,7 +1361,11 @@ PETSC_INTERN PetscErrorCode MatConvert_MPIDense_Elemental(Mat A, MatType newtype /* PETSc-Elemental interface uses axpy for setting off-processor entries, only ADD_VALUES is allowed */ PetscCall(MatDenseGetArray(A, &v)); - PetscCall(MatSetValues(mat_elemental, m, rows, N, cols, v, ADD_VALUES)); + PetscCall(MatDenseGetLDA(a->A, &lda)); + if (lda == m) PetscCall(MatSetValues(mat_elemental, m, rows, N, cols, v, ADD_VALUES)); + else { + for (i = 0; i < N; i++) PetscCall(MatSetValues(mat_elemental, m, rows, 1, &i, v + lda * i, ADD_VALUES)); + } PetscCall(MatAssemblyBegin(mat_elemental, MAT_FINAL_ASSEMBLY)); PetscCall(MatAssemblyEnd(mat_elemental, MAT_FINAL_ASSEMBLY)); PetscCall(MatDenseRestoreArray(A, &v)); diff --git a/src/mat/impls/dense/seq/dense.c b/src/mat/impls/dense/seq/dense.c index 2d6ff02a640..a962f9d5387 100644 --- a/src/mat/impls/dense/seq/dense.c +++ b/src/mat/impls/dense/seq/dense.c @@ -166,13 +166,13 @@ PETSC_INTERN PetscErrorCode MatConvert_SeqAIJ_SeqDense(Mat A, MatType newtype, M b = (Mat_SeqDense *)(B->data); } else { b = (Mat_SeqDense *)((*newmat)->data); - PetscCall(PetscArrayzero(b->v, m * n)); + for (i = 0; i < n; i++) PetscCall(PetscArrayzero(b->v + i * b->lda, m)); } PetscCall(MatSeqAIJGetArrayRead(A, &av)); for (i = 0; i < m; i++) { PetscInt j; for (j = 0; j < ai[1] - ai[0]; j++) { - b->v[*aj * m + i] = *av; + b->v[*aj * b->lda + i] = *av; aj++; av++; } @@ -1153,7 +1153,7 @@ static PetscErrorCode MatGetRow_SeqDense(Mat A, PetscInt row, PetscInt *ncols, P PetscInt i; PetscFunctionBegin; - *ncols = A->cmap->n; + if (ncols) *ncols = A->cmap->n; if (cols) { PetscCall(PetscMalloc1(A->cmap->n, cols)); for (i = 0; i < A->cmap->n; i++) (*cols)[i] = i; @@ -1176,7 +1176,6 @@ static PetscErrorCode MatGetRow_SeqDense(Mat A, PetscInt row, PetscInt *ncols, P static PetscErrorCode MatRestoreRow_SeqDense(Mat A, PetscInt row, PetscInt *ncols, PetscInt **cols, PetscScalar **vals) { PetscFunctionBegin; - if (ncols) *ncols = 0; if (cols) PetscCall(PetscFree(*cols)); if (vals) PetscCall(PetscFree(*vals)); PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/dense/seq/densehdf5.c b/src/mat/impls/dense/seq/densehdf5.c index a02d34aa209..2e1067246a4 100644 --- a/src/mat/impls/dense/seq/densehdf5.c +++ b/src/mat/impls/dense/seq/densehdf5.c @@ -1,4 +1,3 @@ - /* TODO change to #include <../src/mat/impls/dense/seq/dense.h> */ diff --git a/src/mat/impls/diagonal/diagonal.c b/src/mat/impls/diagonal/diagonal.c index cb14f9bffdf..6c4e9f18ebc 100644 --- a/src/mat/impls/diagonal/diagonal.c +++ b/src/mat/impls/diagonal/diagonal.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { @@ -7,6 +6,8 @@ typedef struct { Vec inv_diag; PetscBool inv_diag_valid; PetscObjectState diag_state, inv_diag_state; + PetscInt *col; + PetscScalar *val; } Mat_Diagonal; static PetscErrorCode MatDiagonalSetUpDiagonal(Mat A) @@ -50,6 +51,35 @@ static PetscErrorCode MatAXPY_Diagonal(Mat Y, PetscScalar a, Mat X, MatStructure PetscFunctionReturn(PETSC_SUCCESS); } +static PetscErrorCode MatGetRow_Diagonal(Mat A, PetscInt row, PetscInt *ncols, PetscInt **cols, PetscScalar **vals) +{ + Mat_Diagonal *mat = (Mat_Diagonal *)A->data; + + PetscFunctionBegin; + if (ncols) *ncols = 1; + if (cols) { + if (!mat->col) PetscCall(PetscMalloc1(1, &mat->col)); + *mat->col = row; + *cols = mat->col; + } + if (vals) { + const PetscScalar *v; + + if (!mat->val) PetscCall(PetscMalloc1(1, &mat->val)); + PetscCall(VecGetArrayRead(mat->diag, &v)); + *mat->val = v[row]; + *vals = mat->val; + PetscCall(VecRestoreArrayRead(mat->diag, &v)); + } + PetscFunctionReturn(PETSC_SUCCESS); +} + +static PetscErrorCode MatRestoreRow_Diagonal(Mat A, PetscInt row, PetscInt *ncols, PetscInt **cols, PetscScalar **vals) +{ + PetscFunctionBegin; + PetscFunctionReturn(PETSC_SUCCESS); +} + static PetscErrorCode MatMult_Diagonal(Mat A, Vec x, Vec y) { Mat_Diagonal *ctx = (Mat_Diagonal *)A->data; @@ -284,6 +314,8 @@ static PetscErrorCode MatDestroy_Diagonal(Mat mat) PetscFunctionBegin; PetscCall(VecDestroy(&ctx->diag)); PetscCall(VecDestroy(&ctx->inv_diag)); + PetscCall(PetscFree(ctx->col)); + PetscCall(PetscFree(ctx->val)); PetscCall(PetscObjectComposeFunction((PetscObject)mat, "MatDiagonalGetDiagonal_C", NULL)); PetscCall(PetscObjectComposeFunction((PetscObject)mat, "MatDiagonalRestoreDiagonal_C", NULL)); PetscCall(PetscObjectComposeFunction((PetscObject)mat, "MatDiagonalGetInverseDiagonal_C", NULL)); @@ -503,6 +535,8 @@ PetscErrorCode MatCreateDiagonal(Vec diag, Mat *J) PetscCall(PetscFree((*J)->defaultvectype)); PetscCall(PetscStrallocpy(type, &(*J)->defaultvectype)); PetscCall(MatSetUp(*J)); + ctx->col = NULL; + ctx->val = NULL; PetscFunctionReturn(PETSC_SUCCESS); } @@ -528,6 +562,8 @@ PETSC_INTERN PetscErrorCode MatCreate_Diagonal(Mat A) A->symmetric = PETSC_BOOL3_TRUE; if (!PetscDefined(USE_COMPLEX)) A->hermitian = PETSC_BOOL3_TRUE; + A->ops->getrow = MatGetRow_Diagonal; + A->ops->restorerow = MatRestoreRow_Diagonal; A->ops->mult = MatMult_Diagonal; A->ops->multadd = MatMultAdd_Diagonal; A->ops->multtranspose = MatMult_Diagonal; diff --git a/src/mat/impls/fft/fft.c b/src/mat/impls/fft/fft.c index 9061c41c5e2..5885c798f46 100644 --- a/src/mat/impls/fft/fft.c +++ b/src/mat/impls/fft/fft.c @@ -36,7 +36,7 @@ static PetscErrorCode MatDestroy_FFT(Mat A) Level: intermediate Note: - This serves as a base class for all FFT marix classes, currently `MATFFTW` or `MATSEQCUFFT` + This serves as a base class for all FFT matrix classes, currently `MATFFTW` or `MATSEQCUFFT` .seealso: [](ch_matrices), `Mat`, `MATFFTW`, `MATSEQCUFFT`, `MatCreateVecsFFTW()` @*/ diff --git a/src/mat/impls/fft/fftw/fftw.c b/src/mat/impls/fft/fftw/fftw.c index d2d640e41fd..3c3696bafd5 100644 --- a/src/mat/impls/fft/fftw/fftw.c +++ b/src/mat/impls/fft/fftw/fftw.c @@ -1,4 +1,3 @@ - /* Provides an interface to the FFTW package. Testing examples can be found in ~src/mat/tests diff --git a/src/mat/impls/htool/htool.cxx b/src/mat/impls/htool/htool.cxx index b44e00cb671..a63bc6c5d3f 100644 --- a/src/mat/impls/htool/htool.cxx +++ b/src/mat/impls/htool/htool.cxx @@ -352,10 +352,9 @@ static PetscErrorCode MatGetRow_Htool(Mat A, PetscInt row, PetscInt *nz, PetscIn PetscFunctionReturn(PETSC_SUCCESS); } -static PetscErrorCode MatRestoreRow_Htool(Mat, PetscInt, PetscInt *nz, PetscInt **idx, PetscScalar **v) +static PetscErrorCode MatRestoreRow_Htool(Mat, PetscInt, PetscInt *, PetscInt **idx, PetscScalar **v) { PetscFunctionBegin; - if (nz) *nz = 0; if (idx) PetscCall(PetscFree(*idx)); if (v) PetscCall(PetscFree(*v)); PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/hypre/mhypre.c b/src/mat/impls/hypre/mhypre.c index c00fd18bf0d..c840430d1e8 100644 --- a/src/mat/impls/hypre/mhypre.c +++ b/src/mat/impls/hypre/mhypre.c @@ -1,4 +1,3 @@ - /* Creates hypre ijmatrix from PETSc matrix */ diff --git a/src/mat/impls/kaij/kaij.c b/src/mat/impls/kaij/kaij.c index 590cce16b71..7fa8999a8ba 100644 --- a/src/mat/impls/kaij/kaij.c +++ b/src/mat/impls/kaij/kaij.c @@ -1,4 +1,3 @@ - /* Defines the basic matrix operations for the KAIJ matrix storage format. This format is used to evaluate matrices of the form: @@ -1237,7 +1236,6 @@ static PetscErrorCode MatGetRow_SeqKAIJ(Mat A, PetscInt row, PetscInt *ncols, Pe static PetscErrorCode MatRestoreRow_SeqKAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt **idx, PetscScalar **v) { PetscFunctionBegin; - if (nz) *nz = 0; PetscCall(PetscFree2(*idx, *v)); ((Mat_SeqKAIJ *)A->data)->getrowactive = PETSC_FALSE; PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/localref/mlocalref.c b/src/mat/impls/localref/mlocalref.c index ba2c49de705..7506deeb91a 100644 --- a/src/mat/impls/localref/mlocalref.c +++ b/src/mat/impls/localref/mlocalref.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { diff --git a/src/mat/impls/lrc/lrc.c b/src/mat/impls/lrc/lrc.c index a4f48856aaf..71731ab913f 100644 --- a/src/mat/impls/lrc/lrc.c +++ b/src/mat/impls/lrc/lrc.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ PETSC_EXTERN PetscErrorCode VecGetRootType_Private(Vec, VecType *); diff --git a/src/mat/impls/maij/maij.c b/src/mat/impls/maij/maij.c index 8617e2d51be..351f9081ef0 100644 --- a/src/mat/impls/maij/maij.c +++ b/src/mat/impls/maij/maij.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/maij/maij.h> /*I "petscmat.h" I*/ #include <../src/mat/utils/freespace.h> diff --git a/src/mat/impls/mffd/mffd.c b/src/mat/impls/mffd/mffd.c index 6e1a9b45864..c07dea3495e 100644 --- a/src/mat/impls/mffd/mffd.c +++ b/src/mat/impls/mffd/mffd.c @@ -1,4 +1,3 @@ - #include #include <../src/mat/impls/mffd/mffdimpl.h> /*I "petscmat.h" I*/ diff --git a/src/mat/impls/mffd/mffddef.c b/src/mat/impls/mffd/mffddef.c index 35fe168b33f..c49cfe7da49 100644 --- a/src/mat/impls/mffd/mffddef.c +++ b/src/mat/impls/mffd/mffddef.c @@ -1,4 +1,3 @@ - /* Implements the DS PETSc approach for computing the h parameter used with the finite difference based matrix-free diff --git a/src/mat/impls/mffd/mfregis.c b/src/mat/impls/mffd/mfregis.c index 19dd95d5bab..1c4c1ec4b22 100644 --- a/src/mat/impls/mffd/mfregis.c +++ b/src/mat/impls/mffd/mfregis.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/mffd/mffdimpl.h> /*I "petscmat.h" I*/ PETSC_EXTERN PetscErrorCode MatCreateMFFD_DS(MatMFFD); diff --git a/src/mat/impls/mffd/wp.c b/src/mat/impls/mffd/wp.c index d2fd6e84154..b4533edccf5 100644 --- a/src/mat/impls/mffd/wp.c +++ b/src/mat/impls/mffd/wp.c @@ -1,4 +1,3 @@ - /*MC MATMFFD_WP - Implements an approach for computing the differencing parameter h used with the finite difference based matrix-free Jacobian. diff --git a/src/mat/impls/nest/matnest.c b/src/mat/impls/nest/matnest.c index 4934896b2a6..25e00974b72 100644 --- a/src/mat/impls/nest/matnest.c +++ b/src/mat/impls/nest/matnest.c @@ -1967,7 +1967,7 @@ PETSC_INTERN PetscErrorCode MatAXPY_Dense_Nest(Mat Y, PetscScalar a, Mat X) static PetscErrorCode MatConvert_Nest_AIJ(Mat A, MatType newtype, MatReuse reuse, Mat *newmat) { Mat_Nest *nest = (Mat_Nest *)A->data; - PetscInt m, n, M, N, i, j, k, *dnnz, *onnz, rstart, cstart, cend; + PetscInt m, n, M, N, i, j, k, *dnnz, *onnz = NULL, rstart, cstart, cend; PetscMPIInt size; Mat C; @@ -2049,10 +2049,12 @@ static PetscErrorCode MatConvert_Nest_AIJ(Mat A, MatType newtype, MatReuse reuse PetscCall(MatSetSizes(C, m, n, M, N)); } PetscCall(PetscMalloc1(2 * m, &dnnz)); - onnz = dnnz + m; - for (k = 0; k < m; k++) { - dnnz[k] = 0; - onnz[k] = 0; + if (m) { + onnz = dnnz + m; + for (k = 0; k < m; k++) { + dnnz[k] = 0; + onnz[k] = 0; + } } for (j = 0; j < nest->nc; ++j) { IS bNis; diff --git a/src/mat/impls/normal/normm.c b/src/mat/impls/normal/normm.c index a95171aab44..294584a0f91 100644 --- a/src/mat/impls/normal/normm.c +++ b/src/mat/impls/normal/normm.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { diff --git a/src/mat/impls/normal/normmh.c b/src/mat/impls/normal/normmh.c index c16870d9096..2300d4e21bf 100644 --- a/src/mat/impls/normal/normmh.c +++ b/src/mat/impls/normal/normmh.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { @@ -6,11 +5,11 @@ typedef struct { Mat D; /* local submatrix for diagonal part */ Vec w, left, right, leftwork, rightwork; PetscScalar scale; -} Mat_Normal; +} Mat_NormalHermitian; static PetscErrorCode MatScale_NormalHermitian(Mat inA, PetscScalar scale) { - Mat_Normal *a = (Mat_Normal *)inA->data; + Mat_NormalHermitian *a = (Mat_NormalHermitian *)inA->data; PetscFunctionBegin; a->scale *= scale; @@ -19,7 +18,7 @@ static PetscErrorCode MatScale_NormalHermitian(Mat inA, PetscScalar scale) static PetscErrorCode MatDiagonalScale_NormalHermitian(Mat inA, Vec left, Vec right) { - Mat_Normal *a = (Mat_Normal *)inA->data; + Mat_NormalHermitian *a = (Mat_NormalHermitian *)inA->data; PetscFunctionBegin; if (left) { @@ -43,10 +42,10 @@ static PetscErrorCode MatDiagonalScale_NormalHermitian(Mat inA, Vec left, Vec ri static PetscErrorCode MatCreateSubMatrices_NormalHermitian(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) { - Mat_Normal *a = (Mat_Normal *)mat->data; - Mat B = a->A, *suba; - IS *row; - PetscInt M; + Mat_NormalHermitian *a = (Mat_NormalHermitian *)mat->data; + Mat B = a->A, *suba; + IS *row; + PetscInt M; PetscFunctionBegin; PetscCheck(!a->left && !a->right && irow == icol, PetscObjectComm((PetscObject)mat), PETSC_ERR_SUP, "Not implemented"); @@ -59,7 +58,7 @@ static PetscErrorCode MatCreateSubMatrices_NormalHermitian(Mat mat, PetscInt n, PetscCall(MatCreateSubMatrices(B, n, row, icol, MAT_INITIAL_MATRIX, &suba)); for (M = 0; M < n; ++M) { PetscCall(MatCreateNormalHermitian(suba[M], *submat + M)); - ((Mat_Normal *)(*submat)[M]->data)->scale = a->scale; + ((Mat_NormalHermitian *)(*submat)[M]->data)->scale = a->scale; } PetscCall(ISDestroy(&row[0])); PetscCall(PetscFree(row)); @@ -69,9 +68,9 @@ static PetscErrorCode MatCreateSubMatrices_NormalHermitian(Mat mat, PetscInt n, static PetscErrorCode MatPermute_NormalHermitian(Mat A, IS rowp, IS colp, Mat *B) { - Mat_Normal *a = (Mat_Normal *)A->data; - Mat C, Aa = a->A; - IS row; + Mat_NormalHermitian *a = (Mat_NormalHermitian *)A->data; + Mat C, Aa = a->A; + IS row; PetscFunctionBegin; PetscCheck(rowp == colp, PetscObjectComm((PetscObject)A), PETSC_ERR_ARG_INCOMP, "Row permutation and column permutation must be the same"); @@ -86,21 +85,21 @@ static PetscErrorCode MatPermute_NormalHermitian(Mat A, IS rowp, IS colp, Mat *B static PetscErrorCode MatDuplicate_NormalHermitian(Mat A, MatDuplicateOption op, Mat *B) { - Mat_Normal *a = (Mat_Normal *)A->data; - Mat C; + Mat_NormalHermitian *a = (Mat_NormalHermitian *)A->data; + Mat C; PetscFunctionBegin; PetscCheck(!a->left && !a->right, PetscObjectComm((PetscObject)A), PETSC_ERR_SUP, "Not implemented"); PetscCall(MatDuplicate(a->A, op, &C)); PetscCall(MatCreateNormalHermitian(C, B)); PetscCall(MatDestroy(&C)); - if (op == MAT_COPY_VALUES) ((Mat_Normal *)(*B)->data)->scale = a->scale; + if (op == MAT_COPY_VALUES) ((Mat_NormalHermitian *)(*B)->data)->scale = a->scale; PetscFunctionReturn(PETSC_SUCCESS); } static PetscErrorCode MatCopy_NormalHermitian(Mat A, Mat B, MatStructure str) { - Mat_Normal *a = (Mat_Normal *)A->data, *b = (Mat_Normal *)B->data; + Mat_NormalHermitian *a = (Mat_NormalHermitian *)A->data, *b = (Mat_NormalHermitian *)B->data; PetscFunctionBegin; PetscCheck(!a->left && !a->right, PetscObjectComm((PetscObject)A), PETSC_ERR_SUP, "Not implemented"); @@ -115,8 +114,8 @@ static PetscErrorCode MatCopy_NormalHermitian(Mat A, Mat B, MatStructure str) static PetscErrorCode MatMult_NormalHermitian(Mat N, Vec x, Vec y) { - Mat_Normal *Na = (Mat_Normal *)N->data; - Vec in; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; + Vec in; PetscFunctionBegin; in = x; @@ -134,8 +133,8 @@ static PetscErrorCode MatMult_NormalHermitian(Mat N, Vec x, Vec y) static PetscErrorCode MatMultHermitianAdd_Normal(Mat N, Vec v1, Vec v2, Vec v3) { - Mat_Normal *Na = (Mat_Normal *)N->data; - Vec in; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; + Vec in; PetscFunctionBegin; in = v1; @@ -158,8 +157,8 @@ static PetscErrorCode MatMultHermitianAdd_Normal(Mat N, Vec v1, Vec v2, Vec v3) static PetscErrorCode MatMultHermitianTranspose_Normal(Mat N, Vec x, Vec y) { - Mat_Normal *Na = (Mat_Normal *)N->data; - Vec in; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; + Vec in; PetscFunctionBegin; in = x; @@ -177,8 +176,8 @@ static PetscErrorCode MatMultHermitianTranspose_Normal(Mat N, Vec x, Vec y) static PetscErrorCode MatMultHermitianTransposeAdd_Normal(Mat N, Vec v1, Vec v2, Vec v3) { - Mat_Normal *Na = (Mat_Normal *)N->data; - Vec in; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; + Vec in; PetscFunctionBegin; in = v1; @@ -201,7 +200,7 @@ static PetscErrorCode MatMultHermitianTransposeAdd_Normal(Mat N, Vec v1, Vec v2, static PetscErrorCode MatDestroy_NormalHermitian(Mat N) { - Mat_Normal *Na = (Mat_Normal *)N->data; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; PetscFunctionBegin; PetscCall(MatDestroy(&Na->A)); @@ -226,12 +225,12 @@ static PetscErrorCode MatDestroy_NormalHermitian(Mat N) */ static PetscErrorCode MatGetDiagonal_NormalHermitian(Mat N, Vec v) { - Mat_Normal *Na = (Mat_Normal *)N->data; - Mat A = Na->A; - PetscInt i, j, rstart, rend, nnz; - const PetscInt *cols; - PetscScalar *diag, *work, *values; - const PetscScalar *mvalues; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; + Mat A = Na->A; + PetscInt i, j, rstart, rend, nnz; + const PetscInt *cols; + PetscScalar *diag, *work, *values; + const PetscScalar *mvalues; PetscFunctionBegin; PetscCall(PetscMalloc2(A->cmap->N, &diag, A->cmap->N, &work)); @@ -255,8 +254,8 @@ static PetscErrorCode MatGetDiagonal_NormalHermitian(Mat N, Vec v) static PetscErrorCode MatGetDiagonalBlock_NormalHermitian(Mat N, Mat *D) { - Mat_Normal *Na = (Mat_Normal *)N->data; - Mat M, A = Na->A; + Mat_NormalHermitian *Na = (Mat_NormalHermitian *)N->data; + Mat M, A = Na->A; PetscFunctionBegin; PetscCall(MatGetDiagonalBlock(A, &M)); @@ -267,7 +266,7 @@ static PetscErrorCode MatGetDiagonalBlock_NormalHermitian(Mat N, Mat *D) static PetscErrorCode MatNormalGetMat_NormalHermitian(Mat A, Mat *M) { - Mat_Normal *Aa = (Mat_Normal *)A->data; + Mat_NormalHermitian *Aa = (Mat_NormalHermitian *)A->data; PetscFunctionBegin; *M = Aa->A; @@ -301,9 +300,9 @@ PetscErrorCode MatNormalHermitianGetMat(Mat A, Mat *M) static PetscErrorCode MatConvert_NormalHermitian_AIJ(Mat A, MatType newtype, MatReuse reuse, Mat *newmat) { - Mat_Normal *Aa = (Mat_Normal *)A->data; - Mat B, conjugate; - PetscInt m, n, M, N; + Mat_NormalHermitian *Aa = (Mat_NormalHermitian *)A->data; + Mat B, conjugate; + PetscInt m, n, M, N; PetscFunctionBegin; PetscCall(MatGetSize(A, &M, &N)); @@ -374,9 +373,9 @@ M*/ @*/ PetscErrorCode MatCreateNormalHermitian(Mat A, Mat *N) { - PetscInt m, n; - Mat_Normal *Na; - VecType vtype; + PetscInt m, n; + Mat_NormalHermitian *Na; + VecType vtype; PetscFunctionBegin; PetscCall(MatGetLocalSize(A, &m, &n)); diff --git a/src/mat/impls/sbaij/mpi/mmsbaij.c b/src/mat/impls/sbaij/mpi/mmsbaij.c index 11cae9459b4..f888c23ecb1 100644 --- a/src/mat/impls/sbaij/mpi/mmsbaij.c +++ b/src/mat/impls/sbaij/mpi/mmsbaij.c @@ -1,4 +1,3 @@ - /* Support for the parallel SBAIJ matrix vector multiply */ diff --git a/src/mat/impls/sbaij/mpi/mpiaijsbaij.c b/src/mat/impls/sbaij/mpi/mpiaijsbaij.c index 1fc9b0bc5b2..a4a84f08e1c 100644 --- a/src/mat/impls/sbaij/mpi/mpiaijsbaij.c +++ b/src/mat/impls/sbaij/mpi/mpiaijsbaij.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/mpi/mpisbaij.h> /*I "petscmat.h" I*/ #include <../src/mat/impls/aij/mpi/mpiaij.h> #include diff --git a/src/mat/impls/sbaij/mpi/sbaijov.c b/src/mat/impls/sbaij/mpi/sbaijov.c index 043c556f71f..323ff516ad4 100644 --- a/src/mat/impls/sbaij/mpi/sbaijov.c +++ b/src/mat/impls/sbaij/mpi/sbaijov.c @@ -1,4 +1,3 @@ - /* Routines to compute overlapping regions of a parallel MPI matrix. Used for finding submatrices that were shared across processors. diff --git a/src/mat/impls/sbaij/seq/aijsbaij.c b/src/mat/impls/sbaij/seq/aijsbaij.c index 4fb22d029ed..1203e5de880 100644 --- a/src/mat/impls/sbaij/seq/aijsbaij.c +++ b/src/mat/impls/sbaij/seq/aijsbaij.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/aij/seq/aij.h> #include <../src/mat/impls/baij/seq/baij.h> #include <../src/mat/impls/sbaij/seq/sbaij.h> diff --git a/src/mat/impls/sbaij/seq/cholmod/sbaijcholmod.c b/src/mat/impls/sbaij/seq/cholmod/sbaijcholmod.c index 4bec76129a9..88db23913aa 100644 --- a/src/mat/impls/sbaij/seq/cholmod/sbaijcholmod.c +++ b/src/mat/impls/sbaij/seq/cholmod/sbaijcholmod.c @@ -1,4 +1,3 @@ - /* Provides an interface to the CHOLMOD sparse solver available through SuiteSparse version 4.2.1 diff --git a/src/mat/impls/sbaij/seq/sbaij.c b/src/mat/impls/sbaij/seq/sbaij.c index 75c75fc8399..6b77b9208b3 100644 --- a/src/mat/impls/sbaij/seq/sbaij.c +++ b/src/mat/impls/sbaij/seq/sbaij.c @@ -1,4 +1,3 @@ - /* Defines the basic matrix operations for the SBAIJ (compressed row) matrix storage format. @@ -319,7 +318,6 @@ PetscErrorCode MatGetRow_SeqSBAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt ** PetscErrorCode MatRestoreRow_SeqSBAIJ(Mat A, PetscInt row, PetscInt *nz, PetscInt **idx, PetscScalar **v) { PetscFunctionBegin; - if (nz) *nz = 0; if (idx) PetscCall(PetscFree(*idx)); if (v) PetscCall(PetscFree(*v)); PetscFunctionReturn(PETSC_SUCCESS); diff --git a/src/mat/impls/sbaij/seq/sbaij2.c b/src/mat/impls/sbaij/seq/sbaij2.c index cd51d753ed2..331f05ea9c6 100644 --- a/src/mat/impls/sbaij/seq/sbaij2.c +++ b/src/mat/impls/sbaij/seq/sbaij2.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/baij/seq/baij.h> #include <../src/mat/impls/dense/seq/dense.h> #include <../src/mat/impls/sbaij/seq/sbaij.h> diff --git a/src/mat/impls/sbaij/seq/sbaijfact.c b/src/mat/impls/sbaij/seq/sbaijfact.c index 043b86c0456..4a53286d82d 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact.c +++ b/src/mat/impls/sbaij/seq/sbaijfact.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/baij/seq/baij.h> #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact10.c b/src/mat/impls/sbaij/seq/sbaijfact10.c index ec2ea5ff31e..33e34b4eec0 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact10.c +++ b/src/mat/impls/sbaij/seq/sbaijfact10.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact11.c b/src/mat/impls/sbaij/seq/sbaijfact11.c index 4400864673d..b73f0f81d91 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact11.c +++ b/src/mat/impls/sbaij/seq/sbaijfact11.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact12.c b/src/mat/impls/sbaij/seq/sbaijfact12.c index ac1dc354bd4..6eacc48b360 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact12.c +++ b/src/mat/impls/sbaij/seq/sbaijfact12.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact2.c b/src/mat/impls/sbaij/seq/sbaijfact2.c index 94ccff7d16f..4bd63a03744 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact2.c +++ b/src/mat/impls/sbaij/seq/sbaijfact2.c @@ -1,4 +1,3 @@ - /* Factorization code for SBAIJ format. */ diff --git a/src/mat/impls/sbaij/seq/sbaijfact3.c b/src/mat/impls/sbaij/seq/sbaijfact3.c index 1313698447a..97094ab3349 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact3.c +++ b/src/mat/impls/sbaij/seq/sbaijfact3.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact4.c b/src/mat/impls/sbaij/seq/sbaijfact4.c index aca98f9b6c6..e58773ff9b7 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact4.c +++ b/src/mat/impls/sbaij/seq/sbaijfact4.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact5.c b/src/mat/impls/sbaij/seq/sbaijfact5.c index 3bfedba3cb0..150424b865a 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact5.c +++ b/src/mat/impls/sbaij/seq/sbaijfact5.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact6.c b/src/mat/impls/sbaij/seq/sbaijfact6.c index 99f4dbb2dc6..34b79f12efc 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact6.c +++ b/src/mat/impls/sbaij/seq/sbaijfact6.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact7.c b/src/mat/impls/sbaij/seq/sbaijfact7.c index 2ba7568e56c..f0172088a45 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact7.c +++ b/src/mat/impls/sbaij/seq/sbaijfact7.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact8.c b/src/mat/impls/sbaij/seq/sbaijfact8.c index af014a28913..c598c5595f1 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact8.c +++ b/src/mat/impls/sbaij/seq/sbaijfact8.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sbaijfact9.c b/src/mat/impls/sbaij/seq/sbaijfact9.c index a864062348f..ba4a353a310 100644 --- a/src/mat/impls/sbaij/seq/sbaijfact9.c +++ b/src/mat/impls/sbaij/seq/sbaijfact9.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/sbaij/seq/sbaij.h> #include diff --git a/src/mat/impls/sbaij/seq/sro.c b/src/mat/impls/sbaij/seq/sro.c index da93ccc614b..ae72d523d04 100644 --- a/src/mat/impls/sbaij/seq/sro.c +++ b/src/mat/impls/sbaij/seq/sro.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/baij/seq/baij.h> #include <../src/mat/impls/sbaij/seq/sbaij.h> diff --git a/src/mat/impls/scatter/mscatter.c b/src/mat/impls/scatter/mscatter.c index be7cc780848..7eedfeb591f 100644 --- a/src/mat/impls/scatter/mscatter.c +++ b/src/mat/impls/scatter/mscatter.c @@ -1,4 +1,3 @@ - /* This provides a matrix that applies a VecScatter to a vector. */ diff --git a/src/mat/impls/sell/seq/sell.c b/src/mat/impls/sell/seq/sell.c index f7b1d0a7655..953d8cbf6fa 100644 --- a/src/mat/impls/sell/seq/sell.c +++ b/src/mat/impls/sell/seq/sell.c @@ -1,4 +1,3 @@ - /* Defines the basic matrix operations for the SELL matrix storage format. */ diff --git a/src/mat/impls/sell/seq/sell.h b/src/mat/impls/sell/seq/sell.h index b31417f1a0d..4476c3e9a7c 100644 --- a/src/mat/impls/sell/seq/sell.h +++ b/src/mat/impls/sell/seq/sell.h @@ -54,7 +54,7 @@ means that this shares some data structures with the parent including diag, ilen PetscInt *block_row_map; /* starting row of the current block, CUDA only */ \ PetscInt chunksize; /* chunk size, CUDA only */ \ PetscInt totalchunks; /* total number of chunks, CUDA only */ \ - PetscInt *chunk_slice_map; /* starting slice of the currect chunk, CUDA only */ \ + PetscInt *chunk_slice_map; /* starting slice of the current chunk, CUDA only */ \ PetscInt *getrowcols; /* workarray for MatGetRow_SeqSELL */ \ PetscScalar *getrowvals /* workarray for MatGetRow_SeqSELL */ @@ -101,7 +101,7 @@ static inline PetscErrorCode MatSeqXSELLFreeSELL(Mat AA, MatScalar **val, PetscI PetscCall(PetscArraycpy(new_colidx + SIDX[SID + 1] + SH * MUL, COLIDX + SIDX[SID + 1], SIDX[Ain->totalslices] - SIDX[SID + 1])); \ /* update slice_idx */ \ for (ii = SID + 1; ii <= Ain->totalslices; ii++) { SIDX[ii] += SH * MUL; } \ - /* update pointers. Notice that they point to the FIRST postion of the row */ \ + /* update pointers. Notice that they point to the FIRST position of the row */ \ CP = new_colidx + SIDX[SID] + (ROW % SH); \ VP = new_val + SIDX[SID] + (ROW % SH); \ /* free up old matrix storage */ \ @@ -153,7 +153,7 @@ static inline PetscErrorCode MatSeqXSELLFreeSELL(Mat AA, MatScalar **val, PetscI PetscCall(PetscArraycpy(new_colidx, a->colidx, a->sliidx[row / a->sliceheight + 1])); \ PetscCall(PetscArraycpy(new_val + a->sliidx[row / a->sliceheight + 1] + a->sliceheight, a->val + a->sliidx[row / a->sliceheight + 1], a->sliidx[a->totalslices] - a->sliidx[row / a->sliceheight + 1])); \ PetscCall(PetscArraycpy(new_colidx + a->sliidx[row / a->sliceheight + 1] + a->sliceheight, a->colidx + a->sliidx[row / a->sliceheight + 1], a->sliidx[a->totalslices] - a->sliidx[row / a->sliceheight + 1])); \ - /* update pointers. Notice that they point to the FIRST postion of the row */ \ + /* update pointers. Notice that they point to the FIRST position of the row */ \ cp = new_colidx + a->sliidx[row / a->sliceheight] + (row % a->sliceheight); \ vp = new_val + a->sliidx[row / a->sliceheight] + (row % a->sliceheight); \ /* free up old matrix storage */ \ diff --git a/src/mat/impls/shell/shell.c b/src/mat/impls/shell/shell.c index 0d323211d03..b0691b371b5 100644 --- a/src/mat/impls/shell/shell.c +++ b/src/mat/impls/shell/shell.c @@ -1,4 +1,3 @@ - /* This provides a simple shell for Fortran (and C programmers) to create a very simple matrix class for use with KSP without coding diff --git a/src/mat/impls/submat/submat.c b/src/mat/impls/submat/submat.c index ed1f03dae4a..fbee75bcbc0 100644 --- a/src/mat/impls/submat/submat.c +++ b/src/mat/impls/submat/submat.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { diff --git a/src/mat/impls/transpose/htransm.c b/src/mat/impls/transpose/htransm.c index 28c800bf628..1bac88df774 100644 --- a/src/mat/impls/transpose/htransm.c +++ b/src/mat/impls/transpose/htransm.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { diff --git a/src/mat/impls/transpose/transm.c b/src/mat/impls/transpose/transm.c index 8c671fc092a..06ccebed7a9 100644 --- a/src/mat/impls/transpose/transm.c +++ b/src/mat/impls/transpose/transm.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ typedef struct { diff --git a/src/mat/interface/f90-custom/zmatrixf90.c b/src/mat/interface/f90-custom/zmatrixf90.c index fc387c7affa..34da3dadca4 100644 --- a/src/mat/interface/f90-custom/zmatrixf90.c +++ b/src/mat/interface/f90-custom/zmatrixf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/interface/matnull.c b/src/mat/interface/matnull.c index 06c6a007118..8526e6da046 100644 --- a/src/mat/interface/matnull.c +++ b/src/mat/interface/matnull.c @@ -1,4 +1,3 @@ - /* Routines to project vectors out of null spaces. */ diff --git a/src/mat/interface/matreg.c b/src/mat/interface/matreg.c index 2b60130a5d1..d01fb60fbcf 100644 --- a/src/mat/interface/matreg.c +++ b/src/mat/interface/matreg.c @@ -1,4 +1,3 @@ - /* Mechanism for register PETSc matrix types */ diff --git a/src/mat/interface/matrix.c b/src/mat/interface/matrix.c index 10e936ce80e..fa079bc6337 100644 --- a/src/mat/interface/matrix.c +++ b/src/mat/interface/matrix.c @@ -9643,10 +9643,14 @@ PetscErrorCode MatFactorGetSchurComplement(Mat F, Mat *S, MatFactorSchurStatus * { PetscFunctionBegin; PetscValidHeaderSpecific(F, MAT_CLASSID, 1); - if (S) PetscAssertPointer(S, 2); - if (status) PetscAssertPointer(status, 3); - if (S) *S = F->schur; - if (status) *status = F->schur_status; + if (S) { + PetscAssertPointer(S, 2); + *S = F->schur; + } + if (status) { + PetscAssertPointer(status, 3); + *status = F->schur_status; + } PetscFunctionReturn(PETSC_SUCCESS); } diff --git a/src/mat/matfd/fdmatrix.c b/src/mat/matfd/fdmatrix.c index 0debb98f629..57486ad57c2 100644 --- a/src/mat/matfd/fdmatrix.c +++ b/src/mat/matfd/fdmatrix.c @@ -1,4 +1,3 @@ - /* This is where the abstract matrix operations are defined that are used for finite difference computations of Jacobians using coloring. diff --git a/src/mat/order/amd/amd.c b/src/mat/order/amd/amd.c index 215bc675975..6bf83347e21 100644 --- a/src/mat/order/amd/amd.c +++ b/src/mat/order/amd/amd.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/mat/order/degree.c b/src/mat/order/degree.c index fae4c2e134d..1d3bf58f1f8 100644 --- a/src/mat/order/degree.c +++ b/src/mat/order/degree.c @@ -1,4 +1,3 @@ - /* degree.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/fn1wd.c b/src/mat/order/fn1wd.c index 106e0781294..35b6000fe2a 100644 --- a/src/mat/order/fn1wd.c +++ b/src/mat/order/fn1wd.c @@ -1,4 +1,3 @@ - /* fn1wd.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/fndsep.c b/src/mat/order/fndsep.c index 95afc5fb12a..6677eeda567 100644 --- a/src/mat/order/fndsep.c +++ b/src/mat/order/fndsep.c @@ -1,4 +1,3 @@ - /* fndsep.f -- translated by f2c (version 19931217). */ diff --git a/src/mat/order/fnroot.c b/src/mat/order/fnroot.c index db7a80bccb3..0bb8e5a927a 100644 --- a/src/mat/order/fnroot.c +++ b/src/mat/order/fnroot.c @@ -1,4 +1,3 @@ - /* fnroot.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/gen1wd.c b/src/mat/order/gen1wd.c index 77abfcf2743..6104710e3a3 100644 --- a/src/mat/order/gen1wd.c +++ b/src/mat/order/gen1wd.c @@ -1,4 +1,3 @@ - /* gen1wd.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/gennd.c b/src/mat/order/gennd.c index 3df0c1405b3..60e1cbfc1a4 100644 --- a/src/mat/order/gennd.c +++ b/src/mat/order/gennd.c @@ -1,4 +1,3 @@ - /* gennd.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/genqmd.c b/src/mat/order/genqmd.c index 6cfbdd2db4a..2ededb8b3c2 100644 --- a/src/mat/order/genqmd.c +++ b/src/mat/order/genqmd.c @@ -1,4 +1,3 @@ - /* genqmd.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/genrcm.c b/src/mat/order/genrcm.c index a558106a116..712f6353b1b 100644 --- a/src/mat/order/genrcm.c +++ b/src/mat/order/genrcm.c @@ -1,4 +1,3 @@ - /* genrcm.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/metisnd/metisnd.c b/src/mat/order/metisnd/metisnd.c index b8c2ff481d2..df110539d91 100644 --- a/src/mat/order/metisnd/metisnd.c +++ b/src/mat/order/metisnd/metisnd.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/mat/order/qmdmrg.c b/src/mat/order/qmdmrg.c index 9f88604346b..9b435ef3b67 100644 --- a/src/mat/order/qmdmrg.c +++ b/src/mat/order/qmdmrg.c @@ -1,4 +1,3 @@ - /* qmdmrg.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/qmdqt.c b/src/mat/order/qmdqt.c index 55537cf4a7c..35c0d612e54 100644 --- a/src/mat/order/qmdqt.c +++ b/src/mat/order/qmdqt.c @@ -1,4 +1,3 @@ - /* qmdqt.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/qmdrch.c b/src/mat/order/qmdrch.c index e6032474b69..4d746b8cfc1 100644 --- a/src/mat/order/qmdrch.c +++ b/src/mat/order/qmdrch.c @@ -1,4 +1,3 @@ - /* qmdrch.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/qmdupd.c b/src/mat/order/qmdupd.c index b871be12a36..347bd770f86 100644 --- a/src/mat/order/qmdupd.c +++ b/src/mat/order/qmdupd.c @@ -1,4 +1,3 @@ - /* qmdupd.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/rcm.c b/src/mat/order/rcm.c index 5e19b4b22de..0514b745e33 100644 --- a/src/mat/order/rcm.c +++ b/src/mat/order/rcm.c @@ -1,4 +1,3 @@ - /* rcm.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/rootls.c b/src/mat/order/rootls.c index 2e9b87ca4b8..f1ee2dd8973 100644 --- a/src/mat/order/rootls.c +++ b/src/mat/order/rootls.c @@ -1,4 +1,3 @@ - /* rootls.f -- translated by f2c (version 19931217).*/ #include diff --git a/src/mat/order/sorder.c b/src/mat/order/sorder.c index d5ea9c7b690..fe87a0a48a9 100644 --- a/src/mat/order/sorder.c +++ b/src/mat/order/sorder.c @@ -1,4 +1,3 @@ - /* Provides the code that allows PETSc users to register their own sequential matrix Ordering routines. diff --git a/src/mat/order/sp1wd.c b/src/mat/order/sp1wd.c index d41c0f08f6d..4b21e4d91ea 100644 --- a/src/mat/order/sp1wd.c +++ b/src/mat/order/sp1wd.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/order/spnd.c b/src/mat/order/spnd.c index 9178e2f1e8d..6f3db1beea2 100644 --- a/src/mat/order/spnd.c +++ b/src/mat/order/spnd.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/order/spqmd.c b/src/mat/order/spqmd.c index 08572c48a3e..da7cd3aa321 100644 --- a/src/mat/order/spqmd.c +++ b/src/mat/order/spqmd.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/order/sprcm.c b/src/mat/order/sprcm.c index e1ab6fa515c..026e109ff36 100644 --- a/src/mat/order/sprcm.c +++ b/src/mat/order/sprcm.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/order/sregis.c b/src/mat/order/sregis.c index 4df6ce8d9db..fffe6c6dbee 100644 --- a/src/mat/order/sregis.c +++ b/src/mat/order/sregis.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ PETSC_INTERN PetscErrorCode MatGetOrdering_Natural(Mat, MatOrderingType, IS *, IS *); diff --git a/src/mat/partition/impls/chaco/chaco.c b/src/mat/partition/impls/chaco/chaco.c index 0f490865b2c..2a32ad62c96 100644 --- a/src/mat/partition/impls/chaco/chaco.c +++ b/src/mat/partition/impls/chaco/chaco.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/adj/mpi/mpiadj.h> /*I "petscmat.h" I*/ #if defined(PETSC_HAVE_UNISTD_H) diff --git a/src/mat/partition/impls/hierarchical/hierarchical.c b/src/mat/partition/impls/hierarchical/hierarchical.c index decab7d3ed0..a3c2c7ec92a 100644 --- a/src/mat/partition/impls/hierarchical/hierarchical.c +++ b/src/mat/partition/impls/hierarchical/hierarchical.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/adj/mpi/mpiadj.h> /*I "petscmat.h" I*/ #include #include diff --git a/src/mat/partition/impls/party/party.c b/src/mat/partition/impls/party/party.c index ed54e1ca7e7..4460fe5c097 100644 --- a/src/mat/partition/impls/party/party.c +++ b/src/mat/partition/impls/party/party.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/adj/mpi/mpiadj.h> /*I "petscmat.h" I*/ #if defined(PETSC_HAVE_UNISTD_H) diff --git a/src/mat/partition/impls/pmetis/pmetis.c b/src/mat/partition/impls/pmetis/pmetis.c index 7c0d7e5fca5..dc4f5512737 100644 --- a/src/mat/partition/impls/pmetis/pmetis.c +++ b/src/mat/partition/impls/pmetis/pmetis.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/adj/mpi/mpiadj.h> /*I "petscmat.h" I*/ /* diff --git a/src/mat/partition/impls/scotch/scotch.c b/src/mat/partition/impls/scotch/scotch.c index 14ca2c0197f..eacbd57dd2a 100644 --- a/src/mat/partition/impls/scotch/scotch.c +++ b/src/mat/partition/impls/scotch/scotch.c @@ -1,4 +1,3 @@ - #include <../src/mat/impls/adj/mpi/mpiadj.h> /*I "petscmat.h" I*/ EXTERN_C_BEGIN diff --git a/src/mat/partition/partition.c b/src/mat/partition/partition.c index b818754ef26..028f371b334 100644 --- a/src/mat/partition/partition.c +++ b/src/mat/partition/partition.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ /* Logging support */ diff --git a/src/mat/partition/spartition.c b/src/mat/partition/spartition.c index cdeb14cb9ef..3b3b68a5f1c 100644 --- a/src/mat/partition/spartition.c +++ b/src/mat/partition/spartition.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/tests/ex1.c b/src/mat/tests/ex1.c index 1a5b8210864..a68ddf6dd3e 100644 --- a/src/mat/tests/ex1.c +++ b/src/mat/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests LU, Cholesky, and QR factorization and MatMatSolve() for a sequential dense matrix. \n\ For MATSEQDENSE matrix, the factorization is just a thin wrapper to LAPACK. \n\ For MATSEQDENSECUDA, it uses cusolverDn routines \n\n"; diff --git a/src/mat/tests/ex10.c b/src/mat/tests/ex10.c index d3c87c1b273..c74261cf805 100644 --- a/src/mat/tests/ex10.c +++ b/src/mat/tests/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Tests repeated use of assembly for matrices.\n\n"; #include diff --git a/src/mat/tests/ex100.c b/src/mat/tests/ex100.c index 1a2180904ac..19a8d8834ed 100644 --- a/src/mat/tests/ex100.c +++ b/src/mat/tests/ex100.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various routines in MatMAIJ format.\n"; #include diff --git a/src/mat/tests/ex102.c b/src/mat/tests/ex102.c index 6e6a543a8b3..72b8a503976 100644 --- a/src/mat/tests/ex102.c +++ b/src/mat/tests/ex102.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateLRC()\n\n"; #include diff --git a/src/mat/tests/ex106.c b/src/mat/tests/ex106.c index f0a3e2ecbfd..6217cd41354 100644 --- a/src/mat/tests/ex106.c +++ b/src/mat/tests/ex106.c @@ -1,4 +1,3 @@ - static char help[] = "Test repeated LU factorizations. Used for checking memory leak\n\ -m : problem size\n\ -mat_nonsym : use nonsymmetric matrix (default is symmetric)\n\n"; diff --git a/src/mat/tests/ex107.c b/src/mat/tests/ex107.c index 73095fc4b1d..28282fa919b 100644 --- a/src/mat/tests/ex107.c +++ b/src/mat/tests/ex107.c @@ -1,4 +1,3 @@ - static char help[] = "Test MatCreate() with MAT_STRUCTURE_ONLY .\n\n"; #include diff --git a/src/mat/tests/ex11.c b/src/mat/tests/ex11.c index 0438a9c77fe..8623b93a175 100644 --- a/src/mat/tests/ex11.c +++ b/src/mat/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the use of MatZeroRows() for uniprocessor matrices.\n\n"; #include diff --git a/src/mat/tests/ex111.c b/src/mat/tests/ex111.c index a605d8f1fa5..aeec3a17fe5 100644 --- a/src/mat/tests/ex111.c +++ b/src/mat/tests/ex111.c @@ -1,4 +1,3 @@ - static char help[] = "Tests sequential and parallel MatMatMatMult() and MatPtAP(). Modified from ex96.c \n\ -Mx , where = number of coarse grid points in the x-direction\n\ -My , where = number of coarse grid points in the y-direction\n\ diff --git a/src/mat/tests/ex113.c b/src/mat/tests/ex113.c index d699e4a6997..f1740bc2c56 100644 --- a/src/mat/tests/ex113.c +++ b/src/mat/tests/ex113.c @@ -1,4 +1,3 @@ - static char help[] = "Tests sequential and parallel MatMatMult() and MatAXPY(...,SUBSET_NONZERO_PATTERN) \n\ Input arguments are:\n\ -f : file to load\n\n"; diff --git a/src/mat/tests/ex114.c b/src/mat/tests/ex114.c index f7bac339f3d..869939e5e56 100644 --- a/src/mat/tests/ex114.c +++ b/src/mat/tests/ex114.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatGetRowMax(), MatGetRowMin(), MatGetRowMaxAbs()\n"; #include diff --git a/src/mat/tests/ex115.c b/src/mat/tests/ex115.c index 0b72dd80eda..a958c94cf45 100644 --- a/src/mat/tests/ex115.c +++ b/src/mat/tests/ex115.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatHYPRE\n"; #include diff --git a/src/mat/tests/ex117.c b/src/mat/tests/ex117.c index 3ee0fd38a28..f2909fc75fc 100644 --- a/src/mat/tests/ex117.c +++ b/src/mat/tests/ex117.c @@ -1,4 +1,3 @@ - static char help[] = "Tests Cholesky factorization for a SBAIJ matrix, (bs=2).\n"; /* This code is modified from the code contributed by JUNWANG@uwm.edu on Apr 13, 2007 diff --git a/src/mat/tests/ex12.c b/src/mat/tests/ex12.c index a60ba2bd23e..2b22b0a5f4e 100644 --- a/src/mat/tests/ex12.c +++ b/src/mat/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the use of MatZeroRows() for parallel matrices.\n\ This example also tests the use of MatDuplicate() for both MPIAIJ and MPIBAIJ matrices"; diff --git a/src/mat/tests/ex128.c b/src/mat/tests/ex128.c index 759c1dd73a7..4d2f4521bd1 100644 --- a/src/mat/tests/ex128.c +++ b/src/mat/tests/ex128.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ILU and ICC factorization with and without matrix ordering on seqsbaij format. Modified from ex30.c\n\ Input parameters are:\n\ -lf : level of fill for ILU (default is 0)\n\ diff --git a/src/mat/tests/ex129.c b/src/mat/tests/ex129.c index 5f376b13e03..2abcf66be11 100644 --- a/src/mat/tests/ex129.c +++ b/src/mat/tests/ex129.c @@ -1,4 +1,3 @@ - /* Laplacian in 3D. Use for testing MatSolve routines. Modeled by the partial differential equation diff --git a/src/mat/tests/ex13.c b/src/mat/tests/ex13.c index 6133c0a820a..76081dd1361 100644 --- a/src/mat/tests/ex13.c +++ b/src/mat/tests/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Tests copying and ordering uniprocessor row-based sparse matrices.\n\n"; #include diff --git a/src/mat/tests/ex130.c b/src/mat/tests/ex130.c index d624f4a9228..2d9bd062124 100644 --- a/src/mat/tests/ex130.c +++ b/src/mat/tests/ex130.c @@ -1,4 +1,3 @@ - static char help[] = "Tests external direct solvers. Simplified from ex125.c\n\ Example: mpiexec -n ./ex130 -f -mat_solver_type 1 -mat_superlu_equil \n\n"; diff --git a/src/mat/tests/ex131.c b/src/mat/tests/ex131.c index 88f3454ee4c..b571ef1f391 100644 --- a/src/mat/tests/ex131.c +++ b/src/mat/tests/ex131.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMult() on MatLoad() matrix \n\n"; #include diff --git a/src/mat/tests/ex132.c b/src/mat/tests/ex132.c index 05334aca058..6ebaad715f2 100644 --- a/src/mat/tests/ex132.c +++ b/src/mat/tests/ex132.c @@ -1,4 +1,3 @@ - static char help[] = "Test MatAXPY()\n\n"; #include diff --git a/src/mat/tests/ex133.c b/src/mat/tests/ex133.c index f170ce57222..2cfe41df1a5 100644 --- a/src/mat/tests/ex133.c +++ b/src/mat/tests/ex133.c @@ -1,4 +1,3 @@ - static char help[] = "Test saving SeqSBAIJ matrix that is missing diagonal entries."; #include diff --git a/src/mat/tests/ex136.c b/src/mat/tests/ex136.c index f6fce92e05b..66d49decb6a 100644 --- a/src/mat/tests/ex136.c +++ b/src/mat/tests/ex136.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatLoad() MatView() for MPIBAIJ.\n\n"; #include diff --git a/src/mat/tests/ex137.c b/src/mat/tests/ex137.c index 190b0885cee..ef161f14feb 100644 --- a/src/mat/tests/ex137.c +++ b/src/mat/tests/ex137.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateMPISBAIJWithArrays().\n\n"; #include diff --git a/src/mat/tests/ex138.c b/src/mat/tests/ex138.c index 5e7a241b39d..770631ce7a3 100644 --- a/src/mat/tests/ex138.c +++ b/src/mat/tests/ex138.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatGetColumnNorms()/Sums()/Means() for matrix read from file."; #include diff --git a/src/mat/tests/ex139.c b/src/mat/tests/ex139.c index 7e7b583b16f..04080c1b7ec 100644 --- a/src/mat/tests/ex139.c +++ b/src/mat/tests/ex139.c @@ -1,4 +1,3 @@ - const char help[] = "Test MatCreateLocalRef()\n\n"; #include diff --git a/src/mat/tests/ex14.c b/src/mat/tests/ex14.c index 0006c0a65b7..cd50eee930f 100644 --- a/src/mat/tests/ex14.c +++ b/src/mat/tests/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Tests sequential and parallel MatGetRow() and MatRestoreRow().\n"; #include diff --git a/src/mat/tests/ex141.c b/src/mat/tests/ex141.c index 35ace1a821e..fc3af4f268c 100644 --- a/src/mat/tests/ex141.c +++ b/src/mat/tests/ex141.c @@ -1,4 +1,3 @@ - static char help[] = "Tests converting a SBAIJ matrix to BAIJ format with MatConvert. Modified from ex55.c\n\n"; #include diff --git a/src/mat/tests/ex145.c b/src/mat/tests/ex145.c index 246e8c80744..1a2eb13b041 100644 --- a/src/mat/tests/ex145.c +++ b/src/mat/tests/ex145.c @@ -1,4 +1,3 @@ - static char help[] = "Tests LU, Cholesky factorization and MatMatSolve() for an Elemental dense matrix.\n\n"; #include diff --git a/src/mat/tests/ex15.c b/src/mat/tests/ex15.c index 4ca8a44337b..839ef3485d5 100644 --- a/src/mat/tests/ex15.c +++ b/src/mat/tests/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatNorm(), MatLUFactor(), MatSolve() and MatSolveAdd().\n\n"; #include diff --git a/src/mat/tests/ex160.c b/src/mat/tests/ex160.c index dd2934aea85..e8863eaa76d 100644 --- a/src/mat/tests/ex160.c +++ b/src/mat/tests/ex160.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMPIBAIJ format in sequential run \n"; #include diff --git a/src/mat/tests/ex163.c b/src/mat/tests/ex163.c index 48148346147..abbe80c305a 100644 --- a/src/mat/tests/ex163.c +++ b/src/mat/tests/ex163.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatTransposeMatMult() on MatLoad() matrix \n\n"; #include diff --git a/src/mat/tests/ex164.c b/src/mat/tests/ex164.c index f028c2f0d95..06710dd7141 100644 --- a/src/mat/tests/ex164.c +++ b/src/mat/tests/ex164.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatConvert() from SeqDense to SeqAIJ \n\n"; #include diff --git a/src/mat/tests/ex165.c b/src/mat/tests/ex165.c index 24fe0c9b7bd..5405fe22ef0 100644 --- a/src/mat/tests/ex165.c +++ b/src/mat/tests/ex165.c @@ -1,4 +1,3 @@ - static char help[] = "Tests C=A^T*B via MatTranspose() and MatMatMult(). \n\ Contributed by Alexander Grayver, Jan. 2012 \n\n"; /* Example: diff --git a/src/mat/tests/ex167.c b/src/mat/tests/ex167.c index ebec836565e..bab5ebf1b3f 100644 --- a/src/mat/tests/ex167.c +++ b/src/mat/tests/ex167.c @@ -1,4 +1,3 @@ - static char help[] = "Extract submatrices using unsorted indices. For SEQSBAIJ either sort both rows and columns, or sort none.\n\n"; /* Take a 4x4 grid and form a 5-point stencil graph Laplacian over it. diff --git a/src/mat/tests/ex168.c b/src/mat/tests/ex168.c index cb220392263..c19cf8c56ad 100644 --- a/src/mat/tests/ex168.c +++ b/src/mat/tests/ex168.c @@ -1,4 +1,3 @@ - static char help[] = "Tests external Clique direct solvers. Simplified from ex130.c\n\ Example: mpiexec -n ./ex168 -f \n\n"; diff --git a/src/mat/tests/ex169.c b/src/mat/tests/ex169.c index e55a561b305..dc3b10f2be4 100644 --- a/src/mat/tests/ex169.c +++ b/src/mat/tests/ex169.c @@ -1,4 +1,3 @@ - static char help[] = "Test memory leak when duplicating a redundant matrix.\n\n"; /* diff --git a/src/mat/tests/ex17.c b/src/mat/tests/ex17.c index 6aaae0e8c1f..e490a1c07c9 100644 --- a/src/mat/tests/ex17.c +++ b/src/mat/tests/ex17.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the use of MatSolveTranspose().\n\n"; #include diff --git a/src/mat/tests/ex171.c b/src/mat/tests/ex171.c index 56c3864bba0..4e7f73c5c3a 100644 --- a/src/mat/tests/ex171.c +++ b/src/mat/tests/ex171.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatDiagonalSet() on MatLoad() matrix \n\n"; #include diff --git a/src/mat/tests/ex172.c b/src/mat/tests/ex172.c index 8149c76704f..7b6bdbc3d1d 100644 --- a/src/mat/tests/ex172.c +++ b/src/mat/tests/ex172.c @@ -1,4 +1,3 @@ - static char help[] = "Test MatAXPY and SUBSET_NONZERO_PATTERN [-different] [-skip]\n by default subset pattern is used \n\n"; /* A test contributed by Jose E. Roman, Oct. 2014 */ diff --git a/src/mat/tests/ex174.cxx b/src/mat/tests/ex174.cxx index 490fe4c377f..6ff16f01104 100644 --- a/src/mat/tests/ex174.cxx +++ b/src/mat/tests/ex174.cxx @@ -1,4 +1,3 @@ - static char help[] = "Tests MatConvert(), MatLoad() for MATELEMENTAL interface.\n\n"; /* Example: diff --git a/src/mat/tests/ex175.c b/src/mat/tests/ex175.c index 520e32d6cb0..8fa5899a3c5 100644 --- a/src/mat/tests/ex175.c +++ b/src/mat/tests/ex175.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateHermitianTranspose().\n\n"; #include diff --git a/src/mat/tests/ex176.c b/src/mat/tests/ex176.c index 217957f4238..dedb56eee7c 100644 --- a/src/mat/tests/ex176.c +++ b/src/mat/tests/ex176.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateMPIAIJWithArrays() abd MatUpdateMPIAIJWithArray()\n"; #include diff --git a/src/mat/tests/ex177.c b/src/mat/tests/ex177.c index dd0eeeec6b8..05939d148e8 100644 --- a/src/mat/tests/ex177.c +++ b/src/mat/tests/ex177.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various routines in MatKAIJ format.\n"; #include diff --git a/src/mat/tests/ex178.c b/src/mat/tests/ex178.c index cd3cc8917cd..feafc907292 100644 --- a/src/mat/tests/ex178.c +++ b/src/mat/tests/ex178.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatInvertVariableBlockEnvelope()\n\n"; #include diff --git a/src/mat/tests/ex179.c b/src/mat/tests/ex179.c index e96f32450d7..594af442111 100644 --- a/src/mat/tests/ex179.c +++ b/src/mat/tests/ex179.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatTranspose() with MAT_REUSE_MATRIX and different nonzero pattern\n\n"; #include diff --git a/src/mat/tests/ex181.c b/src/mat/tests/ex181.c index a7e878b02ac..da677365a9c 100644 --- a/src/mat/tests/ex181.c +++ b/src/mat/tests/ex181.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateSubmatrix() with entire matrix, modified from ex59.c."; #include diff --git a/src/mat/tests/ex19.c b/src/mat/tests/ex19.c index 3ffdaaa4b50..f3683b7c10d 100644 --- a/src/mat/tests/ex19.c +++ b/src/mat/tests/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Tests reusing MPI parallel matrices and MatGetValues().\n\ To test the parallel matrix assembly, this example intentionally lays out\n\ the matrix across processors differently from the way it is assembled.\n\ diff --git a/src/mat/tests/ex194.c b/src/mat/tests/ex194.c index fcb852bc84d..7ce82095912 100644 --- a/src/mat/tests/ex194.c +++ b/src/mat/tests/ex194.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateSubmatrix() with certain entire rows of matrix, modified from ex181.c."; #include diff --git a/src/mat/tests/ex199.c b/src/mat/tests/ex199.c index 7740905fae1..95af973cbc3 100644 --- a/src/mat/tests/ex199.c +++ b/src/mat/tests/ex199.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the different MatColoring implementations.\n\n"; #include diff --git a/src/mat/tests/ex2.c b/src/mat/tests/ex2.c index 7a27eecc443..031b20c828f 100644 --- a/src/mat/tests/ex2.c +++ b/src/mat/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatTranspose(), MatNorm(), MatAXPY() and MatAYPX().\n\n"; #include diff --git a/src/mat/tests/ex20.c b/src/mat/tests/ex20.c index 158d5957999..ec47022e5df 100644 --- a/src/mat/tests/ex20.c +++ b/src/mat/tests/ex20.c @@ -1,4 +1,3 @@ - static char help[] = "Tests converting a matrix to another format with MatConvert().\n\n"; #include diff --git a/src/mat/tests/ex200.c b/src/mat/tests/ex200.c index 958bc589420..0f811fd2234 100644 --- a/src/mat/tests/ex200.c +++ b/src/mat/tests/ex200.c @@ -1,4 +1,3 @@ - #include int main(int argc, char **argv) diff --git a/src/mat/tests/ex203.c b/src/mat/tests/ex203.c index 5a28c92288a..e217d76e985 100644 --- a/src/mat/tests/ex203.c +++ b/src/mat/tests/ex203.c @@ -1,4 +1,3 @@ - static char help[] = "Tests incorrect use of MatDiagonalSet() for SHELL matrices\n\n"; #include diff --git a/src/mat/tests/ex21.c b/src/mat/tests/ex21.c index 9202ce29073..1b5e056b9a2 100644 --- a/src/mat/tests/ex21.c +++ b/src/mat/tests/ex21.c @@ -1,4 +1,3 @@ - static char help[] = "Tests converting a parallel AIJ formatted matrix to the parallel Row format.\n\ This also tests MatGetRow() and MatRestoreRow() for the parallel case.\n\n"; diff --git a/src/mat/tests/ex211.c b/src/mat/tests/ex211.c index 173eea3f843..2423f55a2bb 100644 --- a/src/mat/tests/ex211.c +++ b/src/mat/tests/ex211.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateSubmatrix() in parallel."; #include diff --git a/src/mat/tests/ex213.c b/src/mat/tests/ex213.c index df611a9d74b..b4391bde197 100644 --- a/src/mat/tests/ex213.c +++ b/src/mat/tests/ex213.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMPIBAIJSetPreallocationCSR()\n\n"; /* diff --git a/src/mat/tests/ex214.c b/src/mat/tests/ex214.c index f5ac0923245..4a0c639c103 100644 --- a/src/mat/tests/ex214.c +++ b/src/mat/tests/ex214.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMatSolve() and MatMatTransposeSolve() for computing inv(A) with MUMPS.\n\ Example: mpiexec -n ./ex214 -displ \n\n"; diff --git a/src/mat/tests/ex218.c b/src/mat/tests/ex218.c index 93b9b2285bd..9b9a4279ec1 100644 --- a/src/mat/tests/ex218.c +++ b/src/mat/tests/ex218.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatShellTestMult()\n\n"; #include diff --git a/src/mat/tests/ex22.c b/src/mat/tests/ex22.c index a544ed3d879..f6c20b387bb 100644 --- a/src/mat/tests/ex22.c +++ b/src/mat/tests/ex22.c @@ -1,4 +1,3 @@ - static char help[] = "Tests matrix ordering routines.\n\n"; #include diff --git a/src/mat/tests/ex220.c b/src/mat/tests/ex220.c index f3df209df16..2f12ea91805 100644 --- a/src/mat/tests/ex220.c +++ b/src/mat/tests/ex220.c @@ -1,4 +1,3 @@ - #include static char help[PETSC_MAX_PATH_LEN] = "Tests MatLoad() with MatCreateDense() for memory leak "; diff --git a/src/mat/tests/ex225.c b/src/mat/tests/ex225.c index 7f85b89e99d..c7f811d5d12 100644 --- a/src/mat/tests/ex225.c +++ b/src/mat/tests/ex225.c @@ -1,4 +1,3 @@ - static char help[] = "Test Hypre matrix APIs\n"; #include diff --git a/src/mat/tests/ex23.c b/src/mat/tests/ex23.c index b836d998f71..0faf759cbed 100644 --- a/src/mat/tests/ex23.c +++ b/src/mat/tests/ex23.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the use of interface functions for MATIS matrices and conversion routines.\n"; #include diff --git a/src/mat/tests/ex232.c b/src/mat/tests/ex232.c index 99a56edf23f..08f0387f434 100644 --- a/src/mat/tests/ex232.c +++ b/src/mat/tests/ex232.c @@ -1,4 +1,3 @@ - /* tests MatSeqSBAIJSetPreallocationCSR() and MatMPISBAIJSetPreallocationCSR() */ #include diff --git a/src/mat/tests/ex24.c b/src/mat/tests/ex24.c index 6223e67a641..cffc6cee5b2 100644 --- a/src/mat/tests/ex24.c +++ b/src/mat/tests/ex24.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the different MatColoring implementations and ISColoringTestValid() \n\ Modified from the code contributed by Ali Berk Kahraman. \n\n"; #include diff --git a/src/mat/tests/ex242.c b/src/mat/tests/ex242.c index 8ce79b7cabe..4c08a14d643 100644 --- a/src/mat/tests/ex242.c +++ b/src/mat/tests/ex242.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ScaLAPACK interface.\n\n"; #include diff --git a/src/mat/tests/ex244.cxx b/src/mat/tests/ex244.cxx index cfac081d8bc..8bcc93daffe 100644 --- a/src/mat/tests/ex244.cxx +++ b/src/mat/tests/ex244.cxx @@ -1,4 +1,3 @@ - static char help[] = "Tests MatConvert(), MatLoad() for MATSCALAPACK interface.\n\n"; /* Example: diff --git a/src/mat/tests/ex245.c b/src/mat/tests/ex245.c index 0cf8c1f55d9..bbde402586b 100644 --- a/src/mat/tests/ex245.c +++ b/src/mat/tests/ex245.c @@ -1,4 +1,3 @@ - static char help[] = "Tests LU, Cholesky factorization and MatMatSolve() for a ScaLAPACK dense matrix.\n\n"; #include diff --git a/src/mat/tests/ex247.c b/src/mat/tests/ex247.c index b7399ce2617..bcd8e757f2c 100644 --- a/src/mat/tests/ex247.c +++ b/src/mat/tests/ex247.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MATCENTERING matrix type.\n\n"; #include diff --git a/src/mat/tests/ex248.c b/src/mat/tests/ex248.c index 861a44d7213..2e49f156797 100644 --- a/src/mat/tests/ex248.c +++ b/src/mat/tests/ex248.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatSeqAIJKron.\n\n"; #include diff --git a/src/mat/tests/ex25.c b/src/mat/tests/ex25.c index 3135176914b..35b490f5d00 100644 --- a/src/mat/tests/ex25.c +++ b/src/mat/tests/ex25.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatTranspose()\n\n"; #include diff --git a/src/mat/tests/ex26.c b/src/mat/tests/ex26.c index b7e5a34bc06..f618a233e28 100644 --- a/src/mat/tests/ex26.c +++ b/src/mat/tests/ex26.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatGetRowIJ for SeqAIJ, SeqBAIJ and SeqSBAIJ\n\n"; #include diff --git a/src/mat/tests/ex261.c b/src/mat/tests/ex261.c index b245dabc692..73f1518b5c3 100644 --- a/src/mat/tests/ex261.c +++ b/src/mat/tests/ex261.c @@ -11,7 +11,7 @@ static PetscErrorCode CheckDiagonal(Mat A, Vec diag, PetscScalar dval) PetscFunctionBegin; PetscCall(MatGetOwnershipRange(A, &rstart, &rend)); - // If matrix is AIJ, MatSetRandom() will have randomly choosen the locations of nonzeros, + // If matrix is AIJ, MatSetRandom() will have randomly chosen the locations of nonzeros, // which may not be on the diagonal. So a reallocation is not necessarily a bad thing here. if (first_time) PetscCall(MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE)); for (PetscInt i = rstart; i < rend; ++i) PetscCall(MatSetValue(A, i, i, dval, INSERT_VALUES)); diff --git a/src/mat/tests/ex3.c b/src/mat/tests/ex3.c index d81fbc3c797..5e37e5156f8 100644 --- a/src/mat/tests/ex3.c +++ b/src/mat/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests relaxation for dense matrices.\n\n"; #include diff --git a/src/mat/tests/ex30.c b/src/mat/tests/ex30.c index 17b95ba2ec2..996069999ac 100644 --- a/src/mat/tests/ex30.c +++ b/src/mat/tests/ex30.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ILU and ICC factorization with and without matrix ordering on seqaij format, and illustrates drawing of matrix sparsity structure with MatView().\n\ Input parameters are:\n\ -lf : level of fill for ILU (default is 0)\n\ diff --git a/src/mat/tests/ex300.c b/src/mat/tests/ex300.c index da1d5fe13c9..e0f63230f5e 100644 --- a/src/mat/tests/ex300.c +++ b/src/mat/tests/ex300.c @@ -1,4 +1,3 @@ - static char help[] = "Show MatShift BUG happening after copying a matrix with no rows on a process"; /* Contributed by: Eric Chamberland diff --git a/src/mat/tests/ex301.c b/src/mat/tests/ex301.c index 7f86c2a01fe..7759b15bcd9 100644 --- a/src/mat/tests/ex301.c +++ b/src/mat/tests/ex301.c @@ -1,4 +1,3 @@ - static char help[] = "Tests for bugs in A->offloadmask consistency for GPU matrices\n\n"; #include diff --git a/src/mat/tests/ex31.c b/src/mat/tests/ex31.c index 7f23946f56f..29bf9773f00 100644 --- a/src/mat/tests/ex31.c +++ b/src/mat/tests/ex31.c @@ -1,4 +1,3 @@ - static char help[] = "Tests binary I/O of matrices and illustrates user-defined event logging.\n\n"; #include diff --git a/src/mat/tests/ex32.c b/src/mat/tests/ex32.c index fccc55a04d2..8bd2d8d741d 100644 --- a/src/mat/tests/ex32.c +++ b/src/mat/tests/ex32.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MATSEQDENSECUDA\n\n"; #include diff --git a/src/mat/tests/ex35.c b/src/mat/tests/ex35.c index ca6c4b26b9c..eaaed84ff75 100644 --- a/src/mat/tests/ex35.c +++ b/src/mat/tests/ex35.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateSubMatrices().\n\n"; #include diff --git a/src/mat/tests/ex37.c b/src/mat/tests/ex37.c index 736eead2a76..a5694f4bca6 100644 --- a/src/mat/tests/ex37.c +++ b/src/mat/tests/ex37.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCopy() and MatStore/RetrieveValues().\n\n"; #include diff --git a/src/mat/tests/ex38.c b/src/mat/tests/ex38.c index faec076cdb7..215f9509640 100644 --- a/src/mat/tests/ex38.c +++ b/src/mat/tests/ex38.c @@ -1,4 +1,3 @@ - static char help[] = "Test interface of Elemental. \n\n"; #include diff --git a/src/mat/tests/ex39.c b/src/mat/tests/ex39.c index 2f8fb8da201..a42c45aec7a 100644 --- a/src/mat/tests/ex39.c +++ b/src/mat/tests/ex39.c @@ -1,4 +1,3 @@ - static char help[] = "Tests Elemental interface.\n\n"; #include diff --git a/src/mat/tests/ex4.c b/src/mat/tests/ex4.c index 848a8cb29b9..a0829c04b04 100644 --- a/src/mat/tests/ex4.c +++ b/src/mat/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Creates a matrix, inserts some values, and tests MatCreateSubMatrices() and MatZeroEntries().\n\n"; #include diff --git a/src/mat/tests/ex40.c b/src/mat/tests/ex40.c index 29a23af0193..6bb209c5f12 100644 --- a/src/mat/tests/ex40.c +++ b/src/mat/tests/ex40.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the parallel case for MatIncreaseOverlap(). Input arguments are:\n\ -f : file to load. For example see $PETSC_DIR/share/petsc/datafiles/matrices\n\ -nd : > 0 number of domains per processor \n\ diff --git a/src/mat/tests/ex41.c b/src/mat/tests/ex41.c index 75477ac9938..2361d695e23 100644 --- a/src/mat/tests/ex41.c +++ b/src/mat/tests/ex41.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatIncreaseOverlap() - the parallel case. This example\n\ is similar to ex40.c; here the index sets used are random. Input arguments are:\n\ -f : file to load. For example see $PETSC_DIR/share/petsc/datafiles/matrices\n\ diff --git a/src/mat/tests/ex42.c b/src/mat/tests/ex42.c index e27127c53b3..3a9729558ef 100644 --- a/src/mat/tests/ex42.c +++ b/src/mat/tests/ex42.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatIncreaseOverlap() and MatCreateSubmatrices() for the parallel case.\n\ This example is similar to ex40.c; here the index sets used are random.\n\ Input arguments are:\n\ diff --git a/src/mat/tests/ex43.c b/src/mat/tests/ex43.c index de25b541ee0..7f681054cd7 100644 --- a/src/mat/tests/ex43.c +++ b/src/mat/tests/ex43.c @@ -1,4 +1,3 @@ - static char help[] = "Saves a dense matrix in a dense format (binary).\n\n"; #include diff --git a/src/mat/tests/ex46.c b/src/mat/tests/ex46.c index 0fdfeabda94..d7990ab393f 100644 --- a/src/mat/tests/ex46.c +++ b/src/mat/tests/ex46.c @@ -1,4 +1,3 @@ - static char help[] = "Tests late MatSetBlockSizes.\n\n"; #include diff --git a/src/mat/tests/ex47.c b/src/mat/tests/ex47.c index 7a20a8e8ad1..9d47279217b 100644 --- a/src/mat/tests/ex47.c +++ b/src/mat/tests/ex47.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the various routines in MatBAIJ format.\n\ Input arguments are:\n\ -f : file to load. For example see $PETSC_DIR/share/petsc/datafiles/matrices\n\n"; diff --git a/src/mat/tests/ex48.c b/src/mat/tests/ex48.c index 19446678cba..8ecd038c2a9 100644 --- a/src/mat/tests/ex48.c +++ b/src/mat/tests/ex48.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various routines in MatSeqBAIJ format.\n"; #include diff --git a/src/mat/tests/ex49.c b/src/mat/tests/ex49.c index 6a4cc5476d8..bb33af9e6df 100644 --- a/src/mat/tests/ex49.c +++ b/src/mat/tests/ex49.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatTranspose(), MatNorm(), and MatAXPY().\n\n"; #include diff --git a/src/mat/tests/ex5.c b/src/mat/tests/ex5.c index 1df6e988c71..ecf360f61db 100644 --- a/src/mat/tests/ex5.c +++ b/src/mat/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMult(), MatMultAdd(), MatMultTranspose().\n\ Also MatMultTransposeAdd(), MatScale(), MatGetDiagonal(), MatDiagonalScale(), MatZeroEntries() and MatDuplicate().\n\n"; diff --git a/src/mat/tests/ex51.c b/src/mat/tests/ex51.c index 32e582fd942..82a859aed2f 100644 --- a/src/mat/tests/ex51.c +++ b/src/mat/tests/ex51.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatIncreaseOverlap(), MatCreateSubMatrices() for MatBAIJ format.\n"; #include diff --git a/src/mat/tests/ex52.c b/src/mat/tests/ex52.c index a945b7b45fb..2043d4c86f4 100644 --- a/src/mat/tests/ex52.c +++ b/src/mat/tests/ex52.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various routines in MatMPIBAIJ format.\n"; #include diff --git a/src/mat/tests/ex53.c b/src/mat/tests/ex53.c index 81bcd960347..49e0c2d65ee 100644 --- a/src/mat/tests/ex53.c +++ b/src/mat/tests/ex53.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various routines in MatMPIBAIJ format.\n"; #include diff --git a/src/mat/tests/ex54.c b/src/mat/tests/ex54.c index b7e367ea53a..b72208c3478 100644 --- a/src/mat/tests/ex54.c +++ b/src/mat/tests/ex54.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatIncreaseOverlap(), MatCreateSubMatrices() for parallel AIJ and BAIJ formats.\n"; #include diff --git a/src/mat/tests/ex55.c b/src/mat/tests/ex55.c index 5af838aacbf..1fcdff42aad 100644 --- a/src/mat/tests/ex55.c +++ b/src/mat/tests/ex55.c @@ -1,4 +1,3 @@ - static char help[] = "Tests converting a matrix to another format with MatConvert().\n\n"; #include diff --git a/src/mat/tests/ex56.c b/src/mat/tests/ex56.c index 68c6a952da8..5c0b0fccee5 100644 --- a/src/mat/tests/ex56.c +++ b/src/mat/tests/ex56.c @@ -1,4 +1,3 @@ - static char help[] = "Test the use of MatSetValuesBlocked(), MatZeroRows() for rectangular MatBAIJ matrix, test MatSetValuesBlocked() for MatSBAIJ matrix (-test_mat_sbaij)."; #include diff --git a/src/mat/tests/ex57.c b/src/mat/tests/ex57.c index d2cad729bc8..a5adfc2157d 100644 --- a/src/mat/tests/ex57.c +++ b/src/mat/tests/ex57.c @@ -1,4 +1,3 @@ - static char help[] = "Reads in a binary file, extracts a submatrix from it, and writes to another binary file.\n\ Options:\n\ -fin : input matrix file\n\ diff --git a/src/mat/tests/ex58.c b/src/mat/tests/ex58.c index bdc91620cdd..6eb4b4a22e6 100644 --- a/src/mat/tests/ex58.c +++ b/src/mat/tests/ex58.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatTranspose() and MatEqual() for MPIAIJ matrices.\n\n"; #include diff --git a/src/mat/tests/ex59.c b/src/mat/tests/ex59.c index 79fdb825e64..fad4acd7835 100644 --- a/src/mat/tests/ex59.c +++ b/src/mat/tests/ex59.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateSubmatrix() in parallel."; #include diff --git a/src/mat/tests/ex6.c b/src/mat/tests/ex6.c index a69575cce4f..cd81d6bfcc0 100644 --- a/src/mat/tests/ex6.c +++ b/src/mat/tests/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Tests reordering a matrix.\n\n"; #include diff --git a/src/mat/tests/ex60.c b/src/mat/tests/ex60.c index 8188347b28a..95b5bc9892c 100644 --- a/src/mat/tests/ex60.c +++ b/src/mat/tests/ex60.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatGetColumnVector()."; #include diff --git a/src/mat/tests/ex61.c b/src/mat/tests/ex61.c index bf8e7a6e62f..36879d102b8 100644 --- a/src/mat/tests/ex61.c +++ b/src/mat/tests/ex61.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatSeq(B)AIJSetColumnIndices().\n\n"; #include diff --git a/src/mat/tests/ex62.c b/src/mat/tests/ex62.c index 6b0bcbe4b21..9b108777803 100644 --- a/src/mat/tests/ex62.c +++ b/src/mat/tests/ex62.c @@ -1,4 +1,3 @@ - static char help[] = "Test Matrix products for AIJ matrices\n\ Input arguments are:\n\ -fA -fB -fC : file to load\n\n"; diff --git a/src/mat/tests/ex64.c b/src/mat/tests/ex64.c index a3f86258ae4..e306be62db0 100644 --- a/src/mat/tests/ex64.c +++ b/src/mat/tests/ex64.c @@ -1,4 +1,3 @@ - static char help[] = "Saves 4by4 block matrix.\n\n"; #include diff --git a/src/mat/tests/ex65.c b/src/mat/tests/ex65.c index 77af8b7db68..4bd5669aae1 100644 --- a/src/mat/tests/ex65.c +++ b/src/mat/tests/ex65.c @@ -1,4 +1,3 @@ - static char help[] = "Saves a rectangular sparse matrix to disk.\n\n"; #include diff --git a/src/mat/tests/ex67f.F90 b/src/mat/tests/ex67f.F90 index 8f77fbcd3fd..e55a8f69827 100644 --- a/src/mat/tests/ex67f.F90 +++ b/src/mat/tests/ex67f.F90 @@ -59,4 +59,3 @@ program main ! requires: double !complex ! !TEST*/ - diff --git a/src/mat/tests/ex68.c b/src/mat/tests/ex68.c index 14ee7dbb05c..2d9e13c605d 100644 --- a/src/mat/tests/ex68.c +++ b/src/mat/tests/ex68.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatReorderForNonzeroDiagonal().\n\n"; #include diff --git a/src/mat/tests/ex7.c b/src/mat/tests/ex7.c index e868554c79f..11b6606171c 100644 --- a/src/mat/tests/ex7.c +++ b/src/mat/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Tests matrix factorization. Note that most users should\n\ employ the KSP interface to the linear solvers instead of using the factorization\n\ routines directly.\n\n"; diff --git a/src/mat/tests/ex71.c b/src/mat/tests/ex71.c index ef06b7c150d..f31c91251df 100644 --- a/src/mat/tests/ex71.c +++ b/src/mat/tests/ex71.c @@ -1,4 +1,3 @@ - static char help[] = "Passes a sparse matrix to MATLAB.\n\n"; #include diff --git a/src/mat/tests/ex73.c b/src/mat/tests/ex73.c index 61995ef034f..56abcbac17f 100644 --- a/src/mat/tests/ex73.c +++ b/src/mat/tests/ex73.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix from a file partitions it\n\n"; /* diff --git a/src/mat/tests/ex74.c b/src/mat/tests/ex74.c index b442b5b1f66..675526bc127 100644 --- a/src/mat/tests/ex74.c +++ b/src/mat/tests/ex74.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the various sequential routines in MATSEQSBAIJ format.\n"; #include diff --git a/src/mat/tests/ex75.c b/src/mat/tests/ex75.c index b61ba38d88f..c188b28ee20 100644 --- a/src/mat/tests/ex75.c +++ b/src/mat/tests/ex75.c @@ -1,4 +1,3 @@ - static char help[] = "Tests various routines in MatMPISBAIJ format.\n"; #include diff --git a/src/mat/tests/ex76.c b/src/mat/tests/ex76.c index cf1c2f0bb30..fb0592ad70b 100644 --- a/src/mat/tests/ex76.c +++ b/src/mat/tests/ex76.c @@ -1,4 +1,3 @@ - static char help[] = "Tests cholesky, icc factorization and solve on sequential aij, baij and sbaij matrices. \n"; #include diff --git a/src/mat/tests/ex77.c b/src/mat/tests/ex77.c index 3584607a830..6563eef86de 100644 --- a/src/mat/tests/ex77.c +++ b/src/mat/tests/ex77.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the various sequential routines in MatSBAIJ format. Same as ex74.c except diagonal entries of the matrices are zeros.\n"; #include diff --git a/src/mat/tests/ex78.c b/src/mat/tests/ex78.c index 19eabd75ed8..964266c29d2 100644 --- a/src/mat/tests/ex78.c +++ b/src/mat/tests/ex78.c @@ -1,4 +1,3 @@ - static char help[] = "Reads in a matrix in ASCII MATLAB format (I,J,A), read in vectors rhs and exact_solu in ASCII format.\n\ Writes them using the PETSc sparse format.\n\ Note: I and J start at 1, not 0, use -noshift if indices in file start with zero!\n\ diff --git a/src/mat/tests/ex8.c b/src/mat/tests/ex8.c index b6e2303e19c..7a9e5472add 100644 --- a/src/mat/tests/ex8.c +++ b/src/mat/tests/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Tests automatic allocation of matrix storage space.\n\n"; #include diff --git a/src/mat/tests/ex80.c b/src/mat/tests/ex80.c index 24d66cde677..87e4252604d 100644 --- a/src/mat/tests/ex80.c +++ b/src/mat/tests/ex80.c @@ -1,4 +1,3 @@ - static char help[] = "Partition tiny grid.\n\n"; /* diff --git a/src/mat/tests/ex81.c b/src/mat/tests/ex81.c index f9270ca6c07..99d2d9b7951 100644 --- a/src/mat/tests/ex81.c +++ b/src/mat/tests/ex81.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatOption MAT_FORCE_DIAGONAL_ENTRIES.\n\n"; #include diff --git a/src/mat/tests/ex82.c b/src/mat/tests/ex82.c index 490eee5dc50..5b14a00f7e2 100644 --- a/src/mat/tests/ex82.c +++ b/src/mat/tests/ex82.c @@ -1,4 +1,3 @@ - static char help[] = "Partition a tiny grid using hierarchical partitioning.\n\n"; /* diff --git a/src/mat/tests/ex83.c b/src/mat/tests/ex83.c index 7c13bcd91a2..21eac16987f 100644 --- a/src/mat/tests/ex83.c +++ b/src/mat/tests/ex83.c @@ -1,4 +1,3 @@ - static char help[] = "Partition tiny grid using hierarchical partitioning and increase overlap using MatIncreaseOverlapSplit.\n\n"; /* diff --git a/src/mat/tests/ex87.c b/src/mat/tests/ex87.c index 36f3e27a74e..c73f452f9e3 100644 --- a/src/mat/tests/ex87.c +++ b/src/mat/tests/ex87.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateSubMatrices() for SBAIJ matrices\n\n"; #include diff --git a/src/mat/tests/ex88.c b/src/mat/tests/ex88.c index 1380d2fda50..a71bbee35cb 100644 --- a/src/mat/tests/ex88.c +++ b/src/mat/tests/ex88.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatShift(), MatScale(), and MatDiagonalScale() for SHELL and NEST matrices\n\n"; #include diff --git a/src/mat/tests/ex9.c b/src/mat/tests/ex9.c index 36e52be5272..a1c329e9fa7 100644 --- a/src/mat/tests/ex9.c +++ b/src/mat/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MPI parallel matrix creation. Test MatCreateRedundantMatrix() \n\n"; #include diff --git a/src/mat/tests/ex90.c b/src/mat/tests/ex90.c index 3e3ba464c9e..95401d824d2 100644 --- a/src/mat/tests/ex90.c +++ b/src/mat/tests/ex90.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatPtAP() \n"; #include diff --git a/src/mat/tests/ex91.c b/src/mat/tests/ex91.c index f4fa85b7934..49fac12fa22 100644 --- a/src/mat/tests/ex91.c +++ b/src/mat/tests/ex91.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatIncreaseOverlap(), MatCreateSubMatrices() for sequential MatSBAIJ format. Derived from ex51.c\n"; #include diff --git a/src/mat/tests/ex92.c b/src/mat/tests/ex92.c index 3197a94b7ee..b61b4301f38 100644 --- a/src/mat/tests/ex92.c +++ b/src/mat/tests/ex92.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatIncreaseOverlap(), MatCreateSubMatrices() for parallel MatSBAIJ format.\n"; /* Example of usage: mpiexec -n 2 ./ex92 -nd 2 -ov 3 -mat_block_size 2 -view_id 0 -test_overlap -test_submat diff --git a/src/mat/tests/ex94.c b/src/mat/tests/ex94.c index 98a8d38cd15..4fe81a83d18 100644 --- a/src/mat/tests/ex94.c +++ b/src/mat/tests/ex94.c @@ -1,4 +1,3 @@ - static char help[] = "Tests sequential and parallel MatMatMult() and MatPtAP(), MatTransposeMatMult(), sequential MatMatTransposeMult(), MatRARt()\n\ Input arguments are:\n\ -f0 -f1 -f2 -f3 : file to load\n\n"; diff --git a/src/mat/tests/ex96.c b/src/mat/tests/ex96.c index 5ff686f42f5..49f60c7b4d8 100644 --- a/src/mat/tests/ex96.c +++ b/src/mat/tests/ex96.c @@ -1,4 +1,3 @@ - static char help[] = "Tests sequential and parallel DMCreateMatrix(), MatMatMult() and MatPtAP()\n\ -Mx , where = number of coarse grid points in the x-direction\n\ -My , where = number of coarse grid points in the y-direction\n\ diff --git a/src/mat/tests/ex98.c b/src/mat/tests/ex98.c index 0f50d63021f..7e84b8aa77f 100644 --- a/src/mat/tests/ex98.c +++ b/src/mat/tests/ex98.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMPIAIJSetPreallocationCSR()\n\n"; /* diff --git a/src/mat/tests/mmio.c b/src/mat/tests/mmio.c index fd16df5493d..11c84741d74 100644 --- a/src/mat/tests/mmio.c +++ b/src/mat/tests/mmio.c @@ -47,7 +47,7 @@ int mm_read_unsymmetric_sparse(const char *fname, int *M_, int *N_, int *nz_, do *N_ = N; *nz_ = nz; - /* reseve memory for matrices */ + /* reserve memory for matrices */ ia = (int *)malloc(nz * sizeof(int)); ja = (int *)malloc(nz * sizeof(int)); diff --git a/src/mat/tutorials/ex1.c b/src/mat/tutorials/ex1.c index 30938c18d2f..33f5ae2197a 100644 --- a/src/mat/tutorials/ex1.c +++ b/src/mat/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file and reorders it.\n\ -f0 : first file to load (small system)\n\ -f1 : second file to load (larger system)\n\n"; diff --git a/src/mat/tutorials/ex10.c b/src/mat/tutorials/ex10.c index 06de37ae154..e0015a454c0 100644 --- a/src/mat/tutorials/ex10.c +++ b/src/mat/tutorials/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and computes the 2 norm of the columns\n\n"; /* diff --git a/src/mat/tutorials/ex11.c b/src/mat/tutorials/ex11.c index 3c5b9b8d19b..48195f12549 100644 --- a/src/mat/tutorials/ex11.c +++ b/src/mat/tutorials/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatMeshToDual()\n\n"; /* diff --git a/src/mat/tutorials/ex12.c b/src/mat/tutorials/ex12.c index f93eced7b4b..042b61bc8ab 100644 --- a/src/mat/tutorials/ex12.c +++ b/src/mat/tutorials/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc matrix and vector from a file; expands the matrix with the vector\n\n"; /* diff --git a/src/mat/tutorials/ex16.c b/src/mat/tutorials/ex16.c index b557656166b..fcc74d5a028 100644 --- a/src/mat/tutorials/ex16.c +++ b/src/mat/tutorials/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a matrix from PETSc binary file. Use for view or investigating matrix data structure. \n\n"; /* Example: diff --git a/src/mat/tutorials/ex17f.F90 b/src/mat/tutorials/ex17f.F90 index ccfee1938e6..179cfb56d9b 100644 --- a/src/mat/tutorials/ex17f.F90 +++ b/src/mat/tutorials/ex17f.F90 @@ -1,4 +1,3 @@ - program main #include #include diff --git a/src/mat/tutorials/ex8.c b/src/mat/tutorials/ex8.c index 77e28da86fd..bb3fb2f7187 100644 --- a/src/mat/tutorials/ex8.c +++ b/src/mat/tutorials/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Shows how to add a new MatOperation to AIJ MatType\n\n"; #include diff --git a/src/mat/tutorials/ex9.c b/src/mat/tutorials/ex9.c index a6d6c3400a5..da576296276 100644 --- a/src/mat/tutorials/ex9.c +++ b/src/mat/tutorials/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Tests MatCreateComposite()\n\n"; /* diff --git a/src/mat/utils/convert.c b/src/mat/utils/convert.c index a042f4aa14d..24eed11a13f 100644 --- a/src/mat/utils/convert.c +++ b/src/mat/utils/convert.c @@ -1,4 +1,3 @@ - #include /* diff --git a/src/mat/utils/freespace.c b/src/mat/utils/freespace.c index e239b63587f..44ec04c6f4c 100644 --- a/src/mat/utils/freespace.c +++ b/src/mat/utils/freespace.c @@ -1,4 +1,3 @@ - #include <../src/mat/utils/freespace.h> PetscErrorCode PetscFreeSpaceGet(PetscInt n, PetscFreeSpaceList *list) diff --git a/src/mat/utils/getcolv.c b/src/mat/utils/getcolv.c index 83c9fc58dd8..2c0623a9bb3 100644 --- a/src/mat/utils/getcolv.c +++ b/src/mat/utils/getcolv.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ /*@ diff --git a/src/mat/utils/matstash.c b/src/mat/utils/matstash.c index d79f19ac2cd..127680ece27 100644 --- a/src/mat/utils/matstash.c +++ b/src/mat/utils/matstash.c @@ -1,4 +1,3 @@ - #include #define DEFAULT_STASH_SIZE 10000 diff --git a/src/mat/utils/matstashspace.c b/src/mat/utils/matstashspace.c index 891af49d693..112d67900b5 100644 --- a/src/mat/utils/matstashspace.c +++ b/src/mat/utils/matstashspace.c @@ -1,4 +1,3 @@ - #include /* Get new PetscMatStashSpace into the existing space */ diff --git a/src/mat/utils/multequal.c b/src/mat/utils/multequal.c index 4383e29b9eb..ef126776593 100644 --- a/src/mat/utils/multequal.c +++ b/src/mat/utils/multequal.c @@ -1,4 +1,3 @@ - #include /*I "petscmat.h" I*/ static PetscErrorCode MatMultEqual_Private(Mat A, Mat B, PetscInt n, PetscBool *flg, PetscInt t, PetscInt add) diff --git a/src/mat/utils/pheap.c b/src/mat/utils/pheap.c index 74c211e2cdb..7f5ab377609 100644 --- a/src/mat/utils/pheap.c +++ b/src/mat/utils/pheap.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/mat/utils/zerodiag.c b/src/mat/utils/zerodiag.c index 90a77ec641a..58665e78b33 100644 --- a/src/mat/utils/zerodiag.c +++ b/src/mat/utils/zerodiag.c @@ -1,4 +1,3 @@ - /* This file contains routines to reorder a matrix so that the diagonal elements are nonzero. diff --git a/src/snes/f90-mod/petscsnesfas.h b/src/snes/f90-mod/petscsnesfas.h index d9f9969a199..97c9d89b073 100644 --- a/src/snes/f90-mod/petscsnesfas.h +++ b/src/snes/f90-mod/petscsnesfas.h @@ -7,4 +7,3 @@ ! PetscEnum, parameter :: SNES_FAS_MULTIPLICATIVE = 0 PetscEnum, parameter :: SNES_FAS_ADDITIVE = 1 - diff --git a/src/snes/f90-mod/petscsnesmod.F90 b/src/snes/f90-mod/petscsnesmod.F90 index 6016229b05f..3d86c6ce67a 100644 --- a/src/snes/f90-mod/petscsnesmod.F90 +++ b/src/snes/f90-mod/petscsnesmod.F90 @@ -1,4 +1,3 @@ - module petscsnesdefdummy use petsckspdef #include <../src/snes/f90-mod/petscsnes.h> @@ -45,4 +44,3 @@ module petscsnes #include <../src/snes/f90-mod/ftn-auto-interfaces/petscsnes.h90> end interface end module - diff --git a/src/snes/impls/composite/snescomposite.c b/src/snes/impls/composite/snescomposite.c index 52d5d77707e..85b938a2866 100644 --- a/src/snes/impls/composite/snescomposite.c +++ b/src/snes/impls/composite/snescomposite.c @@ -1,4 +1,3 @@ - /* Defines a SNES that can consist of a collection of SNESes */ diff --git a/src/snes/impls/ls/ls.c b/src/snes/impls/ls/ls.c index 6f8d7cd3639..2c5a13eefad 100644 --- a/src/snes/impls/ls/ls.c +++ b/src/snes/impls/ls/ls.c @@ -1,4 +1,3 @@ - #include <../src/snes/impls/ls/lsimpl.h> /* diff --git a/src/snes/impls/ntrdc/ntrdc.c b/src/snes/impls/ntrdc/ntrdc.c index cae90c1a77e..c8ff8291e25 100644 --- a/src/snes/impls/ntrdc/ntrdc.c +++ b/src/snes/impls/ntrdc/ntrdc.c @@ -1,4 +1,3 @@ - #include <../src/snes/impls/ntrdc/ntrdcimpl.h> /*I "petscsnes.h" I*/ typedef struct { diff --git a/src/snes/impls/vi/rs/virs.c b/src/snes/impls/vi/rs/virs.c index 512cad1f061..c9ca7998d0c 100644 --- a/src/snes/impls/vi/rs/virs.c +++ b/src/snes/impls/vi/rs/virs.c @@ -1,4 +1,3 @@ - #include <../src/snes/impls/vi/rs/virsimpl.h> /*I "petscsnes.h" I*/ #include #include diff --git a/src/snes/impls/vi/ss/viss.c b/src/snes/impls/vi/ss/viss.c index 7bd2d161fe3..c219ceec8bb 100644 --- a/src/snes/impls/vi/ss/viss.c +++ b/src/snes/impls/vi/ss/viss.c @@ -1,4 +1,3 @@ - #include <../src/snes/impls/vi/ss/vissimpl.h> /*I "petscsnes.h" I*/ /*@ diff --git a/src/snes/interface/dlregissnes.c b/src/snes/interface/dlregissnes.c index c9849f93f95..f04d694bc96 100644 --- a/src/snes/interface/dlregissnes.c +++ b/src/snes/interface/dlregissnes.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/snes/interface/f90-custom/zsnesf90.c b/src/snes/interface/f90-custom/zsnesf90.c index 472d2009bee..2cc8aa341ae 100644 --- a/src/snes/interface/f90-custom/zsnesf90.c +++ b/src/snes/interface/f90-custom/zsnesf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/snes/interface/noise/snesdnest.c b/src/snes/interface/noise/snesdnest.c index 1fd0ea971a8..2fce3c1ffcf 100644 --- a/src/snes/interface/noise/snesdnest.c +++ b/src/snes/interface/noise/snesdnest.c @@ -1,4 +1,3 @@ - /* fnoise/snesdnest.F -- translated by f2c (version 20020314). */ #include diff --git a/src/snes/interface/noise/snesmfj2.c b/src/snes/interface/noise/snesmfj2.c index fe83d3cddcb..1f91beb3e64 100644 --- a/src/snes/interface/noise/snesmfj2.c +++ b/src/snes/interface/noise/snesmfj2.c @@ -1,4 +1,3 @@ - #include /*I "petscsnes.h" I*/ /* matimpl.h is needed only for logging of matrix operation */ #include diff --git a/src/snes/interface/noise/snesnoise.c b/src/snes/interface/noise/snesnoise.c index c44740bf53f..f748f3f7a4c 100644 --- a/src/snes/interface/noise/snesnoise.c +++ b/src/snes/interface/noise/snesnoise.c @@ -1,4 +1,3 @@ - #include PETSC_INTERN PetscErrorCode SNESDiffParameterCreate_More(SNES, Vec, void **); diff --git a/src/snes/interface/snesj.c b/src/snes/interface/snesj.c index c58172d6c82..e4a57b9c277 100644 --- a/src/snes/interface/snesj.c +++ b/src/snes/interface/snesj.c @@ -1,4 +1,3 @@ - #include /*I "petscsnes.h" I*/ #include /* for Vec->ops->setvalues */ #include diff --git a/src/snes/interface/snesj2.c b/src/snes/interface/snesj2.c index c2e89a6cdc2..517f8f93d7d 100644 --- a/src/snes/interface/snesj2.c +++ b/src/snes/interface/snesj2.c @@ -1,4 +1,3 @@ - #include /*I "petscsnes.h" I*/ #include /*I "petscdm.h" I*/ diff --git a/src/snes/interface/snespc.c b/src/snes/interface/snespc.c index f19bcbb7ba7..1aa821acaff 100644 --- a/src/snes/interface/snespc.c +++ b/src/snes/interface/snespc.c @@ -1,4 +1,3 @@ - #include /*I "petscsnes.h" I*/ /*@ diff --git a/src/snes/interface/snesregi.c b/src/snes/interface/snesregi.c index 8f4eae8ca85..86fb9c31d02 100644 --- a/src/snes/interface/snesregi.c +++ b/src/snes/interface/snesregi.c @@ -1,4 +1,3 @@ - #include /*I "petscsnes.h" I*/ PETSC_EXTERN PetscErrorCode SNESCreate_NEWTONLS(SNES); diff --git a/src/snes/interface/snesut.c b/src/snes/interface/snesut.c index 5f485d9dc20..c671a73fd92 100644 --- a/src/snes/interface/snesut.c +++ b/src/snes/interface/snesut.c @@ -1,4 +1,3 @@ - #include /*I "petsc/private/snesimpl.h" I*/ #include #include diff --git a/src/snes/mf/snesmfj.c b/src/snes/mf/snesmfj.c index 4648e367d60..371c128a6db 100644 --- a/src/snes/mf/snesmfj.c +++ b/src/snes/mf/snesmfj.c @@ -1,4 +1,3 @@ - #include /*I "petscsnes.h" I*/ #include /*I "petscdm.h" I*/ #include <../src/mat/impls/mffd/mffdimpl.h> diff --git a/src/snes/tests/ex1.c b/src/snes/tests/ex1.c index 6eb574fbfcd..fe0ae909955 100644 --- a/src/snes/tests/ex1.c +++ b/src/snes/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the nonlinear system, the Bratu (SFI - solid fuel ignition) problem in a 2D rectangular domain.\n\ This example also illustrates the use of matrix coloring. Runtime options include:\n\ -par , where indicates the problem's nonlinearity\n\ diff --git a/src/snes/tests/ex20.c b/src/snes/tests/ex20.c index ade556f1a19..2ea3eb00f72 100644 --- a/src/snes/tests/ex20.c +++ b/src/snes/tests/ex20.c @@ -1,4 +1,3 @@ - static char help[] = "Nonlinear Radiative Transport PDE with multigrid in 3d.\n\ Uses 3-dimensional distributed arrays.\n\ A 3-dim simplified Radiative Transport test problem is used, with analytic Jacobian. \n\ diff --git a/src/snes/tests/ex4.c b/src/snes/tests/ex4.c index 5b93f4f8f4c..918bc03d8d1 100644 --- a/src/snes/tests/ex4.c +++ b/src/snes/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Tests SNESLinesearch handling of Inf/Nan.\n\n"; /* diff --git a/src/snes/tests/ex5.c b/src/snes/tests/ex5.c index a519329ee9c..0c564d72e53 100644 --- a/src/snes/tests/ex5.c +++ b/src/snes/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Newton method to solve u'' + u^{2} = f, sequentially.\n\ This example tests PCVPBJacobiSetBlocks().\n\n"; diff --git a/src/snes/tests/ex69.c b/src/snes/tests/ex69.c index 71785191c92..4c0ac736eda 100644 --- a/src/snes/tests/ex69.c +++ b/src/snes/tests/ex69.c @@ -1,4 +1,3 @@ - static char help[] = "Tests recovery from domain errors in MatMult() and PCApply()\n\n"; /* diff --git a/src/snes/tests/ex7.c b/src/snes/tests/ex7.c index 3ae7bf439d9..a2792f9b94f 100644 --- a/src/snes/tests/ex7.c +++ b/src/snes/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Solves u`` + u^{2} = f with Newton-like methods. Using\n\ matrix-free techniques with user-provided explicit preconditioner matrix.\n\n"; diff --git a/src/snes/tutorials/ex1.c b/src/snes/tutorials/ex1.c index 919e811c1b8..9f6d6bb1761 100644 --- a/src/snes/tutorials/ex1.c +++ b/src/snes/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Newton's method for a two-variable system, sequential.\n\n"; /* diff --git a/src/snes/tutorials/ex10d/ex10.c b/src/snes/tutorials/ex10d/ex10.c index a55ba9d4db1..490b693fe99 100644 --- a/src/snes/tutorials/ex10d/ex10.c +++ b/src/snes/tutorials/ex10d/ex10.c @@ -1,4 +1,3 @@ - /* Include "petscsnes.h" so that we can use SNES solvers. Note that this file automatically includes: diff --git a/src/snes/tutorials/ex14.c b/src/snes/tutorials/ex14.c index 4282a1d098c..91bd11c02f5 100644 --- a/src/snes/tutorials/ex14.c +++ b/src/snes/tutorials/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Bratu nonlinear PDE in 3d.\n\ We solve the Bratu (SFI - solid fuel ignition) problem in a 3D rectangular\n\ domain, using distributed arrays (DMDAs) to partition the parallel grid.\n\ diff --git a/src/snes/tutorials/ex16.c b/src/snes/tutorials/ex16.c index 6a468d284e4..eb539c2c232 100644 --- a/src/snes/tutorials/ex16.c +++ b/src/snes/tutorials/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Large-deformation Elasticity Buckling Example"; /*F----------------------------------------------------------------------- diff --git a/src/snes/tutorials/ex18.c b/src/snes/tutorials/ex18.c index af72b89e3df..05292d9649d 100644 --- a/src/snes/tutorials/ex18.c +++ b/src/snes/tutorials/ex18.c @@ -1,4 +1,3 @@ - static char help[] = "Nonlinear Radiative Transport PDE with multigrid in 2d.\n\ Uses 2-dimensional distributed arrays.\n\ A 2-dim simplified Radiative Transport test problem is used, with analytic Jacobian. \n\ diff --git a/src/snes/tutorials/ex2.c b/src/snes/tutorials/ex2.c index f143c9f43d2..2736eeed385 100644 --- a/src/snes/tutorials/ex2.c +++ b/src/snes/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Newton method to solve u'' + u^{2} = f, sequentially.\n\ This example employs a user-defined monitoring routine.\n\n"; diff --git a/src/snes/tutorials/ex21.c b/src/snes/tutorials/ex21.c index 56c9c7fa42c..7648813e80e 100644 --- a/src/snes/tutorials/ex21.c +++ b/src/snes/tutorials/ex21.c @@ -1,4 +1,3 @@ - static const char help[] = "Solves PDE optimization problem using full-space method, treats state and adjoint variables separately.\n\n"; #include diff --git a/src/snes/tutorials/ex22.c b/src/snes/tutorials/ex22.c index 5b9c0f4edd4..6d021178e7a 100644 --- a/src/snes/tutorials/ex22.c +++ b/src/snes/tutorials/ex22.c @@ -1,4 +1,3 @@ - static const char help[] = "Solves PDE optimization problem using full-space method, interlaces state and adjoint variables.\n\n"; #include diff --git a/src/snes/tutorials/ex31.c b/src/snes/tutorials/ex31.c index e88e7b9ffd3..de32e54fc8f 100644 --- a/src/snes/tutorials/ex31.c +++ b/src/snes/tutorials/ex31.c @@ -1,4 +1,3 @@ - static char help[] = "A Chebyshev spectral method for the compressible Blasius boundary layer equations.\n\n"; /* diff --git a/src/snes/tutorials/ex42.c b/src/snes/tutorials/ex42.c index 8d51b03392c..087bd9ef1ee 100644 --- a/src/snes/tutorials/ex42.c +++ b/src/snes/tutorials/ex42.c @@ -1,4 +1,3 @@ - static char help[] = "Newton's method to solve a two-variable system that comes from the Rosenbrock function.\n\n"; /* diff --git a/src/snes/tutorials/ex58.c b/src/snes/tutorials/ex58.c index 0a399846985..748f7359230 100644 --- a/src/snes/tutorials/ex58.c +++ b/src/snes/tutorials/ex58.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/snes/tutorials/ex59.c b/src/snes/tutorials/ex59.c index dcf242e2d3a..2e78e1b6ebb 100644 --- a/src/snes/tutorials/ex59.c +++ b/src/snes/tutorials/ex59.c @@ -1,4 +1,3 @@ - static const char help[] = "Tries to solve u`` + u^{2} = f for an easy case and an impossible case.\n\n"; /* diff --git a/src/snes/tutorials/ex6.c b/src/snes/tutorials/ex6.c index 977899cac83..ddba453dc48 100644 --- a/src/snes/tutorials/ex6.c +++ b/src/snes/tutorials/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Newton method to solve u'' + u^{2} = f, sequentially.\n\ This example employs a user-defined reasonview routine.\n\n"; diff --git a/src/snes/tutorials/ex78.c b/src/snes/tutorials/ex78.c index 8d00fa9836b..18b2ae79895 100644 --- a/src/snes/tutorials/ex78.c +++ b/src/snes/tutorials/ex78.c @@ -1,4 +1,3 @@ - static char help[] = "Newton methods to solve u'' = f in parallel with periodic boundary conditions.\n\n"; /* diff --git a/src/snes/utils/dmlocalsnes.c b/src/snes/utils/dmlocalsnes.c index 4914d924c74..4b5da6af86c 100644 --- a/src/snes/utils/dmlocalsnes.c +++ b/src/snes/utils/dmlocalsnes.c @@ -206,7 +206,7 @@ PetscErrorCode DMSNESSetFunctionLocal(DM dm, PetscErrorCode (*func)(DM, Vec, Vec Calling sequence of `func`: $ PetscErrorCode func(DM dm, Vec X, void *ctx) + dm - the `DM` context -. X - ghosted solution vector, approriate locations (such as essential boundary condition nodes) should be filled +. X - ghosted solution vector, appropriate locations (such as essential boundary condition nodes) should be filled - ctx - a user provided context Level: advanced diff --git a/src/sys/ams/pams.c b/src/sys/ams/pams.c index 8c7a9caee93..5d7ea3ae480 100644 --- a/src/sys/ams/pams.c +++ b/src/sys/ams/pams.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #include #include diff --git a/src/sys/classes/bag/f2003-src/fsrc/bagenum.F90 b/src/sys/classes/bag/f2003-src/fsrc/bagenum.F90 index 3cc21a3bfba..b10c67c4601 100644 --- a/src/sys/classes/bag/f2003-src/fsrc/bagenum.F90 +++ b/src/sys/classes/bag/f2003-src/fsrc/bagenum.F90 @@ -1,4 +1,3 @@ - #include "petsc/finclude/petscsys.h" #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES) diff --git a/src/sys/classes/bag/ftn-custom/zbagf.c b/src/sys/classes/bag/ftn-custom/zbagf.c index 4c9540e7712..7bce96d9def 100644 --- a/src/sys/classes/bag/ftn-custom/zbagf.c +++ b/src/sys/classes/bag/ftn-custom/zbagf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/sys/classes/draw/impls/win32/win32draw.c b/src/sys/classes/draw/impls/win32/win32draw.c index 80fe126c947..b3726547440 100644 --- a/src/sys/classes/draw/impls/win32/win32draw.c +++ b/src/sys/classes/draw/impls/win32/win32draw.c @@ -1,4 +1,3 @@ - #include #include #include <../src/sys/classes/draw/impls/win32/win32draw.h> diff --git a/src/sys/classes/draw/impls/x/drawopenx.c b/src/sys/classes/draw/impls/x/drawopenx.c index 75dc3dd333a..e29fbe0564a 100644 --- a/src/sys/classes/draw/impls/x/drawopenx.c +++ b/src/sys/classes/draw/impls/x/drawopenx.c @@ -1,4 +1,3 @@ - /* Defines the operations for the X PetscDraw implementation. */ diff --git a/src/sys/classes/draw/impls/x/xcolor.c b/src/sys/classes/draw/impls/x/xcolor.c index 85c4813378e..5967127e438 100644 --- a/src/sys/classes/draw/impls/x/xcolor.c +++ b/src/sys/classes/draw/impls/x/xcolor.c @@ -1,4 +1,3 @@ - /* Code for managing color the X implementation of the PetscDraw routines. diff --git a/src/sys/classes/draw/impls/x/xinit.c b/src/sys/classes/draw/impls/x/xinit.c index b0c713e8258..e20a86cfaff 100644 --- a/src/sys/classes/draw/impls/x/xinit.c +++ b/src/sys/classes/draw/impls/x/xinit.c @@ -1,4 +1,3 @@ - /* This file contains routines to open an X window display and window This consists of a number of routines that set the various diff --git a/src/sys/classes/draw/impls/x/xtext.c b/src/sys/classes/draw/impls/x/xtext.c index e0cf9f8081c..5ad3ad7090d 100644 --- a/src/sys/classes/draw/impls/x/xtext.c +++ b/src/sys/classes/draw/impls/x/xtext.c @@ -1,4 +1,3 @@ - /* This file contains simple code to manage access to fonts, insuring that library routines access/load fonts only once diff --git a/src/sys/classes/draw/impls/x/xtone.c b/src/sys/classes/draw/impls/x/xtone.c index 30e11315599..c5bc3e539d1 100644 --- a/src/sys/classes/draw/impls/x/xtone.c +++ b/src/sys/classes/draw/impls/x/xtone.c @@ -1,4 +1,3 @@ - /* Code for drawing color interpolated triangles using X-windows. */ diff --git a/src/sys/classes/draw/interface/dcoor.c b/src/sys/classes/draw/interface/dcoor.c index c5ed25ed6c8..9fe2c87dd22 100644 --- a/src/sys/classes/draw/interface/dcoor.c +++ b/src/sys/classes/draw/interface/dcoor.c @@ -1,4 +1,3 @@ - /* Provides the calling sequences for all the basic PetscDraw routines. */ diff --git a/src/sys/classes/draw/interface/dellipse.c b/src/sys/classes/draw/interface/dellipse.c index a768c6fb73e..0ff36bb912b 100644 --- a/src/sys/classes/draw/interface/dellipse.c +++ b/src/sys/classes/draw/interface/dellipse.c @@ -1,4 +1,3 @@ - /* Provides the calling sequences for all the basic Draw routines. */ diff --git a/src/sys/classes/draw/interface/dline.c b/src/sys/classes/draw/interface/dline.c index 8614934b60c..fd84aea284a 100644 --- a/src/sys/classes/draw/interface/dline.c +++ b/src/sys/classes/draw/interface/dline.c @@ -1,4 +1,3 @@ - /* Provides the calling sequences for all the basic PetscDraw routines. */ diff --git a/src/sys/classes/draw/interface/dmarker.c b/src/sys/classes/draw/interface/dmarker.c index fcec16e309e..9b2c0e2f411 100644 --- a/src/sys/classes/draw/interface/dmarker.c +++ b/src/sys/classes/draw/interface/dmarker.c @@ -1,4 +1,3 @@ - /* Provides the calling sequences for all the basic PetscDraw routines. */ diff --git a/src/sys/classes/draw/interface/dmouse.c b/src/sys/classes/draw/interface/dmouse.c index 43ccde6c2b8..e014e633675 100644 --- a/src/sys/classes/draw/interface/dmouse.c +++ b/src/sys/classes/draw/interface/dmouse.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@ diff --git a/src/sys/classes/draw/interface/dpoint.c b/src/sys/classes/draw/interface/dpoint.c index 090477e3e15..b9c26d0a707 100644 --- a/src/sys/classes/draw/interface/dpoint.c +++ b/src/sys/classes/draw/interface/dpoint.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@ diff --git a/src/sys/classes/draw/interface/draw.c b/src/sys/classes/draw/interface/draw.c index 0a9d8ccd753..42bc08f8bc4 100644 --- a/src/sys/classes/draw/interface/draw.c +++ b/src/sys/classes/draw/interface/draw.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ #include diff --git a/src/sys/classes/draw/interface/drawreg.c b/src/sys/classes/draw/interface/drawreg.c index 0e8c18829e0..03eb2d8c31b 100644 --- a/src/sys/classes/draw/interface/drawreg.c +++ b/src/sys/classes/draw/interface/drawreg.c @@ -1,4 +1,3 @@ - /* Provides the registration process for PETSc PetscDraw routines */ diff --git a/src/sys/classes/draw/interface/drawregall.c b/src/sys/classes/draw/interface/drawregall.c index d5a1c348c7d..6d53c8f2699 100644 --- a/src/sys/classes/draw/interface/drawregall.c +++ b/src/sys/classes/draw/interface/drawregall.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ PETSC_EXTERN PetscErrorCode PetscDrawCreate_Image(PetscDraw); diff --git a/src/sys/classes/draw/interface/dtext.c b/src/sys/classes/draw/interface/dtext.c index 0caccf87d2c..402e39ebd68 100644 --- a/src/sys/classes/draw/interface/dtext.c +++ b/src/sys/classes/draw/interface/dtext.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@C diff --git a/src/sys/classes/draw/interface/dtri.c b/src/sys/classes/draw/interface/dtri.c index 26df18f6542..89eb364b484 100644 --- a/src/sys/classes/draw/interface/dtri.c +++ b/src/sys/classes/draw/interface/dtri.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@ diff --git a/src/sys/classes/draw/interface/dviewp.c b/src/sys/classes/draw/interface/dviewp.c index 15b8dcc9257..f82ee337f89 100644 --- a/src/sys/classes/draw/interface/dviewp.c +++ b/src/sys/classes/draw/interface/dviewp.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@ diff --git a/src/sys/classes/draw/tests/ex1.c b/src/sys/classes/draw/tests/ex1.c index 76bc29f5234..05712cd3cc1 100644 --- a/src/sys/classes/draw/tests/ex1.c +++ b/src/sys/classes/draw/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates opening and drawing in a window\n"; #include diff --git a/src/sys/classes/draw/tests/ex10.c b/src/sys/classes/draw/tests/ex10.c index ed19009a99d..8b27bc141fc 100644 --- a/src/sys/classes/draw/tests/ex10.c +++ b/src/sys/classes/draw/tests/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Tests repeatedly setting a window type.\n"; #include diff --git a/src/sys/classes/draw/tests/ex11.c b/src/sys/classes/draw/tests/ex11.c index 573dea5afd7..7bc54f0e442 100644 --- a/src/sys/classes/draw/tests/ex11.c +++ b/src/sys/classes/draw/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates use of color map\n"; #include diff --git a/src/sys/classes/draw/tests/ex12.c b/src/sys/classes/draw/tests/ex12.c index fa18e116715..e6ea4ed25a4 100644 --- a/src/sys/classes/draw/tests/ex12.c +++ b/src/sys/classes/draw/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Makes a simple bar graph.\n"; #include diff --git a/src/sys/classes/draw/tests/ex2.c b/src/sys/classes/draw/tests/ex2.c index 7fb75c78a01..f0fdf967c3a 100644 --- a/src/sys/classes/draw/tests/ex2.c +++ b/src/sys/classes/draw/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates use of color map\n"; #include diff --git a/src/sys/classes/draw/tests/ex3.c b/src/sys/classes/draw/tests/ex3.c index 64470c98951..13dd9f8ece2 100644 --- a/src/sys/classes/draw/tests/ex3.c +++ b/src/sys/classes/draw/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Plots a simple line graph.\n"; #if defined(PETSC_APPLE_FRAMEWORK) diff --git a/src/sys/classes/draw/tests/ex4.c b/src/sys/classes/draw/tests/ex4.c index e32ca8077e1..b24668bf6b7 100644 --- a/src/sys/classes/draw/tests/ex4.c +++ b/src/sys/classes/draw/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates use of PetscDrawZoom()\n"; #if defined(PETSC_APPLE_FRAMEWORK) diff --git a/src/sys/classes/draw/tests/ex7.c b/src/sys/classes/draw/tests/ex7.c index b6cd8de9ca5..bb9c8eb355a 100644 --- a/src/sys/classes/draw/tests/ex7.c +++ b/src/sys/classes/draw/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates drawing primitives in a window\n"; #include diff --git a/src/sys/classes/draw/tests/ex9.c b/src/sys/classes/draw/tests/ex9.c index 029dede2cd5..5ea0b34cfc3 100644 --- a/src/sys/classes/draw/tests/ex9.c +++ b/src/sys/classes/draw/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Makes a simple histogram.\n"; #include diff --git a/src/sys/classes/draw/utils/axis.c b/src/sys/classes/draw/utils/axis.c index e7ca9b86e90..1e9ba3963a5 100644 --- a/src/sys/classes/draw/utils/axis.c +++ b/src/sys/classes/draw/utils/axis.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /* diff --git a/src/sys/classes/draw/utils/bars.c b/src/sys/classes/draw/utils/bars.c index f4d55248d2a..fb2b040b14f 100644 --- a/src/sys/classes/draw/utils/bars.c +++ b/src/sys/classes/draw/utils/bars.c @@ -1,4 +1,3 @@ - /* Contains the data structure for plotting a bargraph in a window with an axis. */ diff --git a/src/sys/classes/draw/utils/hists.c b/src/sys/classes/draw/utils/hists.c index 1044eda5760..fd496b393b4 100644 --- a/src/sys/classes/draw/utils/hists.c +++ b/src/sys/classes/draw/utils/hists.c @@ -1,4 +1,3 @@ - /* Contains the data structure for plotting a histogram in a window with an axis. */ diff --git a/src/sys/classes/draw/utils/lg.c b/src/sys/classes/draw/utils/lg.c index 3443a66af1c..51beaedaf88 100644 --- a/src/sys/classes/draw/utils/lg.c +++ b/src/sys/classes/draw/utils/lg.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@ diff --git a/src/sys/classes/draw/utils/lgc.c b/src/sys/classes/draw/utils/lgc.c index fe728e91bc9..5cea53f10f1 100644 --- a/src/sys/classes/draw/utils/lgc.c +++ b/src/sys/classes/draw/utils/lgc.c @@ -1,4 +1,3 @@ - #include #include /*I "petscdraw.h" I*/ PetscClassId PETSC_DRAWLG_CLASSID = 0; diff --git a/src/sys/classes/draw/utils/zoom.c b/src/sys/classes/draw/utils/zoom.c index 064d0889c99..953897421f0 100644 --- a/src/sys/classes/draw/utils/zoom.c +++ b/src/sys/classes/draw/utils/zoom.c @@ -1,4 +1,3 @@ - #include /*I "petscdraw.h" I*/ /*@C diff --git a/src/sys/classes/matlabengine/matlab.c b/src/sys/classes/matlabengine/matlab.c index dfb873f264f..7ec96477536 100644 --- a/src/sys/classes/matlabengine/matlab.c +++ b/src/sys/classes/matlabengine/matlab.c @@ -1,4 +1,3 @@ - #include /* MATLAB include file */ #include #include /*I "petscmatlab.h" I*/ diff --git a/src/sys/classes/random/impls/rand/rand.c b/src/sys/classes/random/impls/rand/rand.c index 724e861928a..ab479841e11 100644 --- a/src/sys/classes/random/impls/rand/rand.c +++ b/src/sys/classes/random/impls/rand/rand.c @@ -1,4 +1,3 @@ - #include static PetscErrorCode PetscRandomSeed_Rand(PetscRandom r) diff --git a/src/sys/classes/random/impls/sprng/sprng.c b/src/sys/classes/random/impls/sprng/sprng.c index 5a0102de002..9794029bb6c 100644 --- a/src/sys/classes/random/impls/sprng/sprng.c +++ b/src/sys/classes/random/impls/sprng/sprng.c @@ -1,4 +1,3 @@ - #include #define USE_MPI diff --git a/src/sys/classes/random/interface/dlregisrand.c b/src/sys/classes/random/interface/dlregisrand.c index 74582bac38c..23500b1db9a 100644 --- a/src/sys/classes/random/interface/dlregisrand.c +++ b/src/sys/classes/random/interface/dlregisrand.c @@ -1,4 +1,3 @@ - #include static PetscBool PetscRandomPackageInitialized = PETSC_FALSE; diff --git a/src/sys/classes/random/interface/random.c b/src/sys/classes/random/interface/random.c index f2a1d1c5df9..eabcf3dffa5 100644 --- a/src/sys/classes/random/interface/random.c +++ b/src/sys/classes/random/interface/random.c @@ -1,4 +1,3 @@ - /* This file contains routines for interfacing to random number generators. This provides more than just an interface to some system random number diff --git a/src/sys/classes/random/interface/randomc.c b/src/sys/classes/random/interface/randomc.c index d44053b619c..53b08d0b8a6 100644 --- a/src/sys/classes/random/interface/randomc.c +++ b/src/sys/classes/random/interface/randomc.c @@ -1,4 +1,3 @@ - /* This file contains routines for interfacing to random number generators. This provides more than just an interface to some system random number diff --git a/src/sys/classes/random/interface/randreg.c b/src/sys/classes/random/interface/randreg.c index 6b6c14e8899..fb4a6af4358 100644 --- a/src/sys/classes/random/interface/randreg.c +++ b/src/sys/classes/random/interface/randreg.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ PetscFunctionList PetscRandomList = NULL; diff --git a/src/sys/classes/random/tests/ex3.c b/src/sys/classes/random/tests/ex3.c index 1b049dc94b5..dbd36dfc544 100644 --- a/src/sys/classes/random/tests/ex3.c +++ b/src/sys/classes/random/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Run Birthday Spacing Tests for PetscRandom.\n\n"; #include diff --git a/src/sys/classes/random/tutorials/ex1.c b/src/sys/classes/random/tutorials/ex1.c index 4d40d19b825..8548b8fec8b 100644 --- a/src/sys/classes/random/tutorials/ex1.c +++ b/src/sys/classes/random/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscRandom functions.\n\n"; #include diff --git a/src/sys/classes/viewer/impls/ams/ams.c b/src/sys/classes/viewer/impls/ams/ams.c index 93879a7ebb2..0c2bfb88900 100644 --- a/src/sys/classes/viewer/impls/ams/ams.c +++ b/src/sys/classes/viewer/impls/ams/ams.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/sys/classes/viewer/impls/ams/amsopen.c b/src/sys/classes/viewer/impls/ams/amsopen.c index 337135bc1c9..30a2ca9a698 100644 --- a/src/sys/classes/viewer/impls/ams/amsopen.c +++ b/src/sys/classes/viewer/impls/ams/amsopen.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" */ #include diff --git a/src/sys/classes/viewer/impls/ascii/filev.c b/src/sys/classes/viewer/impls/ascii/filev.c index b91df7c5363..f4e63ad287a 100644 --- a/src/sys/classes/viewer/impls/ascii/filev.c +++ b/src/sys/classes/viewer/impls/ascii/filev.c @@ -1,4 +1,3 @@ - #include <../src/sys/classes/viewer/impls/ascii/asciiimpl.h> /*I "petscviewer.h" I*/ #define QUEUESTRINGSIZE 8192 @@ -525,7 +524,7 @@ extern void petscfortranprinttounit_(PetscInt *, const char *, PetscErrorCode *, // PetscClangLinter pragma disable: -fdoc-synopsis-macro-explicit-synopsis-valid-header /*MC - PetscViewerASCIISetFileUnit - sets the `PETSCVIEWERASCII` to write to a Fortan IO unit + PetscViewerASCIISetFileUnit - sets the `PETSCVIEWERASCII` to write to a Fortran IO unit Synopsis: #include @@ -561,7 +560,7 @@ PETSC_EXTERN void petscviewerasciisetfileunit_(PetscViewer *lab, PetscInt *unit, // PetscClangLinter pragma disable: -fdoc-synopsis-macro-explicit-synopsis-valid-header /*MC - PetscViewerASCIIOpenWithFileUnit - opens a `PETSCVIEWERASCII` to write to a Fortan IO unit + PetscViewerASCIIOpenWithFileUnit - opens a `PETSCVIEWERASCII` to write to a Fortran IO unit Synopsis: #include diff --git a/src/sys/classes/viewer/impls/ascii/vcreatea.c b/src/sys/classes/viewer/impls/ascii/vcreatea.c index 0b4cca3ccf0..2ce92a64e56 100644 --- a/src/sys/classes/viewer/impls/ascii/vcreatea.c +++ b/src/sys/classes/viewer/impls/ascii/vcreatea.c @@ -1,4 +1,3 @@ - #include <../src/sys/classes/viewer/impls/ascii/asciiimpl.h> /*I "petscviewer.h" I*/ /* diff --git a/src/sys/classes/viewer/impls/draw/drawv.c b/src/sys/classes/viewer/impls/draw/drawv.c index b466cd7761e..09f7f940344 100644 --- a/src/sys/classes/viewer/impls/draw/drawv.c +++ b/src/sys/classes/viewer/impls/draw/drawv.c @@ -1,4 +1,3 @@ - #include <../src/sys/classes/viewer/impls/draw/vdraw.h> /*I "petscdraw.h" I*/ #include /*I "petscviewer.h" I*/ diff --git a/src/sys/classes/viewer/impls/mathematica/mathematica.c b/src/sys/classes/viewer/impls/mathematica/mathematica.c index 66a4d045d79..91fb5ad81c8 100644 --- a/src/sys/classes/viewer/impls/mathematica/mathematica.c +++ b/src/sys/classes/viewer/impls/mathematica/mathematica.c @@ -1,4 +1,3 @@ - #include /* "petscsys.h" */ #include #include <../src/mat/impls/aij/seq/aij.h> diff --git a/src/sys/classes/viewer/impls/matlab/vmatlab.c b/src/sys/classes/viewer/impls/matlab/vmatlab.c index bce92bd6bf0..640eaceb482 100644 --- a/src/sys/classes/viewer/impls/matlab/vmatlab.c +++ b/src/sys/classes/viewer/impls/matlab/vmatlab.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/sys/classes/viewer/impls/socket/send.c b/src/sys/classes/viewer/impls/socket/send.c index 3e597324ac7..78aabb3f017 100644 --- a/src/sys/classes/viewer/impls/socket/send.c +++ b/src/sys/classes/viewer/impls/socket/send.c @@ -1,4 +1,3 @@ - #include #if defined(PETSC_NEEDS_UTYPE_TYPEDEFS) diff --git a/src/sys/classes/viewer/impls/string/stringv.c b/src/sys/classes/viewer/impls/string/stringv.c index e2168d2e03c..11ec31d8cca 100644 --- a/src/sys/classes/viewer/impls/string/stringv.c +++ b/src/sys/classes/viewer/impls/string/stringv.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ typedef struct { diff --git a/src/sys/classes/viewer/impls/vu/petscvu.c b/src/sys/classes/viewer/impls/vu/petscvu.c index fce608cd894..defd1470496 100644 --- a/src/sys/classes/viewer/impls/vu/petscvu.c +++ b/src/sys/classes/viewer/impls/vu/petscvu.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #define QUEUESTRINGSIZE 1024 diff --git a/src/sys/classes/viewer/interface/dlregispetsc.c b/src/sys/classes/viewer/interface/dlregispetsc.c index 1ea7185b1a8..d858c805ae8 100644 --- a/src/sys/classes/viewer/interface/dlregispetsc.c +++ b/src/sys/classes/viewer/interface/dlregispetsc.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/sys/classes/viewer/interface/dupl.c b/src/sys/classes/viewer/interface/dupl.c index 3c3e3df5e8b..3aaf4e10d12 100644 --- a/src/sys/classes/viewer/interface/dupl.c +++ b/src/sys/classes/viewer/interface/dupl.c @@ -1,4 +1,3 @@ - #include /*I "petscviewer.h" I*/ /*@C diff --git a/src/sys/classes/viewer/interface/flush.c b/src/sys/classes/viewer/interface/flush.c index 468d92ed21e..d5c3b3891c2 100644 --- a/src/sys/classes/viewer/interface/flush.c +++ b/src/sys/classes/viewer/interface/flush.c @@ -1,4 +1,3 @@ - #include /*I "petscviewer.h" I*/ /*@C diff --git a/src/sys/classes/viewer/interface/view.c b/src/sys/classes/viewer/interface/view.c index 213d2c1fa3a..181988ce8b0 100644 --- a/src/sys/classes/viewer/interface/view.c +++ b/src/sys/classes/viewer/interface/view.c @@ -1,4 +1,3 @@ - #include /*I "petscviewer.h" I*/ #include diff --git a/src/sys/classes/viewer/interface/viewa.c b/src/sys/classes/viewer/interface/viewa.c index dfccf077ba1..cdf506d2855 100644 --- a/src/sys/classes/viewer/interface/viewa.c +++ b/src/sys/classes/viewer/interface/viewa.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ const char *const PetscViewerFormats[] = {"DEFAULT", "ASCII_MATLAB", "ASCII_MATHEMATICA", "ASCII_IMPL", "ASCII_INFO", "ASCII_INFO_DETAIL", "ASCII_COMMON", "ASCII_SYMMODU", "ASCII_INDEX", "ASCII_DENSE", "ASCII_MATRIXMARKET", "ASCII_VTK", "ASCII_VTK_CELL", "ASCII_VTK_COORDS", "ASCII_PCICE", "ASCII_PYTHON", "ASCII_FACTOR_INFO", "ASCII_LATEX", "ASCII_XML", "ASCII_FLAMEGRAPH", "ASCII_GLVIS", "ASCII_CSV", "DRAW_BASIC", "DRAW_LG", "DRAW_LG_XRANGE", "DRAW_CONTOUR", "DRAW_PORTS", "VTK_VTS", "VTK_VTR", "VTK_VTU", "BINARY_MATLAB", "NATIVE", "HDF5_PETSC", "HDF5_VIZ", "HDF5_XDMF", "HDF5_MAT", "NOFORMAT", "LOAD_BALANCE", "FAILED", "ALL", "PetscViewerFormat", "PETSC_VIEWER_", NULL}; diff --git a/src/sys/classes/viewer/interface/viewers.c b/src/sys/classes/viewer/interface/viewers.c index 716fc04ff5f..30cff09dcb5 100644 --- a/src/sys/classes/viewer/interface/viewers.c +++ b/src/sys/classes/viewer/interface/viewers.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/sys/classes/viewer/interface/viewreg.c b/src/sys/classes/viewer/interface/viewreg.c index 23677a5c4a6..9f13a114491 100644 --- a/src/sys/classes/viewer/interface/viewreg.c +++ b/src/sys/classes/viewer/interface/viewreg.c @@ -1,4 +1,3 @@ - #include /*I "petscviewer.h" I*/ #include #if defined(PETSC_HAVE_SAWS) diff --git a/src/sys/classes/viewer/interface/viewregall.c b/src/sys/classes/viewer/interface/viewregall.c index c0f46d3912e..eec5b38c5f1 100644 --- a/src/sys/classes/viewer/interface/viewregall.c +++ b/src/sys/classes/viewer/interface/viewregall.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ PETSC_EXTERN PetscErrorCode PetscViewerCreate_Socket(PetscViewer); diff --git a/src/sys/classes/viewer/tests/ex3.c b/src/sys/classes/viewer/tests/ex3.c index 4f3b7a9a7c4..53fda3d9914 100644 --- a/src/sys/classes/viewer/tests/ex3.c +++ b/src/sys/classes/viewer/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests dynamic loading of viewer.\n\n"; #include diff --git a/src/sys/classes/viewer/tests/ex4.c b/src/sys/classes/viewer/tests/ex4.c index 410b5a2b510..ad1688901b6 100644 --- a/src/sys/classes/viewer/tests/ex4.c +++ b/src/sys/classes/viewer/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscOptionsGetViewer() via checking output of PetscViewerASCIIPrintf().\n\n"; #include diff --git a/src/sys/classes/viewer/tests/ex5.c b/src/sys/classes/viewer/tests/ex5.c index d733baf3769..a516e3e4924 100644 --- a/src/sys/classes/viewer/tests/ex5.c +++ b/src/sys/classes/viewer/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscOptionsPushGetViewerOff() via checking output of PetscViewerASCIIPrintf().\n\n"; #include diff --git a/src/sys/classes/viewer/tutorials/ex1.c b/src/sys/classes/viewer/tutorials/ex1.c index e6e7570cbb2..bac811c7511 100644 --- a/src/sys/classes/viewer/tutorials/ex1.c +++ b/src/sys/classes/viewer/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Appends to an ASCII file.\n\n"; #include diff --git a/src/sys/classes/viewer/tutorials/ex1f90.F90 b/src/sys/classes/viewer/tutorials/ex1f90.F90 index 219aecdb588..ee55a3542f3 100644 --- a/src/sys/classes/viewer/tutorials/ex1f90.F90 +++ b/src/sys/classes/viewer/tutorials/ex1f90.F90 @@ -1,4 +1,3 @@ - program ex1f90 #include diff --git a/src/sys/classes/viewer/tutorials/ex2.c b/src/sys/classes/viewer/tutorials/ex2.c index 07abd8d98f0..f5a62aabb01 100644 --- a/src/sys/classes/viewer/tutorials/ex2.c +++ b/src/sys/classes/viewer/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscOptionsGetViewer().\n\n"; #include diff --git a/src/sys/dll/reg.c b/src/sys/dll/reg.c index 4eadfe85467..6f4aa280e37 100644 --- a/src/sys/dll/reg.c +++ b/src/sys/dll/reg.c @@ -1,4 +1,3 @@ - /* Provides a general mechanism to allow one to register new routines in dynamic libraries for many of the PETSc objects (including, e.g., KSP and PC). diff --git a/src/sys/error/err.c b/src/sys/error/err.c index 89e7f3970a3..2e1b1b417cc 100644 --- a/src/sys/error/err.c +++ b/src/sys/error/err.c @@ -1,4 +1,3 @@ - /* Code that allows one to set the error handlers Portions of this code are under: diff --git a/src/sys/error/errabort.c b/src/sys/error/errabort.c index 390d6b6927c..7925f8121d1 100644 --- a/src/sys/error/errabort.c +++ b/src/sys/error/errabort.c @@ -30,7 +30,7 @@ Level: developer Notes: - Ussers do not directly employ this routine + Users do not directly employ this routine Use `PetscPushErrorHandler()` to set the desired error handler. The currently available PETSc error handlers include `PetscTraceBackErrorHandler()`, diff --git a/src/sys/error/errstop.c b/src/sys/error/errstop.c index baf1a71495d..59ab3f3fc28 100644 --- a/src/sys/error/errstop.c +++ b/src/sys/error/errstop.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #include "err.h" diff --git a/src/sys/error/fp.c b/src/sys/error/fp.c index 63ff92e780d..9a0a9cbe65b 100644 --- a/src/sys/error/fp.c +++ b/src/sys/error/fp.c @@ -1,4 +1,3 @@ - /* IEEE error handler for all machines. Since each OS has enough slight differences we have completely separate codes for each one. diff --git a/src/sys/error/pstack.c b/src/sys/error/pstack.c index 382af604d1e..6d4f3b1e895 100644 --- a/src/sys/error/pstack.c +++ b/src/sys/error/pstack.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #if defined(PETSC_USE_DEBUG) && !defined(PETSC_HAVE_THREADSAFETY) diff --git a/src/sys/error/signal.c b/src/sys/error/signal.c index 51e3ae1f2a8..49ee30f35f3 100644 --- a/src/sys/error/signal.c +++ b/src/sys/error/signal.c @@ -1,4 +1,3 @@ - /* Routines to handle signals the program will receive. Usually this will call the error handlers. diff --git a/src/sys/error/tests/ex1.c b/src/sys/error/tests/ex1.c index 8db75fccfd7..62be1aff8a6 100644 --- a/src/sys/error/tests/ex1.c +++ b/src/sys/error/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests signal handling.\n\n"; #include diff --git a/src/sys/f90-mod/petscdraw.h b/src/sys/f90-mod/petscdraw.h index ea1db820115..447b5e72a03 100644 --- a/src/sys/f90-mod/petscdraw.h +++ b/src/sys/f90-mod/petscdraw.h @@ -53,4 +53,3 @@ PetscEnum, parameter :: PETSC_BUTTON_LEFT_SHIFT = 6 PetscEnum, parameter :: PETSC_BUTTON_CENTER_SHIFT = 7 PetscEnum, parameter :: PETSC_BUTTON_RIGHT_SHIFT = 8 - diff --git a/src/sys/f90-mod/petscsysmod.F90 b/src/sys/f90-mod/petscsysmod.F90 index 52b303cf1a1..2009e95e555 100644 --- a/src/sys/f90-mod/petscsysmod.F90 +++ b/src/sys/f90-mod/petscsysmod.F90 @@ -457,4 +457,3 @@ subroutine PetscSetModuleBlockNumeric(pi,maxreal,minreal,eps, & return end - diff --git a/src/sys/f90-src/fsrc/f90_fwrap.F90 b/src/sys/f90-src/fsrc/f90_fwrap.F90 index fb423cf3909..08728ad2599 100644 --- a/src/sys/f90-src/fsrc/f90_fwrap.F90 +++ b/src/sys/f90-src/fsrc/f90_fwrap.F90 @@ -568,4 +568,3 @@ subroutine F90Array4dDestroyFortranAddr(ptr) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - diff --git a/src/sys/fileio/fpath.c b/src/sys/fileio/fpath.c index 2ec3137085f..f27712a3533 100644 --- a/src/sys/fileio/fpath.c +++ b/src/sys/fileio/fpath.c @@ -1,4 +1,3 @@ - #include #if defined(PETSC_HAVE_PWD_H) #include diff --git a/src/sys/fileio/fretrieve.c b/src/sys/fileio/fretrieve.c index 1fd3cb88f29..169abd8624d 100644 --- a/src/sys/fileio/fretrieve.c +++ b/src/sys/fileio/fretrieve.c @@ -1,4 +1,3 @@ - /* Code for opening and closing files. */ diff --git a/src/sys/fileio/ftest.c b/src/sys/fileio/ftest.c index f53c1960c06..9699f25aa08 100644 --- a/src/sys/fileio/ftest.c +++ b/src/sys/fileio/ftest.c @@ -1,4 +1,3 @@ - #include #include #if defined(PETSC_HAVE_PWD_H) diff --git a/src/sys/fileio/fwd.c b/src/sys/fileio/fwd.c index 294a5945b8c..ff793835841 100644 --- a/src/sys/fileio/fwd.c +++ b/src/sys/fileio/fwd.c @@ -1,4 +1,3 @@ - /* Code for manipulating files. */ diff --git a/src/sys/fileio/ghome.c b/src/sys/fileio/ghome.c index 3bf61f7da1b..e62361a1d98 100644 --- a/src/sys/fileio/ghome.c +++ b/src/sys/fileio/ghome.c @@ -1,4 +1,3 @@ - /* Code for manipulating files. */ diff --git a/src/sys/fileio/rpath.c b/src/sys/fileio/rpath.c index 51b9da0bf3a..830ffff589c 100644 --- a/src/sys/fileio/rpath.c +++ b/src/sys/fileio/rpath.c @@ -1,4 +1,3 @@ - #include #if defined(PETSC_HAVE_PWD_H) #include diff --git a/src/sys/fileio/smatlab.c b/src/sys/fileio/smatlab.c index 2dd40001f4c..fbaccc1f366 100644 --- a/src/sys/fileio/smatlab.c +++ b/src/sys/fileio/smatlab.c @@ -1,4 +1,3 @@ - #include /*@C diff --git a/src/sys/fileio/sysio.c b/src/sys/fileio/sysio.c index 48b58789582..d097cc82b13 100644 --- a/src/sys/fileio/sysio.c +++ b/src/sys/fileio/sysio.c @@ -1,4 +1,3 @@ - /* This file contains simple binary read/write routines. */ diff --git a/src/sys/ftn-custom/zsys.c b/src/sys/ftn-custom/zsys.c index c25531e80f1..0534afc3218 100644 --- a/src/sys/ftn-custom/zsys.c +++ b/src/sys/ftn-custom/zsys.c @@ -1,4 +1,3 @@ - #include #if defined(PETSC_HAVE_FORTRAN_CAPS) diff --git a/src/sys/logging/handler/impls/default/logdefault.c b/src/sys/logging/handler/impls/default/logdefault.c index b118688f0fa..5023719b727 100644 --- a/src/sys/logging/handler/impls/default/logdefault.c +++ b/src/sys/logging/handler/impls/default/logdefault.c @@ -527,9 +527,6 @@ static PetscErrorCode PetscLogGetStageEventPerfInfo_threaded(PetscLogHandler_Def PetscFunctionReturn(PETSC_SUCCESS); } -#if defined(PETSC_HAVE_CUDA) - #include -#endif static PetscErrorCode PetscLogHandlerEventBegin_Default(PetscLogHandler h, PetscLogEvent event, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4) { PetscLogHandler_Default def = (PetscLogHandler_Default)h->data; @@ -555,14 +552,6 @@ static PetscErrorCode PetscLogHandlerEventBegin_Default(PetscLogHandler h, Petsc event_perf_info->depth++; /* Check for double counting */ if (event_perf_info->depth > 1) PetscFunctionReturn(PETSC_SUCCESS); -#if defined(PETSC_HAVE_CUDA) - if (PetscDeviceInitialized(PETSC_DEVICE_CUDA)) { - PetscLogEventInfo event_reg_info; - - PetscCall(PetscLogStateEventGetInfo(state, event, &event_reg_info)); - nvtxRangePushA(event_reg_info.name); - } -#endif PetscCall(PetscLogStateEventGetInfo(state, event, &event_info)); /* Log the performance info */ event_perf_info->count++; @@ -640,9 +629,6 @@ static PetscErrorCode PetscLogHandlerEventEnd_Default(PetscLogHandler h, PetscLo PetscCall(PetscEventPerfInfoAdd_Internal(event_perf_info, event_perf_info_global)); PetscCall(PetscSpinlockUnlock(&def->lock)); } -#if defined(PETSC_HAVE_CUDA) - if (PetscDeviceInitialized(PETSC_DEVICE_CUDA)) nvtxRangePop(); -#endif PetscFunctionReturn(PETSC_SUCCESS); } diff --git a/src/sys/logging/handler/impls/makefile b/src/sys/logging/handler/impls/makefile index 23dbb0113de..3d0b512f000 100644 --- a/src/sys/logging/handler/impls/makefile +++ b/src/sys/logging/handler/impls/makefile @@ -3,7 +3,7 @@ MANSEC = Sys SUBMANSEC = Profiling LIBBASE = libpetscsys -DIRS = default nested trace mpe perfstubs legacy +DIRS = default nested trace mpe perfstubs legacy nvtx include ${PETSC_DIR}/lib/petsc/conf/variables include ${PETSC_DIR}/lib/petsc/conf/rules.doc diff --git a/src/sys/logging/handler/impls/mpe/logmpe.c b/src/sys/logging/handler/impls/mpe/logmpe.c index d239db6a59c..0ca0e4cb4b7 100644 --- a/src/sys/logging/handler/impls/mpe/logmpe.c +++ b/src/sys/logging/handler/impls/mpe/logmpe.c @@ -116,7 +116,7 @@ static PetscErrorCode PetscLogHandlerEventEnd_MPE(PetscLogHandler handler, Petsc /*MC PETSCLOGHANDLERMPE - PETSCLOGHANDLERMPE = "mpe" - A - `PetscLogHandler` that collects data for MPE, the MPI Parallel Enviornment for + `PetscLogHandler` that collects data for MPE, the MPI Parallel Environment for performance visualization. A log handler of this type is created and started by `PetscLogMPEBegin()`. diff --git a/src/sys/logging/handler/impls/nested/lognested.c b/src/sys/logging/handler/impls/nested/lognested.c index 891b6a39b3c..6cc98c79f39 100644 --- a/src/sys/logging/handler/impls/nested/lognested.c +++ b/src/sys/logging/handler/impls/nested/lognested.c @@ -1,4 +1,3 @@ - #include #include "lognested.h" #include "xmlviewer.h" diff --git a/src/sys/logging/handler/impls/nvtx/lognvtx.c b/src/sys/logging/handler/impls/nvtx/lognvtx.c new file mode 100644 index 00000000000..91d7493708b --- /dev/null +++ b/src/sys/logging/handler/impls/nvtx/lognvtx.c @@ -0,0 +1,53 @@ +#include /*I "petscsys.h" I*/ +#include +#include +#include + +static PetscErrorCode PetscLogHandlerEventBegin_NVTX(PetscLogHandler handler, PetscLogEvent event, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4) +{ + PetscLogState state; + PetscLogEventInfo info; + + PetscFunctionBegin; + if (PetscDeviceInitialized(PETSC_DEVICE_CUDA)) { + PetscCall(PetscLogHandlerGetState(handler, &state)); + PetscCall(PetscLogStateEventGetInfo(state, event, &info)); + (void)nvtxRangePushA(info.name); + } + PetscFunctionReturn(PETSC_SUCCESS); +} + +static PetscErrorCode PetscLogHandlerEventEnd_NVTX(PetscLogHandler handler, PetscLogEvent event, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4) +{ + PetscFunctionBegin; + if (PetscDeviceInitialized(PETSC_DEVICE_CUDA)) (void)nvtxRangePop(); + PetscFunctionReturn(PETSC_SUCCESS); +} + +/*MC + PETSCLOGHANDLERNVTX - PETSCLOGHANDLERNVTX = "nvtx" - A + `PetscLogHandler` that creates an NVTX range (which appears in Nvidia Nsight + profiling) for each PETSc event. + + Options Database Keys: ++ -log_nvtx - start an nvtx log handler manually +- -log_nvtx 0 - stop the nvtx log handler from starting automatically in `PetscInitialize()` in a program run within an nsys profiling session (see Note) + + Level: developer + + Note: + If `PetscInitialize()` detects the environment variable `NSYS_PROFILING_SESSION_ID` (which is defined by `nsys + profile`) or `NVPROF_ID` (which is defined by `nvprof`) an instance of this log handler will automatically be + started. + +.seealso: [](ch_profiling), `PetscLogHandler` +M*/ + +PETSC_INTERN PetscErrorCode PetscLogHandlerCreate_NVTX(PetscLogHandler handler) +{ + PetscFunctionBegin; + handler->ops->eventbegin = PetscLogHandlerEventBegin_NVTX; + handler->ops->eventend = PetscLogHandlerEventEnd_NVTX; + PetscCall(PetscInfo(handler, "nvtx log handler created\n")); + PetscFunctionReturn(PETSC_SUCCESS); +} diff --git a/src/sys/logging/handler/impls/nvtx/makefile b/src/sys/logging/handler/impls/nvtx/makefile new file mode 100644 index 00000000000..798b6a973d7 --- /dev/null +++ b/src/sys/logging/handler/impls/nvtx/makefile @@ -0,0 +1,10 @@ +-include ../../../../../../petscdir.mk +#requirespackage 'PETSC_HAVE_CUDA' + +MANSEC = Sys +SUBMANSEC = Profiling +LIBBASE = libpetscsys + +include ${PETSC_DIR}/lib/petsc/conf/variables +include ${PETSC_DIR}/lib/petsc/conf/rules.doc + diff --git a/src/sys/logging/handler/interface/lhreg.c b/src/sys/logging/handler/interface/lhreg.c index 03124ec3445..3c9a9d23022 100644 --- a/src/sys/logging/handler/interface/lhreg.c +++ b/src/sys/logging/handler/interface/lhreg.c @@ -1,4 +1,3 @@ - #include #include @@ -18,6 +17,9 @@ PETSC_INTERN PetscErrorCode PetscLogHandlerCreate_MPE(PetscLogHandler); PETSC_INTERN PetscErrorCode PetscLogHandlerCreate_Perfstubs(PetscLogHandler); #endif PETSC_INTERN PetscErrorCode PetscLogHandlerCreate_Legacy(PetscLogHandler); +#if PetscDefined(HAVE_CUDA) +PETSC_INTERN PetscErrorCode PetscLogHandlerCreate_NVTX(PetscLogHandler); +#endif static PetscErrorCode PetscLogHandlerRegisterAll(void) { @@ -34,6 +36,9 @@ static PetscErrorCode PetscLogHandlerRegisterAll(void) PetscCall(PetscLogHandlerRegister(PETSCLOGHANDLERPERFSTUBS, PetscLogHandlerCreate_Perfstubs)); #endif PetscCall(PetscLogHandlerRegister(PETSCLOGHANDLERLEGACY, PetscLogHandlerCreate_Legacy)); +#if PetscDefined(HAVE_CUDA) + PetscCall(PetscLogHandlerRegister(PETSCLOGHANDLERNVTX, PetscLogHandlerCreate_NVTX)); +#endif PetscFunctionReturn(PETSC_SUCCESS); } diff --git a/src/sys/logging/handler/interface/loghandler.c b/src/sys/logging/handler/interface/loghandler.c index 15624c663e0..86601613781 100644 --- a/src/sys/logging/handler/interface/loghandler.c +++ b/src/sys/logging/handler/interface/loghandler.c @@ -1,4 +1,3 @@ - #include #include /*I "petscsys.h" I*/ #include @@ -658,7 +657,7 @@ PetscErrorCode PetscLogHandlerDump(PetscLogHandler handler, const char sname[]) } /*@ - PetscLogHandlerStageSetVisible - Set the visiblity of logging stage in `PetscLogHandlerView()` for a log handler + PetscLogHandlerStageSetVisible - Set the visibility of logging stage in `PetscLogHandlerView()` for a log handler Not collective @@ -685,7 +684,7 @@ PetscErrorCode PetscLogHandlerStageSetVisible(PetscLogHandler handler, PetscLogS } /*@ - PetscLogHandlerStageGetVisible - Get the visiblity of logging stage in `PetscLogHandlerView()` for a log handler + PetscLogHandlerStageGetVisible - Get the visibility of logging stage in `PetscLogHandlerView()` for a log handler Not collective diff --git a/src/sys/logging/plog.c b/src/sys/logging/plog.c index 6eb4b83dc5d..a5b8ee9d398 100644 --- a/src/sys/logging/plog.c +++ b/src/sys/logging/plog.c @@ -1,4 +1,3 @@ - /* PETSc code to log object creation and destruction and PETSc events. @@ -417,7 +416,7 @@ PETSC_UNUSED static PetscErrorCode PetscLogEventEndIsActive(PetscBool *isActive) PetscFunctionReturn(PETSC_SUCCESS); } -static PetscErrorCode PetscLogTypeBegin(PetscLogHandlerType type) +PETSC_INTERN PetscErrorCode PetscLogTypeBegin(PetscLogHandlerType type) { PetscLogHandler handler; @@ -1279,7 +1278,7 @@ PetscErrorCode PetscLogEventDeactivate(PetscLogEvent event) The event may be either a pre-defined PETSc event (found in include/petsclog.h) or an event number obtained with `PetscLogEventRegister()`). - PETSc's default log handler (`PetscLogDefaultBegin()`) respects this function because it can make the output of `PetscLogView()` easier to interpret, but other handlers (such as the nested handler, `PetscLogNestedBegin()`) ignore it because surpressing events is not helpful in their output formats. + PETSc's default log handler (`PetscLogDefaultBegin()`) respects this function because it can make the output of `PetscLogView()` easier to interpret, but other handlers (such as the nested handler, `PetscLogNestedBegin()`) ignore it because suppressing events is not helpful in their output formats. .seealso: [](ch_profiling), `PetscLogEventActivate()`, `PetscLogEVentDeactivate()`, `PetscLogEventDeactivatePop()` @*/ @@ -1458,10 +1457,10 @@ M*/ Input Parameters: + e - `PetscLogEvent` obtained from `PetscLogEventRegister()` -. o1 - object assocated with the event, or NULL -. o2 - object assocated with the event, or NULL -. o3 - object assocated with the event, or NULL -- o4 - object assocated with the event, or NULL +. o1 - object associated with the event, or `NULL` +. o2 - object associated with the event, or `NULL` +. o3 - object associated with the event, or `NULL` +- o4 - object associated with the event, or `NULL` Fortran Synopsis: void PetscLogEventBegin(int e, PetscErrorCode ierr) @@ -1500,10 +1499,10 @@ M*/ Input Parameters: + e - `PetscLogEvent` obtained from `PetscLogEventRegister()` -. o1 - object assocated with the event, or NULL -. o2 - object assocated with the event, or NULL -. o3 - object assocated with the event, or NULL -- o4 - object assocated with the event, or NULL +. o1 - object associated with the event, or `NULL` +. o2 - object associated with the event, or `NULL` +. o3 - object associated with the event, or `NULL` +- o4 - object associated with the event, or `NULL` Fortran Synopsis: void PetscLogEventEnd(int e, PetscErrorCode ierr) diff --git a/src/sys/logging/state/logregistry.c b/src/sys/logging/state/logregistry.c index 7581118c362..9d0c80eb2ac 100644 --- a/src/sys/logging/state/logregistry.c +++ b/src/sys/logging/state/logregistry.c @@ -1,4 +1,3 @@ - #include /*I "petsclog.h" I*/ #define PETSC_LOG_RESIZABLE_ARRAY_HAS_NAME(Container, Entry, Key, Equal) \ diff --git a/src/sys/logging/state/logstate.c b/src/sys/logging/state/logstate.c index 161a283bcdf..643d2089fdd 100644 --- a/src/sys/logging/state/logstate.c +++ b/src/sys/logging/state/logstate.c @@ -1,4 +1,3 @@ - #include /*I "petsclog.h" I*/ /*@ diff --git a/src/sys/logging/utils/stack.c b/src/sys/logging/utils/stack.c index b87fae53bb3..8273bb158b2 100644 --- a/src/sys/logging/utils/stack.c +++ b/src/sys/logging/utils/stack.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /*@C diff --git a/src/sys/mpiuni/f90-mod/mpiunimod.F90 b/src/sys/mpiuni/f90-mod/mpiunimod.F90 index 19f020d797f..146d823d20b 100644 --- a/src/sys/mpiuni/f90-mod/mpiunimod.F90 +++ b/src/sys/mpiuni/f90-mod/mpiunimod.F90 @@ -5,4 +5,3 @@ module mpiuni !DEC$ ATTRIBUTES DLLEXPORT::MPI_IN_PLACE #endif end module - diff --git a/src/sys/objects/destroy.c b/src/sys/objects/destroy.c index 33d8184565c..6a37961b7da 100644 --- a/src/sys/objects/destroy.c +++ b/src/sys/objects/destroy.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manulating any type of PETSc object. */ diff --git a/src/sys/objects/device/interface/dcontext.cxx b/src/sys/objects/device/interface/dcontext.cxx index 19e329e5cc1..a3adc566ed0 100644 --- a/src/sys/objects/device/interface/dcontext.cxx +++ b/src/sys/objects/device/interface/dcontext.cxx @@ -1077,7 +1077,7 @@ PetscErrorCode PetscDeviceContextViewFromOptions(PetscDeviceContext dctx, PetscO Note: This routine is dangerous. It exists only for the most experienced users and - internal PETSc developement. + internal PETSc development. There is no way for PETSc's auto-dependency system to track what the caller does with the stream. diff --git a/src/sys/objects/device/interface/petscdevice_interface_internal.hpp b/src/sys/objects/device/interface/petscdevice_interface_internal.hpp index f5941ad6efa..1c3741bb81d 100644 --- a/src/sys/objects/device/interface/petscdevice_interface_internal.hpp +++ b/src/sys/objects/device/interface/petscdevice_interface_internal.hpp @@ -8,7 +8,7 @@ #include #include // std::lower_bound -// clang's unordered_set implementaiton outperforms the flat vector implementation in all +// clang's unordered_set implementation outperforms the flat vector implementation in all // cases. GCC on the other hand only does so for n > 512, before which it is almost twice as // slow! Even when it does surpass the vector, the speedup is tiny (1.2x). So we use // unordered_set for clang and hand-rolled flat set for GCC... diff --git a/src/sys/objects/f2003-src/fsrc/optionenum.F90 b/src/sys/objects/f2003-src/fsrc/optionenum.F90 index b00c2c16a7d..a0d6162184e 100644 --- a/src/sys/objects/f2003-src/fsrc/optionenum.F90 +++ b/src/sys/objects/f2003-src/fsrc/optionenum.F90 @@ -1,4 +1,3 @@ - #include "petsc/finclude/petscsys.h" #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES) diff --git a/src/sys/objects/ftn-custom/zstartf.c b/src/sys/objects/ftn-custom/zstartf.c index 3197c05d3ff..97cf21bdd2c 100644 --- a/src/sys/objects/ftn-custom/zstartf.c +++ b/src/sys/objects/ftn-custom/zstartf.c @@ -1,4 +1,3 @@ - #include #if defined(PETSC_HAVE_FORTRAN_CAPS) diff --git a/src/sys/objects/gcomm.c b/src/sys/objects/gcomm.c index 33b5ddcfc7e..253276dc147 100644 --- a/src/sys/objects/gcomm.c +++ b/src/sys/objects/gcomm.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manulating any type of PETSc object. */ diff --git a/src/sys/objects/gcookie.c b/src/sys/objects/gcookie.c index 03c2d3d5f15..804bffa9b77 100644 --- a/src/sys/objects/gcookie.c +++ b/src/sys/objects/gcookie.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manulating any type of PETSc object. */ diff --git a/src/sys/objects/gtype.c b/src/sys/objects/gtype.c index d453b10df80..79d64d9c324 100644 --- a/src/sys/objects/gtype.c +++ b/src/sys/objects/gtype.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manulating any type of PETSc object. */ diff --git a/src/sys/objects/init.c b/src/sys/objects/init.c index 3ba1718199a..6972ed4a5db 100644 --- a/src/sys/objects/init.c +++ b/src/sys/objects/init.c @@ -513,6 +513,16 @@ PETSC_INTERN PetscErrorCode PetscOptionsCheckInitial_Private(const char help[]) PetscCall(PetscOptionsHasName(NULL, NULL, "-log_perfstubs", &flg1)); if (flg1) PetscCall(PetscLogPerfstubsBegin()); } + if (PetscDefined(USE_LOG) && PetscDefined(HAVE_CUDA)) { + char *nsys_profiling_session_id = getenv("NSYS_PROFILING_SESSION_ID"); + char *nvprof_id = getenv("NVPROF_ID"); + PetscBool start_log_nvtx = ((nsys_profiling_session_id != NULL) || (nvprof_id != NULL)) ? PETSC_TRUE : PETSC_FALSE; + + if (nsys_profiling_session_id && !PetscGlobalRank) PetscCall(PetscInfo(NULL, "Detected nsys profiling session id %s\n", nsys_profiling_session_id)); + if (nvprof_id && !PetscGlobalRank) PetscCall(PetscInfo(NULL, "Detected nvprof session id %s\n", nvprof_id)); + PetscCall(PetscOptionsGetBool(NULL, NULL, "-log_nvtx", &start_log_nvtx, NULL)); + if (start_log_nvtx) PetscCall(PetscLogTypeBegin(PETSCLOGHANDLERNVTX)); + } flg1 = PETSC_FALSE; PetscCall(PetscOptionsGetBool(NULL, NULL, "-log_all", &flg1, NULL)); PetscCall(PetscOptionsGetBool(NULL, NULL, "-log", &flg2, NULL)); @@ -605,6 +615,9 @@ PETSC_INTERN PetscErrorCode PetscOptionsCheckInitial_Private(const char help[]) #if defined(PETSC_HAVE_MPE) PetscCall((*PetscHelpPrintf)(comm, " -log_mpe: Also create logfile viewable through Jumpshot\n")); #endif + #if PetscDefined(HAVE_CUDA) + PetscCall((*PetscHelpPrintf)(comm, " -log_nvtx: Create nvtx event ranges for Nsight\n")); + #endif #endif #if defined(PETSC_USE_INFO) PetscCall((*PetscHelpPrintf)(comm, " -info [filename][:[~][:[~]self]]: print verbose information\n")); diff --git a/src/sys/objects/olist.c b/src/sys/objects/olist.c index a6927f6e0bc..b23e37a28ec 100644 --- a/src/sys/objects/olist.c +++ b/src/sys/objects/olist.c @@ -1,4 +1,3 @@ - /* Provides a general mechanism to maintain a linked list of PETSc objects. This is used to allow PETSc objects to carry a list of "composed" objects diff --git a/src/sys/objects/package.c b/src/sys/objects/package.c index 25c8dd4de45..44790b91687 100644 --- a/src/sys/objects/package.c +++ b/src/sys/objects/package.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /*@C diff --git a/src/sys/objects/pgname.c b/src/sys/objects/pgname.c index 7445afaf510..ebe40ed4519 100644 --- a/src/sys/objects/pgname.c +++ b/src/sys/objects/pgname.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /*@C diff --git a/src/sys/objects/pinit.c b/src/sys/objects/pinit.c index 4ab2793bd0c..69b3bd20157 100644 --- a/src/sys/objects/pinit.c +++ b/src/sys/objects/pinit.c @@ -446,7 +446,7 @@ PetscErrorCode PetscCitationsInitialize(void) and Jose~E. Roman and Karl Rupp and Patrick Sanan and Jason Sarich and Barry~F. Smith\n\ and Stefano Zampini and Hong Zhang and Hong Zhang and Junchao Zhang},\n\ Title = {{PETSc/TAO} Users Manual},\n\ - Number = {ANL-21/39 - Revision 3.19},\n\ + Number = {ANL-21/39 - Revision 3.20},\n\ Doi = {10.2172/1968587},\n\ Institution = {Argonne National Laboratory},\n\ Year = {2023}\n}\n", @@ -1188,6 +1188,7 @@ PETSC_INTERN PetscErrorCode PetscInitialize_Common(const char *prog, const char . -log_all [filename] - Same as `-log`. . -log_mpe [filename] - Creates a logfile viewable by the utility Jumpshot (in MPICH distribution) . -log_perfstubs - Starts a log handler with the perfstubs interface (which is used by TAU) +. -log_nvtx - Starts an nvtx log handler for use with Nsight . -viewfromoptions on,off - Enable or disable `XXXSetFromOptions()` calls, for applications with many small solves turn this off - -check_pointer_intensity 0,1,2 - if pointers are checked for validity (debug version only), using 0 will result in faster code diff --git a/src/sys/objects/pname.c b/src/sys/objects/pname.c index f4b3fcd6ed7..96c06514e4c 100644 --- a/src/sys/objects/pname.c +++ b/src/sys/objects/pname.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #include diff --git a/src/sys/objects/prefix.c b/src/sys/objects/prefix.c index 22ff374e1c1..1c8121c4af5 100644 --- a/src/sys/objects/prefix.c +++ b/src/sys/objects/prefix.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manulating any type of PETSc object. */ diff --git a/src/sys/objects/ptype.c b/src/sys/objects/ptype.c index 0e2b4da6f9b..2899400c2e6 100644 --- a/src/sys/objects/ptype.c +++ b/src/sys/objects/ptype.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manipulating any type of PETSc object. */ diff --git a/src/sys/objects/state.c b/src/sys/objects/state.c index e36423d080c..29cc7fff2d7 100644 --- a/src/sys/objects/state.c +++ b/src/sys/objects/state.c @@ -1,4 +1,3 @@ - /* Provides utility routines for manulating any type of PETSc object. */ diff --git a/src/sys/objects/subcomm.c b/src/sys/objects/subcomm.c index 8827ee85daa..b74dd00faa6 100644 --- a/src/sys/objects/subcomm.c +++ b/src/sys/objects/subcomm.c @@ -1,4 +1,3 @@ - /* Provides utility routines for split MPI communicator. */ diff --git a/src/sys/perfstubs/config.h b/src/sys/perfstubs/config.h index d2913723bab..641167e73f2 100644 --- a/src/sys/perfstubs/config.h +++ b/src/sys/perfstubs/config.h @@ -7,4 +7,3 @@ // #define PERFSTUBS_USE_TIMERS #define PERFSTUBS_USE_DEFAULT_IMPLEMENTATION /* #undef PERFSTUBS_USE_STATIC */ - diff --git a/src/sys/perfstubs/timer_f.h b/src/sys/perfstubs/timer_f.h index 8ff0b149b06..730b6bc400e 100644 --- a/src/sys/perfstubs/timer_f.h +++ b/src/sys/perfstubs/timer_f.h @@ -53,4 +53,3 @@ ! // defined(PERFSTUBS_USE_TIMERS) #endif - diff --git a/src/sys/perfstubs/tool.h b/src/sys/perfstubs/tool.h index 918c589990d..9f977055504 100644 --- a/src/sys/perfstubs/tool.h +++ b/src/sys/perfstubs/tool.h @@ -119,4 +119,3 @@ extern void ps_deregister_tool(int tool_id); } #endif - diff --git a/src/sys/tests/ex1.c b/src/sys/tests/ex1.c index 2d75a448df6..2dc22b5c5f4 100644 --- a/src/sys/tests/ex1.c +++ b/src/sys/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PETSc error handlers.\n"; #include diff --git a/src/sys/tests/ex10.c b/src/sys/tests/ex10.c index 0351d676d43..ca378b7555c 100644 --- a/src/sys/tests/ex10.c +++ b/src/sys/tests/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscArraymove()/PetscMemmove()\n"; #include diff --git a/src/sys/tests/ex11.c b/src/sys/tests/ex11.c index d445b19d169..57d845353d1 100644 --- a/src/sys/tests/ex11.c +++ b/src/sys/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscSynchronizedPrintf() and PetscSynchronizedFPrintf().\n\n"; #include diff --git a/src/sys/tests/ex12.c b/src/sys/tests/ex12.c index 0bd24510d6a..c31d248efc6 100644 --- a/src/sys/tests/ex12.c +++ b/src/sys/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Tests timing PetscSortInt().\n\n"; #include diff --git a/src/sys/tests/ex14.c b/src/sys/tests/ex14.c index 87e57cf046f..87876b7af47 100644 --- a/src/sys/tests/ex14.c +++ b/src/sys/tests/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscOptionsGetScalar(), PetscOptionsScalarArray() for complex numbers\n"; #include diff --git a/src/sys/tests/ex16.c b/src/sys/tests/ex16.c index 056701d5671..927b626b3c2 100644 --- a/src/sys/tests/ex16.c +++ b/src/sys/tests/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscMatlabEngineXXX()\n"; #include diff --git a/src/sys/tests/ex17.c b/src/sys/tests/ex17.c index b293f803922..fae73c802c3 100644 --- a/src/sys/tests/ex17.c +++ b/src/sys/tests/ex17.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscFOpens() and PetscSynchronizedFGets().\n\n"; #include diff --git a/src/sys/tests/ex18.c b/src/sys/tests/ex18.c index 8405f84ab54..b0d95c3d63f 100644 --- a/src/sys/tests/ex18.c +++ b/src/sys/tests/ex18.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscContainerCreate() and PetscContainerDestroy().\n\n"; #include diff --git a/src/sys/tests/ex19.c b/src/sys/tests/ex19.c index 856503c35b1..9cb20d91a53 100644 --- a/src/sys/tests/ex19.c +++ b/src/sys/tests/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Tests string options with spaces"; #include diff --git a/src/sys/tests/ex2.c b/src/sys/tests/ex2.c index b11da395d53..d11ebbec2b3 100644 --- a/src/sys/tests/ex2.c +++ b/src/sys/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the signal handler.\n"; #include diff --git a/src/sys/tests/ex21.c b/src/sys/tests/ex21.c index b1095ecaa51..1ee186d16bb 100644 --- a/src/sys/tests/ex21.c +++ b/src/sys/tests/ex21.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscTreeProcess()"; #include diff --git a/src/sys/tests/ex23.c b/src/sys/tests/ex23.c index 85e30b59a67..77213f9b675 100644 --- a/src/sys/tests/ex23.c +++ b/src/sys/tests/ex23.c @@ -1,4 +1,3 @@ - static char help[] = "Tests string options with spaces"; #include diff --git a/src/sys/tests/ex27.c b/src/sys/tests/ex27.c index 2d2dd286ca2..81934daa4ee 100644 --- a/src/sys/tests/ex27.c +++ b/src/sys/tests/ex27.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscMergeIntArray\n"; #include diff --git a/src/sys/tests/ex28.c b/src/sys/tests/ex28.c index 507472ec015..5c7f8d1a545 100644 --- a/src/sys/tests/ex28.c +++ b/src/sys/tests/ex28.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscAtan2Real\n"; #include diff --git a/src/sys/tests/ex29.c b/src/sys/tests/ex29.c index 840e85ae1c9..1a62e8531b8 100644 --- a/src/sys/tests/ex29.c +++ b/src/sys/tests/ex29.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscInt64Mult()\n"; #include diff --git a/src/sys/tests/ex3.c b/src/sys/tests/ex3.c index be997b7d143..6b1cbb83a47 100644 --- a/src/sys/tests/ex3.c +++ b/src/sys/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests catching of floating point exceptions.\n\n"; #include diff --git a/src/sys/tests/ex30.c b/src/sys/tests/ex30.c index 43e67346c03..0233e85f797 100644 --- a/src/sys/tests/ex30.c +++ b/src/sys/tests/ex30.c @@ -1,4 +1,3 @@ - static char help[] = "Tests several PetscLogHandler implementations.\n\n"; #include @@ -227,4 +226,10 @@ int main(int argc, char **argv) temporaries: trace.log filter: cat trace.log.0 + # test -log_nvtx + test: + suffix: 10 + requires: cuda defined(PETSC_USE_LOG) + args: -device_enable eager -log_nvtx -info :loghandler + TEST*/ diff --git a/src/sys/tests/ex31.c b/src/sys/tests/ex31.c index f321a9f896e..7d884732078 100644 --- a/src/sys/tests/ex31.c +++ b/src/sys/tests/ex31.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscGetFullPath().\n\n"; #include diff --git a/src/sys/tests/ex32.c b/src/sys/tests/ex32.c index 6172060eba6..20155d495a7 100644 --- a/src/sys/tests/ex32.c +++ b/src/sys/tests/ex32.c @@ -1,4 +1,3 @@ - static char help[] = "Tests deletion of mixed case options"; #include diff --git a/src/sys/tests/ex37.c b/src/sys/tests/ex37.c index d3429aa48e3..7b34feb4f6a 100644 --- a/src/sys/tests/ex37.c +++ b/src/sys/tests/ex37.c @@ -1,4 +1,3 @@ - static char help[] = "Test PetscFormatConvertGetSize().\n"; #include diff --git a/src/sys/tests/ex44.cxx b/src/sys/tests/ex44.cxx index 8d73eb9722d..e87001f78f0 100644 --- a/src/sys/tests/ex44.cxx +++ b/src/sys/tests/ex44.cxx @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates call PETSc and Chombo in the same program.\n\n"; #include diff --git a/src/sys/tests/ex45.cxx b/src/sys/tests/ex45.cxx index 9efab595ba5..98686b39985 100644 --- a/src/sys/tests/ex45.cxx +++ b/src/sys/tests/ex45.cxx @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates call PETSc first and then Trilinos in the same program.\n\n"; /* diff --git a/src/sys/tests/ex46.cxx b/src/sys/tests/ex46.cxx index 93e82a757dc..4ef1823d07f 100644 --- a/src/sys/tests/ex46.cxx +++ b/src/sys/tests/ex46.cxx @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates calling Trilinos and then PETSc in the same program.\n\n"; /* diff --git a/src/sys/tests/ex49.c b/src/sys/tests/ex49.c index 9f2289f96e9..f6e2b856b1c 100644 --- a/src/sys/tests/ex49.c +++ b/src/sys/tests/ex49.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscDataTypeFromString().\n\n"; #include diff --git a/src/sys/tests/ex5.c b/src/sys/tests/ex5.c index c6821a369b4..218caeee703 100644 --- a/src/sys/tests/ex5.c +++ b/src/sys/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests retrieving unused PETSc options.\n\n"; #include diff --git a/src/sys/tests/ex50.c b/src/sys/tests/ex50.c index 452b00dc570..a4baff26804 100644 --- a/src/sys/tests/ex50.c +++ b/src/sys/tests/ex50.c @@ -1,4 +1,3 @@ - static char help[] = "Tests using PetscViewerGetSubViewer() recursively\n\n"; #include diff --git a/src/sys/tests/ex51.c b/src/sys/tests/ex51.c index 03385f3edde..fa9f5b6752f 100644 --- a/src/sys/tests/ex51.c +++ b/src/sys/tests/ex51.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscFileRetrieve().\n\n"; #include @@ -6,7 +5,7 @@ int main(int argc, char **argv) { PetscBool found; char localname[PETSC_MAX_PATH_LEN]; - const char url[] = "https://www.mcs.anl.gov/petsc/index.html"; + const char url[] = "https://web.cels.anl.gov/projects/petsc/download/datafiles/matrices/tiny"; /* Every PETSc routine should begin with the PetscInitialize() routine. diff --git a/src/sys/tests/ex54.c b/src/sys/tests/ex54.c index 4b591e8825b..2c175db3b6d 100644 --- a/src/sys/tests/ex54.c +++ b/src/sys/tests/ex54.c @@ -1,4 +1,3 @@ - static char help[] = "Tests options file parsing.\n\n"; #include diff --git a/src/sys/tests/ex56.c b/src/sys/tests/ex56.c index 133ea95df14..9eca3c2cfb1 100644 --- a/src/sys/tests/ex56.c +++ b/src/sys/tests/ex56.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscHasExternalPackage().\n\n"; #include diff --git a/src/sys/tests/ex57.c b/src/sys/tests/ex57.c index e87aabe2e06..3d0313ed7d1 100644 --- a/src/sys/tests/ex57.c +++ b/src/sys/tests/ex57.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscCommGetComm().\n"; #include diff --git a/src/sys/tests/ex58.c b/src/sys/tests/ex58.c index 256545c7085..588e1ab2d84 100644 --- a/src/sys/tests/ex58.c +++ b/src/sys/tests/ex58.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscGlobalMinMax\n\n"; #include diff --git a/src/sys/tests/ex59.c b/src/sys/tests/ex59.c index da70a34a0fd..03d3a5ef956 100644 --- a/src/sys/tests/ex59.c +++ b/src/sys/tests/ex59.c @@ -1,4 +1,3 @@ - static char help[] = "Tests not trapping an underflow\n\n"; #include diff --git a/src/sys/tests/ex62.c b/src/sys/tests/ex62.c index 57e8db3b4b4..bdeb5de1772 100644 --- a/src/sys/tests/ex62.c +++ b/src/sys/tests/ex62.c @@ -1,4 +1,3 @@ - static char help[] = "Tests `PetscGarbageKeySortedIntersect()`\n\n"; #include diff --git a/src/sys/tests/ex63.c b/src/sys/tests/ex63.c index b7f3619f8b1..3f9eb1cc198 100644 --- a/src/sys/tests/ex63.c +++ b/src/sys/tests/ex63.c @@ -1,4 +1,3 @@ - static char help[] = "Tests `GarbageKeyAllReduceIntersect_Private()` in parallel\n\n"; #include diff --git a/src/sys/tests/ex68.c b/src/sys/tests/ex68.c index 3a83a8167ae..a6ddcf3f5d7 100644 --- a/src/sys/tests/ex68.c +++ b/src/sys/tests/ex68.c @@ -28,12 +28,12 @@ int main(int argc, char **argv) /* This test simulates a program with unrelated logging stages and events that has to "stop the world" to lazily initialize a runtime. - - Pausing events should send the log data for the runtime initalization + - Pausing events should send the log data for the runtime initialization to the Main Stage - Turning the Main Stage invisible should hide it from -log_view - So the runtime intialization should be more or less missing from -log_view. */ + So the runtime initialization should be more or less missing from -log_view. */ PetscCall(PetscClassIdRegister("External runtime", &runtime_classid)); PetscCall(PetscLogEventRegister("External runtime initialization", runtime_classid, &runtime_event)); diff --git a/src/sys/tests/ex7.c b/src/sys/tests/ex7.c index 921ee8a8f13..4a6cc39084f 100644 --- a/src/sys/tests/ex7.c +++ b/src/sys/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscSortIntWithPermutation().\n\n"; #include diff --git a/src/sys/tests/ex70.c b/src/sys/tests/ex70.c index b0f08f788de..9b57f693684 100644 --- a/src/sys/tests/ex70.c +++ b/src/sys/tests/ex70.c @@ -1,4 +1,3 @@ - static char help[] = "Error handling for destroying PETSC_VIEWER_STDOUT_SELF.\n"; #include diff --git a/src/sys/tests/ex9.c b/src/sys/tests/ex9.c index 9a14af6dd6f..00bba78b080 100644 --- a/src/sys/tests/ex9.c +++ b/src/sys/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscSequentialPhaseBegin() and PetscSequentialPhaseEnd()\n"; #include diff --git a/src/sys/tests/options/ex55.c b/src/sys/tests/options/ex55.c index afb6fca8a37..a82348c8369 100644 --- a/src/sys/tests/options/ex55.c +++ b/src/sys/tests/options/ex55.c @@ -1,4 +1,3 @@ - static char help[] = "Tests options database monitoring and precedence.\n\n"; #include diff --git a/src/sys/tests/output/ex30_10.out b/src/sys/tests/output/ex30_10.out new file mode 100644 index 00000000000..e2ca292cf8d --- /dev/null +++ b/src/sys/tests/output/ex30_10.out @@ -0,0 +1 @@ +[0] PetscLogHandlerCreate_NVTX(): nvtx log handler created diff --git a/src/sys/tests/output/ex51_1.out b/src/sys/tests/output/ex51_1.out index 89f1e2b82ee..615af83cb1b 100644 --- a/src/sys/tests/output/ex51_1.out +++ b/src/sys/tests/output/ex51_1.out @@ -1 +1 @@ -Successfully download file index.html +Successfully download file tiny diff --git a/src/sys/time/cputime.c b/src/sys/time/cputime.c index ce2d94d809c..403ebe4b3ae 100644 --- a/src/sys/time/cputime.c +++ b/src/sys/time/cputime.c @@ -1,4 +1,3 @@ - /* This is to allow one to measure CPU time usage of their job, NOT real time usage. Do not use this for reported timings, speedup etc. diff --git a/src/sys/time/fdate.c b/src/sys/time/fdate.c index e901cc1ccd7..819f9ad2742 100644 --- a/src/sys/time/fdate.c +++ b/src/sys/time/fdate.c @@ -1,4 +1,3 @@ - #include #if defined(PETSC_HAVE_SYS_TIME_H) #include diff --git a/src/sys/tutorials/ex1.c b/src/sys/tutorials/ex1.c index 07dd18b36bf..7bdfbd21bb3 100644 --- a/src/sys/tutorials/ex1.c +++ b/src/sys/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Introductory example that illustrates printing.\n\n"; #include diff --git a/src/sys/tutorials/ex16.c b/src/sys/tutorials/ex16.c index 42c722312c9..89bc5d42a86 100644 --- a/src/sys/tutorials/ex16.c +++ b/src/sys/tutorials/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Tests calling PetscOptionsSetValue() before PetscInitialize()\n\n"; #include diff --git a/src/sys/tutorials/ex17.c b/src/sys/tutorials/ex17.c index b766523b88f..7a590452583 100644 --- a/src/sys/tutorials/ex17.c +++ b/src/sys/tutorials/ex17.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscGetVersonNumber().\n\n"; #include diff --git a/src/sys/tutorials/ex19.c b/src/sys/tutorials/ex19.c index 6071c0d9634..cea47821c83 100644 --- a/src/sys/tutorials/ex19.c +++ b/src/sys/tutorials/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Illustrates creating an options database.\n\n"; #include diff --git a/src/sys/tutorials/ex2.c b/src/sys/tutorials/ex2.c index befefcf4ca2..6d89cdbf4d6 100644 --- a/src/sys/tutorials/ex2.c +++ b/src/sys/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Synchronized printing.\n\n"; #include diff --git a/src/sys/tutorials/ex20.c b/src/sys/tutorials/ex20.c index 401308266ae..fd2c6c021c5 100644 --- a/src/sys/tutorials/ex20.c +++ b/src/sys/tutorials/ex20.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates PetscOptionsPush()/PetscOptionsPop().\n\n"; #include diff --git a/src/sys/tutorials/ex3.c b/src/sys/tutorials/ex3.c index b54c2b04a86..a72c8189b5e 100644 --- a/src/sys/tutorials/ex3.c +++ b/src/sys/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Augmenting PETSc profiling by add events.\n\ Run this program with one of the\n\ following options to generate logging information: -log, -log_view,\n\ diff --git a/src/sys/tutorials/ex5.c b/src/sys/tutorials/ex5.c index 12092badd32..c78b3f0c596 100644 --- a/src/sys/tutorials/ex5.c +++ b/src/sys/tutorials/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates using the PetscBag Object\n\n"; #include diff --git a/src/sys/tutorials/ex5f90.F90 b/src/sys/tutorials/ex5f90.F90 index 42d6bcfa37a..cc0133a0574 100644 --- a/src/sys/tutorials/ex5f90.F90 +++ b/src/sys/tutorials/ex5f90.F90 @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/sys/utils/arch.c b/src/sys/utils/arch.c index 74531fdb1b0..ca3821a1d5d 100644 --- a/src/sys/utils/arch.c +++ b/src/sys/utils/arch.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /*@C diff --git a/src/sys/utils/ctable.c b/src/sys/utils/ctable.c index 0ade2e5818e..6b94b1c8652 100644 --- a/src/sys/utils/ctable.c +++ b/src/sys/utils/ctable.c @@ -1,4 +1,3 @@ - /* Contributed by - Mark Adams */ #define PETSC_SKIP_PETSCTABLE_DEPRECATION_WARNING diff --git a/src/sys/utils/ftn-kernels/fcopy.F90 b/src/sys/utils/ftn-kernels/fcopy.F90 index 67d781b110e..2ec9b15eb01 100644 --- a/src/sys/utils/ftn-kernels/fcopy.F90 +++ b/src/sys/utils/ftn-kernels/fcopy.F90 @@ -28,4 +28,3 @@ subroutine FortranZero(n,x) 10 continue return end - diff --git a/src/sys/utils/fuser.c b/src/sys/utils/fuser.c index 26401b024b2..bb19a336198 100644 --- a/src/sys/utils/fuser.c +++ b/src/sys/utils/fuser.c @@ -1,4 +1,3 @@ - /* Code for manipulating files. */ diff --git a/src/sys/utils/memc.c b/src/sys/utils/memc.c index 1703c7ba7dc..2045a7b77d8 100644 --- a/src/sys/utils/memc.c +++ b/src/sys/utils/memc.c @@ -1,4 +1,3 @@ - /* We define the memory operations here. The reason we just do not use the standard memory routines in the PETSc code is that on some machines diff --git a/src/sys/utils/mpilong.c b/src/sys/utils/mpilong.c index 8fcc83034c4..4fae54c68c0 100644 --- a/src/sys/utils/mpilong.c +++ b/src/sys/utils/mpilong.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /* diff --git a/src/sys/utils/mpimesg.c b/src/sys/utils/mpimesg.c index 80f8edb15c5..13d6a20dc01 100644 --- a/src/sys/utils/mpimesg.c +++ b/src/sys/utils/mpimesg.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #include diff --git a/src/sys/utils/mpitr.c b/src/sys/utils/mpitr.c index 52d3d7d005b..efef65d558f 100644 --- a/src/sys/utils/mpitr.c +++ b/src/sys/utils/mpitr.c @@ -1,4 +1,3 @@ - /* Code for tracing mistakes in MPI usage. For example, sends that are never received, nonblocking messages that are not correctly waited for, etc. diff --git a/src/sys/utils/mpiu.c b/src/sys/utils/mpiu.c index 2cdf5ce9073..93290f4e207 100644 --- a/src/sys/utils/mpiu.c +++ b/src/sys/utils/mpiu.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #include /* diff --git a/src/sys/utils/pbarrier.c b/src/sys/utils/pbarrier.c index 335adf4c611..89a0f10a5f8 100644 --- a/src/sys/utils/pbarrier.c +++ b/src/sys/utils/pbarrier.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /* Logging support */ diff --git a/src/sys/utils/pdisplay.c b/src/sys/utils/pdisplay.c index d2d589925fe..d398f589896 100644 --- a/src/sys/utils/pdisplay.c +++ b/src/sys/utils/pdisplay.c @@ -1,4 +1,3 @@ - #include /*@C diff --git a/src/sys/utils/psplit.c b/src/sys/utils/psplit.c index d67f43aa8ea..65cc3970f08 100644 --- a/src/sys/utils/psplit.c +++ b/src/sys/utils/psplit.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ /*@ diff --git a/src/sys/utils/sortd.c b/src/sys/utils/sortd.c index 8dba07481a0..5de47e17272 100644 --- a/src/sys/utils/sortd.c +++ b/src/sys/utils/sortd.c @@ -1,4 +1,3 @@ - /* This file contains routines for sorting doubles. Values are sorted in place. These are provided because the general sort routines incur a great deal diff --git a/src/sys/utils/sorti.c b/src/sys/utils/sorti.c index 4e76685d534..462fdd36dc4 100644 --- a/src/sys/utils/sorti.c +++ b/src/sys/utils/sorti.c @@ -1,4 +1,3 @@ - /* This file contains routines for sorting integers. Values are sorted in place. One can use src/sys/tests/ex52.c for benchmarking. diff --git a/src/sys/utils/sortip.c b/src/sys/utils/sortip.c index 35816533ae2..9c929ccae82 100644 --- a/src/sys/utils/sortip.c +++ b/src/sys/utils/sortip.c @@ -1,4 +1,3 @@ - /* This file contains routines for sorting integers and doubles with a permutation array. diff --git a/src/sys/utils/sseenabled.c b/src/sys/utils/sseenabled.c index 5988c8a7961..002b21d077e 100644 --- a/src/sys/utils/sseenabled.c +++ b/src/sys/utils/sseenabled.c @@ -1,4 +1,3 @@ - #include /*I "petscsys.h" I*/ #if defined(PETSC_HAVE_SSE) diff --git a/src/sys/webclient/box.c b/src/sys/webclient/box.c index 48dd150d2d9..2ee825680e2 100644 --- a/src/sys/webclient/box.c +++ b/src/sys/webclient/box.c @@ -1,4 +1,3 @@ - #include PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN("-Wdeprecated-declarations") diff --git a/src/sys/webclient/client.c b/src/sys/webclient/client.c index 94500978e0a..1b1866880c3 100644 --- a/src/sys/webclient/client.c +++ b/src/sys/webclient/client.c @@ -1,4 +1,3 @@ - #include PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN("-Wdeprecated-declarations") diff --git a/src/sys/webclient/google.c b/src/sys/webclient/google.c index e221cb24738..26cf374896b 100644 --- a/src/sys/webclient/google.c +++ b/src/sys/webclient/google.c @@ -1,4 +1,3 @@ - #include PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN("-Wdeprecated-declarations") diff --git a/src/sys/webclient/tutorials/boxobtainrefreshtoken.c b/src/sys/webclient/tutorials/boxobtainrefreshtoken.c index a251b848c4f..2a7c8644e85 100644 --- a/src/sys/webclient/tutorials/boxobtainrefreshtoken.c +++ b/src/sys/webclient/tutorials/boxobtainrefreshtoken.c @@ -1,4 +1,3 @@ - /* Obtains a refresh token that you can use in the future to access Box from PETSc code diff --git a/src/sys/webclient/tutorials/boxupload.c b/src/sys/webclient/tutorials/boxupload.c index b2011371bcf..078670f81c2 100644 --- a/src/sys/webclient/tutorials/boxupload.c +++ b/src/sys/webclient/tutorials/boxupload.c @@ -1,4 +1,3 @@ - /* Run with -box_refresh_token XXX to allow access to Box or else it will prompt you to enter log in information for Box. diff --git a/src/sys/webclient/tutorials/globusobtaintransfers.c b/src/sys/webclient/tutorials/globusobtaintransfers.c index 8809ed6aac1..c7320d6cfe6 100644 --- a/src/sys/webclient/tutorials/globusobtaintransfers.c +++ b/src/sys/webclient/tutorials/globusobtaintransfers.c @@ -1,4 +1,3 @@ - /* Shows any outstanding Globus file requests diff --git a/src/sys/webclient/tutorials/googledriveupload.c b/src/sys/webclient/tutorials/googledriveupload.c index cfbbd415caf..9d79f08ddcb 100644 --- a/src/sys/webclient/tutorials/googledriveupload.c +++ b/src/sys/webclient/tutorials/googledriveupload.c @@ -1,4 +1,3 @@ - /* Run with -google_refresh_token XXX to allow access to your Google Drive or else it will prompt you to enter log in information for Google Drive. */ diff --git a/src/sys/webclient/tutorials/googleobtainrefreshtoken.c b/src/sys/webclient/tutorials/googleobtainrefreshtoken.c index 626862e72d7..bcf44778f53 100644 --- a/src/sys/webclient/tutorials/googleobtainrefreshtoken.c +++ b/src/sys/webclient/tutorials/googleobtainrefreshtoken.c @@ -1,4 +1,3 @@ - /* Obtains a refresh token that you can use in the future to access Google Drive from PETSc code diff --git a/src/tao/constrained/tutorials/ex1.c b/src/tao/constrained/tutorials/ex1.c index b6f8e4cef34..c5b1a9388f3 100644 --- a/src/tao/constrained/tutorials/ex1.c +++ b/src/tao/constrained/tutorials/ex1.c @@ -208,7 +208,7 @@ PetscErrorCode InitializeProblem(AppCtx *user) PetscCall(VecSetFromOptions(user->ci)); PetscCall(VecSetUp(user->ci)); - /* nexn & nixn matricies for equally and inequalty constraints */ + /* nexn & nixn matrices for equally and inequalty constraints */ if (!user->noeqflag) { PetscCall(MatCreate(PETSC_COMM_WORLD, &user->Ae)); PetscCall(MatSetSizes(user->Ae, neloc, nloc, user->ne, user->n)); diff --git a/src/tao/f90-mod/petsctaomod.F90 b/src/tao/f90-mod/petsctaomod.F90 index 8e95aed7ab6..571c44e52fd 100644 --- a/src/tao/f90-mod/petsctaomod.F90 +++ b/src/tao/f90-mod/petsctaomod.F90 @@ -1,4 +1,3 @@ - module petsctaodef use petsckspdef #include <../src/tao/f90-mod/petsctao.h> diff --git a/src/tao/linesearch/impls/morethuente/morethuente.c b/src/tao/linesearch/impls/morethuente/morethuente.c index b5cbc9c62fe..bba1ced2180 100644 --- a/src/tao/linesearch/impls/morethuente/morethuente.c +++ b/src/tao/linesearch/impls/morethuente/morethuente.c @@ -1,4 +1,3 @@ - #include #include <../src/tao/linesearch/impls/morethuente/morethuente.h> diff --git a/src/tao/linesearch/impls/owarmijo/owarmijo.c b/src/tao/linesearch/impls/owarmijo/owarmijo.c index ec9e0a38ffc..ed23221af59 100644 --- a/src/tao/linesearch/impls/owarmijo/owarmijo.c +++ b/src/tao/linesearch/impls/owarmijo/owarmijo.c @@ -1,4 +1,3 @@ - #include #include <../src/tao/linesearch/impls/owarmijo/owarmijo.h> diff --git a/src/tao/linesearch/impls/unit/unit.c b/src/tao/linesearch/impls/unit/unit.c index 8937dd2d837..93aa0964154 100644 --- a/src/tao/linesearch/impls/unit/unit.c +++ b/src/tao/linesearch/impls/unit/unit.c @@ -1,4 +1,3 @@ - #include static PetscErrorCode TaoLineSearchDestroy_Unit(TaoLineSearch ls) diff --git a/src/tao/unconstrained/tutorials/burgers_spectral.c b/src/tao/unconstrained/tutorials/burgers_spectral.c index c6059ef0097..87a0519387d 100644 --- a/src/tao/unconstrained/tutorials/burgers_spectral.c +++ b/src/tao/unconstrained/tutorials/burgers_spectral.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a simple data assimilation problem with one dimensional Burger's equation using TSAdjoint\n\n"; /* diff --git a/src/tao/unconstrained/tutorials/spectraladjointassimilation.c b/src/tao/unconstrained/tutorials/spectraladjointassimilation.c index 1f94fd19766..06a53f2385a 100644 --- a/src/tao/unconstrained/tutorials/spectraladjointassimilation.c +++ b/src/tao/unconstrained/tutorials/spectraladjointassimilation.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a simple data assimilation problem with one dimensional advection diffusion equation using TSAdjoint\n\n"; /* diff --git a/src/ts/adapt/interface/tsadapt.c b/src/ts/adapt/interface/tsadapt.c index 57d2a60c945..f20487e491d 100644 --- a/src/ts/adapt/interface/tsadapt.c +++ b/src/ts/adapt/interface/tsadapt.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ PetscClassId TSADAPT_CLASSID; diff --git a/src/ts/characteristic/interface/characteristic.c b/src/ts/characteristic/interface/characteristic.c index 4df83284988..55d24d90431 100644 --- a/src/ts/characteristic/interface/characteristic.c +++ b/src/ts/characteristic/interface/characteristic.c @@ -1,4 +1,3 @@ - #include /*I "petsccharacteristic.h" I*/ #include #include diff --git a/src/ts/f90-mod/petscts.h b/src/ts/f90-mod/petscts.h index 6dbdc8da129..a539342216d 100644 --- a/src/ts/f90-mod/petscts.h +++ b/src/ts/f90-mod/petscts.h @@ -71,4 +71,3 @@ external TSCOMPUTERHSJACOBIANCONSTANT external TSCOMPUTEIFUNCTIONLINEAR external TSCOMPUTEIJACOBIANCONSTANT - diff --git a/src/ts/f90-mod/petsctsmod.F90 b/src/ts/f90-mod/petsctsmod.F90 index fb685ddaa17..d7f69057989 100644 --- a/src/ts/f90-mod/petsctsmod.F90 +++ b/src/ts/f90-mod/petsctsmod.F90 @@ -1,4 +1,3 @@ - module petsctsdefdummy use petscsnesdef #include <../src/ts/f90-mod/petscts.h> @@ -93,4 +92,3 @@ module petscts #include <../src/ts/f90-mod/ftn-auto-interfaces/petscsensitivity.h90> end interface end module - diff --git a/src/ts/impls/eimex/eimex.c b/src/ts/impls/eimex/eimex.c index 89efb2f7a53..c25df2c3ebb 100644 --- a/src/ts/impls/eimex/eimex.c +++ b/src/ts/impls/eimex/eimex.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ #include diff --git a/src/ts/impls/implicit/glle/glle.c b/src/ts/impls/implicit/glle/glle.c index b0d7fc80085..f9ceba4f2f0 100644 --- a/src/ts/impls/implicit/glle/glle.c +++ b/src/ts/impls/implicit/glle/glle.c @@ -1,4 +1,3 @@ - #include <../src/ts/impls/implicit/glle/glle.h> /*I "petscts.h" I*/ #include #include diff --git a/src/ts/impls/implicit/glle/glleadapt.c b/src/ts/impls/implicit/glle/glleadapt.c index 9c649cea730..f7b01dd1daf 100644 --- a/src/ts/impls/implicit/glle/glleadapt.c +++ b/src/ts/impls/implicit/glle/glleadapt.c @@ -1,4 +1,3 @@ - #include <../src/ts/impls/implicit/glle/glle.h> /*I "petscts.h" I*/ static PetscFunctionList TSGLLEAdaptList; diff --git a/src/ts/interface/sensitivity/tssen.c b/src/ts/interface/sensitivity/tssen.c index 895d75bbd70..28dccd8601e 100644 --- a/src/ts/interface/sensitivity/tssen.c +++ b/src/ts/interface/sensitivity/tssen.c @@ -937,7 +937,7 @@ PetscErrorCode TSGetCostHessianProducts(TS ts, PetscInt *numcost, Vec **lambda2, Level: intermediate Notes: - When computing sensitivies w.r.t. initial condition, set didp to `NULL` so that the solver will take it as an identity matrix mathematically. + When computing sensitivities w.r.t. initial condition, set didp to `NULL` so that the solver will take it as an identity matrix mathematically. `TSAdjoint` does not reset the tangent linear solver automatically, `TSAdjointResetForward()` should be called to reset the tangent linear solver. .seealso: [](ch_ts), `TSAdjointSolve()`, `TSSetCostHessianProducts()`, `TSAdjointResetForward()` diff --git a/src/ts/interface/ts.c b/src/ts/interface/ts.c index 65881770c54..9143e282c53 100644 --- a/src/ts/interface/ts.c +++ b/src/ts/interface/ts.c @@ -3738,7 +3738,7 @@ static PetscErrorCode TSResizeTransferVecs(TS ts, PetscInt cnt, Vec vecsin[], Ve Input Parameters: + ts - The `TS` context obtained from `TSCreate()` -. name - A string identifiying the vector +. name - A string identifying the vector - vec - The vector Level: developer @@ -3766,7 +3766,7 @@ PetscErrorCode TSResizeRegisterVec(TS ts, const char *name, Vec vec) Input Parameters: + ts - The `TS` context obtained from `TSCreate()` -. name - A string identifiying the vector +. name - A string identifying the vector - vec - The vector Level: developer @@ -4538,7 +4538,7 @@ PetscErrorCode TSComputeIFunctionLinear(TS ts, PetscReal t, Vec U, Vec Udot, Vec } /*@C - TSComputeIJacobianConstant - Reuses a time-independent for a semi-implicit DAE or ODE + TSComputeIJacobianConstant - Reuses the matrix previously computed with the provided `TSIJacobian()` for a semi-implicit DAE or ODE Collective diff --git a/src/ts/interface/tseig.c b/src/ts/interface/tseig.c index 1dd988317b7..e217b8fee71 100644 --- a/src/ts/interface/tseig.c +++ b/src/ts/interface/tseig.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ #include diff --git a/src/ts/interface/tsregall.c b/src/ts/interface/tsregall.c index 8d856a1b941..b4d7d4b1076 100644 --- a/src/ts/interface/tsregall.c +++ b/src/ts/interface/tsregall.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ PETSC_EXTERN PetscErrorCode TSCreate_Euler(TS); PETSC_EXTERN PetscErrorCode TSCreate_BEuler(TS); diff --git a/src/ts/tests/ex12.c b/src/ts/tests/ex12.c index 5a266b18e70..608449fa26a 100644 --- a/src/ts/tests/ex12.c +++ b/src/ts/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscObjectSetOptions() for TS object\n\n"; /* ------------------------------------------------------------------------ diff --git a/src/ts/tests/ex16.c b/src/ts/tests/ex16.c index a13b5198be8..2801d842f92 100644 --- a/src/ts/tests/ex16.c +++ b/src/ts/tests/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the trivial ODE du/dt = 1, u(0) = 0. \n\n"; /* This example tests TSEvent's capability to handle complicated cases. diff --git a/src/ts/tests/ex22.c b/src/ts/tests/ex22.c index 91c4315718e..df22e89836c 100644 --- a/src/ts/tests/ex22.c +++ b/src/ts/tests/ex22.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a time-dependent linear PDE with discontinuous right hand side.\n"; /* ------------------------------------------------------------------------ diff --git a/src/ts/tests/ex3.c b/src/ts/tests/ex3.c index 46968b04183..0ad4da4a6db 100644 --- a/src/ts/tests/ex3.c +++ b/src/ts/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Solves 1D heat equation with FEM formulation.\n\ Input arguments are\n\ -useAlhs: solve Alhs*U' = (Arhs*U + g) \n\ diff --git a/src/ts/trajectory/impls/basic/trajbasic.c b/src/ts/trajectory/impls/basic/trajbasic.c index 24b64a880a9..e387e6d2ae4 100644 --- a/src/ts/trajectory/impls/basic/trajbasic.c +++ b/src/ts/trajectory/impls/basic/trajbasic.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ typedef struct { diff --git a/src/ts/trajectory/impls/singlefile/singlefile.c b/src/ts/trajectory/impls/singlefile/singlefile.c index fc7a89247e4..fc06d856530 100644 --- a/src/ts/trajectory/impls/singlefile/singlefile.c +++ b/src/ts/trajectory/impls/singlefile/singlefile.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ typedef struct { diff --git a/src/ts/trajectory/impls/visualization/trajvisualization.c b/src/ts/trajectory/impls/visualization/trajvisualization.c index a0784809635..cfb9696b45e 100644 --- a/src/ts/trajectory/impls/visualization/trajvisualization.c +++ b/src/ts/trajectory/impls/visualization/trajvisualization.c @@ -1,4 +1,3 @@ - #include /*I "petscts.h" I*/ static PetscErrorCode OutputBIN(MPI_Comm comm, const char *filename, PetscViewer *viewer) diff --git a/src/ts/tutorials/advection-diffusion-reaction/ex1.c b/src/ts/tutorials/advection-diffusion-reaction/ex1.c index 6c3abe07cd3..92e3d24df53 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/ex1.c +++ b/src/ts/tutorials/advection-diffusion-reaction/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Nonlinear Reaction Problem from Chemistry.\n"; /*F diff --git a/src/ts/tutorials/advection-diffusion-reaction/ex2.c b/src/ts/tutorials/advection-diffusion-reaction/ex2.c index eb48d82095f..be3df3ad62b 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/ex2.c +++ b/src/ts/tutorials/advection-diffusion-reaction/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Reaction Equation from Chemistry\n"; /* diff --git a/src/ts/tutorials/advection-diffusion-reaction/ex3.c b/src/ts/tutorials/advection-diffusion-reaction/ex3.c index 0d7bc884587..3220efe6f64 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/ex3.c +++ b/src/ts/tutorials/advection-diffusion-reaction/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Model Equations for Advection-Diffusion\n"; /* diff --git a/src/ts/tutorials/advection-diffusion-reaction/ex4.c b/src/ts/tutorials/advection-diffusion-reaction/ex4.c index 631111605fb..8ab546815e4 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/ex4.c +++ b/src/ts/tutorials/advection-diffusion-reaction/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Chemo-taxis Problems from Mathematical Biology.\n"; /* diff --git a/src/ts/tutorials/advection-diffusion-reaction/ex5.c b/src/ts/tutorials/advection-diffusion-reaction/ex5.c index 3d6ddcb6718..cd605137ff3 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/ex5.c +++ b/src/ts/tutorials/advection-diffusion-reaction/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates Pattern Formation with Reaction-Diffusion Equations.\n"; /*F diff --git a/src/ts/tutorials/advection-diffusion-reaction/ex6.c b/src/ts/tutorials/advection-diffusion-reaction/ex6.c index c6b90699872..5b2bf2d1ea2 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/ex6.c +++ b/src/ts/tutorials/advection-diffusion-reaction/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Model Equations for Advection \n"; /* diff --git a/src/ts/tutorials/advection-diffusion-reaction/shashi.F90 b/src/ts/tutorials/advection-diffusion-reaction/shashi.F90 index af2e651b337..d17dc39d8ae 100644 --- a/src/ts/tutorials/advection-diffusion-reaction/shashi.F90 +++ b/src/ts/tutorials/advection-diffusion-reaction/shashi.F90 @@ -1,4 +1,3 @@ - program main #include use petsc diff --git a/src/ts/tutorials/ex1.c b/src/ts/tutorials/ex1.c index 8588a061698..63208c24ddc 100644 --- a/src/ts/tutorials/ex1.c +++ b/src/ts/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the time independent Bratu problem using pseudo-timestepping."; /* ------------------------------------------------------------------------ diff --git a/src/ts/tutorials/ex13.c b/src/ts/tutorials/ex13.c index 7db51a9d6ce..7c6d99a32ed 100644 --- a/src/ts/tutorials/ex13.c +++ b/src/ts/tutorials/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Time-dependent PDE in 2d. Simplified from ex7.c for illustrating how to use TS on a structured domain. \n"; /* u_t = uxx + uyy diff --git a/src/ts/tutorials/ex15.c b/src/ts/tutorials/ex15.c index 9992af41c02..26345a16d18 100644 --- a/src/ts/tutorials/ex15.c +++ b/src/ts/tutorials/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Time-dependent PDE in 2d. Modified from ex13.c for illustrating how to solve DAEs. \n"; /* u_t = uxx + uyy diff --git a/src/ts/tutorials/ex16.c b/src/ts/tutorials/ex16.c index a349f9af094..b99a353f28f 100644 --- a/src/ts/tutorials/ex16.c +++ b/src/ts/tutorials/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the van der Pol equation and demonstrate IMEX.\n\ Input parameters include:\n\ -mu : stiffness parameter\n\n"; diff --git a/src/ts/tutorials/ex19.c b/src/ts/tutorials/ex19.c index 2c2bc04b5b0..8df578731a4 100644 --- a/src/ts/tutorials/ex19.c +++ b/src/ts/tutorials/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the van der Pol DAE.\n\ Input parameters include:\n"; diff --git a/src/ts/tutorials/ex1f.F90 b/src/ts/tutorials/ex1f.F90 index 6ed81c9eca9..4de8a758518 100644 --- a/src/ts/tutorials/ex1f.F90 +++ b/src/ts/tutorials/ex1f.F90 @@ -357,4 +357,3 @@ subroutine FormJacobian(ts,ctime,X,JJ,B,user,ierr) ! args: -ksp_gmres_cgs_refinement_type refine_always -snes_type newtonls -ts_monitor_pseudo -ts_max_snes_failures 3 -ts_pseudo_frtol 1.e-5 -snes_stol 1e-5 ! !TEST*/ - diff --git a/src/ts/tutorials/ex2.c b/src/ts/tutorials/ex2.c index 1f0f0c09517..a008650f285 100644 --- a/src/ts/tutorials/ex2.c +++ b/src/ts/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a time-dependent nonlinear PDE. Uses implicit\n\ timestepping. Runtime options include:\n\ -M , where = number of grid points\n\ diff --git a/src/ts/tutorials/ex20.c b/src/ts/tutorials/ex20.c index 7900449c8e1..77ab38bc05d 100644 --- a/src/ts/tutorials/ex20.c +++ b/src/ts/tutorials/ex20.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the van der Pol equation.\n\ Input parameters include:\n"; diff --git a/src/ts/tutorials/ex20opt_p.c b/src/ts/tutorials/ex20opt_p.c index 7edae9a3f02..1cbb68b305d 100644 --- a/src/ts/tutorials/ex20opt_p.c +++ b/src/ts/tutorials/ex20opt_p.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the van der Pol equation.\n\ Input parameters include:\n"; diff --git a/src/ts/tutorials/ex21.c b/src/ts/tutorials/ex21.c index dad3f3419c4..c6352b2ae93 100644 --- a/src/ts/tutorials/ex21.c +++ b/src/ts/tutorials/ex21.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a time-dependent nonlinear PDE with lower and upper bounds on the interior grid points. Uses implicit\n\ timestepping. Runtime options include:\n\ -M , where = number of grid points\n\ diff --git a/src/ts/tutorials/ex23fwdadj.c b/src/ts/tutorials/ex23fwdadj.c index a794c89724b..e2bf4c4c0b4 100644 --- a/src/ts/tutorials/ex23fwdadj.c +++ b/src/ts/tutorials/ex23fwdadj.c @@ -1,4 +1,4 @@ -static char help[] = "A toy example for testing forward and adjoint sensitivity analysis of an implicit ODE with a paramerized mass matrice.\n"; +static char help[] = "A toy example for testing forward and adjoint sensitivity analysis of an implicit ODE with a parametrized mass matrice.\n"; /* This example solves the simple ODE diff --git a/src/ts/tutorials/ex26.c b/src/ts/tutorials/ex26.c index 32264f4205e..9c9112aec29 100644 --- a/src/ts/tutorials/ex26.c +++ b/src/ts/tutorials/ex26.c @@ -1,4 +1,3 @@ - static char help[] = "Transient nonlinear driven cavity in 2d.\n\ \n\ The 2D driven cavity problem is solved in a velocity-vorticity formulation.\n\ diff --git a/src/ts/tutorials/ex28.c b/src/ts/tutorials/ex28.c index 790571dfc87..bd42999c76b 100644 --- a/src/ts/tutorials/ex28.c +++ b/src/ts/tutorials/ex28.c @@ -1,4 +1,3 @@ - static char help[] = "Loads a previously saved TS."; /* diff --git a/src/ts/tutorials/ex3.c b/src/ts/tutorials/ex3.c index 5ab0b4a879b..9f57394c6d0 100644 --- a/src/ts/tutorials/ex3.c +++ b/src/ts/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a simple time-dependent linear PDE (the heat equation).\n\ Input parameters include:\n\ -m , where = number of grid points\n\ diff --git a/src/ts/tutorials/ex36.c b/src/ts/tutorials/ex36.c index 4daae4d27b0..a3694c19267 100644 --- a/src/ts/tutorials/ex36.c +++ b/src/ts/tutorials/ex36.c @@ -1,4 +1,3 @@ - static char help[] = "Transistor amplifier.\n"; /*F diff --git a/src/ts/tutorials/ex36A.c b/src/ts/tutorials/ex36A.c index 8cd8a98cdfc..6b24ddfd97b 100644 --- a/src/ts/tutorials/ex36A.c +++ b/src/ts/tutorials/ex36A.c @@ -1,4 +1,3 @@ - static char help[] = "Transistor amplifier (autonomous).\n"; /*F diff --git a/src/ts/tutorials/ex36SE.c b/src/ts/tutorials/ex36SE.c index 2b354ff1f51..0db6166a477 100644 --- a/src/ts/tutorials/ex36SE.c +++ b/src/ts/tutorials/ex36SE.c @@ -1,4 +1,3 @@ - static char help[] = "Transistor amplifier (semi-explicit).\n"; /*F diff --git a/src/ts/tutorials/ex4.c b/src/ts/tutorials/ex4.c index b6e4fd241ab..17cb7c024e2 100644 --- a/src/ts/tutorials/ex4.c +++ b/src/ts/tutorials/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a simple time-dependent linear PDE (the heat equation).\n\ Input parameters include:\n\ -m , where = number of grid points\n\ diff --git a/src/ts/tutorials/ex49.c b/src/ts/tutorials/ex49.c index 72ae34e1e48..c9b47e90946 100644 --- a/src/ts/tutorials/ex49.c +++ b/src/ts/tutorials/ex49.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the van der Pol equation.\n\ Input parameters include:\n"; diff --git a/src/ts/tutorials/ex5.c b/src/ts/tutorials/ex5.c index 58381357d36..1fec3bcd4bb 100644 --- a/src/ts/tutorials/ex5.c +++ b/src/ts/tutorials/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a simple time-dependent linear PDE (the heat equation).\n\ Input parameters include:\n\ -m , where = number of grid points\n\ diff --git a/src/ts/tutorials/ex50.c b/src/ts/tutorials/ex50.c index 24b272fb2af..db978d54590 100644 --- a/src/ts/tutorials/ex50.c +++ b/src/ts/tutorials/ex50.c @@ -1,4 +1,3 @@ - static char help[] = "Solves one dimensional Burger's equation compares with exact solution\n\n"; /* diff --git a/src/ts/tutorials/ex6.c b/src/ts/tutorials/ex6.c index 4aa6dd9fb89..08f324dd37e 100644 --- a/src/ts/tutorials/ex6.c +++ b/src/ts/tutorials/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Solves a simple time-dependent linear PDE (the heat equation).\n\ Input parameters include:\n\ -m , where = number of grid points\n\ diff --git a/src/ts/tutorials/ex7.c b/src/ts/tutorials/ex7.c index 8cc57628439..f4addcefcd0 100644 --- a/src/ts/tutorials/ex7.c +++ b/src/ts/tutorials/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Nonlinear, time-dependent PDE in 2d.\n"; /* diff --git a/src/ts/tutorials/ex8.c b/src/ts/tutorials/ex8.c index e01c40cdc0b..c2d5a01f180 100644 --- a/src/ts/tutorials/ex8.c +++ b/src/ts/tutorials/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Nonlinear DAE benchmark problems.\n"; /* diff --git a/src/ts/tutorials/extchemfield.c b/src/ts/tutorials/extchemfield.c index 8f4e5558907..d8ca742a15d 100644 --- a/src/ts/tutorials/extchemfield.c +++ b/src/ts/tutorials/extchemfield.c @@ -41,7 +41,7 @@ static const char help[] = "Integrate chemistry using TChem.\n"; Save the images in a .gif (movie) file -draw_save -draw_save_single_file - Compute the sensitivies of the solution of the first temperature on the initial conditions + Compute the sensitivities of the solution of the first temperature on the initial conditions -ts_adjoint_solve -ts_dt 1.e-5 -ts_type cn -ts_adjoint_view_solution draw Turn off diffusion diff --git a/src/ts/tutorials/hamiltonian/ex1.c b/src/ts/tutorials/hamiltonian/ex1.c index 8356d3dc7fb..4e109ce0060 100644 --- a/src/ts/tutorials/hamiltonian/ex1.c +++ b/src/ts/tutorials/hamiltonian/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Solves the motion of spring.\n\ Input parameters include:\n"; diff --git a/src/ts/tutorials/phasefield/biharmonic.c b/src/ts/tutorials/phasefield/biharmonic.c index af664e4478b..720d9eb322d 100644 --- a/src/ts/tutorials/phasefield/biharmonic.c +++ b/src/ts/tutorials/phasefield/biharmonic.c @@ -1,4 +1,3 @@ - static char help[] = "Solves biharmonic equation in 1d.\n"; /* diff --git a/src/ts/tutorials/phasefield/biharmonic2.c b/src/ts/tutorials/phasefield/biharmonic2.c index 288918e0ff6..81a05778205 100644 --- a/src/ts/tutorials/phasefield/biharmonic2.c +++ b/src/ts/tutorials/phasefield/biharmonic2.c @@ -1,4 +1,3 @@ - static char help[] = "Solves biharmonic equation in 1d.\n"; /* diff --git a/src/ts/tutorials/phasefield/biharmonic3.c b/src/ts/tutorials/phasefield/biharmonic3.c index 18023ad9c4c..b2d90958174 100644 --- a/src/ts/tutorials/phasefield/biharmonic3.c +++ b/src/ts/tutorials/phasefield/biharmonic3.c @@ -1,4 +1,3 @@ - static char help[] = "Solves biharmonic equation in 1d.\n"; /* diff --git a/src/ts/tutorials/phasefield/heat.c b/src/ts/tutorials/phasefield/heat.c index adca5cb5c4d..f549f53cb60 100644 --- a/src/ts/tutorials/phasefield/heat.c +++ b/src/ts/tutorials/phasefield/heat.c @@ -1,4 +1,3 @@ - static char help[] = "Solves heat equation in 1d.\n"; /* diff --git a/src/ts/tutorials/phasefield/potentials.c b/src/ts/tutorials/phasefield/potentials.c index d398bcf0f16..d41fb21a944 100644 --- a/src/ts/tutorials/phasefield/potentials.c +++ b/src/ts/tutorials/phasefield/potentials.c @@ -1,4 +1,3 @@ - static char help[] = "Plots the various potentials used in the examples.\n"; #include diff --git a/src/ts/tutorials/power_grid/ex1.c b/src/ts/tutorials/power_grid/ex1.c index 342f66d79de..5aef286cfc3 100644 --- a/src/ts/tutorials/power_grid/ex1.c +++ b/src/ts/tutorials/power_grid/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for generator stability analysis.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex2.c b/src/ts/tutorials/power_grid/ex2.c index 698bf25d7ca..0edcaa700cf 100644 --- a/src/ts/tutorials/power_grid/ex2.c +++ b/src/ts/tutorials/power_grid/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for generator stability analysis.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex3.c b/src/ts/tutorials/power_grid/ex3.c index ebd86f34e70..dd3e3fca43e 100644 --- a/src/ts/tutorials/power_grid/ex3.c +++ b/src/ts/tutorials/power_grid/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for generator stability analysis.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex3opt.c b/src/ts/tutorials/power_grid/ex3opt.c index 057627b9114..d94c58f42ee 100644 --- a/src/ts/tutorials/power_grid/ex3opt.c +++ b/src/ts/tutorials/power_grid/ex3opt.c @@ -1,4 +1,3 @@ - static char help[] = "Finds optimal parameter P_m for the generator system while maintaining generator stability.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex3opt_fd.c b/src/ts/tutorials/power_grid/ex3opt_fd.c index 9f05c311ad2..4e5343ffc04 100644 --- a/src/ts/tutorials/power_grid/ex3opt_fd.c +++ b/src/ts/tutorials/power_grid/ex3opt_fd.c @@ -1,4 +1,3 @@ - static char help[] = "Finds optimal parameter P_m for the generator system while maintaining generator stability.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex3sa.c b/src/ts/tutorials/power_grid/ex3sa.c index 39c30828b63..ee9579a23e9 100644 --- a/src/ts/tutorials/power_grid/ex3sa.c +++ b/src/ts/tutorials/power_grid/ex3sa.c @@ -1,4 +1,3 @@ - static char help[] = "Adjoint and tangent linear sensitivity analysis of the basic equation for generator stability analysis.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex5.c b/src/ts/tutorials/power_grid/ex5.c index 733ccfeb4d9..0bfe67226fc 100644 --- a/src/ts/tutorials/power_grid/ex5.c +++ b/src/ts/tutorials/power_grid/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for an induction generator driven by a wind turbine.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex7.c b/src/ts/tutorials/power_grid/ex7.c index 4ee309a5279..f1610e1323c 100644 --- a/src/ts/tutorials/power_grid/ex7.c +++ b/src/ts/tutorials/power_grid/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Time-dependent PDE in 2d for calculating joint PDF. \n"; /* p_t = -x_t*p_x -y_t*p_y + f(t)*p_yy diff --git a/src/ts/tutorials/power_grid/ex9.c b/src/ts/tutorials/power_grid/ex9.c index 9e6b546461c..c2ba41c4dda 100644 --- a/src/ts/tutorials/power_grid/ex9.c +++ b/src/ts/tutorials/power_grid/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for generator stability analysis.\n"; /*F diff --git a/src/ts/tutorials/power_grid/ex9adj.c b/src/ts/tutorials/power_grid/ex9adj.c index 894943e86c3..ebe87a8dde2 100644 --- a/src/ts/tutorials/power_grid/ex9adj.c +++ b/src/ts/tutorials/power_grid/ex9adj.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for generator stability analysis.\n"; /*F @@ -282,6 +281,8 @@ int main(int argc, char **argv) PetscCall(TSSetRHSFunction(quadts, NULL, (TSRHSFunction)CostIntegrand, &ctx)); PetscCall(TSSetRHSJacobian(quadts, DRDU, DRDU, (TSRHSJacobian)DRDUJacobianTranspose, &ctx)); PetscCall(TSSetRHSJacobianP(quadts, DRDP, (TSRHSJacobianP)DRDPJacobianTranspose, &ctx)); + PetscCall(TSSetCostGradients(ts, 1, lambda, mu)); + PetscCall(TSSetRHSJacobianP(ts, Jacp, RHSJacobianP, &ctx)); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set initial conditions @@ -304,7 +305,6 @@ int main(int argc, char **argv) PetscCall(VecGetArray(mu[0], &x_ptr)); x_ptr[0] = -1.0; PetscCall(VecRestoreArray(mu[0], &x_ptr)); - PetscCall(TSSetCostGradients(ts, 1, lambda, mu)); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set solver options @@ -348,9 +348,6 @@ int main(int argc, char **argv) x_ptr[0] = -1.0; PetscCall(VecRestoreArray(mu[0], &x_ptr)); - /* Set RHS JacobianP */ - PetscCall(TSSetRHSJacobianP(ts, Jacp, RHSJacobianP, &ctx)); - PetscCall(TSAdjointSolve(ts)); PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n sensitivity wrt initial conditions: d[Psi(tf)]/d[phi0] d[Psi(tf)]/d[omega0]\n")); diff --git a/src/ts/tutorials/power_grid/ex9opt.c b/src/ts/tutorials/power_grid/ex9opt.c index 4a15f2e24be..d6491c8673d 100644 --- a/src/ts/tutorials/power_grid/ex9opt.c +++ b/src/ts/tutorials/power_grid/ex9opt.c @@ -1,4 +1,3 @@ - static char help[] = "Basic equation for generator stability analysis.\n"; /*F diff --git a/src/ts/tutorials/power_grid/stability_9bus/ex9bus.c b/src/ts/tutorials/power_grid/stability_9bus/ex9bus.c index 02f6df9cc4b..ed3f99c12ec 100644 --- a/src/ts/tutorials/power_grid/stability_9bus/ex9bus.c +++ b/src/ts/tutorials/power_grid/stability_9bus/ex9bus.c @@ -1,4 +1,3 @@ - static char help[] = "Power grid stability analysis of WECC 9 bus system.\n\ This example is based on the 9-bus (node) example given in the book Power\n\ Systems Dynamics and Stability (Chapter 7) by P. Sauer and M. A. Pai.\n\ diff --git a/src/ts/tutorials/power_grid/stability_9bus/ex9busadj.c b/src/ts/tutorials/power_grid/stability_9bus/ex9busadj.c index 4f588f478cf..220dd7915d6 100644 --- a/src/ts/tutorials/power_grid/stability_9bus/ex9busadj.c +++ b/src/ts/tutorials/power_grid/stability_9bus/ex9busadj.c @@ -1,4 +1,3 @@ - static char help[] = "Sensitivity analysis applied in power grid stability analysis of WECC 9 bus system.\n\ This example is based on the 9-bus (node) example given in the book Power\n\ Systems Dynamics and Stability (Chapter 7) by P. Sauer and M. A. Pai.\n\ diff --git a/src/ts/tutorials/power_grid/stability_9bus/ex9busdmnetwork.c b/src/ts/tutorials/power_grid/stability_9bus/ex9busdmnetwork.c index 9924c584619..bf951b7ba4c 100644 --- a/src/ts/tutorials/power_grid/stability_9bus/ex9busdmnetwork.c +++ b/src/ts/tutorials/power_grid/stability_9bus/ex9busdmnetwork.c @@ -1,4 +1,3 @@ - static char help[] = "This example uses the same problem set up of ex9busdmnetwork.c. \n\ It demonstrates setting and accessing of variables for individual components, instead of \n\ the network vertices (as used in ex9busdmnetwork.c). This is especially useful where vertices \n\ diff --git a/src/vec/f90-mod/petscvecmod.F90 b/src/vec/f90-mod/petscvecmod.F90 index 7573630c1ae..4c54fbf63dc 100644 --- a/src/vec/f90-mod/petscvecmod.F90 +++ b/src/vec/f90-mod/petscvecmod.F90 @@ -1,4 +1,3 @@ - module petscisdefdummy use petscsysdef #include <../src/vec/f90-mod/petscis.h> diff --git a/src/vec/is/ao/impls/basic/aobasic.c b/src/vec/is/ao/impls/basic/aobasic.c index 18a411a6b2b..9cab55ccc5c 100644 --- a/src/vec/is/ao/impls/basic/aobasic.c +++ b/src/vec/is/ao/impls/basic/aobasic.c @@ -1,4 +1,3 @@ - /* The most basic AO application ordering routines. These store the entire orderings on each processor. diff --git a/src/vec/is/ao/impls/basic/ftn-custom/zaobasicf.c b/src/vec/is/ao/impls/basic/ftn-custom/zaobasicf.c index 4ab68978ea7..b57bbfdb068 100644 --- a/src/vec/is/ao/impls/basic/ftn-custom/zaobasicf.c +++ b/src/vec/is/ao/impls/basic/ftn-custom/zaobasicf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/is/ao/impls/mapping/aomapping.c b/src/vec/is/ao/impls/mapping/aomapping.c index 5cca06a1697..5b1d58c9e6e 100644 --- a/src/vec/is/ao/impls/mapping/aomapping.c +++ b/src/vec/is/ao/impls/mapping/aomapping.c @@ -1,4 +1,3 @@ - /* These AO application ordering routines do not require that the input be a permutation, but merely a 1-1 mapping. This implementation still diff --git a/src/vec/is/ao/impls/mapping/ftn-custom/zaomappingf.c b/src/vec/is/ao/impls/mapping/ftn-custom/zaomappingf.c index 5e4125619ba..98515ef973f 100644 --- a/src/vec/is/ao/impls/mapping/ftn-custom/zaomappingf.c +++ b/src/vec/is/ao/impls/mapping/ftn-custom/zaomappingf.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/is/ao/impls/memscalable/aomemscalable.c b/src/vec/is/ao/impls/memscalable/aomemscalable.c index 31d4ac7d0b7..61d86488be2 100644 --- a/src/vec/is/ao/impls/memscalable/aomemscalable.c +++ b/src/vec/is/ao/impls/memscalable/aomemscalable.c @@ -1,4 +1,3 @@ - /* The memory scalable AO application ordering routines. These store the orderings on each processor for that processor's range of values diff --git a/src/vec/is/ao/interface/ao.c b/src/vec/is/ao/interface/ao.c index 9b71be267b9..319b1e0d009 100644 --- a/src/vec/is/ao/interface/ao.c +++ b/src/vec/is/ao/interface/ao.c @@ -1,4 +1,3 @@ - /* Defines the abstract operations on AO (application orderings) */ diff --git a/src/vec/is/ao/interface/aoreg.c b/src/vec/is/ao/interface/aoreg.c index 7e5cb1fb9b9..3ddc13c2ed2 100644 --- a/src/vec/is/ao/interface/aoreg.c +++ b/src/vec/is/ao/interface/aoreg.c @@ -1,4 +1,3 @@ - #include <../src/vec/is/ao/aoimpl.h> /*I "petscao.h" I*/ static PetscBool AOPackageInitialized = PETSC_FALSE; diff --git a/src/vec/is/ao/interface/ftn-custom/zaof.c b/src/vec/is/ao/interface/ftn-custom/zaof.c index e0d398f69d7..cfe115ff5e5 100644 --- a/src/vec/is/ao/interface/ftn-custom/zaof.c +++ b/src/vec/is/ao/interface/ftn-custom/zaof.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/vec/is/ao/tests/ex1.c b/src/vec/is/ao/tests/ex1.c index 24f2494180a..569a4c4d860 100644 --- a/src/vec/is/ao/tests/ex1.c +++ b/src/vec/is/ao/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates constructing an application ordering.\n\n"; #include diff --git a/src/vec/is/ao/tests/ex2.c b/src/vec/is/ao/tests/ex2.c index 3ea1e04de62..deb5c0da291 100644 --- a/src/vec/is/ao/tests/ex2.c +++ b/src/vec/is/ao/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests application ordering.\n\n"; #include diff --git a/src/vec/is/ao/tests/ex3d/ex3.cxx b/src/vec/is/ao/tests/ex3d/ex3.cxx index e15d7e39dd4..f8f3ebfbe97 100644 --- a/src/vec/is/ao/tests/ex3d/ex3.cxx +++ b/src/vec/is/ao/tests/ex3d/ex3.cxx @@ -1,4 +1,3 @@ - static char help[] = "AO test contributed by Sebastian Steiger , March 2011\n\n"; /* diff --git a/src/vec/is/ao/tests/ex4.c b/src/vec/is/ao/tests/ex4.c index 85ae396c0bd..0b11b9199d6 100644 --- a/src/vec/is/ao/tests/ex4.c +++ b/src/vec/is/ao/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Test AO with on IS with 0 entries - contributed by Ethan Coon , Apr 2011.\n\n"; #include diff --git a/src/vec/is/ao/tests/ex7.c b/src/vec/is/ao/tests/ex7.c index 2ad71701642..c57c74572a4 100644 --- a/src/vec/is/ao/tests/ex7.c +++ b/src/vec/is/ao/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates constructing an application ordering.\n\n"; #include diff --git a/src/vec/is/is/impls/block/block.c b/src/vec/is/is/impls/block/block.c index de37081e4bd..974cc892ba9 100644 --- a/src/vec/is/is/impls/block/block.c +++ b/src/vec/is/is/impls/block/block.c @@ -1,4 +1,3 @@ - /* Provides the functions for index sets (IS) defined by a list of integers. These are for blocks of data, each block is indicated with a single integer. diff --git a/src/vec/is/is/impls/f90-custom/zblockf90.c b/src/vec/is/is/impls/f90-custom/zblockf90.c index 34e9b2e5c37..27fe1a72797 100644 --- a/src/vec/is/is/impls/f90-custom/zblockf90.c +++ b/src/vec/is/is/impls/f90-custom/zblockf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/is/is/impls/general/general.c b/src/vec/is/is/impls/general/general.c index 0462f5228f8..e2b0f3c64a9 100644 --- a/src/vec/is/is/impls/general/general.c +++ b/src/vec/is/is/impls/general/general.c @@ -1,4 +1,3 @@ - /* Provides the functions for index sets (IS) defined by a list of integers. */ diff --git a/src/vec/is/is/impls/stride/stride.c b/src/vec/is/is/impls/stride/stride.c index 3672387b428..3335927e129 100644 --- a/src/vec/is/is/impls/stride/stride.c +++ b/src/vec/is/is/impls/stride/stride.c @@ -1,4 +1,3 @@ - /* Index sets of evenly space integers, defined by a start, stride and length. diff --git a/src/vec/is/is/interface/f90-custom/zindexf90.c b/src/vec/is/is/interface/f90-custom/zindexf90.c index b8e77097952..8df767ad1de 100644 --- a/src/vec/is/is/interface/f90-custom/zindexf90.c +++ b/src/vec/is/is/interface/f90-custom/zindexf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/is/is/interface/index.c b/src/vec/is/is/interface/index.c index 69f72714443..45534d7f47a 100644 --- a/src/vec/is/is/interface/index.c +++ b/src/vec/is/is/interface/index.c @@ -1111,7 +1111,7 @@ PetscErrorCode ISInvertPermutation(IS is, PetscInt nlocal, IS *isout) Level: beginner -.seealso: `IS`, `ISSetSize()` +.seealso: `IS` @*/ PetscErrorCode ISGetSize(IS is, PetscInt *size) { diff --git a/src/vec/is/is/interface/isreg.c b/src/vec/is/is/interface/isreg.c index e40a4430484..96f9cf08d7f 100644 --- a/src/vec/is/is/interface/isreg.c +++ b/src/vec/is/is/interface/isreg.c @@ -1,4 +1,3 @@ - #include /*I "petscis.h" I*/ PetscFunctionList ISList = NULL; diff --git a/src/vec/is/is/interface/isregall.c b/src/vec/is/is/interface/isregall.c index 9d8d3bab986..cbbc3440506 100644 --- a/src/vec/is/is/interface/isregall.c +++ b/src/vec/is/is/interface/isregall.c @@ -1,4 +1,3 @@ - #include /*I "petscis.h" I*/ PETSC_INTERN PetscErrorCode ISCreate_General(IS); PETSC_INTERN PetscErrorCode ISCreate_Stride(IS); diff --git a/src/vec/is/is/tests/ex10.c b/src/vec/is/is/tests/ex10.c index 82481a7d114..7968b250ad8 100644 --- a/src/vec/is/is/tests/ex10.c +++ b/src/vec/is/is/tests/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISFilter().\n\n"; #include diff --git a/src/vec/is/is/tests/ex11.c b/src/vec/is/is/tests/ex11.c index d2a631f2389..82429a8ac3f 100644 --- a/src/vec/is/is/tests/ex11.c +++ b/src/vec/is/is/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISSortGlobal().\n\n"; #include diff --git a/src/vec/is/is/tests/ex12.c b/src/vec/is/is/tests/ex12.c index ea49640b432..c12f92fa184 100644 --- a/src/vec/is/is/tests/ex12.c +++ b/src/vec/is/is/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Tests HDF5 ISView() / ISLoad(), and ISSetLayout()\n\n"; #include diff --git a/src/vec/is/is/tests/ex13.c b/src/vec/is/is/tests/ex13.c index 45c35b4cc77..24d4d81faa3 100644 --- a/src/vec/is/is/tests/ex13.c +++ b/src/vec/is/is/tests/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISDuplicate(), ISCopy(), ISShift(), ISEqualUnsorted(), ISEqual().\n\n"; #include diff --git a/src/vec/is/is/tests/ex2.c b/src/vec/is/is/tests/ex2.c index 1b542e2f403..8c0f9be99da 100644 --- a/src/vec/is/is/tests/ex2.c +++ b/src/vec/is/is/tests/ex2.c @@ -1,4 +1,3 @@ - /* Formatted test for ISStride routines. */ diff --git a/src/vec/is/is/tests/ex4.c b/src/vec/is/is/tests/ex4.c index 01465754028..e8831a8f721 100644 --- a/src/vec/is/is/tests/ex4.c +++ b/src/vec/is/is/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISToGeneral().\n\n"; #include diff --git a/src/vec/is/is/tests/ex5.c b/src/vec/is/is/tests/ex5.c index fbfd737fb9e..f05d6c4c309 100644 --- a/src/vec/is/is/tests/ex5.c +++ b/src/vec/is/is/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISLocalToGlobalMappingGetInfo.()\n\n"; #include diff --git a/src/vec/is/is/tests/ex6.c b/src/vec/is/is/tests/ex6.c index 039393ebe6d..377b16b9f6b 100644 --- a/src/vec/is/is/tests/ex6.c +++ b/src/vec/is/is/tests/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISComplement().\n\n"; #include diff --git a/src/vec/is/is/tests/ex8.c b/src/vec/is/is/tests/ex8.c index bf98b80a9fe..f9954f085c2 100644 --- a/src/vec/is/is/tests/ex8.c +++ b/src/vec/is/is/tests/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISLocalToGlobalMappingSetBlockSize.\n\n"; #include diff --git a/src/vec/is/is/tests/ex9.c b/src/vec/is/is/tests/ex9.c index 417267923f1..0b572fb0e5d 100644 --- a/src/vec/is/is/tests/ex9.c +++ b/src/vec/is/is/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Test ISLocalToGlobalMappingCreateSF(), PetscSFSetGraphLayout(), PetscSFGetGraphLayout().\n\n"; #include diff --git a/src/vec/is/is/tutorials/ex1.c b/src/vec/is/is/tutorials/ex1.c index 0f4c8f115d7..212e25fdc65 100644 --- a/src/vec/is/is/tutorials/ex1.c +++ b/src/vec/is/is/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Creating a general index set.\n\n"; /* diff --git a/src/vec/is/is/tutorials/ex2.c b/src/vec/is/is/tutorials/ex2.c index a7f8b98bd6f..b9a58541080 100644 --- a/src/vec/is/is/tutorials/ex2.c +++ b/src/vec/is/is/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates creating a stride index set.\n\n"; /* diff --git a/src/vec/is/is/tutorials/ex3.c b/src/vec/is/is/tutorials/ex3.c index 758e91e437d..736d38a9cf4 100644 --- a/src/vec/is/is/tutorials/ex3.c +++ b/src/vec/is/is/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates creating a blocked index set.\n\n"; #include diff --git a/src/vec/is/is/tutorials/ex4.c b/src/vec/is/is/tutorials/ex4.c index 0fee4faa710..bc7c1196e97 100644 --- a/src/vec/is/is/tutorials/ex4.c +++ b/src/vec/is/is/tutorials/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates using ISLocalToGlobalMappings.\n\n"; #include diff --git a/src/vec/is/is/tutorials/ex5.c b/src/vec/is/is/tutorials/ex5.c index 177a0151146..cc4ce9e6352 100644 --- a/src/vec/is/is/tutorials/ex5.c +++ b/src/vec/is/is/tutorials/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates using ISLocalToGlobalMappings with block size.\n\n"; #include diff --git a/src/vec/is/is/utils/f90-custom/ziscoloringf90.c b/src/vec/is/is/utils/f90-custom/ziscoloringf90.c index 185ff119abf..6f2fa11ae4a 100644 --- a/src/vec/is/is/utils/f90-custom/ziscoloringf90.c +++ b/src/vec/is/is/utils/f90-custom/ziscoloringf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/is/is/utils/iscoloring.c b/src/vec/is/is/utils/iscoloring.c index d3c3f99a1a7..b59cd79ee3c 100644 --- a/src/vec/is/is/utils/iscoloring.c +++ b/src/vec/is/is/utils/iscoloring.c @@ -1,4 +1,3 @@ - #include /*I "petscis.h" I*/ #include #include diff --git a/src/vec/is/is/utils/iscomp.c b/src/vec/is/is/utils/iscomp.c index 32c44746b30..bf50f9d0838 100644 --- a/src/vec/is/is/utils/iscomp.c +++ b/src/vec/is/is/utils/iscomp.c @@ -1,4 +1,3 @@ - #include /*I "petscis.h" I*/ #include diff --git a/src/vec/is/is/utils/isdiff.c b/src/vec/is/is/utils/isdiff.c index 66bb9cd30ea..d2fad2517c9 100644 --- a/src/vec/is/is/utils/isdiff.c +++ b/src/vec/is/is/utils/isdiff.c @@ -1,4 +1,3 @@ - #include /*I "petscis.h" I*/ #include #include @@ -503,10 +502,12 @@ PetscErrorCode ISConcatenate(MPI_Comm comm, PetscInt len, const IS islist[], IS for (i = 0; i < len; ++i) { if (islist[i]) { PetscCall(ISGetLocalSize(islist[i], &n)); - PetscCall(ISGetIndices(islist[i], &iidx)); - PetscCall(PetscArraycpy(idx + N, iidx, n)); - PetscCall(ISRestoreIndices(islist[i], &iidx)); - N += n; + if (n) { + PetscCall(ISGetIndices(islist[i], &iidx)); + PetscCall(PetscArraycpy(idx + N, iidx, n)); + PetscCall(ISRestoreIndices(islist[i], &iidx)); + N += n; + } } } PetscCall(ISCreateGeneral(comm, N, idx, PETSC_OWN_POINTER, isout)); diff --git a/src/vec/is/sf/impls/basic/gatherv/sfgatherv.c b/src/vec/is/sf/impls/basic/gatherv/sfgatherv.c index 448f8834393..ab62c80a970 100644 --- a/src/vec/is/sf/impls/basic/gatherv/sfgatherv.c +++ b/src/vec/is/sf/impls/basic/gatherv/sfgatherv.c @@ -1,4 +1,3 @@ - #include <../src/vec/is/sf/impls/basic/gatherv/sfgatherv.h> /* Reuse the type. The difference is some fields (displs, recvcounts) are only significant diff --git a/src/vec/is/sf/tests/ex11.c b/src/vec/is/sf/tests/ex11.c index 13b96243f0c..27f1b588f50 100644 --- a/src/vec/is/sf/tests/ex11.c +++ b/src/vec/is/sf/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters between parallel vectors. \n\ uses block index sets\n\n"; diff --git a/src/vec/is/sf/tests/ex12.c b/src/vec/is/sf/tests/ex12.c index 2c33f2310f4..abae1339262 100644 --- a/src/vec/is/sf/tests/ex12.c +++ b/src/vec/is/sf/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector. \n\ uses block index sets\n\n"; diff --git a/src/vec/is/sf/tests/ex13.c b/src/vec/is/sf/tests/ex13.c index d53c9f43924..f81aebdb4bf 100644 --- a/src/vec/is/sf/tests/ex13.c +++ b/src/vec/is/sf/tests/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a sequential vector to a parallel vector. \n\ uses block index sets\n\n"; diff --git a/src/vec/is/sf/tests/ex14.c b/src/vec/is/sf/tests/ex14.c index 39b81f98a88..1e9bf1ad471 100644 --- a/src/vec/is/sf/tests/ex14.c +++ b/src/vec/is/sf/tests/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Test event log of VecScatter with various block sizes\n\n"; #include diff --git a/src/vec/is/sf/tests/ex18.c b/src/vec/is/sf/tests/ex18.c index b09397edb79..58f4f62628a 100644 --- a/src/vec/is/sf/tests/ex18.c +++ b/src/vec/is/sf/tests/ex18.c @@ -1,4 +1,3 @@ - static char help[] = "Test PetscSFConcatenate()\n\n"; #include diff --git a/src/vec/is/sf/tests/ex19.c b/src/vec/is/sf/tests/ex19.c index 70671e92924..2a7a37411c7 100644 --- a/src/vec/is/sf/tests/ex19.c +++ b/src/vec/is/sf/tests/ex19.c @@ -1,4 +1,3 @@ - static char help[] = "Test leaf sorting in PetscSFSetGraph()\n\n"; #include diff --git a/src/vec/is/sf/tutorials/ex1f.F90 b/src/vec/is/sf/tutorials/ex1f.F90 index 64ca3eac16b..0fc31bfc5b3 100644 --- a/src/vec/is/sf/tutorials/ex1f.F90 +++ b/src/vec/is/sf/tutorials/ex1f.F90 @@ -1,4 +1,3 @@ - ! Description: A star forest is a simple tree with one root and zero or more leaves. ! Many common communication patterns can be expressed as updates of rootdata using leafdata and vice-versa. ! This example creates a star forest, communicates values using the graph views the graph, then destroys it. diff --git a/src/vec/is/tests/ex1.c b/src/vec/is/tests/ex1.c index 02786355197..33dea715d59 100644 --- a/src/vec/is/tests/ex1.c +++ b/src/vec/is/tests/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISLocalToGlobalMappingCreateIS() for bs > 1.\n\n"; #include diff --git a/src/vec/is/tests/ex3.c b/src/vec/is/tests/ex3.c index ca251a157ee..1e0683bb436 100644 --- a/src/vec/is/tests/ex3.c +++ b/src/vec/is/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests ISSetBlockSize() on ISBlock().\n\n"; #include diff --git a/src/vec/is/utils/f90-custom/zisltogf90.c b/src/vec/is/utils/f90-custom/zisltogf90.c index df74cfc7b6b..5bc0ef4e593 100644 --- a/src/vec/is/utils/f90-custom/zisltogf90.c +++ b/src/vec/is/utils/f90-custom/zisltogf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/is/utils/isltog.c b/src/vec/is/utils/isltog.c index e36027c4a81..8f042453977 100644 --- a/src/vec/is/utils/isltog.c +++ b/src/vec/is/utils/isltog.c @@ -1,4 +1,3 @@ - #include /*I "petscis.h" I*/ #include #include diff --git a/src/vec/is/utils/pmap.c b/src/vec/is/utils/pmap.c index b7afdfef9b3..441b26423d0 100644 --- a/src/vec/is/utils/pmap.c +++ b/src/vec/is/utils/pmap.c @@ -1,4 +1,3 @@ - /* This file contains routines for basic map object implementation. */ diff --git a/src/vec/is/utils/psort.c b/src/vec/is/utils/psort.c index c75e12c2ecb..f186dd81296 100644 --- a/src/vec/is/utils/psort.c +++ b/src/vec/is/utils/psort.c @@ -1,4 +1,3 @@ - #include #include /*I "petscis.h" I*/ diff --git a/src/vec/pf/impls/constant/const.c b/src/vec/pf/impls/constant/const.c index 85903cf287d..6e18c8f03e0 100644 --- a/src/vec/pf/impls/constant/const.c +++ b/src/vec/pf/impls/constant/const.c @@ -1,4 +1,3 @@ - #include <../src/vec/pf/pfimpl.h> /*I "petscpf.h" I*/ static PetscErrorCode PFApply_Constant(void *value, PetscInt n, const PetscScalar *x, PetscScalar *y) diff --git a/src/vec/pf/impls/matlab/cmatlab.c b/src/vec/pf/impls/matlab/cmatlab.c index aec3bd22d1f..8445bb1335d 100644 --- a/src/vec/pf/impls/matlab/cmatlab.c +++ b/src/vec/pf/impls/matlab/cmatlab.c @@ -1,4 +1,3 @@ - #include <../src/vec/pf/pfimpl.h> /*I "petscpf.h" I*/ #include /*I "petscmatlab.h" I*/ diff --git a/src/vec/pf/impls/string/cstring.c b/src/vec/pf/impls/string/cstring.c index ddd5b1321b8..29a66a13126 100644 --- a/src/vec/pf/impls/string/cstring.c +++ b/src/vec/pf/impls/string/cstring.c @@ -1,4 +1,3 @@ - #include <../src/vec/pf/pfimpl.h> /*I "petscpf.h" I*/ /* diff --git a/src/vec/pf/interface/pfall.c b/src/vec/pf/interface/pfall.c index 2976c7b0ea0..12e3f7420e3 100644 --- a/src/vec/pf/interface/pfall.c +++ b/src/vec/pf/interface/pfall.c @@ -1,4 +1,3 @@ - #include /*I "petscpf.h" I*/ #include <../src/vec/pf/pfimpl.h> diff --git a/src/vec/vec/impls/hypre/vhyp.c b/src/vec/vec/impls/hypre/vhyp.c index 2fa5bd9040a..a561dcf03a9 100644 --- a/src/vec/vec/impls/hypre/vhyp.c +++ b/src/vec/vec/impls/hypre/vhyp.c @@ -1,4 +1,3 @@ - /* Creates hypre ijvector from PETSc vector */ diff --git a/src/vec/vec/impls/mpi/commonmpvec.c b/src/vec/vec/impls/mpi/commonmpvec.c index 9fff2024392..cc6e634f891 100644 --- a/src/vec/vec/impls/mpi/commonmpvec.c +++ b/src/vec/vec/impls/mpi/commonmpvec.c @@ -1,4 +1,3 @@ - #include <../src/vec/vec/impls/mpi/pvecimpl.h> /*I "petscvec.h" I*/ /* diff --git a/src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx b/src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx index fa05fb642bd..8a426a8f442 100644 --- a/src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx +++ b/src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx @@ -1,4 +1,3 @@ - /* This file contains routines for Parallel vector operations. */ diff --git a/src/vec/vec/impls/mpi/mpiviennacl/mpiviennacl.cxx b/src/vec/vec/impls/mpi/mpiviennacl/mpiviennacl.cxx index bfcffee6e0e..eea945cb674 100644 --- a/src/vec/vec/impls/mpi/mpiviennacl/mpiviennacl.cxx +++ b/src/vec/vec/impls/mpi/mpiviennacl/mpiviennacl.cxx @@ -1,4 +1,3 @@ - /* This file contains routines for Parallel vector operations. */ diff --git a/src/vec/vec/impls/mpi/pbvec.c b/src/vec/vec/impls/mpi/pbvec.c index ccf5e84508d..73708802a2b 100644 --- a/src/vec/vec/impls/mpi/pbvec.c +++ b/src/vec/vec/impls/mpi/pbvec.c @@ -1,4 +1,3 @@ - /* This file contains routines for Parallel vector operations. */ diff --git a/src/vec/vec/impls/mpi/pdvec.c b/src/vec/vec/impls/mpi/pdvec.c index 99e66fa0005..479e8123ce4 100644 --- a/src/vec/vec/impls/mpi/pdvec.c +++ b/src/vec/vec/impls/mpi/pdvec.c @@ -1,4 +1,3 @@ - /* Code for some of the parallel vector primitives. */ diff --git a/src/vec/vec/impls/mpi/pvec2.c b/src/vec/vec/impls/mpi/pvec2.c index d63a3ed2217..badc7ea8385 100644 --- a/src/vec/vec/impls/mpi/pvec2.c +++ b/src/vec/vec/impls/mpi/pvec2.c @@ -1,4 +1,3 @@ - /* Code for some of the parallel vector primitives. */ diff --git a/src/vec/vec/impls/mpi/vmpicr.c b/src/vec/vec/impls/mpi/vmpicr.c index de771634aa7..9122d6a48c3 100644 --- a/src/vec/vec/impls/mpi/vmpicr.c +++ b/src/vec/vec/impls/mpi/vmpicr.c @@ -1,4 +1,3 @@ - /* This file contains routines for Parallel vector operations. */ diff --git a/src/vec/vec/impls/nest/vecnest.c b/src/vec/vec/impls/nest/vecnest.c index 6581631f1c1..9847cdbbd3d 100644 --- a/src/vec/vec/impls/nest/vecnest.c +++ b/src/vec/vec/impls/nest/vecnest.c @@ -1,4 +1,3 @@ - #include <../src/vec/vec/impls/nest/vecnestimpl.h> /*I "petscvec.h" I*/ /* check all blocks are filled */ diff --git a/src/vec/vec/impls/seq/bvec1.c b/src/vec/vec/impls/seq/bvec1.c index 75c744a69b1..d548c94c599 100644 --- a/src/vec/vec/impls/seq/bvec1.c +++ b/src/vec/vec/impls/seq/bvec1.c @@ -1,4 +1,3 @@ - /* Defines the BLAS based vector operations. Code shared by parallel and sequential vectors. diff --git a/src/vec/vec/impls/seq/bvec2.c b/src/vec/vec/impls/seq/bvec2.c index 04755d1d3f2..d023993dee4 100644 --- a/src/vec/vec/impls/seq/bvec2.c +++ b/src/vec/vec/impls/seq/bvec2.c @@ -1,4 +1,3 @@ - /* Implements the sequential vectors. */ diff --git a/src/vec/vec/impls/seq/bvec3.c b/src/vec/vec/impls/seq/bvec3.c index 91752fef165..c4f98147830 100644 --- a/src/vec/vec/impls/seq/bvec3.c +++ b/src/vec/vec/impls/seq/bvec3.c @@ -1,4 +1,3 @@ - /* Implements the sequential vectors. */ diff --git a/src/vec/vec/impls/seq/dvec2.c b/src/vec/vec/impls/seq/dvec2.c index d4848b6267d..e5c09d1761c 100644 --- a/src/vec/vec/impls/seq/dvec2.c +++ b/src/vec/vec/impls/seq/dvec2.c @@ -1,4 +1,3 @@ - /* Defines some vector operation functions that are shared by sequential and parallel vectors. @@ -90,6 +89,10 @@ PetscErrorCode VecMDot_Seq(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z const Vec *yy = (Vec *)yin; PetscFunctionBegin; + if (n == 0) { + PetscCall(PetscArrayzero(z, nv)); + PetscFunctionReturn(PETSC_SUCCESS); + } PetscCall(VecGetArrayRead(xin, &xbase)); x = xbase; switch (nv_rem) { diff --git a/src/vec/vec/impls/seq/ftn-kernels/fnorm.F90 b/src/vec/vec/impls/seq/ftn-kernels/fnorm.F90 index 2ed2a2728c8..6ec2f9f22d7 100644 --- a/src/vec/vec/impls/seq/ftn-kernels/fnorm.F90 +++ b/src/vec/vec/impls/seq/ftn-kernels/fnorm.F90 @@ -40,4 +40,3 @@ subroutine FortranNormSqrUnroll(x,n,sum1) return end - diff --git a/src/vec/vec/impls/seq/ftn-kernels/fxtimesy.F90 b/src/vec/vec/impls/seq/ftn-kernels/fxtimesy.F90 index 0d78bea10b6..4a463f5f7f9 100644 --- a/src/vec/vec/impls/seq/ftn-kernels/fxtimesy.F90 +++ b/src/vec/vec/impls/seq/ftn-kernels/fxtimesy.F90 @@ -14,4 +14,3 @@ subroutine Fortranxtimesy(x,y,z,n) 10 continue return end - diff --git a/src/vec/vec/impls/seq/vseqcr.c b/src/vec/vec/impls/seq/vseqcr.c index 7acc183738c..7ff0fa10dc5 100644 --- a/src/vec/vec/impls/seq/vseqcr.c +++ b/src/vec/vec/impls/seq/vseqcr.c @@ -1,4 +1,3 @@ - /* Implements the sequential vectors. */ diff --git a/src/vec/vec/impls/shared/shvec.c b/src/vec/vec/impls/shared/shvec.c index 1e43984851d..e25c5d8a2d8 100644 --- a/src/vec/vec/impls/shared/shvec.c +++ b/src/vec/vec/impls/shared/shvec.c @@ -1,4 +1,3 @@ - /* This file contains routines for Parallel vector operations that use shared memory */ diff --git a/src/vec/vec/interface/dlregisvec.c b/src/vec/vec/interface/dlregisvec.c index a86d63fd6ba..3d0c64b3850 100644 --- a/src/vec/vec/interface/dlregisvec.c +++ b/src/vec/vec/interface/dlregisvec.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/vec/vec/interface/f90-custom/zvectorf90.c b/src/vec/vec/interface/f90-custom/zvectorf90.c index 01bd09439f2..1d715b42222 100644 --- a/src/vec/vec/interface/f90-custom/zvectorf90.c +++ b/src/vec/vec/interface/f90-custom/zvectorf90.c @@ -1,4 +1,3 @@ - #include #include diff --git a/src/vec/vec/interface/veccreate.c b/src/vec/vec/interface/veccreate.c index ab1cba9f63d..68297618ab8 100644 --- a/src/vec/vec/interface/veccreate.c +++ b/src/vec/vec/interface/veccreate.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ static PetscErrorCode VecCreate_Common_Private(Vec v) diff --git a/src/vec/vec/interface/vecreg.c b/src/vec/vec/interface/vecreg.c index 24210b8985c..4bdecd21585 100644 --- a/src/vec/vec/interface/vecreg.c +++ b/src/vec/vec/interface/vecreg.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ PetscFunctionList VecList = NULL; diff --git a/src/vec/vec/interface/vecregall.c b/src/vec/vec/interface/vecregall.c index 006990e0d4e..b764e9d76e3 100644 --- a/src/vec/vec/interface/vecregall.c +++ b/src/vec/vec/interface/vecregall.c @@ -1,4 +1,3 @@ - #include #include PETSC_EXTERN PetscErrorCode VecCreate_Seq(Vec); diff --git a/src/vec/vec/tests/ex10.c b/src/vec/vec/tests/ex10.c index 7f0c4c88668..0d5553fe012 100644 --- a/src/vec/vec/tests/ex10.c +++ b/src/vec/vec/tests/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector.\n\ uses block index sets\n\n"; diff --git a/src/vec/vec/tests/ex100.cu b/src/vec/vec/tests/ex100.cu index 63583bd5bf1..894a398024d 100644 --- a/src/vec/vec/tests/ex100.cu +++ b/src/vec/vec/tests/ex100.cu @@ -1,4 +1,3 @@ - static char help[] = "Tests I/O of vectors for different data formats (binary,HDF5)\n\n"; #include diff --git a/src/vec/vec/tests/ex11.c b/src/vec/vec/tests/ex11.c index 0f497cc5f9c..4c3d8f666b4 100644 --- a/src/vec/vec/tests/ex11.c +++ b/src/vec/vec/tests/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector.\n\n"; #include diff --git a/src/vec/vec/tests/ex12.c b/src/vec/vec/tests/ex12.c index 121f085730f..166098a13d4 100644 --- a/src/vec/vec/tests/ex12.c +++ b/src/vec/vec/tests/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a sequential vector to a parallel vector.\n\ This does case when we are merely selecting the local part of the\n\ parallel vector.\n"; diff --git a/src/vec/vec/tests/ex13.c b/src/vec/vec/tests/ex13.c index 525209b4932..d2e1c32a1b2 100644 --- a/src/vec/vec/tests/ex13.c +++ b/src/vec/vec/tests/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates scattering with the indices specified by a process that is not sender or receiver.\n\n"; #include diff --git a/src/vec/vec/tests/ex14.c b/src/vec/vec/tests/ex14.c index 911060824e8..acaeef7d730 100644 --- a/src/vec/vec/tests/ex14.c +++ b/src/vec/vec/tests/ex14.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a sequential vector to a parallel vector.\n\ This does the tricky case.\n\n"; diff --git a/src/vec/vec/tests/ex15.c b/src/vec/vec/tests/ex15.c index a5a16468023..4000e51f0cb 100644 --- a/src/vec/vec/tests/ex15.c +++ b/src/vec/vec/tests/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecSetValuesBlocked() on sequential vectors.\n\n"; #include diff --git a/src/vec/vec/tests/ex17.c b/src/vec/vec/tests/ex17.c index 7d9e4c1bcd0..486206eea9c 100644 --- a/src/vec/vec/tests/ex17.c +++ b/src/vec/vec/tests/ex17.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector. In\n\ this case each local vector is as long as the entire parallel vector.\n\n"; diff --git a/src/vec/vec/tests/ex18.c b/src/vec/vec/tests/ex18.c index fe0409659d8..1d56838c336 100644 --- a/src/vec/vec/tests/ex18.c +++ b/src/vec/vec/tests/ex18.c @@ -1,4 +1,3 @@ - static char help[] = "Compares BLAS dots on different machines. Input\n\ arguments are\n\ -n : local vector length\n\n"; diff --git a/src/vec/vec/tests/ex2.c b/src/vec/vec/tests/ex2.c index 3d358887015..c817b3f5b27 100644 --- a/src/vec/vec/tests/ex2.c +++ b/src/vec/vec/tests/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Tests vector scatter-gather operations. Input arguments are\n\ -n : vector length\n\n"; diff --git a/src/vec/vec/tests/ex21.c b/src/vec/vec/tests/ex21.c index 638d4eb2298..51f91c8d2f4 100644 --- a/src/vec/vec/tests/ex21.c +++ b/src/vec/vec/tests/ex21.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecMax() with index.\n\ -n : vector length\n\n"; diff --git a/src/vec/vec/tests/ex22.c b/src/vec/vec/tests/ex22.c index 730c9b6fec0..339addb24c8 100644 --- a/src/vec/vec/tests/ex22.c +++ b/src/vec/vec/tests/ex22.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a parallel vector.\n\n"; #include diff --git a/src/vec/vec/tests/ex23.c b/src/vec/vec/tests/ex23.c index db0713e3666..251bbd63877 100644 --- a/src/vec/vec/tests/ex23.c +++ b/src/vec/vec/tests/ex23.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector.\n\ Using a blocked send and a strided receive.\n\n"; diff --git a/src/vec/vec/tests/ex24.c b/src/vec/vec/tests/ex24.c index 57ac022e8c2..36d995e3632 100644 --- a/src/vec/vec/tests/ex24.c +++ b/src/vec/vec/tests/ex24.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector.\n\ Tests where the local part of the scatter is a copy.\n\n"; diff --git a/src/vec/vec/tests/ex25.c b/src/vec/vec/tests/ex25.c index 694f6fdcb71..b7364caa256 100644 --- a/src/vec/vec/tests/ex25.c +++ b/src/vec/vec/tests/ex25.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector. In\n\ this case processor zero is as long as the entire parallel vector; rest are zero length.\n\n"; diff --git a/src/vec/vec/tests/ex28.c b/src/vec/vec/tests/ex28.c index be69cd1223c..e0b4c0ee273 100644 --- a/src/vec/vec/tests/ex28.c +++ b/src/vec/vec/tests/ex28.c @@ -1,4 +1,3 @@ - static char help[] = "Tests repeated VecDotBegin()/VecDotEnd().\n\n"; #include diff --git a/src/vec/vec/tests/ex29.c b/src/vec/vec/tests/ex29.c index c3269dfd8d1..8fce7fea12f 100644 --- a/src/vec/vec/tests/ex29.c +++ b/src/vec/vec/tests/ex29.c @@ -1,4 +1,3 @@ - static char help[] = "Tests VecSetValues() and VecSetValuesBlocked() on MPI vectors.\n\ Where at least a couple of mallocs will occur in the stash code.\n\n"; diff --git a/src/vec/vec/tests/ex3.c b/src/vec/vec/tests/ex3.c index f34aae7463e..104a5207d8c 100644 --- a/src/vec/vec/tests/ex3.c +++ b/src/vec/vec/tests/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Tests parallel vector assembly. Input arguments are\n\ -n : local vector length\n\n"; diff --git a/src/vec/vec/tests/ex30f.F90 b/src/vec/vec/tests/ex30f.F90 index 20596a78b80..0601d72fe85 100644 --- a/src/vec/vec/tests/ex30f.F90 +++ b/src/vec/vec/tests/ex30f.F90 @@ -118,4 +118,3 @@ program main ! nsize: 4 ! !TEST*/ - diff --git a/src/vec/vec/tests/ex33.c b/src/vec/vec/tests/ex33.c index 503d6455569..9e2c0446b8a 100644 --- a/src/vec/vec/tests/ex33.c +++ b/src/vec/vec/tests/ex33.c @@ -1,4 +1,3 @@ - static char help[] = "Tests the routines VecScatterCreateToAll(), VecScatterCreateToZero()\n\n"; #include diff --git a/src/vec/vec/tests/ex35.c b/src/vec/vec/tests/ex35.c index 6c992d5cfe0..204e5c4c9b2 100644 --- a/src/vec/vec/tests/ex35.c +++ b/src/vec/vec/tests/ex35.c @@ -1,4 +1,3 @@ - static char help[] = "Test VecGetArray4d()\n"; #include diff --git a/src/vec/vec/tests/ex39.c b/src/vec/vec/tests/ex39.c index 64eecff8eb4..b362a9937dd 100644 --- a/src/vec/vec/tests/ex39.c +++ b/src/vec/vec/tests/ex39.c @@ -1,4 +1,3 @@ - static char help[] = "This example is intended for showing how subvectors can\n\ share the pointer with the main vector using VecGetArray()\n\ and VecPlaceArray() routines so that vector operations done\n\ diff --git a/src/vec/vec/tests/ex4.c b/src/vec/vec/tests/ex4.c index a4f88ec63d3..65082683155 100644 --- a/src/vec/vec/tests/ex4.c +++ b/src/vec/vec/tests/ex4.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector into sequential vectors.\n\n"; #include diff --git a/src/vec/vec/tests/ex40.c b/src/vec/vec/tests/ex40.c index b587e783577..886785da009 100644 --- a/src/vec/vec/tests/ex40.c +++ b/src/vec/vec/tests/ex40.c @@ -1,4 +1,3 @@ - static char help[] = "Tests taking part of existing array to create a new vector.\n\n"; #include diff --git a/src/vec/vec/tests/ex42.c b/src/vec/vec/tests/ex42.c index 405e2afd679..2456734d408 100644 --- a/src/vec/vec/tests/ex42.c +++ b/src/vec/vec/tests/ex42.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a parallel vector.\n\n"; #include diff --git a/src/vec/vec/tests/ex44.c b/src/vec/vec/tests/ex44.c index d73601daf33..1e50f6b4b41 100644 --- a/src/vec/vec/tests/ex44.c +++ b/src/vec/vec/tests/ex44.c @@ -1,4 +1,3 @@ - #include static char help[] = "Tests vecScatter Sequential to Sequential for (CUDA) vectors\n\ diff --git a/src/vec/vec/tests/ex45.c b/src/vec/vec/tests/ex45.c index 554ea84d0c8..604d5b28d2f 100644 --- a/src/vec/vec/tests/ex45.c +++ b/src/vec/vec/tests/ex45.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates VecStrideSubSetScatter() and VecStrideSubSetGather().\n\n"; /* diff --git a/src/vec/vec/tests/ex46.c b/src/vec/vec/tests/ex46.c index 716c0bf683c..4109140791a 100644 --- a/src/vec/vec/tests/ex46.c +++ b/src/vec/vec/tests/ex46.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscViewerBinary VecView()/VecLoad() function correctly when binary header is skipped.\n\n"; #include diff --git a/src/vec/vec/tests/ex47.c b/src/vec/vec/tests/ex47.c index 9f91bf6856d..99488fa23bf 100644 --- a/src/vec/vec/tests/ex47.c +++ b/src/vec/vec/tests/ex47.c @@ -1,4 +1,3 @@ - static char help[] = "Tests PetscViewerHDF5 VecView()/VecLoad() function.\n\n"; #include diff --git a/src/vec/vec/tests/ex48.c b/src/vec/vec/tests/ex48.c index 95d18b0d815..c8a2403f215 100644 --- a/src/vec/vec/tests/ex48.c +++ b/src/vec/vec/tests/ex48.c @@ -1,4 +1,3 @@ - static char help[] = "Tests HDF5 attribute I/O.\n\n"; #include diff --git a/src/vec/vec/tests/ex5.c b/src/vec/vec/tests/ex5.c index 0fa429b5248..34ed0c3e12e 100644 --- a/src/vec/vec/tests/ex5.c +++ b/src/vec/vec/tests/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector.\n\ This does case when we are merely selecting the local part of the\n\ parallel vector.\n\n"; diff --git a/src/vec/vec/tests/ex56.c b/src/vec/vec/tests/ex56.c index 1de24e7221d..82ec5563fca 100644 --- a/src/vec/vec/tests/ex56.c +++ b/src/vec/vec/tests/ex56.c @@ -1,4 +1,3 @@ - static char help[] = "Update the data in a VECVIENNACL via a CL kernel.\n\n"; #include diff --git a/src/vec/vec/tests/ex58.c b/src/vec/vec/tests/ex58.c index a5c61096a1c..87e0864c931 100644 --- a/src/vec/vec/tests/ex58.c +++ b/src/vec/vec/tests/ex58.c @@ -1,4 +1,3 @@ - static char help[] = "Test VecCreate{Seq|MPI}CUDAWithArrays.\n\n"; #include "petsc.h" diff --git a/src/vec/vec/tests/ex59.cxx b/src/vec/vec/tests/ex59.cxx index b5d7d1bc66e..753d60eb3d3 100644 --- a/src/vec/vec/tests/ex59.cxx +++ b/src/vec/vec/tests/ex59.cxx @@ -1,4 +1,3 @@ - static char help[] = "Test VecCreate{Seq|MPI}ViennaCLWithArrays.\n\n"; #include "petsc.h" diff --git a/src/vec/vec/tests/ex6.c b/src/vec/vec/tests/ex6.c index 34fbb1931d0..a2e710c7940 100644 --- a/src/vec/vec/tests/ex6.c +++ b/src/vec/vec/tests/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates a scatter with a stride and general index set.\n\n"; #include diff --git a/src/vec/vec/tests/ex7.c b/src/vec/vec/tests/ex7.c index 7e04fe950ac..bf84218fbd1 100644 --- a/src/vec/vec/tests/ex7.c +++ b/src/vec/vec/tests/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates a scatter with a stride and general index set.\n\n"; #include diff --git a/src/vec/vec/tests/ex8.c b/src/vec/vec/tests/ex8.c index 50c12ba7a04..1fe4628d207 100644 --- a/src/vec/vec/tests/ex8.c +++ b/src/vec/vec/tests/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates scattering with strided index sets.\n\n"; #include diff --git a/src/vec/vec/tests/ex9.c b/src/vec/vec/tests/ex9.c index 2edff9ab3c5..8f567ff6cad 100644 --- a/src/vec/vec/tests/ex9.c +++ b/src/vec/vec/tests/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Scatters from a parallel vector to a sequential vector.\n\n"; #include diff --git a/src/vec/vec/tutorials/ex1.c b/src/vec/vec/tutorials/ex1.c index cde65414e27..b5278be9224 100644 --- a/src/vec/vec/tutorials/ex1.c +++ b/src/vec/vec/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "Basic vector routines.\n\n"; /* diff --git a/src/vec/vec/tutorials/ex10.c b/src/vec/vec/tutorials/ex10.c index 8c63863eaef..dbba1ae60c3 100644 --- a/src/vec/vec/tutorials/ex10.c +++ b/src/vec/vec/tutorials/ex10.c @@ -1,4 +1,3 @@ - static char help[] = "Tests I/O of vectors for different data formats (binary,HDF5) and illustrates the use of user-defined event logging\n\n"; #include diff --git a/src/vec/vec/tutorials/ex11.c b/src/vec/vec/tutorials/ex11.c index e026fb1e365..343a2b61633 100644 --- a/src/vec/vec/tutorials/ex11.c +++ b/src/vec/vec/tutorials/ex11.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates VecStrideNorm().\n\n"; /* diff --git a/src/vec/vec/tutorials/ex12.c b/src/vec/vec/tutorials/ex12.c index 18daaf263af..19aeab71766 100644 --- a/src/vec/vec/tutorials/ex12.c +++ b/src/vec/vec/tutorials/ex12.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates VecStrideScatter() and VecStrideGather().\n\n"; /* diff --git a/src/vec/vec/tutorials/ex13.c b/src/vec/vec/tutorials/ex13.c index 2297a22aaee..f75c2a72f1a 100644 --- a/src/vec/vec/tutorials/ex13.c +++ b/src/vec/vec/tutorials/ex13.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates VecStrideSum().\n\n"; /* diff --git a/src/vec/vec/tutorials/ex14f.F90 b/src/vec/vec/tutorials/ex14f.F90 index 27a0545dbf7..04f28f3d9cb 100644 --- a/src/vec/vec/tutorials/ex14f.F90 +++ b/src/vec/vec/tutorials/ex14f.F90 @@ -116,4 +116,3 @@ program main ! nsize: 2 ! !TEST*/ - diff --git a/src/vec/vec/tutorials/ex15.c b/src/vec/vec/tutorials/ex15.c index b5e1f4f0945..73e6a56d140 100644 --- a/src/vec/vec/tutorials/ex15.c +++ b/src/vec/vec/tutorials/ex15.c @@ -1,4 +1,3 @@ - static char help[] = "Tests Mathematica I/O of vectors and illustrates the use of user-defined event logging.\n\n"; #include diff --git a/src/vec/vec/tutorials/ex16.c b/src/vec/vec/tutorials/ex16.c index c58461aa59c..cddb68b03d4 100644 --- a/src/vec/vec/tutorials/ex16.c +++ b/src/vec/vec/tutorials/ex16.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates VecStrideScatter() and VecStrideGather() with subvectors that are also strided.\n\n"; /* diff --git a/src/vec/vec/tutorials/ex18.c b/src/vec/vec/tutorials/ex18.c index 3ecdb2faebc..6c713f6bd94 100644 --- a/src/vec/vec/tutorials/ex18.c +++ b/src/vec/vec/tutorials/ex18.c @@ -1,4 +1,3 @@ - static char help[] = "Computes the integral of 2*x/(1+x^2) from x=0..1 \nThis is equal to the ln(2).\n\n"; /* diff --git a/src/vec/vec/tutorials/ex1f.F90 b/src/vec/vec/tutorials/ex1f.F90 index b916e695524..0c2a75719ff 100644 --- a/src/vec/vec/tutorials/ex1f.F90 +++ b/src/vec/vec/tutorials/ex1f.F90 @@ -1,4 +1,3 @@ - program main #include use petscvec diff --git a/src/vec/vec/tutorials/ex1f90.F90 b/src/vec/vec/tutorials/ex1f90.F90 index ccc9160cd6b..9a7b6ec680d 100644 --- a/src/vec/vec/tutorials/ex1f90.F90 +++ b/src/vec/vec/tutorials/ex1f90.F90 @@ -1,4 +1,3 @@ - program main #include use petscvec diff --git a/src/vec/vec/tutorials/ex2.c b/src/vec/vec/tutorials/ex2.c index 626cfce85c9..8bff9738e5f 100644 --- a/src/vec/vec/tutorials/ex2.c +++ b/src/vec/vec/tutorials/ex2.c @@ -1,4 +1,3 @@ - static char help[] = "Builds a parallel vector with 1 component on the first processor, 2 on the second, etc.\n\ Then each processor adds one to all elements except the last rank.\n\n"; diff --git a/src/vec/vec/tutorials/ex20f90.F90 b/src/vec/vec/tutorials/ex20f90.F90 index dfa01b9dae8..12fa7dd56ee 100644 --- a/src/vec/vec/tutorials/ex20f90.F90 +++ b/src/vec/vec/tutorials/ex20f90.F90 @@ -1,4 +1,3 @@ - program main ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/vec/vec/tutorials/ex3.c b/src/vec/vec/tutorials/ex3.c index 566d87d1368..fc5dbd4881c 100644 --- a/src/vec/vec/tutorials/ex3.c +++ b/src/vec/vec/tutorials/ex3.c @@ -1,4 +1,3 @@ - static char help[] = "Parallel vector layout.\n\n"; /* diff --git a/src/vec/vec/tutorials/ex42.c b/src/vec/vec/tutorials/ex42.c index 2164d3d7e91..066f4063e4e 100644 --- a/src/vec/vec/tutorials/ex42.c +++ b/src/vec/vec/tutorials/ex42.c @@ -1,4 +1,3 @@ - static char help[] = "Reads a PETSc vector from a socket connection, then sends it back within a loop 1000 times. Works with ex42.m or ex42a.c\n"; #include diff --git a/src/vec/vec/tutorials/ex42a.c b/src/vec/vec/tutorials/ex42a.c index 8e7f2309f27..e88f4863cf0 100644 --- a/src/vec/vec/tutorials/ex42a.c +++ b/src/vec/vec/tutorials/ex42a.c @@ -1,4 +1,3 @@ - static char help[] = "Sends a PETSc vector to a socket connection, receives it back, within a loop. Must be run with ex42.c.\n"; #include diff --git a/src/vec/vec/tutorials/ex43.c b/src/vec/vec/tutorials/ex43.c index 40ddb1cd6a6..bef3775c0b9 100644 --- a/src/vec/vec/tutorials/ex43.c +++ b/src/vec/vec/tutorials/ex43.c @@ -1,4 +1,3 @@ - #include PETSC_INTERN void fillupvector(Vec *v, PetscErrorCode *ierr) diff --git a/src/vec/vec/tutorials/ex43f.F90 b/src/vec/vec/tutorials/ex43f.F90 index 394f4589681..d371a7c33cf 100644 --- a/src/vec/vec/tutorials/ex43f.F90 +++ b/src/vec/vec/tutorials/ex43f.F90 @@ -1,4 +1,3 @@ - module ex43fmodule #include use,intrinsic :: iso_c_binding diff --git a/src/vec/vec/tutorials/ex44.c b/src/vec/vec/tutorials/ex44.c index ac3272eba54..9c4e6643777 100644 --- a/src/vec/vec/tutorials/ex44.c +++ b/src/vec/vec/tutorials/ex44.c @@ -1,4 +1,3 @@ - static char help[] = "Test VecConcatenate both in serial and parallel.\n"; #include diff --git a/src/vec/vec/tutorials/ex5.c b/src/vec/vec/tutorials/ex5.c index 172a2889258..9605f47b5fa 100644 --- a/src/vec/vec/tutorials/ex5.c +++ b/src/vec/vec/tutorials/ex5.c @@ -1,4 +1,3 @@ - static char help[] = "Tests binary I/O of vectors and illustrates the use of user-defined event logging.\n\n"; #include diff --git a/src/vec/vec/tutorials/ex6.c b/src/vec/vec/tutorials/ex6.c index e4a258ced79..8300c025e29 100644 --- a/src/vec/vec/tutorials/ex6.c +++ b/src/vec/vec/tutorials/ex6.c @@ -1,4 +1,3 @@ - static char help[] = "Writes an array to a file, then reads an array from a file, then forms a vector.\n\n"; /* diff --git a/src/vec/vec/tutorials/ex7.c b/src/vec/vec/tutorials/ex7.c index 9be5dcec213..c416ed75884 100644 --- a/src/vec/vec/tutorials/ex7.c +++ b/src/vec/vec/tutorials/ex7.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates calling a Fortran computational routine from C.\n\ Also demonstrates passing PETSc objects, MPI Communicators from C to Fortran\n\ and from Fortran to C\n\n"; diff --git a/src/vec/vec/tutorials/ex8.c b/src/vec/vec/tutorials/ex8.c index c5bd6cd81be..6ef4ca2ea1c 100644 --- a/src/vec/vec/tutorials/ex8.c +++ b/src/vec/vec/tutorials/ex8.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates using a local ordering to set values into a parallel vector.\n\n"; /* diff --git a/src/vec/vec/tutorials/ex9.c b/src/vec/vec/tutorials/ex9.c index e3e81723ff2..f6efc51f299 100644 --- a/src/vec/vec/tutorials/ex9.c +++ b/src/vec/vec/tutorials/ex9.c @@ -1,4 +1,3 @@ - static char help[] = "Demonstrates use of VecCreateGhost().\n\n"; /* diff --git a/src/vec/vec/tutorials/ex9f.F90 b/src/vec/vec/tutorials/ex9f.F90 index 37e2e0cc06c..940f28bee3e 100644 --- a/src/vec/vec/tutorials/ex9f.F90 +++ b/src/vec/vec/tutorials/ex9f.F90 @@ -119,4 +119,3 @@ program main ! args: -allocate ! !TEST*/ - diff --git a/src/vec/vec/utils/comb.c b/src/vec/vec/utils/comb.c index e4913e42639..745a0c07bc5 100644 --- a/src/vec/vec/utils/comb.c +++ b/src/vec/vec/utils/comb.c @@ -1,4 +1,3 @@ - /* Split phase global vector reductions with support for combining the communication portion of several operations. Using MPI-1.1 support only diff --git a/src/vec/vec/utils/matlab/gcreatev.c b/src/vec/vec/utils/matlab/gcreatev.c index 7f8d5186361..7365291bd39 100644 --- a/src/vec/vec/utils/matlab/gcreatev.c +++ b/src/vec/vec/utils/matlab/gcreatev.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include diff --git a/src/vec/vec/utils/tagger/impls/absolute.c b/src/vec/vec/utils/tagger/impls/absolute.c index dea2a022e48..4dce93206cb 100644 --- a/src/vec/vec/utils/tagger/impls/absolute.c +++ b/src/vec/vec/utils/tagger/impls/absolute.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include "../src/vec/vec/utils/tagger/impls/simple.h" diff --git a/src/vec/vec/utils/tagger/impls/and.c b/src/vec/vec/utils/tagger/impls/and.c index 5c8263ec197..789ee240bbc 100644 --- a/src/vec/vec/utils/tagger/impls/and.c +++ b/src/vec/vec/utils/tagger/impls/and.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include "../src/vec/vec/utils/tagger/impls/andor.h" diff --git a/src/vec/vec/utils/tagger/impls/cdf.c b/src/vec/vec/utils/tagger/impls/cdf.c index f6bd69def7a..0384db5dee1 100644 --- a/src/vec/vec/utils/tagger/impls/cdf.c +++ b/src/vec/vec/utils/tagger/impls/cdf.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include "../src/vec/vec/utils/tagger/impls/simple.h" diff --git a/src/vec/vec/utils/tagger/impls/or.c b/src/vec/vec/utils/tagger/impls/or.c index 36ab2f40d60..9fa354519aa 100644 --- a/src/vec/vec/utils/tagger/impls/or.c +++ b/src/vec/vec/utils/tagger/impls/or.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include "../src/vec/vec/utils/tagger/impls/andor.h" diff --git a/src/vec/vec/utils/tagger/impls/relative.c b/src/vec/vec/utils/tagger/impls/relative.c index a23244b3b76..7eca0a0918f 100644 --- a/src/vec/vec/utils/tagger/impls/relative.c +++ b/src/vec/vec/utils/tagger/impls/relative.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include "../src/vec/vec/utils/tagger/impls/simple.h" diff --git a/src/vec/vec/utils/tagger/impls/simple.c b/src/vec/vec/utils/tagger/impls/simple.c index 15376c752e3..c59981fc246 100644 --- a/src/vec/vec/utils/tagger/impls/simple.c +++ b/src/vec/vec/utils/tagger/impls/simple.c @@ -1,4 +1,3 @@ - #include /*I "petscvec.h" I*/ #include "../src/vec/vec/utils/tagger/impls/simple.h" diff --git a/src/vec/vec/utils/tagger/tutorials/ex1.c b/src/vec/vec/utils/tagger/tutorials/ex1.c index 15baa0b044f..8c83022f58c 100644 --- a/src/vec/vec/utils/tagger/tutorials/ex1.c +++ b/src/vec/vec/utils/tagger/tutorials/ex1.c @@ -1,4 +1,3 @@ - static char help[] = "VecTagger interface routines.\n\n"; #include diff --git a/src/vec/vec/utils/vecio.c b/src/vec/vec/utils/vecio.c index 57b4135004b..ee83caadfba 100644 --- a/src/vec/vec/utils/vecio.c +++ b/src/vec/vec/utils/vecio.c @@ -1,4 +1,3 @@ - /* This file contains simple binary input routines for vectors. The analogous output routines are within each vector implementation's diff --git a/src/vec/vec/utils/vecs.c b/src/vec/vec/utils/vecs.c index 4e84627ec0c..09f536a7162 100644 --- a/src/vec/vec/utils/vecs.c +++ b/src/vec/vec/utils/vecs.c @@ -1,4 +1,3 @@ - #include PetscErrorCode VecsDestroy(Vecs x) diff --git a/src/vec/vec/utils/vecstash.c b/src/vec/vec/utils/vecstash.c index 0156124efc3..15ceb4b6863 100644 --- a/src/vec/vec/utils/vecstash.c +++ b/src/vec/vec/utils/vecstash.c @@ -1,4 +1,3 @@ - #include #define DEFAULT_STASH_SIZE 100 diff --git a/src/vec/vec/utils/vinv.c b/src/vec/vec/utils/vinv.c index 1c841968dd8..5c4431c5b28 100644 --- a/src/vec/vec/utils/vinv.c +++ b/src/vec/vec/utils/vinv.c @@ -1,4 +1,3 @@ - /* Some useful vector utility functions. */