new configuration/compile system for PETSc
I am revisiting the idea of a new configuration/compile system for PETSc (with the prototype cll: ssh://[email protected]//hg/petsc/cll) and am currently trying to see if we can come up with a list of requirements that satisfies all our needs and everyone's ambitions. I have added a preliminary list at the top of the cll.py file in that repository and also posted here. Requirements: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...) 3) Able to run parallel configures and builds (on shared memory system enough?) 4) Able to work with batch systems 5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order) 6) Able to utilize clang and similar systems 7) Works seamlessly with GNU autoconf and Cmake packages (that is will build these packages automatically) 8) Can download and install packages by given URL 9) Easy to add configurations for packages such as SuperLU, etc that have no decent configuration x 10) Can test for available functionalities (include files, etc) X 11) Easy to add new types of compilers, new tests 12) Does dependency analysis and rebuilds only what needs to be rebuilt 13) Able to manage test suites 14) Compatible with and able to use revision control systems 15) Completely command-line controlled but also with a GUI frontend that gives one full control as well 16) Able to build for bizarre-assed systems like the iPAD and GPUs. X - does, x - does some I looked at cmake recently and was not pleased with what I saw. Any comments, thoughts, complaints and volunteers early solicited. Barry
When you say "Portability to Windows", do you mean "native Windows, without Cygwin"? I agree that cmake is less than cool. Suppose there is a package we need already installed on the system (e.g., hdf5 installed in <hdf5_dir>), which depends on another package we need, which is also already installed on the system (e.g., openmpi_dir, installed in <openmpi_dir>). The user requests --with-hdf5-dir=<hdf5_dir> --download-mpich. Is this dangerous? Can/should we be able to detect this? On the system where I encountered this (Ubuntu), there is a package management system (apt-get) that contains the necessary information, but I think it would be prohibitively complex to make PETSc configure compatible with all package management systems so we can parse their package databases. As a related matter, there is a sometimes unclear distinction between a package (e.g., mpich or openmpi) and an abstract "capability" (mpi), which can be satisfied by multiple packages (openmpi, mpich). We have both: --with-mpi-dir=<mpi_dir> (capability), --download-mpich=1 (package). This is, of course, due to the fact that the "capability" has a standard interface (the MPI standard), that multiple packages can satisfy. If FFT had a similar standardized interface we could potentially have the same ambiguity with fft and fftw. BLAS-LAPACK may be another such example. Dmitry. On Fri, Jul 8, 2011 at 4:48 PM, Barry Smith <[email protected]> wrote:
I am revisiting the idea of a new configuration/compile system for PETSc (with the prototype cll: ssh://[email protected]//hg/petsc/cll) and am currently trying to see if we can come up with a list of requirements that satisfies all our needs and everyone's ambitions. I have added a preliminary list at the top of the cll.py file in that repository and also posted here.
Requirements: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...) 3) Able to run parallel configures and builds (on shared memory system enough?) 4) Able to work with batch systems 5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order) 6) Able to utilize clang and similar systems 7) Works seamlessly with GNU autoconf and Cmake packages (that is will build these packages automatically) 8) Can download and install packages by given URL 9) Easy to add configurations for packages such as SuperLU, etc that have no decent configuration x 10) Can test for available functionalities (include files, etc) X 11) Easy to add new types of compilers, new tests 12) Does dependency analysis and rebuilds only what needs to be rebuilt 13) Able to manage test suites 14) Compatible with and able to use revision control systems 15) Completely command-line controlled but also with a GUI frontend that gives one full control as well 16) Able to build for bizarre-assed systems like the iPAD and GPUs.
X - does, x - does some
I looked at cmake recently and was not pleased with what I saw.
Any comments, thoughts, complaints and volunteers early solicited.
Barry
On Jul 8, 2011, at 6:34 PM, Dmitry Karpeev wrote:
When you say "Portability to Windows", do you mean "native Windows, without Cygwin"?
Yes, cll does this and I submit this is actually not difficult (some other requirements may be :-(
I agree that cmake is less than cool.
These are good points. I've added them to the master list in cll.py Now that we've started a list it would be a good idea to start adding thoughts on how each requirement could be met in a clean way. Barry
Suppose there is a package we need already installed on the system (e.g., hdf5 installed in <hdf5_dir>), which depends on another package we need, which is also already installed on the system (e.g., openmpi_dir, installed in <openmpi_dir>). The user requests --with-hdf5-dir=<hdf5_dir> --download-mpich. Is this dangerous? Can/should we be able to detect this?
On the system where I encountered this (Ubuntu), there is a package management system (apt-get) that contains the necessary information, but I think it would be prohibitively complex to make PETSc configure compatible with all package management systems so we can parse their package databases.
As a related matter, there is a sometimes unclear distinction between a package (e.g., mpich or openmpi) and an abstract "capability" (mpi), which can be satisfied by multiple packages (openmpi, mpich). We have both: --with-mpi-dir=<mpi_dir> (capability), --download-mpich=1 (package). This is, of course, due to the fact that the "capability" has a standard interface (the MPI standard), that multiple packages can satisfy. If FFT had a similar standardized interface we could potentially have the same ambiguity with fft and fftw. BLAS-LAPACK may be another such example.
Dmitry.
On Fri, Jul 8, 2011 at 4:48 PM, Barry Smith <[email protected]> wrote:
I am revisiting the idea of a new configuration/compile system for PETSc (with the prototype cll: ssh://[email protected]//hg/petsc/cll) and am currently trying to see if we can come up with a list of requirements that satisfies all our needs and everyone's ambitions. I have added a preliminary list at the top of the cll.py file in that repository and also posted here.
Requirements: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...) 3) Able to run parallel configures and builds (on shared memory system enough?) 4) Able to work with batch systems 5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order) 6) Able to utilize clang and similar systems 7) Works seamlessly with GNU autoconf and Cmake packages (that is will build these packages automatically) 8) Can download and install packages by given URL 9) Easy to add configurations for packages such as SuperLU, etc that have no decent configuration x 10) Can test for available functionalities (include files, etc) X 11) Easy to add new types of compilers, new tests 12) Does dependency analysis and rebuilds only what needs to be rebuilt 13) Able to manage test suites 14) Compatible with and able to use revision control systems 15) Completely command-line controlled but also with a GUI frontend that gives one full control as well 16) Able to build for bizarre-assed systems like the iPAD and GPUs.
X - does, x - does some
I looked at cmake recently and was not pleased with what I saw.
Any comments, thoughts, complaints and volunteers early solicited.
Barry
On Fri, Jul 8, 2011 at 16:48, Barry Smith <[email protected]> wrote:
X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...)
We can support the systems that we use, but I fear that this task will become endless.
3) Able to run parallel configures and builds (on shared memory system enough?)
Probably, distcc can also be used if distributed-memory is needed.
5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order)
This is important and also quite tricky, especially when dependencies vary based on configuration options. I think we need to be more precise about how to handle packages that depend on PETSc relative to packages that PETSc (optionally) depends on. And how central would PETSc be in this new package management system?
On Jul 9, 2011, at 10:41 AM, Jed Brown wrote:
On Fri, Jul 8, 2011 at 16:48, Barry Smith <[email protected]> wrote: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...)
We can support the systems that we use, but I fear that this task will become endless.
Sadly we only use Emacs and don't even support that (besides crappy etags) very well.
3) Able to run parallel configures and builds (on shared memory system enough?)
Probably, distcc can also be used if distributed-memory is needed.
I think we can steal ideas from distcc but I'd like to keep a pure Python environment.
5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order)
This is important and also quite tricky, especially when dependencies vary based on configuration options.
I think we need to be more precise about how to handle packages that depend on PETSc relative to packages that PETSc (optionally) depends on. And how central would PETSc be in this new package management system?
PETSc should be no different than any other package. It has dependencies on other packages and other packages have dependencies on PETSc (SLEPc, MeshLib,...). In theory BuildSystem is independent of PETSc but in practice our build infra-structure treats PETSc as a first among equals and that should be changed. Barry
On Sat, Jul 9, 2011 at 11:47 AM, Barry Smith <[email protected]> wrote:
On Jul 9, 2011, at 10:41 AM, Jed Brown wrote:
On Fri, Jul 8, 2011 at 16:48, Barry Smith <[email protected]> wrote: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...)
We can support the systems that we use, but I fear that this task will become endless.
Sadly we only use Emacs and don't even support that (besides crappy etags) very well.
3) Able to run parallel configures and builds (on shared memory system enough?)
Probably, distcc can also be used if distributed-memory is needed.
I think we can steal ideas from distcc but I'd like to keep a pure Python environment.
5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order)
This is important and also quite tricky, especially when dependencies vary based on configuration options.
I think we need to be more precise about how to handle packages that depend on PETSc relative to packages that PETSc (optionally) depends on. And how central would PETSc be in this new package management system?
PETSc should be no different than any other package. It has dependencies on other packages and other packages have dependencies on PETSc (SLEPc, MeshLib,...). In theory BuildSystem is independent of PETSc but in practice our build infra-structure treats PETSc as a first among equals and that should be changed.
I frequently get this question: I have a code "blah", which has its own build system (e.g., wmake), and I want to use PETSc solvers in it. How can I build the two together? The usual answer I give that they either have to (a) build their application using our makefiles, or (b) include $PETSC_DIR/conf/variables, etc. This problem stems from the fact that in the dependency graph we always treat PETSc as the source and topologically sort from it. Then we configure/build the other packages using their own crappy configure/make systems by feeding them a controlled set of options. In principle, we could allow PETSc to be an "interior vertex" so that it is built before some other packages. Dmitry.
Barry
On Sat, Jul 9, 2011 at 18:00, Dmitry Karpeev <[email protected]> wrote:
I frequently get this question: I have a code "blah", which has its own build system (e.g., wmake), and I want to use PETSc solvers in it. How can I build the two together? The usual answer I give that they either have to (a) build their application using our makefiles, or (b) include $PETSC_DIR/conf/variables, etc.
These are both makefile-based solutions, and "make getlinklibs" is a better ways to snarf the variables. We could easily write a pkgconfig file for PETSc. Some people would like that, but pkgconfig doesn't really care about supporting multiple installs (different PETSC_ARCH). As I've suggested before, I think we should have a pure Python script that provides the information in a machine-readable way (listing library paths without "-Wl,-rpath," flags that may need to be adjusted if the user is not linking exactly the same way that PETSc was, correctly handle shared versus static linking, etc).
On Sat, Jul 9, 2011 at 6:13 PM, Jed Brown <[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:00, Dmitry Karpeev <[email protected]> wrote:
I frequently get this question: I have a code "blah", which has its own build system (e.g., wmake), and I want to use PETSc solvers in it. How can I build the two together? The usual answer I give that they either have to (a) build their application using our makefiles, or (b) include $PETSC_DIR/conf/variables, etc.
These are both makefile-based solutions, That's right. And that's my point: what we offer now for incorporating PETSc into other codes is somewhat limited. and "make getlinklibs" is a better ways to snarf the variables. But only marginally. We could easily write a pkgconfig file for PETSc. Some people would like that, but pkgconfig doesn't really care about supporting multiple installs (different PETSC_ARCH). As I've suggested before, I think we should have a pure Python script that provides the information in a machine-readable way (listing library paths without "-Wl,-rpath," flags that may need to be adjusted if the user is not linking exactly the same way that PETSc was, correctly handle shared versus static linking, etc).
I think another way would be to simplify the writing of "configure modules" for libraries built using some set of standard tools (e.g., GNU packages built with configure/make, etc). We already configure these packages internally (e.g., mpich). If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it. At the same time they couldn't have to parse the output of make getlinklibs, etc. Dmitry.
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev <[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it.
But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake).
On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown <[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev <[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it.
But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake).
Yes, but there is also a practical problem: an engineer or a scientist, not intimately familiar with automake, cmake, etc., has taken the effort to understand PETSc so that our linear solvers can be substituted for FOO's. How can we make it easier for these people to insert PETSc into their code? Here I only mean the build process. Maybe making them write foo.py is not the right approach, but we should have a usable approach (and, maybe, an example of doing it). In particular, is it sufficient to export linklibs, or do we also need to export the compiler (e.g., to ensure consistent Fortrant name mangling)? There are a good number of Fortran users that want to use PETSc too. Dmitry.
We happen to use Petsc with our own makefiles. PETSc is compiled entirely separately (or we use system-provided PETSc-modules). We then manually set the appropriate include- and library-paths in our makefiles, for example: PETSC_INCLUDE = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include PETSC_LIB = -L$(PETSC_DIR)/$(PETSC_ARCH)/lib -lpetsc -lX11 ... other stuff here ... ARCH_INCLUDE = $(PETSC_INCLUDE) ... ARCH_LIB_PARALLEL = $(HDF_LIB) $(FFTW_LIB) $(PETSC_LIB) .... Not elegant, but has been working like a charm for the last 12 years. Harald On 7/10/11 1:02 AM, Dmitry Karpeev wrote:
On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown<[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev<[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it. But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake). Yes, but there is also a practical problem: an engineer or a scientist, not intimately familiar with automake, cmake, etc., has taken the effort to understand PETSc so that our linear solvers can be substituted for FOO's. How can we make it easier for these people to insert PETSc into their code? Here I only mean the build process. Maybe making them write foo.py is not the right approach, but we should have a usable approach (and, maybe, an example of doing it).
In particular, is it sufficient to export linklibs, or do we also need to export the compiler (e.g., to ensure consistent Fortrant name mangling)? There are a good number of Fortran users that want to use PETSc too.
Dmitry.
-- Harald Pfeiffer Assistant Professor Cdn. Institute for Theoretical Astrophysics University of Toronto [email protected] Tel. ++1 416-978-8497
On Sat, Jul 9, 2011 at 7:18 PM, Harald Pfeiffer <[email protected]> wrote:
We happen to use Petsc with our own makefiles. PETSc is compiled entirely separately (or we use system-provided PETSc-modules). We then manually set the appropriate include- and library-paths in our makefiles, for example:
PETSC_INCLUDE = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include PETSC_LIB = -L$(PETSC_DIR)/$(PETSC_ARCH)/lib -lpetsc -lX11 ... other stuff here ... ARCH_INCLUDE = $(PETSC_INCLUDE) ... ARCH_LIB_PARALLEL = $(HDF_LIB) $(FFTW_LIB) $(PETSC_LIB) ....
Not elegant, but has been working like a charm for the last 12 years.
I'm not saying it can't be made to work. I'm saying it might not be trivial for someone just starting to use PETSc and not even necessarily that familiar with make: there are a lot of potential users like that. And even for more sophisticated users it might take a while to work out the kinks. Dmitry.
Harald
On 7/10/11 1:02 AM, Dmitry Karpeev wrote:
On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown<[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev<[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it.
But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake).
Yes, but there is also a practical problem: an engineer or a scientist, not intimately familiar with automake, cmake, etc., has taken the effort to understand PETSc so that our linear solvers can be substituted for FOO's. How can we make it easier for these people to insert PETSc into their code? Here I only mean the build process. Maybe making them write foo.py is not the right approach, but we should have a usable approach (and, maybe, an example of doing it).
In particular, is it sufficient to export linklibs, or do we also need to export the compiler (e.g., to ensure consistent Fortrant name mangling)? There are a good number of Fortran users that want to use PETSc too.
Dmitry.
-- Harald Pfeiffer Assistant Professor Cdn. Institute for Theoretical Astrophysics University of Toronto [email protected] Tel. ++1 416-978-8497
Observe that PETSc's configure deals with the problem of consistently configuring MULTIPLE packages, while most tools I have heard of typically deal with a SINGLE package. That's a qualitative difference, in my opinion. Separately, I would suggest having the new build system allow the user to install PETSc in one go. Something like 'cll install --with-clanguage=c++ ...', because it's rare for users to stop after configuring, and then end up executing an easily automatable sequence of steps: configure --with-clanguage=c++ ... make PETSC_DIR= ... all make PETSC_DIR= ... PETSC_ARCH=... test Of course, we should provide intermediate stages as well -- 'cll configure' -- etc. In particular, if cll were able to configure "arbitrary" collections of packages, it may be desirable to leave the "top" package configured, but not built, as it has to be built repeatedly (as part of a development cycle) using make or cmake, etc. Dmitry. On Sat, Jul 9, 2011 at 7:37 PM, Dmitry Karpeev <[email protected]> wrote:
On Sat, Jul 9, 2011 at 7:18 PM, Harald Pfeiffer <[email protected]> wrote:
We happen to use Petsc with our own makefiles. PETSc is compiled entirely separately (or we use system-provided PETSc-modules). We then manually set the appropriate include- and library-paths in our makefiles, for example:
PETSC_INCLUDE = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include PETSC_LIB = -L$(PETSC_DIR)/$(PETSC_ARCH)/lib -lpetsc -lX11 ... other stuff here ... ARCH_INCLUDE = $(PETSC_INCLUDE) ... ARCH_LIB_PARALLEL = $(HDF_LIB) $(FFTW_LIB) $(PETSC_LIB) ....
Not elegant, but has been working like a charm for the last 12 years.
I'm not saying it can't be made to work. I'm saying it might not be trivial for someone just starting to use PETSc and not even necessarily that familiar with make: there are a lot of potential users like that. And even for more sophisticated users it might take a while to work out the kinks.
Dmitry.
Harald
On 7/10/11 1:02 AM, Dmitry Karpeev wrote:
On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown<[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev<[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it.
But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake).
Yes, but there is also a practical problem: an engineer or a scientist, not intimately familiar with automake, cmake, etc., has taken the effort to understand PETSc so that our linear solvers can be substituted for FOO's. How can we make it easier for these people to insert PETSc into their code? Here I only mean the build process. Maybe making them write foo.py is not the right approach, but we should have a usable approach (and, maybe, an example of doing it).
In particular, is it sufficient to export linklibs, or do we also need to export the compiler (e.g., to ensure consistent Fortrant name mangling)? There are a good number of Fortran users that want to use PETSc too.
Dmitry.
-- Harald Pfeiffer Assistant Professor Cdn. Institute for Theoretical Astrophysics University of Toronto [email protected] Tel. ++1 416-978-8497
Ok, here's the current list of requirements. What is missing? Requirements: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...) 3) Able to run parallel configures and builds (on shared memory system enough?, distcc?) 4) Able to work with batch systems 5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order) 6) Able to utilize clang and similar systems 7) Works seamlessly with GNU autoconf, Cmake, pkconfig packages (that is will build these packages automatically and maybe generate them) 8) Can download and install packages by given URL 9) Easy to add configurations for packages such as SuperLU, etc that have no decent configuration x 10) Can test for available functionalities (include files, etc) X 11) Easy to add new types of compilers, new tests 12) Does dependency analysis and rebuilds only what needs to be rebuilt 13) Able to manage test suites 14) Compatible with and able to use revision control systems 15) Completely command-line controlled but also with a GUI frontend that gives one full control as well 16) Able to build for bizarre-assed systems like the iPAD and GPUs. 17) Able to manage the concept of abstract packages such as MPI and BLAS/LAPACK and particular implementations 18) Able to handle already installed packages and detect if that package uses something incompatable with other packages: for example HDF5 installed with OpenMPI and someone building other packages with MPICH. 19) Able to manage several different compilers of the same type (for example 2 C compilers) being used for different packages. 20) Incrementable builds, that is more packages can be installed later based on packages already installed. Say add SLEPc later. X - does, x - does some On Jul 9, 2011, at 7:45 PM, Dmitry Karpeev wrote:
Observe that PETSc's configure deals with the problem of consistently configuring MULTIPLE packages, while most tools I have heard of typically deal with a SINGLE package. That's a qualitative difference, in my opinion.
Separately, I would suggest having the new build system allow the user to install PETSc in one go. Something like 'cll install --with-clanguage=c++ ...', because it's rare for users to stop after configuring, and then end up executing an easily automatable sequence of steps: configure --with-clanguage=c++ ... make PETSC_DIR= ... all make PETSC_DIR= ... PETSC_ARCH=... test
Of course, we should provide intermediate stages as well -- 'cll configure' -- etc. In particular, if cll were able to configure "arbitrary" collections of packages, it may be desirable to leave the "top" package configured, but not built, as it has to be built repeatedly (as part of a development cycle) using make or cmake, etc.
Dmitry.
On Sat, Jul 9, 2011 at 7:37 PM, Dmitry Karpeev <[email protected]> wrote:
On Sat, Jul 9, 2011 at 7:18 PM, Harald Pfeiffer <[email protected]> wrote:
We happen to use Petsc with our own makefiles. PETSc is compiled entirely separately (or we use system-provided PETSc-modules). We then manually set the appropriate include- and library-paths in our makefiles, for example:
PETSC_INCLUDE = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include PETSC_LIB = -L$(PETSC_DIR)/$(PETSC_ARCH)/lib -lpetsc -lX11 ... other stuff here ... ARCH_INCLUDE = $(PETSC_INCLUDE) ... ARCH_LIB_PARALLEL = $(HDF_LIB) $(FFTW_LIB) $(PETSC_LIB) ....
Not elegant, but has been working like a charm for the last 12 years.
I'm not saying it can't be made to work. I'm saying it might not be trivial for someone just starting to use PETSc and not even necessarily that familiar with make: there are a lot of potential users like that. And even for more sophisticated users it might take a while to work out the kinks.
Dmitry.
Harald
On 7/10/11 1:02 AM, Dmitry Karpeev wrote:
On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown<[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev<[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it.
But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake).
Yes, but there is also a practical problem: an engineer or a scientist, not intimately familiar with automake, cmake, etc., has taken the effort to understand PETSc so that our linear solvers can be substituted for FOO's. How can we make it easier for these people to insert PETSc into their code? Here I only mean the build process. Maybe making them write foo.py is not the right approach, but we should have a usable approach (and, maybe, an example of doing it).
In particular, is it sufficient to export linklibs, or do we also need to export the compiler (e.g., to ensure consistent Fortrant name mangling)? There are a good number of Fortran users that want to use PETSc too.
Dmitry.
-- Harald Pfeiffer Assistant Professor Cdn. Institute for Theoretical Astrophysics University of Toronto [email protected] Tel. ++1 416-978-8497
This is probably implied by what's already on the list, but we need an easy way for the *users* to build individual examples, as well as to add new examples, when they experiment with PETSc. The ability to incorporate PETSc into new and/or existing codes that use other packages (that aren't a part of the PETSc build) has already been discussed. It's a natural extension of writing and building small examples. It's probably implied by one of the below list items, but I'm not sure which :-), so I thought I'd mention it again. Dmitry. On Sat, Jul 9, 2011 at 10:17 PM, Barry Smith <[email protected]> wrote:
Ok, here's the current list of requirements. What is missing?
Requirements: X 1) Portability to Windows, Cygwin, Unix (all versions) 2) Compatible with GUI development systems (Xcode, Eclipse, Emacs, ...) 3) Able to run parallel configures and builds (on shared memory system enough?, distcc?) 4) Able to work with batch systems 5) Able to handle dependencies between packages (given dependencies between packages builds everything in the correct order) 6) Able to utilize clang and similar systems 7) Works seamlessly with GNU autoconf, Cmake, pkconfig packages (that is will build these packages automatically and maybe generate them) 8) Can download and install packages by given URL 9) Easy to add configurations for packages such as SuperLU, etc that have no decent configuration x 10) Can test for available functionalities (include files, etc) X 11) Easy to add new types of compilers, new tests 12) Does dependency analysis and rebuilds only what needs to be rebuilt 13) Able to manage test suites 14) Compatible with and able to use revision control systems 15) Completely command-line controlled but also with a GUI frontend that gives one full control as well 16) Able to build for bizarre-assed systems like the iPAD and GPUs. 17) Able to manage the concept of abstract packages such as MPI and BLAS/LAPACK and particular implementations 18) Able to handle already installed packages and detect if that package uses something incompatable with other packages: for example HDF5 installed with OpenMPI and someone building other packages with MPICH. 19) Able to manage several different compilers of the same type (for example 2 C compilers) being used for different packages. 20) Incrementable builds, that is more packages can be installed later based on packages already installed. Say add SLEPc later.
X - does, x - does some
On Jul 9, 2011, at 7:45 PM, Dmitry Karpeev wrote:
Observe that PETSc's configure deals with the problem of consistently configuring MULTIPLE packages, while most tools I have heard of typically deal with a SINGLE package. That's a qualitative difference, in my opinion.
Separately, I would suggest having the new build system allow the user to install PETSc in one go. Something like 'cll install --with-clanguage=c++ ...', because it's rare for users to stop after configuring, and then end up executing an easily automatable sequence of steps: configure --with-clanguage=c++ ... make PETSC_DIR= ... all make PETSC_DIR= ... PETSC_ARCH=... test
Of course, we should provide intermediate stages as well -- 'cll configure' -- etc. In particular, if cll were able to configure "arbitrary" collections of packages, it may be desirable to leave the "top" package configured, but not built, as it has to be built repeatedly (as part of a development cycle) using make or cmake, etc.
Dmitry.
On Sat, Jul 9, 2011 at 7:37 PM, Dmitry Karpeev <[email protected]> wrote:
On Sat, Jul 9, 2011 at 7:18 PM, Harald Pfeiffer <[email protected]> wrote:
We happen to use Petsc with our own makefiles. PETSc is compiled entirely separately (or we use system-provided PETSc-modules). We then manually set the appropriate include- and library-paths in our makefiles, for example:
PETSC_INCLUDE = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include PETSC_LIB = -L$(PETSC_DIR)/$(PETSC_ARCH)/lib -lpetsc -lX11 ... other stuff here ... ARCH_INCLUDE = $(PETSC_INCLUDE) ... ARCH_LIB_PARALLEL = $(HDF_LIB) $(FFTW_LIB) $(PETSC_LIB) ....
Not elegant, but has been working like a charm for the last 12 years.
I'm not saying it can't be made to work. I'm saying it might not be trivial for someone just starting to use PETSc and not even necessarily that familiar with make: there are a lot of potential users like that. And even for more sophisticated users it might take a while to work out the kinks.
Dmitry.
Harald
On 7/10/11 1:02 AM, Dmitry Karpeev wrote:
On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown<[email protected]> wrote:
On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev<[email protected]> wrote:
If a user could write a simple foo.py that configured/built their favorite package with PETSc as a dependency, they could then proceed to modify the FOO code and jack PETSc into it.
But this just a different form of asking them to adopt our build system, except that makefiles are a de-facto standard and our system won't be familiar to anyone. Any system has to be easily usable from other systems (at least makefiles, automake, and cmake).
Yes, but there is also a practical problem: an engineer or a scientist, not intimately familiar with automake, cmake, etc., has taken the effort to understand PETSc so that our linear solvers can be substituted for FOO's. How can we make it easier for these people to insert PETSc into their code? Here I only mean the build process. Maybe making them write foo.py is not the right approach, but we should have a usable approach (and, maybe, an example of doing it).
In particular, is it sufficient to export linklibs, or do we also need to export the compiler (e.g., to ensure consistent Fortrant name mangling)? There are a good number of Fortran users that want to use PETSc too.
Dmitry.
-- Harald Pfeiffer Assistant Professor Cdn. Institute for Theoretical Astrophysics University of Toronto [email protected] Tel. ++1 416-978-8497
On Sun, Jul 10, 2011 at 21:11, Dmitry Karpeev <[email protected]> wrote:
This is probably implied by what's already on the list, but we need an easy way for the *users* to build individual examples, as well as to add new examples, when they experiment with PETSc.
This is the easiest possible case to support. We are focusing on the interoperability and multi-dependency cases because they are actually hard.
participants (4)
-
Barry Smith -
Dmitry Karpeev -
Harald Pfeiffer -
Jed Brown