Commit Graph

1419 Commits

Author SHA1 Message Date
Field G. Van Zee
9d5f1c4f3b Patch to avoid gcc warning in blastest/f2c/open.c.
Details:
- Use the modulo operator to limit the size of an integer that is given
  to sprintf(). This avoids a warning in some versions of gcc about the
  integer potentially overflowing the available space in the string into
  which the integer is being printed.
2018-10-01 17:39:26 -05:00
Field G. Van Zee
0c3cd00ba7 More README.md updates.
Details:
- Replaced much of "Getting Started" section with a shortened version of
  the bullet list of documentation currently shown in the github wiki
  page. Thanks to Devangi Parikh for her feedback in this change.
2018-10-01 16:18:25 -05:00
Field G. Van Zee
8eaf34bd23 Very minor README.md update. 2018-10-01 14:29:07 -05:00
Field G. Van Zee
599090e0eb README.md update.
Details:
- Added language mentioning SHPC group to Introduction.
2018-10-01 14:04:30 -05:00
Field G. Van Zee
b952ca8feb CREDITS file update. 2018-09-28 16:12:32 -05:00
Field G. Van Zee
7d96fc437e Allow slashes ('/') in version tags.
Details:
- Updated the configure script to allow slashes in version string. This
  is needed so that downstream maintainers (such as those for Debian)
  can create local tags such as "upstream/0.4.1". Thanks to M. Zhou for
  reporting this issue via PR #256 and providing me the information
  needed to debug the problem.
