changed library name to openblas and modified environment variable.

This commit is contained in:
Xianyi Zhang 2011-01-24 17:58:05 +00:00
parent a8e9e1ced8
commit e6c13e2b3c
7 changed files with 158 additions and 29 deletions

View File

@ -47,27 +47,27 @@ endif
shared :
ifeq ($(OSNAME), Linux)
$(MAKE) -C exports so
-ln -fs $(LIBSONAME) libgoto2.so
-ln -fs $(LIBSONAME) libopenblas.so
endif
ifeq ($(OSNAME), FreeBSD)
$(MAKE) -C exports so
-ln -fs $(LIBSONAME) libgoto2.so
-ln -fs $(LIBSONAME) libopenblas.so
endif
ifeq ($(OSNAME), NetBSD)
$(MAKE) -C exports so
-ln -fs $(LIBSONAME) libgoto2.so
-ln -fs $(LIBSONAME) libopenblas.so
endif
ifeq ($(OSNAME), Darwin)
$(MAKE) -C exports dyn
-ln -fs $(LIBDYNNAME) libgoto2.dylib
-ln -fs $(LIBDYNNAME) libopenblas.dylib
endif
ifeq ($(OSNAME), WINNT)
$(MAKE) -C exports dll
# -ln -fs $(LIBDLLNAME) libgoto2.dll
# -ln -fs $(LIBDLLNAME) libopenblas.dll
endif
ifeq ($(OSNAME), CYGWIN_NT)
$(MAKE) -C exports dll
-ln -fs $(LIBDLLNAME) libgoto2.dll
-ln -fs $(LIBDLLNAME) libopenblas.dll
endif
tests :
@ -86,7 +86,7 @@ endif
endif
libs :
-ln -fs $(LIBNAME) libgoto2.$(LIBSUFFIX)
-ln -fs $(LIBNAME) libopenblas.$(LIBSUFFIX)
for d in $(SUBDIRS) ; \
do if test -d $$d; then \
$(MAKE) -C $$d $(@F) || exit 1 ; \
@ -102,7 +102,7 @@ endif
prof : prof_blas prof_lapack
prof_blas :
ln -fs $(LIBNAME_P) libgoto2_p.$(LIBSUFFIX)
ln -fs $(LIBNAME_P) libopenblas_p.$(LIBSUFFIX)
for d in $(SUBDIRS) ; \
do if test -d $$d; then \
$(MAKE) -C $$d prof || exit 1 ; \
@ -113,7 +113,7 @@ ifdef DYNAMIC_ARCH
endif
blas :
ln -fs $(LIBNAME) libgoto2.$(LIBSUFFIX)
ln -fs $(LIBNAME) libopenblas.$(LIBSUFFIX)
for d in $(BLASDIRS) ; \
do if test -d $$d; then \
$(MAKE) -C $$d libs || exit 1 ; \
@ -121,7 +121,7 @@ blas :
done
hpl :
ln -fs $(LIBNAME) libgoto2.$(LIBSUFFIX)
ln -fs $(LIBNAME) libopenblas.$(LIBSUFFIX)
for d in $(BLASDIRS) ../laswp exports ; \
do if test -d $$d; then \
$(MAKE) -C $$d $(@F) || exit 1 ; \
@ -135,7 +135,7 @@ ifdef DYNAMIC_ARCH
endif
hpl_p :
ln -fs $(LIBNAME_P) libgoto2_p.$(LIBSUFFIX)
ln -fs $(LIBNAME_P) libopenblas_p.$(LIBSUFFIX)
for d in $(SUBDIRS) ../laswp exports ; \
do if test -d $$d; then \
$(MAKE) -C $$d $(@F) || exit 1 ; \
@ -221,7 +221,7 @@ clean ::
ifdef DYNAMIC_ARCH
@$(MAKE) -C kernel clean
endif
@rm -f *.$(LIBSUFFIX) *.so *~ *.exe getarch getarch_2nd *.dll *.lib *.$(SUFFIX) *.dwf libgoto2.$(LIBSUFFIX) libgoto2_p.$(LIBSUFFIX) *.lnk myconfig.h
@rm -f *.$(LIBSUFFIX) *.so *~ *.exe getarch getarch_2nd *.dll *.lib *.$(SUFFIX) *.dwf libopenblas.$(LIBSUFFIX) libopenblas_p.$(LIBSUFFIX) *.lnk myconfig.h
@rm -f Makefile.conf config.h Makefile_kernel.conf config_kernel.h st* *.dylib
@if test -d lapack-3.1.1; then \
echo deleting lapack-3.1.1; \

View File

@ -3,7 +3,7 @@
#
# This library's version
VERSION = 1.13
VERSION = 0.1
# You can specify the target architecture, otherwise it's
# automatically detected.

View File

@ -544,7 +544,7 @@ ifdef USE_SIMPLE_THREADED_LEVEL3
CCOMMON_OPT += -DUSE_SIMPLE_THREADED_LEVEL3
endif
LIBPREFIX = libgoto2
LIBPREFIX = libopenblas
KERNELDIR = $(TOPDIR)/kernel/$(ARCH)

View File

