Skip to content

Issues with ?lamch routines: use O0 to compile them and static variables #497

@stefanozampini

Description

@stefanozampini

It seems that BLIS compiles slamch and dlamch using optimization flags enabled.
My configuration is

./configure --enable-blas --enable-cblas --enable-pba-pools --enable-sba-pools --enable-threading=openmp --prefix=$HOME/amd/src/local zen2

and the compilation of these routines is

[zampins@cn514-15-r blis]$ grep lamch.c make2.log
/sw/csi/gcc/10.2.0/bin/gcc -O3 -Wall -Wno-unused-function -Wfatal-errors -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -fopenmp -Iinclude/zen2 -I./frame/3/ -I./frame/ind/ukernels/ -I./frame/3/ -I./frame/1m/ -I./frame/1f/ -I./frame/1/ -I./frame/include -DBLIS_VERSION_STRING=\"3.0.0\" -DBLIS_IS_BUILDING_LIBRARY -fvisibility=hidden -c frame/base/noopt/bli_dlamch.c -o obj/zen2/frame/base/noopt/bli_dlamch.o
/sw/csi/gcc/10.2.0/bin/gcc -O3 -Wall -Wno-unused-function -Wfatal-errors -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -fopenmp -Iinclude/zen2 -I./frame/3/ -I./frame/ind/ukernels/ -I./frame/3/ -I./frame/1m/ -I./frame/1f/ -I./frame/1/ -I./frame/include -DBLIS_VERSION_STRING=\"3.0.0\" -DBLIS_IS_BUILDING_LIBRARY -fvisibility=hidden -c frame/base/noopt/bli_slamch.c -o obj/zen2/frame/base/noopt/bli_slamch.o

Using gcc 10.2 with -march=znver2 on an AMD EPYC 7702 let my code (compiled with -fopenmp) emit this warning

(// WARNING. The value EMIN may be incorrect:-,  EMIN = ,i8,/ If, after inspection, the value EMIN looks, acceptable please comment out ,/ the IF block as marked within the code of routine, DLAMC2,,/ otherwise supply EMIN explicitly.,/)(// WARNING. The value EMIN may be incorrect:-,  EMIN = ,i8,/ If, after inspection, the value EMIN looks, acceptable please comment out ,/ the IF block as marked within the code of routine, DLAMC2,,/ otherwise supply EMIN explicitly.,/)

I'm not familiar with BLIS makefile rule defintions to be able to provide a fix for this. However, I see the ?lamch routines are in frame/base/noopt/ so there's probably hope that these routines will be compiled with -O0. Same happens with the amd fork of blis as well as with the libflame code. Should I submit an issue for libflame too or this one is enough?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions