Skip to content

Commit fdd1b50

Browse files
authored
Merge pull request #63 from xianyi/develop
rebase
2 parents 0f9a935 + 430e8b4 commit fdd1b50

File tree

16 files changed

+127
-1491
lines changed

16 files changed

+127
-1491
lines changed

Makefile.system

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,7 @@ endif
783783

784784
ifeq ($(F_COMPILER), FLANG)
785785
CCOMMON_OPT += -DF_INTERFACE_FLANG
786+
FCOMMON_OPT += -frecursive
786787
ifdef BINARY64
787788
ifdef INTERFACE64
788789
ifneq ($(INTERFACE64), 0)
@@ -796,6 +797,11 @@ endif
796797
ifeq ($(USE_OPENMP), 1)
797798
FCOMMON_OPT += -fopenmp
798799
endif
800+
ifeq ($(OSNAME), Linux)
801+
ifeq ($(ARCH), x86_64)
802+
FLANG_VENDOR := $(shell expr `$(FC) --version|cut -f 1 -d "."|head -1`)
803+
endif
804+
endif
799805
endif
800806

801807
ifeq ($(F_COMPILER), G77)
@@ -1270,8 +1276,11 @@ endif
12701276

12711277
override CFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR)
12721278
override PFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) -DPROFILE $(COMMON_PROF)
1273-
1279+
ifeq ($(FLANG_VENDOR),AOCC)
1280+
override FFLAGS += $(filter-out -O2 -O3,$(COMMON_OPT)) -O1 $(FCOMMON_OPT)
1281+
else
12741282
override FFLAGS += $(COMMON_OPT) $(FCOMMON_OPT)
1283+
endif
12751284
override FPFLAGS += $(FCOMMON_OPT) $(COMMON_PROF)
12761285
#MAKEOVERRIDES =
12771286

benchmark/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,7 @@ zsymv.veclib : zsymv.$(SUFFIX)
18251825

18261826
##################################### Sgeev ####################################################
18271827
sgeev.goto : sgeev.$(SUFFIX) ../$(LIBNAME)
1828-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1828+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
18291829

18301830
sgeev.acml : sgeev.$(SUFFIX)
18311831
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1841,7 +1841,7 @@ sgeev.veclib : sgeev.$(SUFFIX)
18411841

18421842
##################################### Dgeev ####################################################
18431843
dgeev.goto : dgeev.$(SUFFIX) ../$(LIBNAME)
1844-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1844+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
18451845

18461846
dgeev.acml : dgeev.$(SUFFIX)
18471847
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1858,7 +1858,7 @@ dgeev.veclib : dgeev.$(SUFFIX)
18581858
##################################### Cgeev ####################################################
18591859

18601860
cgeev.goto : cgeev.$(SUFFIX) ../$(LIBNAME)
1861-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1861+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
18621862

18631863
cgeev.acml : cgeev.$(SUFFIX)
18641864
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1875,7 +1875,7 @@ cgeev.veclib : cgeev.$(SUFFIX)
18751875
##################################### Zgeev ####################################################
18761876

18771877
zgeev.goto : zgeev.$(SUFFIX) ../$(LIBNAME)
1878-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1878+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
18791879

18801880
zgeev.acml : zgeev.$(SUFFIX)
18811881
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1891,7 +1891,7 @@ zgeev.veclib : zgeev.$(SUFFIX)
18911891

18921892
##################################### Sgetri ####################################################
18931893
sgetri.goto : sgetri.$(SUFFIX) ../$(LIBNAME)
1894-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1894+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
18951895

18961896
sgetri.acml : sgetri.$(SUFFIX)
18971897
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1907,7 +1907,7 @@ sgetri.veclib : sgetri.$(SUFFIX)
19071907

19081908
##################################### Dgetri ####################################################
19091909
dgetri.goto : dgetri.$(SUFFIX) ../$(LIBNAME)
1910-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1910+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
19111911

19121912
dgetri.acml : dgetri.$(SUFFIX)
19131913
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1924,7 +1924,7 @@ dgetri.veclib : dgetri.$(SUFFIX)
19241924
##################################### Cgetri ####################################################
19251925

19261926
cgetri.goto : cgetri.$(SUFFIX) ../$(LIBNAME)
1927-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1927+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
19281928

19291929
cgetri.acml : cgetri.$(SUFFIX)
19301930
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -1941,7 +1941,7 @@ cgetri.veclib : cgetri.$(SUFFIX)
19411941
##################################### Zgetri ####################################################
19421942

19431943
zgetri.goto : zgetri.$(SUFFIX) ../$(LIBNAME)
1944-
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
1944+
$(FC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
19451945

19461946
zgetri.acml : zgetri.$(SUFFIX)
19471947
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)

benchmark/zdot.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ int main(int argc, char *argv[]){
170170
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
171171
}
172172
gettimeofday( &start, (struct timezone *)0);
173-
173+
#ifdef RETURN_BY_STACK
174+
DOT (&result , &m, x, &inc_x, y, &inc_y );
175+
#else
174176
result = DOT (&m, x, &inc_x, y, &inc_y );
175-
177+
#endif
176178
gettimeofday( &stop, (struct timezone *)0);
177179

178180
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;

common_x86_64.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void __inline blas_lock(volatile BLASULONG *address){
8080
#endif
8181

8282
do {
83-
while (*address) {YIELDING;};
83+
while (*address) {YIELDING;}
8484

8585
#ifndef C_MSVC
8686
__asm__ __volatile__(
@@ -199,9 +199,9 @@ static __inline BLASLONG blas_quickdivide(BLASLONG x, BLASLONG y){
199199
#else
200200
extern unsigned int blas_quick_divide_table[];
201201

202-
static __inline int blas_quickdivide(unsigned int x, unsigned int y){
202+
static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){
203203

204-
unsigned int result;
204+
volatile unsigned int result;
205205

206206
if (y <= 1) return x;
207207

@@ -215,7 +215,6 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
215215
y = blas_quick_divide_table[y];
216216

217217
__asm__ __volatile__ ("mull %0" :"=d" (result), "+a"(x) : "0" (y));
218-
219218
return result;
220219
}
221220
#endif

f_check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ if ($link ne "") {
334334
&& ($flags !~ /kernel32/)
335335
&& ($flags !~ /advapi32/)
336336
&& ($flags !~ /shell32/)
337-
&& ($flags !~ /omp/)
337+
&& ($flags !~ /omp/ || ($vendor !~ /PGI/ && $flags =~ /omp/))
338338
&& ($flags !~ /[0-9]+/)
339339
&& ($flags !~ /^\-l$/)
340340
) {

0 commit comments

Comments
 (0)