1
1
Граф коммитов

58 Коммитов

Автор SHA1 Сообщение Дата
Sven Stork
a97e65e7f7 - export mmap/munmap so the memory manager can intercept this calls
This commit was SVN r14665.
2007-05-16 13:40:33 +00:00
Sven Stork
b5f1538d21 - export the required symbols
This commit was SVN r14414.
2007-04-18 13:27:28 +00:00
Josh Hursey
dadca7da88 Merging in the jjhursey-ft-cr-stable branch (r13912 : HEAD).
This merge adds Checkpoint/Restart support to Open MPI. The initial
frameworks and components support a LAM/MPI-like implementation.

This commit follows the risk assessment presented to the Open MPI core
development group on Feb. 22, 2007.

This commit closes trac:158

More details to follow.

This commit was SVN r14051.

The following SVN revisions from the original message are invalid or
inconsistent and therefore were not cross-referenced:
  r13912

The following Trac tickets were found above:
  Ticket 158 --> https://svn.open-mpi.org/trac/ompi/ticket/158
2007-03-16 23:11:45 +00:00
Rainer Keller
1ba8f82cfd - Move the help-string to the configure, where it belongs.
This commit was SVN r12406.
2006-11-02 11:20:05 +00:00
George Bosilca
5e280cda19 Latest and greatest. Now OPAL is ready for the Windows prime-time.
The same treatement will happens on all sub-projects. The .h files
have to be C++ compatibles and all symbols with an external visibility
have to get the {PROJECT}_DECLSPEC in front of the prototype.

This commit was SVN r11340.
2006-08-23 00:29:35 +00:00
George Bosilca
6afa4c6c64 Windows friendly version. We have to split the OMPI_DECLSPEC in at least 3
different macros, one for each project. Therefore, now we have OPAL_DECLSPEC,
ORTE_DECLSPEC and OMPI_DECLSPEC. Please use them based on the sub-project.

This commit was SVN r11270.
2006-08-20 15:54:04 +00:00
Brian Barrett
a1b0f2d5bd * opal already sets __builtin_expect, so don't try to redefine it if it's
already set.  This can annoy compilers that aren't GNUish
* __align is technically a reserved token and IBM XL appears to be doing
  something with it that causes compile badness.  So use a different
  variable name.

refs trac:279

This commit was SVN r11264.

The following Trac tickets were found above:
  Ticket 279 --> https://svn.open-mpi.org/trac/ompi/ticket/279
2006-08-20 01:42:36 +00:00
Jeff Squyres
7aac77a37c When on the IA64 platform, if we're using the Intel 9.0 v20051201
compiler, automatically disable the ptmalloc component.  It seems that
optimization level -O2 or higher will cause the generated code to do
Bad Things (e.g., opalcc will segv).  Upgrading to the Intel 9.1
compiler seems to fix the problem.

This closes ticket #227.

This commit was SVN r11076.
2006-08-01 18:48:34 +00:00
Brian Barrett
dc47dd39aa * mvapi's deregister call calls free, and the fast bins in ptmalloc2 aren't
reentrant for free(), so we can't call free() from inside an sbrk() handler.
  The solution is never call sbrk() with a negative number.  The mmap() allocator
  used for large allocations does not have this problem and continues to give
  memory back to the OS as soon as possible.

This should go to both the v1.1 and v1.0 branches.

This commit was SVN r9943.
2006-05-16 21:16:55 +00:00
Brian Barrett
710bca2df4 * properly enable threading support inside ptmalloc2=. Thanks to Tim for
figuring out that ptmalloc2 was borked.

This commit was SVN r9251.
2006-03-11 02:37:55 +00:00
Brian Barrett
566a050c23 Next step in the project split, mainly source code re-arranging
- move files out of toplevel include/ and etc/, moving it into the
    sub-projects
  - rather than including config headers with <project>/include, 
    have them as <project>
  - require all headers to be included with a project prefix, with
    the exception of the config headers ({opal,orte,ompi}_config.h
    mpi.h, and mpif.h)

This commit was SVN r8985.
2006-02-12 01:33:29 +00:00
Brian Barrett
e3ded6f8cf * add a #define for Galen as to whether or not any memory component was
built.

