MFC r282115, r282152, r282201
MFV r282150 libgomp: Update to version 4.3.5. bring initial BSD support from upstream. This was not meant to be MFC'd at first but the original OMP support for FreeBSD was in very poor shape. The effect of this change should be minimal as all ports are already using the version of libgomp that comes with the gcc ports. The local libgomp is planned to be disabled for platforms that are not using older gcc by default so this version of libgomp will not be shipped in tier-1 platform releases. Discussed with: emaste
This commit is contained in:
parent
0f07927a1e
commit
c5245aadbb
@ -1,6 +1,223 @@
|
||||
2007-07-19 Release Manager
|
||||
2010-05-22 Release Manager
|
||||
|
||||
* GCC 4.2.1 released.
|
||||
* GCC 4.3.5 released.
|
||||
|
||||
2010-05-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
PR other/43620
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
|
||||
* configure: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
* config.h.in: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
* testsuite/Makefile.in: Regenerate.
|
||||
|
||||
2009-08-19 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/41102
|
||||
omp_lib.h.in: Fix -std=f95 errors.
|
||||
|
||||
2009-08-14 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
Backport from mainline:
|
||||
2008-12-26 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
|
||||
|
||||
2009-08-04 Release Manager
|
||||
|
||||
* GCC 4.3.4 released.
|
||||
|
||||
2009-01-24 Release Manager
|
||||
|
||||
* GCC 4.3.3 released.
|
||||
|
||||
2008-12-05 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
Backport from mainline:
|
||||
2008-05-15 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
* testsuite/lib/libgomp.exp: Load new torture support.
|
||||
|
||||
2008-12-02 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
Backport from mainline:
|
||||
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
PR testsuite/28870
|
||||
* testsuite/lib/libgomp.exp: Include new timeout library files.
|
||||
(libgomp_target_compile): Set timeout value from new proc.
|
||||
|
||||
2008-08-27 Release Manager
|
||||
|
||||
* GCC 4.3.2 released.
|
||||
|
||||
2008-06-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/36506
|
||||
* testsuite/libgomp.c/reduction-5.c: New test.
|
||||
|
||||
2008-06-06 Release Manager
|
||||
|
||||
* GCC 4.3.1 released.
|
||||
|
||||
2008-05-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/36308
|
||||
* testsuite/libgomp.c++/ctor-11.C: New test.
|
||||
* testsuite/libgomp.c++/ctor-12.C: New test.
|
||||
|
||||
2008-05-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/36106
|
||||
* testsuite/libgomp.c/atomic-5.c: New test.
|
||||
* testsuite/libgomp.c/atomic-6.c: New test.
|
||||
* testsuite/libgomp.c/autopar-1.c: New test.
|
||||
|
||||
2008-03-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35611
|
||||
* testsuite/libgomp.c/atomic-4.c: New test.
|
||||
|
||||
PR libgomp/35625
|
||||
* iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
|
||||
(gomp_iter_guided_next): Likewise.
|
||||
* testsuite/libgomp.c/pr35625.c: New test.
|
||||
|
||||
2008-03-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35185
|
||||
* testsuite/libgomp.c++/pr35185.C: New test.
|
||||
|
||||
2008-03-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35549
|
||||
* testsuite/libgomp.c/pr35549.c: New test.
|
||||
|
||||
2008-03-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.c/atomic-3.c: New test.
|
||||
|
||||
2008-03-05 Release Manager
|
||||
|
||||
* GCC 4.3.0 released.
|
||||
|
||||
2008-02-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35196
|
||||
* testsuite/libgomp.c/pr35196.c: New test.
|
||||
|
||||
PR middle-end/35130
|
||||
* testsuite/libgomp.fortran/pr35130.f90: New test.
|
||||
* testsuite/libgomp.c/pr35130.c: New test.
|
||||
|
||||
2008-01-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/33880
|
||||
* testsuite/libgomp.c/pr33880.c: New test.
|
||||
* testsuite/libgomp.fortran/pr33880.f90: New test.
|
||||
|
||||
2008-01-24 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-01-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.ac: Move futex checking into ../config/futex.m4.
|
||||
* configure: Rebuilt.
|
||||
* aclocal.m4: Rebuilt.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
* configure.tgt: Rename have_tls to gcc_cv_have_tls to match
|
||||
2007-10-15 ../config/tls.m4 change.
|
||||
|
||||
2007-12-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34513
|
||||
* testsuite/libgomp.c/pr34513.c: New test.
|
||||
* testsuite/libgomp.c++/pr34513.C: New test.
|
||||
|
||||
2007-12-17 Jack Howarth <howarth@bromo.med.uc.edu>
|
||||
|
||||
PR target/32765
|
||||
* testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
|
||||
|
||||
2007-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes.
|
||||
|
||||
2007-12-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.c/private-1.c: New test.
|
||||
|
||||
2007-11-29 Andris Pavenis <andris.pavenis@iki.fi>
|
||||
Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.am: Use space as vpath separator. Use 'vpath %'
|
||||
instead of 'VPATH ='.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-11-23 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* configure.ac: Adjust makeinfo version check.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/34020
|
||||
* testsuite/libgomp.fortran/pr34020.f90: New test.
|
||||
|
||||
2007-11-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33894
|
||||
* testsuite/libgomp.c++/atomic-1.C: New test.
|
||||
|
||||
2007-10-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libgomp/33275
|
||||
* testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
|
||||
Make x and y integers rather than (implicit) reals. Add private (j)
|
||||
clause to the last omp parallel.
|
||||
|
||||
2007-10-15 Maciej W. Rozycki <macro@linux-mips.org>
|
||||
|
||||
* configure: Regenerate following changes to ../config/tls.m4.
|
||||
|
||||
2007-09-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.fortran/stack.f90: New test.
|
||||
|
||||
2007-09-10 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* config/mingw32/proc.c: New file.
|
||||
|
||||
2007-09-05 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
|
||||
(main): Use __get_cpuid to get i386 target fetaures.
|
||||
* testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
|
||||
(main): Use __get_cpuid to get x86_64 target fetaures.
|
||||
|
||||
2007-08-15 Jack Howarth <howarth@bromo.med.uc.edu>
|
||||
|
||||
PR target/32765
|
||||
* testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
|
||||
* testsuite/libgomp.fortran/crayptr2.f90: Likwise.
|
||||
|
||||
2007-07-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/32550
|
||||
* testsuite/libgomp.fortran/pr32550.f90: New test.
|
||||
* testsuite/libgomp.fortran/crayptr2.f90: New test.
|
||||
|
||||
2007-07-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* aclocal.m4: Regenerated.
|
||||
|
||||
2007-07-05 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/32359
|
||||
* testsuite/libgomp.fortran/pr32359.f90: New.
|
||||
|
||||
2007-07-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
@ -21,9 +238,117 @@
|
||||
* testsuite/libgomp.c/pr32362-2.c: New test.
|
||||
* testsuite/libgomp.c/pr32362-3.c: New test.
|
||||
|
||||
2007-05-13 Release Manager
|
||||
2007-06-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* GCC 4.2.0 released.
|
||||
* team.c (gomp_team_start): Fix setting up thread_attr
|
||||
stack size.
|
||||
|
||||
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-05-23 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
* testsuite/Makefile.in: Regenerate.
|
||||
|
||||
2007-05-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/linux/proc.c: New file.
|
||||
|
||||
PR libgomp/28482
|
||||
* configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
|
||||
|
||||
2007-04-19 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
* libgomp.texi (GOMP_CPU_AFFINITY): Updated.
|
||||
|
||||
2007-04-16 Matthias Klose <doko@debian.org>
|
||||
|
||||
* configure.tgt (i[456]86-*-linux*): Only add ia32 specific
|
||||
flags if not building with -m64.
|
||||
* testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
|
||||
flag for i?86-*-* targets, if current target matches -m64.
|
||||
|
||||
2007-04-14 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-04-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR testsuite/31369
|
||||
* testsuite/libgomp.c++/c++.exp: Don't use concat when setting
|
||||
ld_library_path.
|
||||
* testsuite/libgomp.fortran/fortran.exp: Likewise.
|
||||
|
||||
2007-04-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
|
||||
decls.
|
||||
(gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
|
||||
* env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
|
||||
(parse_affinity): New function.
|
||||
(initialize_env): Call it and gomp_init_affinity.
|
||||
* team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
|
||||
create new pthread_attr_t and call gomp_init_thread_affinity
|
||||
on it for each thread before passing the attribute to pthread_create.
|
||||
* config/linux/affinity.c: New file.
|
||||
* config/posix/affinity.c: New file.
|
||||
* configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
|
||||
* configure: Rebuilt.
|
||||
* config.h.in: Rebuilt.
|
||||
* Makefile.am (libgomp_la_SOURCES): Add affinity.c.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
2007-03-23 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
|
||||
*-*-darwin*.
|
||||
* testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
|
||||
and use it if found.
|
||||
|
||||
2007-03-18 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* testsuite/config/default.exp: New file.
|
||||
* testsuite/lib/libgomp.exp: New file.
|
||||
* testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
|
||||
libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
|
||||
load_lib *, load_gcc_lib *): Move to libgomp.exp.
|
||||
(libgomp_load): Remove.
|
||||
* testsuite/lib/libgomp.exp (libgomp_init): Compute
|
||||
always_ld_library_path, not ld_library_path. Set additional_flags
|
||||
to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
|
||||
(target_compile): Do not call libgomp_init. Append lang_library_path
|
||||
and lang_link_flags to options.
|
||||
* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set
|
||||
ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH
|
||||
here.
|
||||
* testsuite/libgomp.c++/c++.exp: Set ld_library_path from
|
||||
always_ld_library_path. Set LD_LIBRARY_PATH here.
|
||||
* testsuite/libgomp.fortran/fortran.exp: Ditto.
|
||||
* testsuite/libgomp.c/atomic-1.c: Set dg-options to
|
||||
"-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
|
||||
CX8 flag.
|
||||
* testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
|
||||
lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
|
||||
* testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
|
||||
* testsuite/libgomp.c/pr29947-1.c: Ditto.
|
||||
* testsuite/libgomp.c/atomic-10.c: Ditto.
|
||||
|
||||
2007-03-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
|
||||
dg-final cleanup-modules line.
|
||||
* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/reduction5.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
|
||||
|
||||
2007-03-18 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
@ -31,15 +356,32 @@
|
||||
extraction.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
|
||||
|
||||
* Makefile.am: Add install-pdf target as copied from
|
||||
automake v1.10 rules.
|
||||
* Makefile.in: Regenerate
|
||||
|
||||
2007-02-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libgomp/28486
|
||||
* configure: Regenerate.
|
||||
|
||||
PR c++/30703
|
||||
* testsuite/libgomp.c++/pr30703.C: New test.
|
||||
|
||||
2007-02-07 Daniel Franke <franke.daniel@gmail.com>
|
||||
2007-02-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-31 Daniel Franke <franke.daniel@gmail.com>
|
||||
Revert:
|
||||
2006-07-05 Eric Christopher <echristo@apple.com>
|
||||
* configure.ac: Depend addition of -pthread on host OS.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* libgomp.texi: Fix spacing after abbreviations.
|
||||
|
||||
2007-01-31 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/30546
|
||||
* configure.ac: Add check for makeinfo
|
||||
@ -50,74 +392,47 @@
|
||||
* Makefile.in: Regenerated.
|
||||
* testsuite/Makefile.in: Regenerated.
|
||||
|
||||
2007-02-07 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* libgomp.texi: Fix spacing after abbreviations.
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-29 Daniel Franke <franke.daniel@gmail.com>
|
||||
2007-01-29 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/30540
|
||||
* libgomp.texi: More about implementation-dependent settings.
|
||||
|
||||
2007-02-06 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR libgomp/28296
|
||||
Backport from mainline.
|
||||
Revert:
|
||||
2006-07-05 Eric Christopher <echristo@apple.com>
|
||||
* configure.ac: Depend addition of -pthread on host OS.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-01-30 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
Backport from mainline.
|
||||
2007-01-26 Tobias Burnus <burnus@net-b.de>
|
||||
2007-01-26 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
|
||||
|
||||
2007-01-25 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
Backport from mainline:
|
||||
2006-12-21 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/28209
|
||||
* libgomp.texi: New file.
|
||||
* configure.ac: Add --enable-generated-files-in-srcdir option.
|
||||
* Makefile.am: Add info, dvi, pdf, html targets. On request,
|
||||
copy files to srcdir.
|
||||
* Makefile.in: Regenerated.
|
||||
* testsuite/Makefile.in: Regenerated.
|
||||
* NOTES: Removed.
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-14 Daniel Franke <franke.daniel@gmail.com>
|
||||
* libgomp.texi: Document implementation specific default values of
|
||||
environment variables.
|
||||
|
||||
2007-01-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/30494
|
||||
* testsuite/libgomp.c/pr30494.c: New test.
|
||||
|
||||
2006-12-18 Daniel Franke <franke.daniel@gmail.com>
|
||||
2007-01-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
Backport from mainline:
|
||||
2006-12-04 Daniel Franke <franke.daniel@gmail.com>
|
||||
* configure: Rebuilt.
|
||||
* configure.ac: Fixed comment.
|
||||
|
||||
2007-01-14 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
* libgomp.texi: Document implementation specific default values of
|
||||
environment variables.
|
||||
|
||||
2006-12-21 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/28209
|
||||
* libgomp.texi: New file.
|
||||
* configure.ac: Add --enable-generated-files-in-srcdir option.
|
||||
* Makefile.am: Add info, dvi, pdf, html targets. On request, copy
|
||||
files to srcdir.
|
||||
* Makefile.in: Regenerated.
|
||||
* config.h.in: Regenerated.
|
||||
* testsuite/Makefile.in: Regenerated.
|
||||
* NOTES: Removed.
|
||||
|
||||
2006-12-04 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/29949
|
||||
* env.c (omp_set_num_threads): Set illegal thread count to 1.
|
||||
|
||||
Backport from mainline:
|
||||
2006-11-09 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* env.c (parse_schedule): Reject out of range values.
|
||||
(parse_unsigned_long): Reject out of range, negative
|
||||
or zero values.
|
||||
|
||||
2006-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* configure: Regenerate.
|
||||
@ -135,6 +450,15 @@
|
||||
|
||||
* configure.tgt: Force initial-exec TLS model on Linux only.
|
||||
|
||||
2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* configure: Regenerated.
|
||||
|
||||
2006-11-09 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* env.c (parse_schedule): Reject out of range values.
|
||||
(parse_unsigned_long): Reject out of range, negative or zero values.
|
||||
|
||||
2006-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/29629
|
||||
|
8
contrib/gcclibs/libgomp/ChangeLog.gcc44
Normal file
8
contrib/gcclibs/libgomp/ChangeLog.gcc44
Normal file
@ -0,0 +1,8 @@
|
||||
2008-09-19 Jakub Jelinek <jakub@redhat.com> (r140497)
|
||||
Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* config/bsd/proc.c: New file.
|
||||
* configure.tgt (*-*-darwin*): Use config_path "darwin posix".
|
||||
* configure.ac: Check for header <sys/sysctl.h>
|
||||
* configure: Regenerate.
|
||||
* config.h.in: Likewise.
|
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../config
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
SUBDIRS = testsuite
|
||||
|
||||
## May be used by toolexeclibdir.
|
||||
@ -12,9 +12,7 @@ search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
|
||||
fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
|
||||
libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
|
||||
|
||||
empty =
|
||||
space = $(empty) $(empty)
|
||||
VPATH = $(subst $(space),:,$(strip $(search_path)))
|
||||
vpath % $(strip $(search_path))
|
||||
|
||||
AM_CPPFLAGS = $(addprefix -I, $(search_path))
|
||||
AM_CFLAGS = $(XCFLAGS)
|
||||
@ -33,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
|
||||
|
||||
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
|
||||
loop.c ordered.c parallel.c sections.c single.c team.c work.c \
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
|
||||
|
||||
nodist_noinst_HEADERS = libgomp_f.h
|
||||
nodist_libsubinclude_HEADERS = omp.h
|
||||
@ -51,10 +49,19 @@ env.lo: libgomp_f.h
|
||||
env.o: libgomp_f.h
|
||||
|
||||
|
||||
# No install-html target
|
||||
.PHONY: install-html
|
||||
# No install-html or install-pdf support in automake yet
|
||||
.PHONY: install-html install-pdf
|
||||
install-html:
|
||||
|
||||
install-pdf: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
# Automake Documentation:
|
||||
# If your package has Texinfo files in many directories, you can use the
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
@ -37,24 +38,27 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/../config.guess \
|
||||
$(srcdir)/../config.sub $(srcdir)/../depcomp \
|
||||
$(srcdir)/../install-sh $(srcdir)/../ltmain.sh \
|
||||
$(srcdir)/../missing $(srcdir)/../mkinstalldirs \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(srcdir)/libgomp.spec.in \
|
||||
$(srcdir)/libgomp_f.h.in $(srcdir)/omp.h.in \
|
||||
$(srcdir)/omp_lib.f90.in $(srcdir)/omp_lib.h.in \
|
||||
$(top_srcdir)/configure ChangeLog
|
||||
DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \
|
||||
ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \
|
||||
$(srcdir)/omp.h.in $(srcdir)/omp_lib.h.in \
|
||||
$(srcdir)/omp_lib.f90.in $(srcdir)/libgomp_f.h.in \
|
||||
$(srcdir)/libgomp.spec.in $(srcdir)/../depcomp \
|
||||
$(srcdir)/../ltmain.sh $(srcdir)/../config.guess \
|
||||
$(srcdir)/../config.sub
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
|
||||
$(top_srcdir)/../config/depstand.m4 \
|
||||
$(top_srcdir)/../config/enable.m4 \
|
||||
$(top_srcdir)/../config/futex.m4 \
|
||||
$(top_srcdir)/../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../config/multi.m4 \
|
||||
$(top_srcdir)/../config/stdint.m4 \
|
||||
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
|
||||
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
|
||||
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
@ -79,21 +83,20 @@ libgomp_la_LIBADD =
|
||||
am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \
|
||||
error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \
|
||||
single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \
|
||||
bar.lo time.lo fortran.lo
|
||||
bar.lo time.lo fortran.lo affinity.lo
|
||||
libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/../depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libgomp_la_SOURCES)
|
||||
DIST_SOURCES = $(libgomp_la_SOURCES)
|
||||
MULTISRCTOP =
|
||||
MULTIBUILDTOP =
|
||||
MULTIDIRS =
|
||||
@ -126,18 +129,6 @@ HEADERS = $(nodist_finclude_HEADERS) $(nodist_libsubinclude_HEADERS) \
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
VPATH = $(subst $(space),:,$(strip $(search_path)))
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
@ -157,6 +148,7 @@ CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
@ -164,12 +156,15 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FGREP = @FGREP@
|
||||
GENINSRC_FALSE = @GENINSRC_FALSE@
|
||||
GENINSRC_TRUE = @GENINSRC_TRUE@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE = @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@
|
||||
LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE = @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@
|
||||
@ -182,6 +177,7 @@ MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NM = @NM@
|
||||
OBJEXT = @OBJEXT@
|
||||
OMP_LOCK_ALIGN = @OMP_LOCK_ALIGN@
|
||||
OMP_LOCK_KIND = @OMP_LOCK_KIND@
|
||||
@ -200,6 +196,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
@ -210,6 +207,7 @@ XCFLAGS = @XCFLAGS@
|
||||
XLDFLAGS = @XLDFLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
@ -244,6 +242,7 @@ libexecdir = @libexecdir@
|
||||
libtool_VERSION = @libtool_VERSION@
|
||||
link_gomp = @link_gomp@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
multi_basedir = @multi_basedir@
|
||||
@ -260,14 +259,12 @@ target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
ACLOCAL_AMFLAGS = -I ../config
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
SUBDIRS = testsuite
|
||||
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
||||
search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
|
||||
fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
|
||||
libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
|
||||
empty =
|
||||
space = $(empty) $(empty)
|
||||
AM_CPPFLAGS = $(addprefix -I, $(search_path))
|
||||
AM_CFLAGS = $(XCFLAGS)
|
||||
AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS)
|
||||
@ -279,7 +276,7 @@ libgomp_version_info = -version-info $(libtool_VERSION)
|
||||
libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
|
||||
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
|
||||
loop.c ordered.c parallel.c sections.c single.c team.c work.c \
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
|
||||
|
||||
nodist_noinst_HEADERS = libgomp_f.h
|
||||
nodist_libsubinclude_HEADERS = omp.h
|
||||
@ -406,6 +403,7 @@ mostlyclean-compile:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affinity.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barrier.Plo@am__quote@
|
||||
@ -733,152 +731,6 @@ GTAGS:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) all-multi $(HEADERS) \
|
||||
@ -1011,16 +863,13 @@ uninstall-info: uninstall-info-recursive
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \
|
||||
all-multi am--refresh check check-am clean clean-generic \
|
||||
clean-libtool clean-multi clean-recursive \
|
||||
clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-info dist-shar dist-tarZ \
|
||||
dist-zip distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-multi distclean-recursive distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-multi \
|
||||
install-nodist_fincludeHEADERS \
|
||||
clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist-info \
|
||||
distclean distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-multi distclean-recursive \
|
||||
distclean-tags dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-multi install-nodist_fincludeHEADERS \
|
||||
install-nodist_libsubincludeHEADERS \
|
||||
install-nodist_toolexeclibHEADERS install-strip \
|
||||
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
|
||||
@ -1036,6 +885,8 @@ uninstall-info: uninstall-info-recursive
|
||||
uninstall-toolexeclibLTLIBRARIES
|
||||
|
||||
|
||||
vpath % $(strip $(search_path))
|
||||
|
||||
omp_lib_kinds.mod: omp_lib.mod
|
||||
:
|
||||
omp_lib.mod: omp_lib.f90
|
||||
@ -1045,10 +896,20 @@ fortran.o: libgomp_f.h
|
||||
env.lo: libgomp_f.h
|
||||
env.o: libgomp_f.h
|
||||
|
||||
# No install-html target
|
||||
.PHONY: install-html
|
||||
# No install-html or install-pdf support in automake yet
|
||||
.PHONY: install-html install-pdf
|
||||
install-html:
|
||||
|
||||
install-pdf: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
all-local: $(STAMP_GENINSRC)
|
||||
|
||||
stamp-geninsrc: libgomp.info
|
||||
|
5
contrib/gcclibs/libgomp/aclocal.m4
vendored
5
contrib/gcclibs/libgomp/aclocal.m4
vendored
@ -859,8 +859,13 @@ AC_SUBST([am__untar])
|
||||
m4_include([../config/acx.m4])
|
||||
m4_include([../config/depstand.m4])
|
||||
m4_include([../config/enable.m4])
|
||||
m4_include([../config/futex.m4])
|
||||
m4_include([../config/lead-dot.m4])
|
||||
m4_include([../config/multi.m4])
|
||||
m4_include([../config/stdint.m4])
|
||||
m4_include([../config/tls.m4])
|
||||
m4_include([../ltoptions.m4])
|
||||
m4_include([../ltsugar.m4])
|
||||
m4_include([../ltversion.m4])
|
||||
m4_include([../lt~obsolete.m4])
|
||||
m4_include([acinclude.m4])
|
||||
|
@ -12,9 +12,15 @@
|
||||
/* Define if the POSIX Semaphores do not work on your system. */
|
||||
#undef HAVE_BROKEN_POSIX_SEMAPHORES
|
||||
|
||||
/* Define to 1 if the target assembler supports thread-local storage. */
|
||||
#undef HAVE_CC_TLS
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `getloadavg' function. */
|
||||
#undef HAVE_GETLOADAVG
|
||||
|
||||
@ -24,6 +30,9 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */
|
||||
#undef HAVE_PTHREAD_AFFINITY_NP
|
||||
|
||||
/* Define to 1 if you have the <semaphore.h> header file. */
|
||||
#undef HAVE_SEMAPHORE_H
|
||||
|
||||
@ -48,6 +57,9 @@
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
#undef HAVE_SYS_SYSCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
@ -60,6 +72,10 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
117
contrib/gcclibs/libgomp/config/bsd/proc.c
Normal file
117
contrib/gcclibs/libgomp/config/bsd/proc.c
Normal file
@ -0,0 +1,117 @@
|
||||
/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This file contains system specific routines related to counting
|
||||
online processors and dynamic load balancing. It is expected that
|
||||
a system may well want to write special versions of each of these.
|
||||
|
||||
The following implementation uses a mix of POSIX and BSD routines. */
|
||||
|
||||
#include "libgomp.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
# ifdef HAVE_SYS_LOADAVG_H
|
||||
# include <sys/loadavg.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSCTL_H
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
static int
|
||||
get_num_procs (void)
|
||||
{
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
return sysconf (_SC_NPROCESSORS_ONLN);
|
||||
#elif defined HW_NCPU
|
||||
int ncpus = 1;
|
||||
size_t len = sizeof(ncpus);
|
||||
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
|
||||
return ncpus;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* At startup, determine the default number of threads. It would seem
|
||||
this should be related to the number of cpus online. */
|
||||
|
||||
void
|
||||
gomp_init_num_threads (void)
|
||||
{
|
||||
int ncpus = get_num_procs ();
|
||||
|
||||
if (ncpus > 0)
|
||||
gomp_global_icv.nthreads_var = ncpus;
|
||||
}
|
||||
|
||||
/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
threads we should spawn for this team. */
|
||||
/* ??? I have no idea what best practice for this is. Surely some
|
||||
function of the number of processors that are *still* online and
|
||||
the load average. Here I use the number of processors online
|
||||
minus the 15 minute load average. */
|
||||
|
||||
unsigned
|
||||
gomp_dynamic_max_threads (void)
|
||||
{
|
||||
unsigned n_onln, loadavg;
|
||||
unsigned nthreads_var = gomp_icv (false)->nthreads_var;
|
||||
|
||||
n_onln = get_num_procs ();
|
||||
if (!n_onln || n_onln > nthreads_var)
|
||||
n_onln = nthreads_var;
|
||||
|
||||
loadavg = 0;
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
{
|
||||
double dloadavg[3];
|
||||
if (getloadavg (dloadavg, 3) == 3)
|
||||
{
|
||||
/* Add 0.1 to get a kind of biased rounding. */
|
||||
loadavg = dloadavg[2] + 0.1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (loadavg >= n_onln)
|
||||
return 1;
|
||||
else
|
||||
return n_onln - loadavg;
|
||||
}
|
||||
|
||||
int
|
||||
omp_get_num_procs (void)
|
||||
{
|
||||
int ncpus = get_num_procs ();
|
||||
if (ncpus <= 0)
|
||||
ncpus = gomp_icv (false)->nthreads_var;
|
||||
return ncpus;
|
||||
}
|
||||
|
||||
ialias (omp_get_num_procs)
|
107
contrib/gcclibs/libgomp/config/linux/affinity.c
Normal file
107
contrib/gcclibs/libgomp/config/linux/affinity.c
Normal file
@ -0,0 +1,107 @@
|
||||
/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This is a Linux specific implementation of a CPU affinity setting. */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include "libgomp.h"
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
|
||||
static unsigned int affinity_counter;
|
||||
#ifndef HAVE_SYNC_BUILTINS
|
||||
static gomp_mutex_t affinity_lock;
|
||||
#endif
|
||||
|
||||
void
|
||||
gomp_init_affinity (void)
|
||||
{
|
||||
cpu_set_t cpuset;
|
||||
size_t idx, widx;
|
||||
|
||||
if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset))
|
||||
{
|
||||
gomp_error ("could not get CPU affinity set");
|
||||
free (gomp_cpu_affinity);
|
||||
gomp_cpu_affinity = NULL;
|
||||
gomp_cpu_affinity_len = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (widx = idx = 0; idx < gomp_cpu_affinity_len; idx++)
|
||||
if (gomp_cpu_affinity[idx] < CPU_SETSIZE
|
||||
&& CPU_ISSET (gomp_cpu_affinity[idx], &cpuset))
|
||||
gomp_cpu_affinity[widx++] = gomp_cpu_affinity[idx];
|
||||
|
||||
if (widx == 0)
|
||||
{
|
||||
gomp_error ("no CPUs left for affinity setting");
|
||||
free (gomp_cpu_affinity);
|
||||
gomp_cpu_affinity = NULL;
|
||||
gomp_cpu_affinity_len = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
gomp_cpu_affinity_len = widx;
|
||||
CPU_ZERO (&cpuset);
|
||||
CPU_SET (gomp_cpu_affinity[0], &cpuset);
|
||||
pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
|
||||
affinity_counter = 1;
|
||||
#ifndef HAVE_SYNC_BUILTINS
|
||||
gomp_mutex_init (&affinity_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gomp_init_thread_affinity (pthread_attr_t *attr)
|
||||
{
|
||||
unsigned int cpu;
|
||||
cpu_set_t cpuset;
|
||||
|
||||
#ifdef HAVE_SYNC_BUILTINS
|
||||
cpu = __sync_fetch_and_add (&affinity_counter, 1);
|
||||
#else
|
||||
gomp_mutex_lock (&affinity_lock);
|
||||
cpu = affinity_counter++;
|
||||
gomp_mutex_unlock (&affinity_lock);
|
||||
#endif
|
||||
cpu %= gomp_cpu_affinity_len;
|
||||
CPU_ZERO (&cpuset);
|
||||
CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
|
||||
pthread_attr_setaffinity_np (attr, sizeof (cpu_set_t), &cpuset);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "../posix/affinity.c"
|
||||
|
||||
#endif
|
179
contrib/gcclibs/libgomp/config/linux/proc.c
Normal file
179
contrib/gcclibs/libgomp/config/linux/proc.c
Normal file
@ -0,0 +1,179 @@
|
||||
/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This file contains system specific routines related to counting
|
||||
online processors and dynamic load balancing. */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include "libgomp.h"
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
# ifdef HAVE_SYS_LOADAVG_H
|
||||
# include <sys/loadavg.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
static unsigned long
|
||||
cpuset_popcount (cpu_set_t *cpusetp)
|
||||
{
|
||||
#ifdef CPU_COUNT
|
||||
/* glibc 2.6 and above provide a macro for this. */
|
||||
return CPU_COUNT (cpusetp);
|
||||
#else
|
||||
size_t i;
|
||||
unsigned long ret = 0;
|
||||
extern int check[sizeof (cpusetp->__bits[0]) == sizeof (unsigned long int)];
|
||||
|
||||
(void) check;
|
||||
for (i = 0; i < sizeof (*cpusetp) / sizeof (cpusetp->__bits[0]); i++)
|
||||
{
|
||||
unsigned long int mask = cpusetp->__bits[i];
|
||||
if (mask == 0)
|
||||
continue;
|
||||
ret += __builtin_popcountl (mask);
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* At startup, determine the default number of threads. It would seem
|
||||
this should be related to the number of cpus online. */
|
||||
|
||||
void
|
||||
gomp_init_num_threads (void)
|
||||
{
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
cpu_set_t cpuset;
|
||||
|
||||
if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset) == 0)
|
||||
{
|
||||
/* Count only the CPUs this process can use. */
|
||||
gomp_nthreads_var = cpuset_popcount (&cpuset);
|
||||
if (gomp_nthreads_var == 0)
|
||||
gomp_nthreads_var = 1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
gomp_nthreads_var = sysconf (_SC_NPROCESSORS_ONLN);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
get_num_procs (void)
|
||||
{
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
cpu_set_t cpuset;
|
||||
|
||||
if (gomp_cpu_affinity == NULL)
|
||||
{
|
||||
/* Count only the CPUs this process can use. */
|
||||
if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset),
|
||||
&cpuset) == 0)
|
||||
{
|
||||
int ret = cpuset_popcount (&cpuset);
|
||||
return ret != 0 ? ret : 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t idx;
|
||||
static int affinity_cpus;
|
||||
|
||||
/* We can't use pthread_getaffinity_np in this case
|
||||
(we have changed it ourselves, it binds to just one CPU).
|
||||
Count instead the number of different CPUs we are
|
||||
using. */
|
||||
CPU_ZERO (&cpuset);
|
||||
if (affinity_cpus == 0)
|
||||
{
|
||||
int cpus = 0;
|
||||
for (idx = 0; idx < gomp_cpu_affinity_len; idx++)
|
||||
if (! CPU_ISSET (gomp_cpu_affinity[idx], &cpuset))
|
||||
{
|
||||
cpus++;
|
||||
CPU_SET (gomp_cpu_affinity[idx], &cpuset);
|
||||
}
|
||||
affinity_cpus = cpus;
|
||||
}
|
||||
return affinity_cpus;
|
||||
}
|
||||
#endif
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
return sysconf (_SC_NPROCESSORS_ONLN);
|
||||
#else
|
||||
return gomp_nthreads_var;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
threads we should spawn for this team. */
|
||||
/* ??? I have no idea what best practice for this is. Surely some
|
||||
function of the number of processors that are *still* online and
|
||||
the load average. Here I use the number of processors online
|
||||
minus the 15 minute load average. */
|
||||
|
||||
unsigned
|
||||
gomp_dynamic_max_threads (void)
|
||||
{
|
||||
unsigned n_onln, loadavg;
|
||||
|
||||
n_onln = get_num_procs ();
|
||||
if (n_onln > gomp_nthreads_var)
|
||||
n_onln = gomp_nthreads_var;
|
||||
|
||||
loadavg = 0;
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
{
|
||||
double dloadavg[3];
|
||||
if (getloadavg (dloadavg, 3) == 3)
|
||||
{
|
||||
/* Add 0.1 to get a kind of biased rounding. */
|
||||
loadavg = dloadavg[2] + 0.1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (loadavg >= n_onln)
|
||||
return 1;
|
||||
else
|
||||
return n_onln - loadavg;
|
||||
}
|
||||
|
||||
int
|
||||
omp_get_num_procs (void)
|
||||
{
|
||||
return get_num_procs ();
|
||||
}
|
||||
|
||||
ialias (omp_get_num_procs)
|
82
contrib/gcclibs/libgomp/config/mingw32/proc.c
Normal file
82
contrib/gcclibs/libgomp/config/mingw32/proc.c
Normal file
@ -0,0 +1,82 @@
|
||||
/* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
Contributed by Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This file contains system specific routines related to counting
|
||||
online processors and dynamic load balancing. It is expected that
|
||||
a system may well want to write special versions of each of these.
|
||||
|
||||
The following implementation uses win32 API routines. */
|
||||
|
||||
#include "libgomp.h"
|
||||
#include <windows.h>
|
||||
|
||||
/* Count the CPU's currently available to this process. */
|
||||
static int
|
||||
count_avail_process_cpus ()
|
||||
{
|
||||
DWORD_PTR process_cpus;
|
||||
DWORD_PTR system_cpus;
|
||||
|
||||
if (GetProcessAffinityMask (GetCurrentProcess (),
|
||||
&process_cpus, &system_cpus))
|
||||
{
|
||||
unsigned int count;
|
||||
for (count = 0; process_cpus != 0; process_cpus >>= 1)
|
||||
if (process_cpus & 1)
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* At startup, determine the default number of threads. It would seem
|
||||
this should be related to the number of cpus available to the process. */
|
||||
|
||||
void
|
||||
gomp_init_num_threads (void)
|
||||
{
|
||||
gomp_nthreads_var = count_avail_process_cpus ();
|
||||
}
|
||||
|
||||
/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
threads we should spawn for this team. FIXME: How do we adjust for
|
||||
load average on MS Windows? */
|
||||
|
||||
unsigned
|
||||
gomp_dynamic_max_threads (void)
|
||||
{
|
||||
int n_onln = count_avail_process_cpus ();
|
||||
return n_onln > gomp_nthreads_var ? gomp_nthreads_var : n_onln;
|
||||
}
|
||||
|
||||
int
|
||||
omp_get_num_procs (void)
|
||||
{
|
||||
return count_avail_process_cpus ();
|
||||
}
|
||||
|
||||
ialias (omp_get_num_procs)
|
41
contrib/gcclibs/libgomp/config/posix/affinity.c
Normal file
41
contrib/gcclibs/libgomp/config/posix/affinity.c
Normal file
@ -0,0 +1,41 @@
|
||||
/* Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This is a generic stub implementation of a CPU affinity setting. */
|
||||
|
||||
#include "libgomp.h"
|
||||
|
||||
void
|
||||
gomp_init_affinity (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
gomp_init_thread_affinity (pthread_attr_t *attr)
|
||||
{
|
||||
(void) attr;
|
||||
}
|
11488
contrib/gcclibs/libgomp/configure
vendored
11488
contrib/gcclibs/libgomp/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -15,12 +15,6 @@ LIBGOMP_ENABLE(version-specific-runtime-libs, no, ,
|
||||
permit yes|no)
|
||||
AC_MSG_RESULT($enable_version_specific_runtime_libs)
|
||||
|
||||
AC_MSG_CHECKING([for --enable-linux-futex])
|
||||
LIBGOMP_ENABLE(linux-futex, default, ,
|
||||
[Use the Linux futex system call],
|
||||
permit yes|no|default)
|
||||
AC_MSG_RESULT($enable_linux_futex)
|
||||
|
||||
# We would like our source tree to be readonly. However when releases or
|
||||
# pre-releases are generated, the flex/bison generated files as well as the
|
||||
# various formats of manuals need to be included along with the rest of the
|
||||
@ -64,11 +58,11 @@ target_alias=${target_alias-$host_alias}
|
||||
# we can do about that; they come from AC_INIT).
|
||||
# foreign: we don't follow the normal rules for GNU packages (no COPYING
|
||||
# file in the top srcdir, etc, etc), so stop complaining.
|
||||
# no-dependencies: turns off auto dependency generation (just for now)
|
||||
# no-dist: we don't want 'dist' and related rules.
|
||||
# -Wall: turns on all automake warnings...
|
||||
# -Wno-portability: ...except this one, since GNU make is required.
|
||||
# -Wno-override: ... and this one, since we do want this in testsuite.
|
||||
AM_INIT_AUTOMAKE([1.9.0 foreign -Wall -Wno-portability -Wno-override])
|
||||
AM_INIT_AUTOMAKE([1.9.0 foreign no-dist -Wall -Wno-portability -Wno-override])
|
||||
AM_ENABLE_MULTILIB(, ..)
|
||||
|
||||
# Calculate toolexeclibdir
|
||||
@ -135,7 +129,7 @@ AC_PROG_INSTALL
|
||||
# that we can use it.
|
||||
ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
|
||||
[GNU texinfo.* \([0-9][0-9.]*\)],
|
||||
[4.[4-9]*])
|
||||
[4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
|
||||
AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
|
||||
|
||||
|
||||
@ -160,7 +154,7 @@ AC_SUBST(libtool_VERSION)
|
||||
# Check header files.
|
||||
AC_STDC_HEADERS
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/time.h)
|
||||
AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h)
|
||||
|
||||
GCC_HEADER_STDINT(gstdint.h)
|
||||
|
||||
@ -193,50 +187,29 @@ case "$host" in
|
||||
AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
|
||||
Define if the POSIX Semaphores do not work on your system.)
|
||||
;;
|
||||
*-linux*)
|
||||
case "$enable_linux_futex" in
|
||||
default)
|
||||
# If headers don't have gettid/futex syscalls definition, then
|
||||
# default to no, otherwise there will be compile time failures.
|
||||
# Otherwise, default to yes. If we don't detect we are
|
||||
# compiled/linked against NPTL and not cross-compiling, check
|
||||
# if programs are run by default against NPTL and if not, issue
|
||||
# a warning.
|
||||
enable_linux_futex=no
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/syscall.h>
|
||||
int lk;],
|
||||
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
pthread_t th; void *status;],
|
||||
[pthread_tryjoin_np (th, &status);])],[enable_linux_futex=yes],
|
||||
[if test x$cross_compiling = xno; then
|
||||
if getconf GNU_LIBPTHREAD_VERSION 2>/dev/null \
|
||||
| LC_ALL=C grep -i NPTL > /dev/null 2>/dev/null; then
|
||||
AC_MSG_WARN([The kernel might not support futex or gettid syscalls.
|
||||
If so, please configure with --disable-linux-futex])
|
||||
fi
|
||||
fi
|
||||
enable_linux_futex=yes])])
|
||||
;;
|
||||
yes)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/syscall.h>
|
||||
int lk;],
|
||||
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[],
|
||||
[AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
GCC_LINUX_FUTEX(:)
|
||||
|
||||
# Check for pthread_{,attr_}[sg]etaffinity_np.
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#define _GNU_SOURCE
|
||||
#include <pthread.h>],
|
||||
[cpu_set_t cpuset;
|
||||
pthread_attr_t attr;
|
||||
pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
|
||||
if (CPU_ISSET (0, &cpuset))
|
||||
CPU_SET (1, &cpuset);
|
||||
else
|
||||
CPU_ZERO (&cpuset);
|
||||
pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
|
||||
pthread_attr_init (&attr);
|
||||
pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
|
||||
pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);])],
|
||||
AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1,
|
||||
[ Define if pthread_{,attr_}{g,s}etaffinity_np is supported.]))
|
||||
|
||||
# At least for glibc, clock_gettime is in librt. But don't pull that
|
||||
# in if it still doesn't give us the function we want.
|
||||
if test $ac_cv_func_clock_gettime = no; then
|
||||
|
@ -11,14 +11,11 @@
|
||||
# XLDFLAGS Add extra link flags to use.
|
||||
|
||||
# Optimize TLS usage by avoiding the overhead of dynamic allocation.
|
||||
# This does require that the library be present during process
|
||||
# startup, so mark the library as not to be dlopened.
|
||||
if test $have_tls = yes ; then
|
||||
if test $gcc_cv_have_tls = yes ; then
|
||||
case "${target}" in
|
||||
|
||||
*-*-linux*)
|
||||
XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
|
||||
XLDFLAGS="${XLDFLAGS} -Wl,-z,nodlopen"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -49,9 +46,14 @@ if test $enable_linux_futex = yes; then
|
||||
# Note that bare i386 is not included here. We need cmpxchg.
|
||||
i[456]86-*-linux*)
|
||||
config_path="linux/x86 linux posix"
|
||||
if test -z "$with_arch"; then
|
||||
XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
fi
|
||||
case " ${CC} ${CFLAGS} " in
|
||||
*" -m64 "*)
|
||||
;;
|
||||
*)
|
||||
if test -z "$with_arch"; then
|
||||
XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
fi
|
||||
esac
|
||||
;;
|
||||
|
||||
# Similar jiggery-pokery for x86_64 multilibs, except here we
|
||||
@ -105,6 +107,10 @@ case "${target}" in
|
||||
XLDFLAGS="${XLDFLAGS} -lposix4"
|
||||
;;
|
||||
|
||||
*-*-darwin*)
|
||||
config_path="bsd posix"
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -42,6 +42,8 @@ bool gomp_dyn_var = false;
|
||||
bool gomp_nest_var = false;
|
||||
enum gomp_schedule_type gomp_run_sched_var = GFS_DYNAMIC;
|
||||
unsigned long gomp_run_sched_chunk = 1;
|
||||
unsigned short *gomp_cpu_affinity;
|
||||
size_t gomp_cpu_affinity_len;
|
||||
|
||||
/* Parse the OMP_SCHEDULE environment variable. */
|
||||
|
||||
@ -177,6 +179,97 @@ parse_boolean (const char *name, bool *value)
|
||||
gomp_error ("Invalid value for environment variable %s", name);
|
||||
}
|
||||
|
||||
/* Parse the GOMP_CPU_AFFINITY environment varible. Return true if one was
|
||||
present and it was successfully parsed. */
|
||||
|
||||
static bool
|
||||
parse_affinity (void)
|
||||
{
|
||||
char *env, *end;
|
||||
unsigned long cpu_beg, cpu_end, cpu_stride;
|
||||
unsigned short *cpus = NULL;
|
||||
size_t allocated = 0, used = 0, needed;
|
||||
|
||||
env = getenv ("GOMP_CPU_AFFINITY");
|
||||
if (env == NULL)
|
||||
return false;
|
||||
|
||||
do
|
||||
{
|
||||
while (*env == ' ' || *env == '\t')
|
||||
env++;
|
||||
|
||||
cpu_beg = strtoul (env, &end, 0);
|
||||
cpu_end = cpu_beg;
|
||||
cpu_stride = 1;
|
||||
if (env == end || cpu_beg >= 65536)
|
||||
goto invalid;
|
||||
|
||||
env = end;
|
||||
if (*env == '-')
|
||||
{
|
||||
cpu_end = strtoul (++env, &end, 0);
|
||||
if (env == end || cpu_end >= 65536 || cpu_end < cpu_beg)
|
||||
goto invalid;
|
||||
|
||||
env = end;
|
||||
if (*env == ':')
|
||||
{
|
||||
cpu_stride = strtoul (++env, &end, 0);
|
||||
if (env == end || cpu_stride == 0 || cpu_stride >= 65536)
|
||||
goto invalid;
|
||||
|
||||
env = end;
|
||||
}
|
||||
}
|
||||
|
||||
needed = (cpu_end - cpu_beg) / cpu_stride + 1;
|
||||
if (used + needed >= allocated)
|
||||
{
|
||||
unsigned short *new_cpus;
|
||||
|
||||
if (allocated < 64)
|
||||
allocated = 64;
|
||||
if (allocated > needed)
|
||||
allocated <<= 1;
|
||||
else
|
||||
allocated += 2 * needed;
|
||||
new_cpus = realloc (cpus, allocated * sizeof (unsigned short));
|
||||
if (new_cpus == NULL)
|
||||
{
|
||||
free (cpus);
|
||||
gomp_error ("not enough memory to store GOMP_CPU_AFFINITY list");
|
||||
return false;
|
||||
}
|
||||
|
||||
cpus = new_cpus;
|
||||
}
|
||||
|
||||
while (needed--)
|
||||
{
|
||||
cpus[used++] = cpu_beg;
|
||||
cpu_beg += cpu_stride;
|
||||
}
|
||||
|
||||
while (*env == ' ' || *env == '\t')
|
||||
env++;
|
||||
|
||||
if (*env == ',')
|
||||
env++;
|
||||
else if (*env == '\0')
|
||||
break;
|
||||
}
|
||||
while (1);
|
||||
|
||||
gomp_cpu_affinity = cpus;
|
||||
gomp_cpu_affinity_len = used;
|
||||
return true;
|
||||
|
||||
invalid:
|
||||
gomp_error ("Invalid value for enviroment variable GOMP_CPU_AFFINITY");
|
||||
return false;
|
||||
}
|
||||
|
||||
static void __attribute__((constructor))
|
||||
initialize_env (void)
|
||||
{
|
||||
@ -190,6 +283,8 @@ initialize_env (void)
|
||||
parse_boolean ("OMP_NESTED", &gomp_nest_var);
|
||||
if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var))
|
||||
gomp_init_num_threads ();
|
||||
if (parse_affinity ())
|
||||
gomp_init_affinity ();
|
||||
|
||||
/* Not strictly environment related, but ordering constructors is tricky. */
|
||||
pthread_attr_init (&gomp_thread_attr);
|
||||
|
@ -242,16 +242,16 @@ gomp_iter_guided_next_locked (long *pstart, long *pend)
|
||||
if (ws->next == ws->end)
|
||||
return false;
|
||||
|
||||
n = (ws->end - ws->next) / ws->incr;
|
||||
start = ws->next;
|
||||
n = (ws->end - start) / ws->incr;
|
||||
q = (n + nthreads - 1) / nthreads;
|
||||
|
||||
if (q < ws->chunk_size)
|
||||
q = ws->chunk_size;
|
||||
if (q > n)
|
||||
q = n;
|
||||
|
||||
start = ws->next;
|
||||
end = start + q * ws->incr;
|
||||
if (q <= n)
|
||||
end = start + q * ws->incr;
|
||||
else
|
||||
end = ws->end;
|
||||
|
||||
ws->next = end;
|
||||
*pstart = start;
|
||||
@ -286,15 +286,15 @@ gomp_iter_guided_next (long *pstart, long *pend)
|
||||
if (start == end)
|
||||
return false;
|
||||
|
||||
n = (end - start) / ws->incr;
|
||||
n = (end - start) / incr;
|
||||
q = (n + nthreads - 1) / nthreads;
|
||||
|
||||
if (q < chunk_size)
|
||||
q = chunk_size;
|
||||
if (q > n)
|
||||
q = n;
|
||||
|
||||
nend = start + q * incr;
|
||||
if (__builtin_expect (q <= n, 1))
|
||||
nend = start + q * incr;
|
||||
else
|
||||
nend = end;
|
||||
|
||||
tmp = __sync_val_compare_and_swap (&ws->next, start, nend);
|
||||
if (__builtin_expect (tmp == start, 1))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -246,8 +246,18 @@ extern unsigned long gomp_run_sched_chunk;
|
||||
/* The attributes to be used during thread creation. */
|
||||
extern pthread_attr_t gomp_thread_attr;
|
||||
|
||||
/* Other variables. */
|
||||
|
||||
extern unsigned short *gomp_cpu_affinity;
|
||||
extern size_t gomp_cpu_affinity_len;
|
||||
|
||||
/* Function prototypes. */
|
||||
|
||||
/* affinity.c */
|
||||
|
||||
extern void gomp_init_affinity (void);
|
||||
extern void gomp_init_thread_affinity (pthread_attr_t *);
|
||||
|
||||
/* alloc.c */
|
||||
|
||||
extern void *gomp_malloc (size_t) __attribute__((malloc));
|
||||
|
@ -895,14 +895,25 @@ dynamic scheduling and a chunk size of 1 is used.
|
||||
@cindex Environment Variable
|
||||
@table @asis
|
||||
@item @emph{Description}:
|
||||
A patch for this extension has been submitted, but was not yet applied at the
|
||||
time of writing.
|
||||
Binds threads to specific CPUs. The variable should contain a space- or
|
||||
comma-separated list of CPUs. This list may contain different kind of
|
||||
entries: either single CPU numbers in any order, a range of CPUs (M-N)
|
||||
or a range with some stride (M-N:S). CPU numbers are zero based. For example,
|
||||
@code{GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"} will bind the initial thread
|
||||
to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
|
||||
CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 10, 12,
|
||||
and 14 respectively and then start assigning back from the beginning of
|
||||
the list. @code{GOMP_CPU_AFFINITY=0} binds all threads to CPU 0.
|
||||
|
||||
@item @emph{Reference}:
|
||||
@uref{http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00982.html,
|
||||
GCC Patches Mailinglist}
|
||||
@uref{http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01133.html,
|
||||
GCC Patches Mailinglist}
|
||||
There is no GNU OpenMP library routine to determine whether a CPU affinity
|
||||
specification is in effect. As a workaround, language-specific library
|
||||
functions, e.g., @code{getenv} in C or @code{GET_ENVIRONMENT_VARIABLE} in
|
||||
Fortran, may be used to query the setting of the @code{GOMP_CPU_AFFINITY}
|
||||
environment variable. A defined CPU affinity on startup cannot be changed
|
||||
or disabled during the runtime of the application.
|
||||
|
||||
If this environment variable is omitted, the host system will handle the
|
||||
assignment of threads to CPUs.
|
||||
@end table
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -49,36 +49,39 @@ typedef struct
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# define __GOMP_NOTHROW throw ()
|
||||
#else
|
||||
# define __GOMP_NOTHROW __attribute__((__nothrow__))
|
||||
#endif
|
||||
|
||||
extern void omp_set_num_threads (int);
|
||||
extern int omp_get_num_threads (void);
|
||||
extern int omp_get_max_threads (void);
|
||||
extern int omp_get_thread_num (void);
|
||||
extern int omp_get_num_procs (void);
|
||||
extern void omp_set_num_threads (int) __GOMP_NOTHROW;
|
||||
extern int omp_get_num_threads (void) __GOMP_NOTHROW;
|
||||
extern int omp_get_max_threads (void) __GOMP_NOTHROW;
|
||||
extern int omp_get_thread_num (void) __GOMP_NOTHROW;
|
||||
extern int omp_get_num_procs (void) __GOMP_NOTHROW;
|
||||
|
||||
extern int omp_in_parallel (void);
|
||||
extern int omp_in_parallel (void) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_set_dynamic (int);
|
||||
extern int omp_get_dynamic (void);
|
||||
extern void omp_set_dynamic (int) __GOMP_NOTHROW;
|
||||
extern int omp_get_dynamic (void) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_set_nested (int);
|
||||
extern int omp_get_nested (void);
|
||||
extern void omp_set_nested (int) __GOMP_NOTHROW;
|
||||
extern int omp_get_nested (void) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_init_lock (omp_lock_t *);
|
||||
extern void omp_destroy_lock (omp_lock_t *);
|
||||
extern void omp_set_lock (omp_lock_t *);
|
||||
extern void omp_unset_lock (omp_lock_t *);
|
||||
extern int omp_test_lock (omp_lock_t *);
|
||||
extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_init_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_destroy_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_set_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_unset_nest_lock (omp_nest_lock_t *);
|
||||
extern int omp_test_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
|
||||
extern double omp_get_wtime (void);
|
||||
extern double omp_get_wtick (void);
|
||||
extern double omp_get_wtime (void) __GOMP_NOTHROW;
|
||||
extern double omp_get_wtick (void) __GOMP_NOTHROW;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -38,16 +38,16 @@
|
||||
external omp_set_num_threads
|
||||
|
||||
external omp_get_dynamic, omp_get_nested
|
||||
logical*4 omp_get_dynamic, omp_get_nested
|
||||
logical(4) omp_get_dynamic, omp_get_nested
|
||||
external omp_test_lock, omp_in_parallel
|
||||
logical*4 omp_test_lock, omp_in_parallel
|
||||
logical(4) omp_test_lock, omp_in_parallel
|
||||
|
||||
external omp_get_max_threads, omp_get_num_procs
|
||||
integer*4 omp_get_max_threads, omp_get_num_procs
|
||||
integer(4) omp_get_max_threads, omp_get_num_procs
|
||||
external omp_get_num_threads, omp_get_thread_num
|
||||
integer*4 omp_get_num_threads, omp_get_thread_num
|
||||
integer(4) omp_get_num_threads, omp_get_thread_num
|
||||
external omp_test_nest_lock
|
||||
integer*4 omp_test_nest_lock
|
||||
integer(4) omp_test_nest_lock
|
||||
|
||||
external omp_get_wtick, omp_get_wtime
|
||||
double precision omp_get_wtick, omp_get_wtime
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -183,6 +183,7 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
|
||||
struct gomp_team *team;
|
||||
bool nested;
|
||||
unsigned i, n, old_threads_used = 0;
|
||||
pthread_attr_t thread_attr, *attr;
|
||||
|
||||
thr = gomp_thread ();
|
||||
nested = thr->ts.team != NULL;
|
||||
@ -265,6 +266,17 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
|
||||
}
|
||||
}
|
||||
|
||||
attr = &gomp_thread_attr;
|
||||
if (gomp_cpu_affinity != NULL)
|
||||
{
|
||||
size_t stacksize;
|
||||
pthread_attr_init (&thread_attr);
|
||||
pthread_attr_setdetachstate (&thread_attr, PTHREAD_CREATE_DETACHED);
|
||||
if (! pthread_attr_getstacksize (&gomp_thread_attr, &stacksize))
|
||||
pthread_attr_setstacksize (&thread_attr, stacksize);
|
||||
attr = &thread_attr;
|
||||
}
|
||||
|
||||
start_data = gomp_alloca (sizeof (struct gomp_thread_start_data)
|
||||
* (nthreads-i));
|
||||
|
||||
@ -283,12 +295,17 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
|
||||
start_data->fn_data = data;
|
||||
start_data->nested = nested;
|
||||
|
||||
err = pthread_create (&pt, &gomp_thread_attr,
|
||||
gomp_thread_start, start_data);
|
||||
if (gomp_cpu_affinity != NULL)
|
||||
gomp_init_thread_affinity (attr);
|
||||
|
||||
err = pthread_create (&pt, attr, gomp_thread_start, start_data);
|
||||
if (err != 0)
|
||||
gomp_fatal ("Thread creation failed: %s", strerror (err));
|
||||
}
|
||||
|
||||
if (gomp_cpu_affinity != NULL)
|
||||
pthread_attr_destroy (&thread_attr);
|
||||
|
||||
do_release:
|
||||
gomp_barrier_wait (nested ? &team->barrier : &gomp_threads_dock);
|
||||
|
||||
|
@ -12,7 +12,7 @@ SHLIB_MAJOR= 1
|
||||
SRCS= alloc.c barrier.c critical.c env.c \
|
||||
error.c iter.c loop.c ordered.c parallel.c sections.c \
|
||||
single.c team.c work.c lock.c mutex.c proc.c sem.c \
|
||||
bar.c time.c fortran.c
|
||||
bar.c time.c fortran.c affinity.c
|
||||
SRCS+= gstdint.h libgomp_f.h omp.h omp_lib.h
|
||||
|
||||
INCS+= omp.h
|
||||
|
@ -26,6 +26,9 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */
|
||||
#undef HAVE_PTHREAD_AFFINITY_NP
|
||||
|
||||
/* Define to 1 if you have the <semaphore.h> header file. */
|
||||
#define HAVE_SEMAPHORE_H 1
|
||||
|
||||
@ -52,6 +55,9 @@
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
#define HAVE_SYS_SYSCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user