Need help adding a new solver to the petsc library

Xavier Lacoste lacoste at labri.fr
Fri Nov 21 08:05:55 CST 2008


Hello,

I have some new questions.

I haded a MPIAIJ to CSC conversion routine.
I managed to run ex19 on the solver PaStiX like it is done for mumps but 
my matrix must be badly constructed (PaStiX doesn't succeed in 
computing  the solution withe the given problem...).
Is there a way to dump the MPIAIJ matrix into a matrixmarket format so 
that I can check what's wrong with the CSC built ?

Second question, in the petsc-dev/config/PETSc/packages/Scotch.py I 
wrote, do I have a way to check if libz.a is present, so that I can 
decide if I compile with -DCOMMON_FILE_COMPRESS_GZ and -lz ? (libz.a 
requirement is depending of an optional feature of Scotch...)

thanks,

XL.


Barry Smith a écrit :
>
>      Take a look at, for example, MatGetFactor_MPIAIJ_mumps (in 
> src/mat/impls/aij/mpi/mumps)
> you will need to create one for pastix and then take a look at 
> MatCreate_MPIAIJ and see
> how the mumps function is registered, you will need to register in the 
> same way.
>
>     Barry
>
>
>
> On Nov 7, 2008, at 10:07 AM, Xavier Lacoste wrote:
>
>> Hello,
>>
>> I'm still working on adding PaStiX into PETSc.
>>
>> I managed to pass the configure and "make all test" steps.
>> (./config/configure.py -with-scotch=1 -download-scotch=ifneeded 
>> -with-pastix -download-pastix=ifneeded )
>>
>>
>> Here are the modification I made on petsc-dev version 12911:0e70d56474b2
>>
>> http://dept-info.labri.fr/~lacoste/petsc/adding_pastix_12911_0e70d56474b2.patch 
>>
>>
>> - I added PaStiX.py package
>> - I modified Scotch.py package to use last version
>> - I modified partition/impls/scotch.c so that it compiles (it would 
>> not work in the current state)
>> - I had aij/mpi/pastix/pastix.c file to make an interface to pastix.
>> - I tried to use example 19 with pastix, like it is done with mumps 
>> but pastix solver is not found :
>>
>> http://dept-info.labri.fr/~lacoste/petsc/error_log
>>
>> Now, I have to know how to tell petsc it has a new solver 
>> implementing mpiaij.
>>
>> How can I do that ?
>>
>> After that I should be able to test if my implementation of mpiaij 
>> matrix is working or not.
>>
>> Thanks,
>>
>> XL.
>>
>>
>>
>> Barry Smith a écrit :
>>>
>>>   Please send your $PETSC_ARCH/conf/configure.log and 
>>> $PETSC_ARCH/conf/make.log to petsc-maint at mcs.anl.gov (not to this 
>>> email address)
>>> and we'll take a look.  Also send your modified Scotch.py file.
>>>
>>>  Thanks
>>>
>>>
>>>   Barry
>>>
>>> On Nov 3, 2008, at 10:45 AM, Xavier Lacoste wrote:
>>>
>>>> Hello,
>>>>
>>>> I want to add the solver PaStiX 
>>>> (https://gforge.inria.fr/projects/pastix/) to the PETSc library.
>>>> I Check-outed the last hg version of PETSc and started adding my 
>>>> PaStiX.py script, based on MUMPS one, in 
>>>> petsc-dev/config/PETSc/packages/ .
>>>> I modified first Scotch.py wich wasn't updated because PaStiX needs 
>>>> Scotch.
>>>>
>>>> My problem is that I couldn't succed in configuring PETSCc with 
>>>> "--with-pastix=1 etc." because i don't know how to say PETSc that 
>>>> PaStiX needs the "-L/Scotch/dir -lscotch etc."
>>>>
>>>> I have the setupDependencies :
>>>>
>>>>
>>>> def setupDependencies(self, framework):
>>>>  PETSc.package.Package.setupDependencies(self, framework)
>>>>  self.mpi        = framework.require('config.packages.MPI',self)
>>>>  self.blasLapack = 
>>>> framework.require('config.packages.BlasLapack',self)
>>>>  self.scotch     = framework.require('PETSc.packages.Scotch',self)
>>>>  self.deps       = [self.mpi,self.blasLapack,self.scotch]
>>>>  return
>>>>
>>>> But it didn't helped, the -L/scotchdir/lib is still missing...
>>>>
>>>> > Executing: mpicc  -o conftest    -g  conftest.o  
>>>> -Wl,-rpath,/home/xl/pastix/lib -L/home/xl/pastix/lib -lpastix 
>>>> -lpthread -lscotch -llapack -lblas *
>>>> > -L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/lib -ldl -lgcc_s 
>>>> -lgfortranbegin -lgfortran -lm -L/usr/lib/gcc/i486-linux-gnu/4.3.2 
>>>> -L/usr/lib/gcc/i486-linux-gnu
>>>> > -L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/usr/lib/gcc/i486-linux-gnu 
>>>> -L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/usr/lib/gcc/i486-linux-gnu
>>>> > -L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/lib -L/lib -lm 
>>>> -L/usr/lib/gcc/i486-linux-gnu/4.3.2 
>>>> -L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/lib -ldl -lgcc_s -ldl
>>>> > sh:
>>>> > Possible ERROR while running linker: /usr/bin/ld: cannot find 
>>>> -lscotch
>>>>
>>>> Hope i'm on the good Mailing list for this kind of questions.
>>>>
>>>> Thanks
>>>>
>>>> XL.
>>>> PaStiX team, INRIA-Bordeaux-Sud-Ouest, France.
>>>>
>>>>
>>>>
>>>>
>>>
>>
>




More information about the petsc-dev mailing list