Home My Page Projects PaStiX
Summary Activity Forums Lists Docs News Files

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: pastix shared libraries? [ Reply ]
By: Xavier Lacoste on 2012-05-22 06:02
[forum:109681]
OK I'll add, it... was afraid it wouldn't work with other compiler than GCC, I'll keep it in config.in, in the SHARED_FLAGS with a __SO_NAME__ that will be replaced by the name of the lib in the Makefile.

If you want, we can add you to the developer list so that you can get easily the last release and you can commit some stuff if you have some other requirement.

XL.

RE: pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-21 15:12
[forum:109679]
In fact it works...
The point is that it's not clear to understand that you have to choose an integer value
for each option :
""
-mat_pastix_threadnbr 4 -mat_pastix_verbose 4 -mat_pastix_check 1
"""

It will help a lot if you can be more explicit in http://pastix.gforge.inria.fr/files/README_PETSC-txt.html

RE: pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-21 14:32
[forum:109677]
> You added $(LDFLAGS) -Wl,-soname,libmatrix_driver${VERSIONNAME}${LIB_SO}${SOVERSION}
> to the .so generation,
> what does that adds ?

it adds the soname to the shared library

As for the PETSC error I will try to check the compilations options used by PETSC for Pastix

RE: pastix shared libraries? [ Reply ]
By: Xavier Lacoste on 2012-05-21 13:00
[forum:109676]
Ok for the SOVERSION=5.2 and add the link creation from .so to .so.5.2

For the PETSc error, I only used it with letting PETSc download the PaStiX archive, didn't tried to build it using an installed PaStiX version...

An other question :

You added $(LDFLAGS) -Wl,-soname,libmatrix_driver${VERSIONNAME}${LIB_SO}${SOVERSION} to the .so generation,
what does that adds ?

XL.

RE: pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-21 12:18
[forum:109675]
> About the SO_VERSION, I saw we have some libXXX.so.1 or whatever, what is the
> .1 made for ?

I just try to stick to the convention on soname-version (eg 1.0) for shared library :
libXXX.so.1.0
libXXX.so.1 (which points to libXXX.so.1)
libXXX.so (which points to libXXX.so)

See Debian policy on shared libs
"""
soname-version is the version part of the soname of the library. The soname is the thing that must exactly match for the library to be recognized by the dynamic linker, and is usually of the form name.so.major-version, in our example, libz.so.1.[67] The version part is the part which comes after .so., so in our case, it is 1. The soname may instead be of the form name-major-version.so, such as libdb-4.8.so, in which case the name would be libdb and the version would be 4.8.
"""

> And you modified so that SHARED=1 provide .so and not .a where I produced both.
> Is there a particular problem with generating both ?

My idea is that we do not need to build static library with -fPIC option...


In the meantime I've tried to rebuild petsc 3.2 with pastix support.
I have a trouble checking the petsc package. Running the example quoted in
http://pastix.gforge.inria.fr/files/README_PETSC-txt.html I end up with an error:


[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Argument out of range!
[0]PETSC ERROR: Input string [0:4] has no integer value (do not include . in it)!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 5, Sat Oct 29 13:45:54 CDT 2011
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: ./ex2 on a linux-gnu named calcul14 by debian Mon May 21 14:11:56 2012
[0]PETSC ERROR: Libraries linked from /home/debian/debian/petsc-3.2.dfsg/linux-gnu-c-opt/lib
[0]PETSC ERROR: Configure run at Mon May 21 13:06:36 2012
[0]PETSC ERROR: Configure options --with-shared-libraries --with-debugging=0 --useThreads 0 --with-clanguage=C++
-with-c-support --with-fortran-interfaces=1 --with-mpi-dir=/usr/lib/openmpi --with-mpi-shared=1 --with-blas-lib=-lblas --with-lapack-lib=-llapack --with-blacs=1 --with-blacs-include=/usr/include --with-blacs-lib="[/usr/lib/libblacsCinit-openmpi.so,/usr/lib/libblacs-openmpi.so]" --with-scalapack=1 --with-scalapack-include=/usr/include --with-scalapack-lib=/usr/lib/libscalapack-openmpi.so --with-mumps=1 --with-mumps-include=/usr/include --with-mumps-lib="[/usr/lib/libdmumps.so,/usr/lib/libzmumps.so,/usr/lib/libsmumps.so,/usr/lib/libcmumps.so,/usr/lib/libmumps_common.so,/usr/lib/libpord.so]" --with-umfpack=1 --with-umfpack-include=/usr/include/suitesparse --with-umfpack-lib="[/usr/lib/libumfpack.so,/usr/lib/libamd.so]" --with-cholmod=1 --with-cholmod-include=/usr/include/suitesparse --with-cholmod-lib=/usr/lib/libcholmod.so --with-spooles=1 --with-spooles-include=/usr/include/spooles --with-spooles-lib=/usr/lib/libspooles.so --with-hypre=1 --with-hypre-dir=/usr --with-ptscotch=1 --with-ptscotch-include=/usr/include/scotch --with-ptscotch-lib="[/usr/lib/libptesmumps.so,/usr/lib/libptscotch.so,/usr/lib/libptscotcherr.so]" --with-pastix=1 --with-pastix-include=/usr/include/pastix --with-pastix-lib="[/usr/lib/libpastix.so]" --with-hdf5=1 --with-hdf5-dir=/usr
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: PetscOptionsStringToInt() line 106 in src/sys/objects/options.c
[0]PETSC ERROR: PetscOptionsGetInt() line 1288 in src/sys/objects/options.c
[0]PETSC ERROR: PetscOptionsInt() line 673 in src/sys/objects/aoptions.c
[0]PETSC ERROR: MatFactorNumeric_PaStiX() line 368 in src/mat/impls/aij/mpi/pastix/pastix.c
[0]PETSC ERROR: MatLUFactorNumeric() line 2876 in src/mat/interface/matrix.c
[0]PETSC ERROR: PCSetUp_LU() line 160 in src/ksp/pc/impls/factor/lu/lu.c
[0]PETSC ERROR: PCSetUp() line 819 in src/ksp/pc/interface/precon.c
[0]PETSC ERROR: main() line 54 in src/ksp/pc/examples/tests/ex2.c
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 63.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

I have no clue what's the problem? Maybe some trouble with the compilations options of pastix (Note that pastix has been compiled with the default options)


The following example work:
./ex2 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package pastix -ksp_monitor
Check : Numbering OK
Check : Sort CSC OK
Check : Duplicates OK
Check : Numbering OK
Check : Sort CSC OK
Check : Duplicates OK
Running preonly with lu preconditioning
2 norm of error < 1.e-12 Number of iterations 1

RE: pastix shared libraries? [ Reply ]
By: Xavier Lacoste on 2012-05-21 06:52
[forum:109673]
Hello,

For the example/src/makefile part :

You use the ${SHARED} variable which is not available as config.in is not included.
But the shared libraries are loaded as default on my machine so it worked like that.

For the murge/examples/Makefile :

I didn't looked this part but I'll had the BINDIR creation which seems to be missing.

For the Makefile :

I'll add

ifeq (1, ${SHARED})
all: $(BUILD_LIBDIR)/libpastix$(LIB_SO) \
$(BUILD_LIBDIR)/libpastix_murge$(LIB_SO)
endif

and

tests: examples murge

If you need it

i'll add :
- $(MKPROG) -C murge/example
+ $(MKPROG) -C murge/examples

For the $(DESTDIR)${LIBDIR}/ part, as we considered it, LIBDIR includes the ROOTDIR (Which is your DESTDIR) in config.in.

About the SO_VERSION, I saw we have some libXXX.so.1 or whatever, what is the .1 made for ?

And you modified so that SHARED=1 provide .so and not .a where I produced both. Is there a particular problem with generating both ?

Thanks again.

XL.



RE: pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-16 14:35
[forum:109668]

sharedlibrary.patch (20) downloads
Thanks for your patch
It almost work for me. I made some changes to get it to work (see the attached patch).
Please let me know what you keep from my patch if you keep something.

Best
C

RE: pastix shared libraries? [ Reply ]
By: Xavier Lacoste on 2012-05-16 08:42
[forum:109667]

pastix_release_3688.tar.bz2 (18) downloads
Hello,

Here is a new generated release which should build shared libraries when you uncomment the SHARED part of the config.in

Please tell me if you have any problem with it.

XL.

RE: pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-15 13:28
[forum:109656]
Great :)
Thanks for your help

RE: pastix shared libraries? [ Reply ]
By: Pierre Ramet on 2012-05-15 13:23
[forum:109655]
Xavier has a patch to remove multiple definitions.
He will send you a new release including this patch and some bugfixes.
I think you may build PaStiX with INTSIZE32 or INTSIZE64 with and without MPI (FORCE_NO_MPI) like for scotch and ptscotch.
Threads support should always been enable.
You should keep a dependency on ptscotch (metis is optional) and enable DISTRIBUTED compilation flag.
Finaly, PaStiX need a BLAS library (sequential i.e. not multithreaded).
Regards,
Pierre.

RE: pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-15 13:01
[forum:109654]

sharedlibrary.patch (18) downloads
Please find attached a quick and dirty hack to enable shared libs.
The shared libs are not generated qith latest g++ >= 4.5 due to multiple definitions

Hope this helps
Best
C

RE: pastix shared libraries? [ Reply ]
By: Pierre Ramet on 2012-05-15 12:20
[forum:109653]
Thank you Christophe for packaging PaStiX. We already use -fPIC option for the python wrapper, but as Xavier said, I will try to add support for shared libraries.
As you already work on the Scotch package, you should find the same kind of options for architectures. We can define default options that should be enable with common user functionnalities. And I think we should provide you lastest patches for bugfix with the current release. Thanks again, Pierre.

RE: pastix shared libraries? [ Reply ]
By: Xavier Lacoste on 2012-05-15 11:41
[forum:109652]
Hello,

I never tried to make a shared library.
I'll have a look at it.

Thanks for the packaging !

XL.

pastix shared libraries? [ Reply ]
By: Trophime Christophe on 2012-05-15 09:46
[forum:109651]
Hi, I am a member of the Debian Science team. I would like to package pastix for debian.
I manage to get a version with only static libs but I would also like to have shared libraries for pastix.
The trouble is building shared libs fails because of a lot of "multiple definitions"...

Do you have any hints how to fix this.
Do you plan to support shared libraries?
Thanks

C.