2018-09-28 15:40:45 -05:00
Field G. Van Zee
5fdddf6f37 Removed 'debian' directory.
Details:
- Removed the top-level 'debian' directory. This directory is apparently
  no longer needed (issue #257). Thanks to M. Zhou and Nico Schlömer for
  their contributions.
2018-09-28 11:25:54 -05:00
Field G. Van Zee
807a654888 Fixed confusing configure message for libmemkind.
Details:
- Corrected feedback echoed to user by configure when libmemkind is
  found but not explicitly requested. In these cases, configure would
  echo a message that it had received an explicit request to enable
  libmemkind, which was not accurate, even if the end result was the
  same--that libmemkind is enabled by default when it is found. Thanks
  To Devangi Parikh for reporting this issue.
2018-09-20 15:41:05 -05:00
Devangi N. Parikh
02adab427c Created a 'thunderx2' subdirectory within test/studies
Details:
- Created a 'thunderx2' subdirectory within test/studies to house
  various level-3 test driver used to measure performance on
  ThunderX2.
2018-09-20 14:38:50 -04:00
Field G. Van Zee
d7537fb51d Merge branch 'dev' 2018-09-12 15:24:20 -05:00
Devangi N. Parikh
dad07245db Fixed yet another bug in runme script in test/studies
Details:
- Fixed another copy-paste bug
2018-09-12 04:16:58 -05:00
Devangi N. Parikh
e669057fe3 Fixed bug in runme script in test/studies
Details:
- Fixed bug in runme script for skx studies that set the number of
  threads incorrectly
2018-09-11 22:29:42 -05:00
Devangi N. Parikh
232fdc3df3 Updated runme script in test/studies.
Details:
- Updated runme script for skx studies to run multithreading tests
  on 1 and 2 sockets.
2018-09-10 18:45:50 -05:00
Field G. Van Zee
c03728f1f4 Various minor cleanups.
Details:
- Rewrote bli_winsys.c to define bli_setenv() and bli_sleep()
  unconditionally, but differently for Windows and non-Windows, but
  then disabled the definition of bli_setenv() entirely since BLIS
  no longer needs to set environment variables. Updated bli_winsys.h
  accordingly, and call bli_sleep() from within testsuite instead of
  sleep() directly.
- Use
    #if !defined(_POSIX_BARRIERS) || (_POSIX_BARRIERS != 200809L)
  instead of
    #if !defined(_POSIX_BARRIERS) || (_POSIX_BARRIERS < 0)
  when guarding against local definition of pthread barrier in
  testsuite. (The description for unistd.h implies that _POSIX_BARRIERS
  should always be set to 200809L when barriers are supported, though I
  won't be surprised if we encounter a case in the future where it is
  set to something else such as 1 while still supported.)
- Removed old _VERS_CONF_INST definitions and installation rules in
  top-level Makefile. These are no longer needed because we no longer
  output libraries with the version and configuration name as
  substrings.
- Comment/whitespace updates in Makefile, config.mk.in, common.mk,
  configure, bli_extern_defs.h, and test_libblis.h.
- Added mention of 1m to README.md and other trivial tweaks.
2018-09-10 17:54:27 -05:00
Field G. Van Zee
e249a00a82 Imported skx dgemm ukernel from skx-redux branch.
Details:
- Added the new bli_dgemm_skx_asm_16x14.c microkernel from the skx-redux
  branch, along with appropriate blocksizes in bli_cntx_init_skx.c and
  a prototype in bli_kernels_skx.h. (Devin has not yet written the
  sgemm analague, so for now we will continue using the older sgemm
  ukernel.)
- Updated frame/include/bli_x86_asm_macros.h with a minor change that
  was present within the skx-redux branch.
2018-09-10 16:48:35 -05:00
Isuru Fernando
e93b01ff60 Windows DLL support (#246)
* Enable shared

* Enable rdp

* Add support for dll

* Use libblis-symbols.def

* Fix building dlls

* Fix libblis-symbols.def

* Fix soname

* Fix Makefile error

* Fix install target

* Fix missing symbols

* Add BLIS_MINUS_TWO

* Add path to dll

* Fix OSX soname

* Add declspec for dll

* Add -DBLIS_BUILD_DLL

* Replace @enable_shared@ in config

* switch to auto for now

* blis_ -> bli_

* Remove BLIS_BUILD_DLL in make check

* change auto->haswell

* enable_shared_01

* Add wno-macro-redefined

* print out.cblat3

* BLIS_BUILD_DLL -> BLIS_IS_BUILDING_LIBRARY

* Use V=1

* Remove fpic for windows

* Remember LIBPTHREAD

* Remove libm for windows

* Remember AR

* Fix remembering libpthread

* Add Wno-maybe-uninitialized in only gcc

* Don't do blastest for shared for now

* Fix install target

And remove unnecessary change

* test auto and x86_64

* Fix install target again

* Use IS_WIN variable

* Remove leading dot from LIBBLIS_SO_MAJ_EXT

* Make is_win yes/no

* Add comments for windows builds

* Change if else blocks location
2018-09-09 15:57:43 -05:00
Field G. Van Zee
1330d5c4bc Employ "user" cflags for tl Makefile test targets.
Details:
- Use get-user-cflags-for() to generate cflags when compiling BLAS test
  drivers and BLIS testsuite from top-level Makefile. Meant to include
  these changes in previous commit (4b5437e). Thanks to Isuru Fernando
  for pointing out this oversight.
2018-09-07 19:37:59 -05:00
Field G. Van Zee
4b5437ec7a Define a cpp macro specific to BLIS compilation.
Details:
- Tweaked the cflags functions in common.mk so that a new preprocessor
  macro, BLIS_IS_BUILDING_LIBRARY, is defined, but only when BLIS
  itself is being built. This macro will not be defined when, for
  example, the testsuite or example code compiles code local to those
  applications. This was done in part by defining a new cflags function
  get-user-cflags-for(), which is now the designated function for
  application Makefiles if they wish to inherit a basic set of CFLAGS
  from BLIS. (The compiler flags returned are identical to that of
  get-frame-cflags-for() except that -DBLIS_IS_BUILDING_LIBRARY is
  omitted.)
- Updated all test driver-like makefiles to call get-user-cflags-for()
  instead of get-frame-cflags-for().
2018-09-07 17:24:32 -05:00
Field G. Van Zee
cc2cca4f56 Merge branch 'dev' 2018-09-06 17:12:13 -05:00
Jeff Hammond
e19e721287 Merge pull request #244 from kali/pthread-barrier-osx
add an adhoc impl for pthread_barrier
2018-09-06 14:58:49 -07:00
Jeff Hammond
b3d0702cf2 Merge branch 'master' into pthread-barrier-osx 2018-09-06 14:58:23 -07:00
Mathieu Poumeyrol
4e7d06700f second __APPLE__ 2018-09-06 23:48:31 +02:00
Field G. Van Zee
fb81c7fc66 Defined cortexa53 sub-configuration.
Details:
- Added a new sub-configuration 'cortexa53', which is a mirror image
  of cortexa57 except that it will use slightly different compiler
  flags. Thanks to Mathieu Poumeyrol for making this suggestion after
  discovering that the compiler flags being used by cortexa57 were
  not working properly in certain OS X environments (the fix to which
  is currently pending in pull request #245).
2018-09-06 16:29:39 -05:00
Mathieu Poumeyrol
24ecc0d94a use _POSIX_BARRIERS instead of __APPLE__ 2018-09-06 22:10:16 +02:00
Mathieu Poumeyrol
97965b0905 cortexa9 and cortexa53 travis build + qemu test (#245) 2018-09-06 14:10:29 -05:00
Mathieu Poumeyrol
a6802eab7d reinstantiate test on macos 2018-09-06 17:16:35 +02:00
Mathieu Poumeyrol
d688a2b7e5 add an adhoc impl for pthread_barrier 2018-09-06 15:31:14 +02:00
Field G. Van Zee
ab9f9e684d CHANGELOG update (0.4.1) 2018-08-30 15:14:02 -05:00
Field G. Van Zee
10fd614031 Version file update (0.4.1) 0.4.1 2018-08-30 15:13:59 -05:00
Field G. Van Zee
08dd67c4b2 ReleaseNotes.md update in advance of next version. 2018-08-30 15:12:13 -05:00
Field G. Van Zee
4fa4cb0734 Trivial comment header updates.
Details:
- Removed four trailing spaces after "BLIS" that occurs in most files'
  commented-out license headers.
- Added UT copyright lines to some files. (These files previously had
  only AMD copyright lines but were contributed to by both UT and AMD.)
- In some files' copyright lines, expanded 'The University of Texas' to
  'The University of Texas at Austin'.
- Fixed various typos/misspellings in some license headers.
2018-08-29 18:06:41 -05:00
Field G. Van Zee
b051ffb815 Merge branch 'dev' 2018-08-29 17:06:48 -05:00
Mathieu Poumeyrol
6f33d9de21 fix compilation of armv7a kernels (#242) 2018-08-29 16:48:22 -05:00
Field G. Van Zee
8199e339ae Added testsuite threading to input.general.fast.
Details:
- Added lines associated with the testsuite's new threading option to
  input.general.fast. This change was intended for the previous commit
  (10d0735).
2018-08-27 07:00:12 -05:00
Field G. Van Zee
10d07357af Better thread safety; added threading to testsuite.
Details:
- Replaced critical sections that were conditional upon multithreading
  being enabled (via pthreads or OpenMP) with unconditional use of
  pthreads mutexes. (Why pthreads? Because BLIS already requires it
  for its initialization mechanism: pthread_once().) This was done in
  bli_error.c, bli_gks.c, bli_l3_ind.c. Also, replaced usage of BLIS's
  mtx_t object and bli_mutex_*() API with pthread mutexes in
  bli_thread.c. The previous status quo could result in a race condition
  if the application called BLIS from more than one thread. The new
  pthread-based code should be completely agnostic to the application's
  threading configuration. Thanks to AMD for bringing to our attention
  the need for a thread-safety review.
- Added an option to the testsuite to simulate application-level
  multithreading. Specifically, each thread maintains a counter that is
  incremented after each experiment. The thread only executes the
  experiment if: counter % n_threads == thread_id. In other words, the
  threads simply take turns executing each problem experiment. Also,
  POSIX guarantees that fprintf() will not intermingle output, so
  output was switched to fprintf() instead of libblis_test_fprintf().
- Changed membrk_t objects to use pthread_mutex_t intead of mtx_t and
  replaced use of bli_mutex_init()/_finalize() in bli_membrk.c with
  wrappers to pthread_mutex_init()/_destroy().
- Changed the implementation of bli_l3_ind_oper_enable_only() to fix
  a race condition; specifically, two threads calling the function with
  the same parameters could lead to a non-deterministic outcome.
- Added #include <pthread.h> to bli_cpuid.c and moved the same in
  bli_arch.c.
- Added 'const' to declaration of OPT_MARKER in bli_getopt.c.
- Added #include <pthread.h> to bli_system.h.
- Added add-copyright.py script to automate adding new copyright lines
  to (and updating existing lines of) source files.
2018-08-26 20:34:30 -05:00
Field G. Van Zee
aaa549f4d1 Minor update to configure --help (--sharedir option).
Details:
- Fixed/tweaked description for --sharedir=SHAREDIR option.
2018-08-26 20:13:51 -05:00
Field G. Van Zee
573b8ac373 Fixed copy-paste typo in previous commit.
Details:
- Fixed a typo in travis/do_testsuite.sh introduced in 62ea1d3.
2018-08-26 13:51:32 -05:00
Field G. Van Zee
62ea1d33d3 Fixed broken out-of-tree builds.
Details:
- Fixed stale filepaths to check-blastest.sh and check-blistest.sh in
  travis/do_testsuite.sh and travis/do_sde.sh.
- Create a symbolic link to the 'config' directory so that the top-level
  Makefile can find the configs' make_defs.mk files during out-of-tree
  builds.
- Added additional case handling to out-of-tree scenario to handle
  situations where files 'Makefile', 'common.mk', or 'config' exist but
  are not symbolic links. In such cases, configure warns the user and
  exits.
- Homogenized various error messages throughout configure.
- Belated thanks to Victor Eijkhout for requesting the feature added
  in 0f491e9 whereby lesser Makefiles can compile and link against
  an existing installation of BLIS.
2018-08-26 13:35:53 -05:00
Field G. Van Zee
0f491e994a Allow lesser Makefiles to reference installed BLIS.
Details:
- Updated the build system so that "lesser" Makefiles, such as those in
  belonging to example code or the testsuite, may be run even if the
  directory is orphaned from the original build tree. This allows a
  user to configure, compile, and install BLIS, delete the build tree
  (that is, the source distribution, or the build directory for out-
  of-tree builds) and then compile example or testsuite code and link
  against the installed copy of BLIS (provided the example or testsuite
  directory was preserved or obtained from another source). The only
  requirement is that make be invoked while setting the
  BLIS_INSTALL_PATH variable to the same installation prefix used when
  BLIS was configured. The easiest syntax is:

    make BLIS_INSTALL_PATH=/install/prefix

  though it's also permissible to set BLIS_INSTALL_PATH as an
  environment variable prior to running 'make'.
- Updated all lesser Makefiles to implement the new aforementioned build
  behavior.
- Relocated check-blastest.sh and check-blistest.sh from build to
  blastest and testsuite, respectively, so that if those directories are
  copied elsewhere the user can still run 'make check' locally.
- Updated docs/Testsuite.md with language that mentions this new option
  of building/linking against an installed copy of BLIS.
2018-08-25 20:12:36 -05:00
Field G. Van Zee
36ff92ce0d Missing C++ compiler no longer fatal to configure.
Details:
- Changed configure so that the absence of any C++ compiler from the
  pre-defined search list does not result in an exit. Instead, in this
  situation, the found_cxx variable is assigned 'c++notfound' and the
  error message is changed to remind the user that C++ will not be
  available in the sandbox. Thanks to Devangi Parikh for reporting this
  issue.
- Also tweaked the message when a C++ compiler *is* found to remind any
  would-be confused user that BLIS will only use C++ if it is needed by
  code in the sandbox.
2018-08-24 18:26:09 -05:00
Field G. Van Zee
658f0a129b Fixed obscure integer size bug in va_arg() usage.
Details:
- Fixed a bug in the way that the variadic bli_cntx_set_l3_nat_ukrs()
  function was defined. This function is meant to take a microkernel id,
  microkernel datatype, microkernel address, and microkernel preference
  as arguments, and is typically called within the bli_cntx_init_*()
  function defined within a sub-configuration for initializing an
  appropriate context. The problem is with the final argument: the
  microkernel preference. These preferences are actually boolean values,
  0 or 1 (encoded as FALSE or TRUE). Since the variadic function does
  not give the compiler any type information for any variadic arguments,
  they are "promoted" in the course of internal (macroized) processing
  according to default argument promotion rules. Thus, integer literals
  such as 0 and 1 become int and floating-point literals (such as 0.0 or
  1.0) become double. Previous to this commit, we indicated to va_arg()
  that the ukernel preference was a 'bool_t', which is a typedef of
  int64_t on 64-bit systems. On systems where int is defined as 64 bits,
  no problems manifest since int is the same size as the type we passed
  in to va_arg(), but on systems where int is 32 bits, the ukernel
  preference could be misinterpreted as a garbage value. (This was
  observed on a modern armv8 system.) The fix was to interpret the
  bool_t value as int and then immediately typecast it to and store it
  as a bool_t. Special thanks to Devangi Parikh for helping track down
  this issue, including deciphering the use of va_arg() and its
  byzantine treatment of types.
- Added explicit typecasts for all invocations of va_arg() in
  bli_cntx.c.
2018-08-24 17:49:37 -05:00
Field G. Van Zee
e71dc38912 Fixed a very minor memory leak in gks.
Details:
- Fixed a memory leak in the global kernel structure that resulted in 56
  bytes per configured architecture (of which only 18 are presently
  supported by BLIS). The leak would only manifest if BLIS was
  initialized and then finalized before the application terminated.
  Thanks to Devangi Parikh for helping track down this leak.
2018-08-24 15:56:04 -05:00
Field G. Van Zee
a7e3a5f975 Fixed uncallable bli_finalize().
Details:
- Previously, bli_finalize_once()--which, like bli_init_once(), was
  implemented in terms of pthread_once()--was using the same
  pthread_once_t control object being used by bli_init(), thus
  guaranteeing that it would never be called as long as BLIS had already
  been initialized. This could manifest as a rather large memory leak to
  any application that attempted to finalize BLIS midway through its
  execution (since BLIS reserves several megabytes of storage for
  packing buffers per thread used). The fix entailed giving each
  function its own pthread_once_t object. Thanks to Devangi Parikh for
  helping track down this very quiet bug.
2018-08-24 14:51:11 -05:00
Field G. Van Zee
a79c21c7c1 Fixed cleanmk target post-1b0f8d6.
Details:
- Changed the cleanmk target to delete makefile fragments from their new
  home in obj/$(CONFIG_NAME). The old definition worked only because of
  a typo (REFERKN_PATH instead of REFKERN_PATH), and only in the
  non-verbose (V != 1) case.
2018-08-23 14:40:46 -05:00
Field G. Van Zee
ffb57242f3 Cosmetic output changes to configure.
Details:
- Disable sandbox-related obj directory creation, directory mirroring,
  and makefile fragment generation when a sandbox is not enabled.
- Prevent various duplicate actions by configure (such as those
  mentioned above for sandboxes above).
2018-08-22 18:22:41 -05:00
Field G. Van Zee
ac17454aae Merge branch 'master' into dev 2018-08-22 15:34:53 -05:00
Field G. Van Zee
a77bec766a Whitespace changes, minor renames in build system.
Details:
- Minor whitespace cleanup, mostly in the form of spaces -> tabs.
- Shortened certain variables' _FRAGMENT_ infixes to _FRAG_ in
  common.mk.
2018-08-22 15:31:29 -05:00
Devin Matthews
1b0f8d60d1 Generate makefile fragments in build tree (#240)
* Make src dir read-only in out-of-tree build test.

* Generate makefile fragments in the build tree.
2018-08-22 15:19:29 -05:00
Field G. Van Zee
7afd095af3 Removed skx from code snippet in previous commit.
Details:
- The docs/ConfigurationHowTo.md document was written with examples that
  did not yet contain the skx sub-configuration, but the previous commit
  included bli_arch.c code copied and pasted from a recent commit that
  does support skx. To keep things consistent, I've removed skx from the
  recently-added ConfigurationHowTo.md code snippet.
2018-08-22 14:58:24 -05:00
Field G. Van Zee
48211a980d Update to docs/ConfigurationHowTo.md.
Details:
- Added missing language directing the reader to modify the config_name
  string array in bli_arch.c when adding a new sub-configuration. Thanks
  to Devangi Parikh for reporting this missing section.
2018-08-22 14:55:02 -05:00