This commit was SVN r8928.
2006-02-08 00:50:42 +00:00
Brian Barrett
bc22539441 * update the code used when calls are made for every malloc/free in the
ptmalloc2 component - it had bit-rotted a bit.

This commit was SVN r8911.
2006-02-07 00:03:52 +00:00
Brian Barrett
5e6798cb4d * with ptmalloc2, prefer syscall over dlsym for calling the real munmap. This
makes illegal free() calls behave in a much more rational way.  You'll still
  probably die, but your stack trace will not have 3 billion pages of recusion
  inside the memory allocator.
* Fix illegal free in the opal_wrapper code.  basename() returns a string in a
  static buffer, so it shouldn't be free()ed.  It also shouldn't be left around
  so long, as another call to basename() may whack the returned buffer.  So
  leave the free and add a strdup() around the basename() call.
* Turn off some unneeded debugging in the opal_wrapper code that would list the
  comamnd to be run, regardless of the -showme option.

This commit was SVN r8758.
2006-01-19 18:48:58 +00:00
Brian Barrett
17197666bf When heap is shrinking ptmalloc tries to be smart and uses mmap to change
page protection, which causes the pages to be droped, which causes problems
if we don't deregister the pages first.  Since memory is cheap in this case
(it is still usable, should ptmalloc2 want it back, and is limited in size),
we just mprotect the pages instead.  This solves the dropping pages problem,
and doesn't cause even more calls into the cache code.

Thanks to Gleb Natapov for both finding the problem and giving a fix.

This should go to the v1.0 branch

This commit was SVN r8732.
2006-01-18 16:23:52 +00:00
Brian Barrett
3f6c409164 * Need to specify link order to make sure we grab the right mmap
This commit was SVN r8556.
2005-12-20 00:50:47 +00:00
Brian Barrett
f993b3a1f0 * 1, 0, they're all the same...
This commit was SVN r8550.
2005-12-19 22:01:56 +00:00
Brian Barrett
7801b9045f temporarily bring back the malloc_hooks code so that Galen and I can do
some regression testing

This commit was SVN r8548.
2005-12-19 21:08:51 +00:00
Brian Barrett
5685144e3d * update darwin memory hooks code to recent changes in API
This commit was SVN r8522.
2005-12-16 02:01:38 +00:00
Brian Barrett
b42bb3d8e8 More memory hooks tweaks... Set a flag on callbacks if the allocation /
deallocation came from the allocator (malloc, fee, etc) or somewhere
else (the user calling mmap/munmap, etc).  Going to be used by Galen
to determine if it is worth searching the allocations tree

Set flag if it is possible to intercept mmap (not always possible
due to a circular dependency between mmap, dlsym, and calloc)

This commit was SVN r8521.
2005-12-16 01:12:45 +00:00
Brian Barrett
2a94f693f6 * make sure to actually add the ptmalloc2-specific library dependencies to
LIBADD, so that libtool does it's magic propogation thing...

This commit was SVN r8508.
2005-12-15 18:11:51 +00:00
Brian Barrett
01e7191c3e * use our memory barriers instead of ptmalloc2's, since it only does the
right thing with gcc on x86.

This commit was SVN r8490.
2005-12-13 16:04:48 +00:00
Brian Barrett
d8d67b618f don't intercept mmap if we have to use dlsym to get at the real mmap. dlsym
may call calloc(large number), which causes ptmalloc2 to call mmap, which
causes us to try to dlsym for mmap, which leads to looping badness.

This commit was SVN r8461.
2005-12-12 19:38:42 +00:00
Brian Barrett
6c4ac2299c fix typo in release hooks if calling for every malloc/free
This commit was SVN r8431.
2005-12-10 05:06:52 +00:00
George Bosilca
699653f733 Typo correction.
This commit was SVN r8427.
2005-12-09 05:17:27 +00:00
Brian Barrett
0348d02875 * need to expose posix_memalign so that the one in our ptmalloc2 is used
instead of the one in libc.  Thanks to Gleb Natapov for tracking this
  down.

This commit was SVN r8418.
2005-12-08 18:06:52 +00:00
Brian Barrett
364ca3f075 - Add configure-time switch (--enable-ptmalloc2-opt-sbrk) to control when
the ptmalloc2 memory hooks component triggers callbacks for memory
  allocation / deallocation.  If enabled (the default) it is only when
  memory is actually obtained from or released to the OS (so little
  malloc calls only trigger callbacks if sbrk is called).  If disabled,
  callbacks are triggered every time malloc/free/etc. is called