@ -1,3 +1,35 @@
/*****************************************************************************
Copyright (c) 2011, Lab of Parallel Software and Computational Science,ICSAS
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the ISCAS nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
@ -486,7 +518,7 @@ int blas_thread_init(void){
char *p;
p = getenv("GOTO_THREAD_TIMEOUT");
p = getenv("THREAD_TIMEOUT");
if (p) {
thread_timeout = atoi(p);
@ -677,7 +709,7 @@ int exec_blas(BLASLONG num, blas_queue_t *queue){
if (omp_in_parallel && (num > 1)) {
if (omp_in_parallel() > 0) {
fprintf(stderr,
"GotoBLAS Warning : Detect OpenMP Loop and this application may hang. "
"OpenBLAS Warning : Detect OpenMP Loop and this application may hang. "
"Please rebuild the library with USE_OPENMP=1 option.\n");
}
}

View File

@ -1,3 +1,36 @@
/*****************************************************************************
Copyright (c) 2011, Lab of Parallel Software and Computational Science,ICSAS
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the ISCAS nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
@ -547,7 +580,7 @@ void gotoblas_affinity_init(void) {
#ifdef USE_OPENMP
numprocs = 0;
#else
numprocs = readenv("GOTO_NUM_THREADS");
numprocs = readenv("OPENBLAS_NUM_THREADS");
#endif
if (numprocs == 0) numprocs = readenv("OMP_NUM_THREADS");
@ -633,7 +666,7 @@ void gotoblas_affinity_init(void) {
setup_mempolicy();
if (readenv("GOTOBLAS_MAIN_FREE")) {
if (readenv("OPENBLAS_MAIN_FREE")) {
sched_setaffinity(0, sizeof(cpu_orig_mask), &cpu_orig_mask[0]);
}

View File

@ -1,3 +1,35 @@
/*****************************************************************************
Copyright (c) 2011, Lab of Parallel Software and Computational Science,ICSAS
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the ISCAS nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
@ -196,7 +228,7 @@ int blas_get_cpu_number(void){
blas_goto_num = 0;
#ifndef USE_OPENMP
p = getenv("GOTO_NUM_THREADS");
p = getenv("OPENBLAS_NUM_THREADS");
if (p) blas_goto_num = atoi(p);
if (blas_goto_num < 0) blas_goto_num = 0;
#endif
@ -246,7 +278,7 @@ static int hot_alloc = 0;
static void alloc_mmap_free(struct release_t *release){
if (munmap(release -> address, BUFFER_SIZE)) {
printf("GotoBLAS : munmap failed\n");
printf("OpenBLAS : munmap failed\n");
}
}
@ -511,11 +543,11 @@ static void *alloc_windows(void *address){
static void alloc_devicedirver_free(struct release_t *release){
if (munmap(release -> address, BUFFER_SIZE)) {
printf("GotoBLAS : Bugphysarea unmap failed.\n");
printf("OpenBLAS : Bugphysarea unmap failed.\n");
}
if (close(release -> attr)) {
printf("GotoBLAS : Bugphysarea close failed.\n");
printf("OpenBLAS : Bugphysarea close failed.\n");
}
}
@ -553,7 +585,7 @@ static void *alloc_devicedirver(void *address){
static void alloc_shm_free(struct release_t *release){
if (shmdt(release -> address)) {
printf("GotoBLAS : Shared memory unmap failed.\n");
printf("OpenBLAS : Shared memory unmap failed.\n");
}
}
@ -590,7 +622,7 @@ static void alloc_hugetlb_free(struct release_t *release){
#if defined(OS_LINUX) || defined(OS_AIX)
if (shmdt(release -> address)) {
printf("GotoBLAS : Hugepage unmap failed.\n");
printf("OpenBLAS : Hugepage unmap failed.\n");
}
#endif
@ -690,11 +722,11 @@ static int hugetlb_pid = 0;
static void alloc_hugetlbfile_free(struct release_t *release){
if (munmap(release -> address, BUFFER_SIZE)) {
printf("GotoBLAS : HugeTLBfs unmap failed.\n");
printf("OpenBLAS : HugeTLBfs unmap failed.\n");
}
if (close(release -> attr)) {
printf("GotoBLAS : HugeTLBfs close failed.\n");
printf("OpenBLAS : HugeTLBfs close failed.\n");
}
}
@ -916,14 +948,14 @@ void *blas_memory_alloc(int procpos){
#ifdef ALLOC_DEVICEDRIVER
if ((*func == alloc_devicedirver) && (map_address == (void *)-1)) {
fprintf(stderr, "GotoBLAS Warning ... Physically contigous allocation was failed.\n");
fprintf(stderr, "OpenBLAS Warning ... Physically contigous allocation was failed.\n");
}
#endif
#ifdef ALLOC_HUGETLBFILE
if ((*func == alloc_hugetlbfile) && (map_address == (void *)-1)) {
#ifndef OS_WINDOWS
fprintf(stderr, "GotoBLAS Warning ... HugeTLB(File) allocation was failed.\n");
fprintf(stderr, "OpenBLAS Warning ... HugeTLB(File) allocation was failed.\n");
#endif
}
#endif

View File

@ -1,3 +1,35 @@
/*****************************************************************************
Copyright (c) 2011, Lab of Parallel Software and Computational Science,ICSAS
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the ISCAS nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
@ -39,5 +71,5 @@
#ifndef VERSION_H
#define VERSION_H
#define VERSION " Optimized BLAS by Kazushige Goto <kgoto@tacc.utexas.edu>"
#define VERSION " OpenBLAS"
#endif