* It turns out that syscall and mmap aren't good friends due to the return
  type of mmap and some old legacy issues with syscall functions that
  take more than 5 parameters.  For now, default to either loading
  the symbol from glibc using dlsym or using the __m{un,}map functions.
  Thanks to George for finding this.
* Fix some dumb typos in the mmap / munmap catching code

This commit was SVN r8410.
2005-12-08 04:47:03 +00:00
George Bosilca
9efd0e0813 Include the memoryhooks.h after the standard include files to insure that all expected types are
correctly defined (like size_t).

This commit was SVN r8383.
2005-12-06 05:55:36 +00:00
George Bosilca
23c618ab51 Allow a VPATH build to find the include files.
This commit was SVN r8382.
2005-12-06 05:26:36 +00:00
Brian Barrett
f44bd9e067 * Intercept both allocations and deallocations from ptmalloc2 (including
both mmap and munmap), adjusting the configure script so that the
  component will only be activated on systems that use ptmalloc2 in the
  first place -- ie, Linux
* Remove the malloc_hooks component - it became an unworkable solution
  once threads and such were considered.
* Remove malloc_interpose component - it never worked quite right and
  was not going to be able to intercept malloc, so it wasn't going to
  be useful for OMPI's purposes.
* Update tests a little bit to match recent memory hooks api
  issues - still needs a bit of work.

This commit was SVN r8381.
2005-12-06 00:44:50 +00:00
Brian Barrett
4ada272062 update memory hooks to properly initialize, even if malloc hasn't been
called when the component is initialized...

This commit was SVN r8369.
2005-12-02 00:59:03 +00:00
Brian Barrett
e338d65540 * can't dlsym for calloc, since dlsym calls calloc. So the interpose library
can only really intercept frees :(

This commit was SVN r8351.
2005-12-01 16:01:41 +00:00
Brian Barrett
79bf8843d2 * update memory hooks interface to allow for callbacks on both allocations
and dealllocations, per request from Galen and Tim

This commit was SVN r8303.
2005-11-29 04:46:14 +00:00
Brian Barrett
20cea60b82 * fix "make distclean" error in PML
* turns out (duh!) that there was a reason that the <projectdir>dir
  variable was set in the AM conditional.  If not, stupid directories
  are created and not needed...  duh.

This commit was SVN r8205.
2005-11-20 07:41:09 +00:00
Brian Barrett
8faa1884f0 * The last of the build system optimizations. Combine the component and
component/base Makefile.am files, reducing the time configure spends
  stamping out Makefiles at the end
* Install base_impl.h file when devel-headers are being installed

This commit was SVN r8200.
2005-11-20 01:03:01 +00:00
Brian Barrett
878676218e Rename opal/memory to opal/memoryhooks because XLC++ on Mac OS X is broken.
When compiling C++ code that includes something that looks for the C++
header file "memory" (stupid C++ headers not having .h extensions), it
goes through the header file search path, which includes $(topsrcdir)/opal,
so it finds the directory $(topsrcdir)/opal/memory/ and tries to load
that as the memory header file and all goes downhill.

This commit was SVN r8111.
2005-11-11 00:26:27 +00:00
Jeff Squyres
42ec26e640 Update the copyright notices for IU and UTK.
This commit was SVN r7999.
2005-11-05 19:57:48 +00:00
Brian Barrett
1302cb4072 The next in a long line of crazed build system changes from Brian. This was
originally suggested by Ralf Wildenhues, to try to speed autogen, configure,
and make (and possibly even make install).  Use automake's include directive
to drastically reduce the number of Makefile files (although the number of
Makefile.am files is the same - most are just included in a top-level
Makefile.am).  Also use an Automake SUBDIRs feature to eliminate the
dynamic-mca tree, which was no longer really needed.  This makes adding
a framework easier (since you don't have to remember the dynamic-mca
tree) and makes building faster (as make doesn't have to recurse through
the dynamic-mca tree)

This commit was SVN r7777.
2005-10-17 00:21:10 +00:00
Brian Barrett
8894eabf00 * some versions of malloc.h check to see if __malloc_attribute__ is defined, and
set it to empty if it isn't.  __malloc_attribute__ is set in sys/cdef.h, and
  some versions set it unconditionally.  If sys/cdef.h is included after malloc.h,
  some compilers will complain loudly.  So include malloc.h at the end so that
  sys/cdef.h is already included if it's going to be.

This commit was SVN r7613.
2005-10-04 14:42:32 +00:00
Brian Barrett
2117e4efbf * one more void* to function pointer casting cleanup. Stupid dlsym!
This commit was SVN r7556.
2005-09-30 14:54:28 +00:00
Brian Barrett
e98a6d32d7 * fix compiler warning about void* -> function pointer casting. Stupid
compilers and return type of dlsym()

This commit was SVN r7552.
2005-09-30 05:15:27 +00:00
Brian Barrett
b808fb82c9 * fix compiler warning about void* -> function pointer casting. Stupid
compilers and return type of munmap....

This commit was SVN r7551.
2005-09-30 04:57:08 +00:00
Brian Barrett
676e34c2d4 * play the linker games that need to be played to shut Darwin up
This commit was SVN r7527.
2005-09-28 01:24:05 +00:00
Brian Barrett
1d9b663b62 * test for condition where we think we can intercept malloc/free/munmap but
really can't.  Test for munmap, since it's the most likely to cause problems,
  since it's always an interposed symbol.

  The condition that usually causes problems is if libmpi was brought in as
  the result of a library dependency, rather than as a -l on the link line.
  The linker in this case will find malloc/free/munmap/etc. in libc, rather
  than in libmpi.

This commit was SVN r7508.
2005-09-26 20:20:20 +00:00
Jeff Squyres
f5ded6dd04 Don't link in libopal here because this component is *always* built
statically, and therefore is part of libopal.

This commit was SVN r7494.
2005-09-23 12:39:47 +00:00
George Bosilca
46a5259a3f Missing a \ protection from the LIBS list.
This commit was SVN r7480.
2005-09-22 15:38:05 +00:00
Andrew Friedley
555ae37255 Add lib{opal,orte,mpi}.la to appropriate LIBADD's, some whitespace cleanup as well.
This commit was SVN r7477.
2005-09-22 12:28:54 +00:00
Brian Barrett
ed56e743b7 * update configure.ac to use the modern version of AC_INIT and
AM_INIT_AUTOMAKE, instead of the deprecated version.
* Work around dumbness in modern AC_INIT that requires the version
  number to be set at autoconf time (instead of at configure time, as
  it was before).  Set the version number, minus the subversion r number,
  at autoconf time.  Override the internal variables to include the r
  number (if needed) at configure time.  Basically, the right thing
  should always happen.  The only place it might not is the version
  reported as part of configure --help will not have an r number.
* Since AM_INIT_AUTOMAKE taks a list of options, no need to specify
  them in all the Makefile.am files.
* Addes support for subdir-objects, meaning that object files are put
  in the directory containing source files, even if the Makefile.am is
  in another directory.  This should start making it feasible to
  reduce the number of Makefile.am files we have in the tree, which
  will greatly reduce the time to run autogen and configure.

This commit was SVN r7211.
2005-09-07 05:54:53 +00:00
Brian Barrett
1454e40f0e * for some reason, was having issues with C bool vs C++ bool on odin.
cast the return to an int in the C++ test case, just in case.
* C++ sucks.  If compiling with C++ on some GNU compiler/linker
  combos, the initialize hook isn't automagically fired for the
  malloc code.  Add a backup setting during opal_init, which is
  early enough not to cause any damage. 

This commit was SVN r6983.
2005-08-23 16:03:16 +00:00
Brian Barrett
f2769f14e8 * Add malloc_interpose memory manager intercept functions that should work
on all glibc systems (tested with x86 and x86_64 with a couple of C++
  compilers).  While not as ideal as the malloc_hooks method, it does
  have the advantage of working with threads.
* Modified malloc_hooks component to properly follow prefix rule.  No
  functionality changes
* Make the memory framework only chose one component, and modify all
  components to set priority to 20, except malloc-interpose, which is
  at 10.  This means that on Linux, malloc_hooks will be used unless
  threads are enabled, since I think malloc_hooks is a better design
  choice when we can use it

This commit was SVN r6949.
2005-08-21 19:01:39 +00:00