Comments (8)
Whether or not XLC is right, woe to he who ignores restrict warnings.
from blis.
Jeff,
Best thing to do in the short term is to insert a “#define restrict /* nothing */“ in the bli_config.h for bgq.
What’s going on below can be fixed by a couple of extra curly braces.
As an example, XLC will complain about:
int function( double* restrict a)
{
double* restrict b = a;
return 0;
}
because apparently local variables are in the same scope as function arguments.
But it won’t complain about:
int function( double* restrict a)
{
{
double* restrict b = a;
return 0;
}
}
because this creates an inner scope where b is defined, and “outer to inner assignments” are allowed.
So basically to use restrict pointers on bgq, BLIS just needs a ton of extra curly braces.
-Tyler
On Apr 3, 2014, at 3:33 PM, Jeff Hammond [email protected] wrote:
XLC is the only compiler I've ever seen that gives these warnings, but I think they are formally legit. On the other hand, they may be false positives in practice.
[jhammond@vestalac1 blis]$ ./configure -p $HOME/BLIS/bgq bgq && make -j32 && make install
configure: checking whether we need to update the version file.
configure: checking version file './version'.
configure: found '.git' directory; assuming git clone.
configure: executing git describe --tags.
configure: got back 0.1.1-14-gd531a24.
configure: truncating to 0.1.1-14.
configure: updating version file './version'.
configure: starting configuration of BLIS 0.1.1-14.
configure: configuring with 'bgq' configuration sub-directory.
configure: detected -p option; using install prefix '/home/jhammond/BLIS/bgq'.
configure: creating ./config.mk from ./build/config.mk.in
configure: creating ./obj/bgq
configure: creating ./obj/bgq/config
configure: creating ./obj/bgq/frame
configure: creating ./obj/bgq/testsuite
configure: creating ./lib/bgq
configure: mirroring ./config/bgq to ./obj/bgq/config
configure: mirroring ./frame to ./obj/bgq/frame
configure: creating makefile fragment in ./config/bgq
configure: creating makefile fragment in ./config/bgq/kernels
configure: creating makefile fragment in ./config/bgq/kernels/1
configure: creating makefile fragment in ./config/bgq/kernels/1f
configure: creating makefile fragment in ./config/bgq/kernels/3
configure: creating makefile fragment in ./frame
configure: creating makefile fragment in ./frame/0
configure: creating makefile fragment in ./frame/0/absqsc
configure: creating makefile fragment in ./frame/0/addsc
configure: creating makefile fragment in ./frame/0/copysc
configure: creating makefile fragment in ./frame/0/divsc
configure: creating makefile fragment in ./frame/0/getsc
configure: creating makefile fragment in ./frame/0/mulsc
configure: creating makefile fragment in ./frame/0/normfsc
configure: creating makefile fragment in ./frame/0/setsc
configure: creating makefile fragment in ./frame/0/sqrtsc
configure: creating makefile fragment in ./frame/0/subsc
configure: creating makefile fragment in ./frame/0/unzipsc
configure: creating makefile fragment in ./frame/0/zipsc
configure: creating makefile fragment in ./frame/1
configure: creating makefile fragment in ./frame/1/addv
configure: creating makefile fragment in ./frame/1/axpyv
configure: creating makefile fragment in ./frame/1/copyv
configure: creating makefile fragment in ./frame/1/dotv
configure: creating makefile fragment in ./frame/1/dotxv
configure: creating makefile fragment in ./frame/1/invertv
configure: creating makefile fragment in ./frame/1/packv
configure: creating makefile fragment in ./frame/1/scal2v
configure: creating makefile fragment in ./frame/1/scalv
configure: creating makefile fragment in ./frame/1/setv
configure: creating makefile fragment in ./frame/1/subv
configure: creating makefile fragment in ./frame/1/swapv
configure: creating makefile fragment in ./frame/1/unpackv
configure: creating makefile fragment in ./frame/1d
configure: creating makefile fragment in ./frame/1d/addd
configure: creating makefile fragment in ./frame/1d/axpyd
configure: creating makefile fragment in ./frame/1d/copyd
configure: creating makefile fragment in ./frame/1d/invertd
configure: creating makefile fragment in ./frame/1d/scal2d
configure: creating makefile fragment in ./frame/1d/scald
configure: creating makefile fragment in ./frame/1d/setd
configure: creating makefile fragment in ./frame/1d/subd
configure: creating makefile fragment in ./frame/1f
configure: creating makefile fragment in ./frame/1f/axpy2v
configure: creating makefile fragment in ./frame/1f/axpyf
configure: creating makefile fragment in ./frame/1f/dotaxpyv
configure: creating makefile fragment in ./frame/1f/dotxaxpyf
configure: creating makefile fragment in ./frame/1f/dotxf
configure: creating makefile fragment in ./frame/1m
configure: creating makefile fragment in ./frame/1m/addm
configure: creating makefile fragment in ./frame/1m/axpym
configure: creating makefile fragment in ./frame/1m/copym
configure: creating makefile fragment in ./frame/1m/packm
configure: creating makefile fragment in ./frame/1m/packm/ukernels
configure: creating makefile fragment in ./frame/1m/scal2m
configure: creating makefile fragment in ./frame/1m/scalm
configure: creating makefile fragment in ./frame/1m/setm
configure: creating makefile fragment in ./frame/1m/subm
configure: creating makefile fragment in ./frame/1m/unpackm
configure: creating makefile fragment in ./frame/1m/unpackm/ukernels
configure: creating makefile fragment in ./frame/2
configure: creating makefile fragment in ./frame/2/gemv
configure: creating makefile fragment in ./frame/2/ger
configure: creating makefile fragment in ./frame/2/hemv
configure: creating makefile fragment in ./frame/2/her
configure: creating makefile fragment in ./frame/2/her2
configure: creating makefile fragment in ./frame/2/symv
configure: creating makefile fragment in ./frame/2/syr
configure: creating makefile fragment in ./frame/2/syr2
configure: creating makefile fragment in ./frame/2/trmv
configure: creating makefile fragment in ./frame/2/trsv
configure: creating makefile fragment in ./frame/3
configure: creating makefile fragment in ./frame/3/gemm
configure: creating makefile fragment in ./frame/3/gemm/3m
configure: creating makefile fragment in ./frame/3/gemm/3m/ukernels
configure: creating makefile fragment in ./frame/3/gemm/4m
configure: creating makefile fragment in ./frame/3/gemm/4m/ukernels
configure: creating makefile fragment in ./frame/3/gemm/ukernels
configure: creating makefile fragment in ./frame/3/hemm
configure: creating makefile fragment in ./frame/3/hemm/3m
configure: creating makefile fragment in ./frame/3/hemm/4m
configure: creating makefile fragment in ./frame/3/her2k
configure: creating makefile fragment in ./frame/3/her2k/3m
configure: creating makefile fragment in ./frame/3/her2k/4m
configure: creating makefile fragment in ./frame/3/herk
configure: creating makefile fragment in ./frame/3/herk/3m
configure: creating makefile fragment in ./frame/3/herk/4m
configure: creating makefile fragment in ./frame/3/symm
configure: creating makefile fragment in ./frame/3/symm/3m
configure: creating makefile fragment in ./frame/3/symm/4m
configure: creating makefile fragment in ./frame/3/syr2k
configure: creating makefile fragment in ./frame/3/syr2k/3m
configure: creating makefile fragment in ./frame/3/syr2k/4m
configure: creating makefile fragment in ./frame/3/syrk
configure: creating makefile fragment in ./frame/3/syrk/3m
configure: creating makefile fragment in ./frame/3/syrk/4m
configure: creating makefile fragment in ./frame/3/trmm
configure: creating makefile fragment in ./frame/3/trmm/3m
configure: creating makefile fragment in ./frame/3/trmm/4m
configure: creating makefile fragment in ./frame/3/trmm3
configure: creating makefile fragment in ./frame/3/trmm3/3m
configure: creating makefile fragment in ./frame/3/trmm3/4m
configure: creating makefile fragment in ./frame/3/trsm
configure: creating makefile fragment in ./frame/3/trsm/3m
configure: creating makefile fragment in ./frame/3/trsm/3m/ukernels
configure: creating makefile fragment in ./frame/3/trsm/4m
configure: creating makefile fragment in ./frame/3/trsm/4m/ukernels
configure: creating makefile fragment in ./frame/3/trsm/ukernels
configure: creating makefile fragment in ./frame/base
configure: creating makefile fragment in ./frame/base/check
configure: creating makefile fragment in ./frame/base/noopt
configure: creating makefile fragment in ./frame/cntl
configure: creating makefile fragment in ./frame/compat
configure: creating makefile fragment in ./frame/compat/check
configure: creating makefile fragment in ./frame/compat/f2c
configure: creating makefile fragment in ./frame/compat/f2c/util
configure: creating makefile fragment in ./frame/include
configure: creating makefile fragment in ./frame/include/level0
configure: creating makefile fragment in ./frame/include/level0/ri
configure: creating makefile fragment in ./frame/include/level0/ri3
configure: creating makefile fragment in ./frame/util
configure: creating makefile fragment in ./frame/util/amaxv
configure: creating makefile fragment in ./frame/util/asumv
configure: creating makefile fragment in ./frame/util/mkherm
configure: creating makefile fragment in ./frame/util/mksymm
configure: creating makefile fragment in ./frame/util/mktrim
configure: creating makefile fragment in ./frame/util/norm1m
configure: creating makefile fragment in ./frame/util/norm1v
configure: creating makefile fragment in ./frame/util/normfm
configure: creating makefile fragment in ./frame/util/normfv
configure: creating makefile fragment in ./frame/util/normim
configure: creating makefile fragment in ./frame/util/normiv
configure: creating makefile fragment in ./frame/util/printm
configure: creating makefile fragment in ./frame/util/printv
configure: creating makefile fragment in ./frame/util/randm
configure: creating makefile fragment in ./frame/util/randv
configure: creating makefile fragment in ./frame/util/sumsqv
configure: configured to build within top-level directory of source distribution.
Compiling config/bgq/kernels/1/bli_axpyv_opt_var1.c (NOTE: using flags for kernels)
Compiling frame/0/unzipsc/bli_unzipsc.c
Compiling frame/0/unzipsc/bli_unzipsc_check.c
Compiling frame/0/unzipsc/bli_unzipsc_unb_var1.c
Compiling frame/0/zipsc/bli_zipsc.c
Compiling frame/0/zipsc/bli_zipsc_check.c
Compiling frame/0/zipsc/bli_zipsc_unb_var1.c
Compiling frame/1/addv/bli_addv.c
Compiling frame/1/addv/bli_addv_check.c
Compiling frame/1/addv/bli_addv_kernel.c
Compiling frame/1/addv/bli_addv_ref.c
Compiling frame/1/axpyv/bli_axpyv.c
Compiling frame/1/axpyv/bli_axpyv_check.c
Compiling frame/1/axpyv/bli_axpyv_kernel.c
Compiling frame/1/axpyv/bli_axpyv_ref.c
Compiling frame/1/copyv/bli_copyv.c
Compiling frame/1/copyv/bli_copyv_check.c
Compiling frame/1/copyv/bli_copyv_kernel.c
Compiling frame/1/copyv/bli_copyv_ref.c
Compiling frame/1/dotv/bli_dotv.c
Compiling frame/1/dotv/bli_dotv_check.c
Compiling frame/1/dotv/bli_dotv_kernel.c
Compiling frame/1/dotv/bli_dotv_ref.c
Compiling frame/1/dotxv/bli_dotxv.c
Compiling frame/1/dotxv/bli_dotxv_check.c
Compiling frame/1/dotxv/bli_dotxv_kernel.c
Compiling frame/1/dotxv/bli_dotxv_ref.c
Compiling frame/1/invertv/bli_invertv.c
Compiling frame/1/invertv/bli_invertv_check.c
Compiling frame/1/invertv/bli_invertv_kernel.c
Compiling frame/1/invertv/bli_invertv_ref.c
Compiling frame/1/packv/bli_packv.c
Compiling frame/1/packv/bli_packv_check.c
Compiling frame/1/packv/bli_packv_cntl.c
Compiling frame/1/packv/bli_packv_init.c
"config/bgq/kernels/1/bli_axpyv_opt_var1.c", line 45.33: 1506-1418 (E) Assignment between restrict pointers "alpha" and "alpha_in" is not allowed. Only outer-to-inner scope assignments between restrict pointers are allowed.
"config/bgq/kernels/1/bli_axpyv_opt_var1.c", line 46.29: 1506-1418 (E) Assignment between restrict pointers "x" and "x_in" is not allowed. Only outer-to-inner scope assignments between restrict pointers are allowed.
"config/bgq/kernels/1/bli_axpyv_opt_var1.c", line 47.29: 1506-1418 (E) Assignment between restrict pointers "y" and "y_in" is not allowed. Only outer-to-inner scope assignments between restrict pointers are allowed.
"config/bgq/kernels/1/bli_axpyv_opt_var1.c", line 68.28: 1506-754 (S) The parameter type is not valid for a function of this linkage type.
make: *** [obj/bgq/config/kernels/1/bli_axpyv_opt_var1.o] Error 1
make: *** Waiting for unfinished jobs....
—
Reply to this email directly or view it on GitHub.
from blis.
As Tyler pointed out, BLIS is not yet completely restrict-compliant. This is partially my fault for misusing the keyword to begin with, and partially gcc's fault for not informing me of the misuse with a warning. :)
I am trying to fix these as I find them, but it's kind of like whack-a-mole. Especially since none of my primary development machines have xlc.
from blis.
I will add the curly braces rather than give up the benefits of anti-aliasing.
Field: you can get an an ALCF account from me any time.
from blis.
This particular instances (config/bgq/kernels/1/bli_axpyv_opt_var1.c) can easily be fixed even without curlies. I will push a new commit soon.
Thanks for the offer, Jeff. I will take you up on it sometime!
from blis.
Jeff: please confirm that this has been fixed. If not, I suspect it is because there are other instances of the same problem that the build process now gets to that it was not getting to previously. If so, let's just keep the issue/thread going till we stomp them all out.
from blis.
With the latest commit, I saw this:
"config/bgq/kernels/1/bli_axpyv_opt_var1.c", line 64.28: 1506-754 (S) The parameter type is not valid for a function of this linkage type.
make: *** [obj/bgq/config/kernels/1/bli_axpyv_opt_var1.o] Error 1
make: *** Waiting for unfinished jobs....
I fixed like this:
[jhammond@vestalac1 blis]$ git diff
diff --git a/kernels/bgq/1/bli_axpyv_opt_var1.c b/kernels/bgq/1/bli_axpyv_opt_var1.c
index 495ab60..163e8bb 100644
--- a/kernels/bgq/1/bli_axpyv_opt_var1.c
+++ b/kernels/bgq/1/bli_axpyv_opt_var1.c
@@ -61,7 +61,7 @@ void bli_daxpyv_opt_var1(
dim_t n_left = n % 4;
vector4double xv, yv, zv;
- vector4double alphav = vec_lds( 0 * sizeof(double), alpha );
+ vector4double alphav = vec_lds( 0 * sizeof(double), (double*)alpha );
#pragma omp parallel for
for ( dim_t i = 0; i < n_run; i++ )
Don't ask me why vec_lds won't take a restrict pointer. http://pic.dhe.ibm.com/infocenter/compbg/v121v141/index.jsp?topic=%2Fcom.ibm.xlcpp121.bg.doc%2Fcompiler_ref%2Fvec_lds.html does not mention this semantic restriction.
from blis.
Thanks again, Jeff.
from blis.
Related Issues (20)
- RISC-V Target is missing support for -mabi=lp64d based systems HOT 8
- How to cross-compile libraries for use on Android? HOT 14
- Cortex-A72 Flops? HOT 4
- libblis.so.4.loc Problem! HOT 3
- Could sources are amalgamated into a monolithic c file during configure? HOT 7
- hpx runtime support breaks in testsuite HOT 1
- I get "undefined reference to `__tls_get_addr'" when linking using the gnu toolchain HOT 5
- compile blis on windows HOT 1
- Discussion for new level-1v/-1m-like operations HOT 23
- Multithreading.md does not introduce include file needed for function calls HOT 1
- make install doesn't work with new install directory HOT 2
- When could you support AMD Zen4 arch? HOT 7
- Discrepancy in Haswell Results for Dgemm HOT 5
- cspan: Suggesting an ergonomic C99 API with multidimensional matrices for BLIS HOT 10
- "Missing" symbols relative to OpenBLAS HOT 16
- triggers segfault in "make check" process with configuration --disable-sba-pools on CentOS (SkylakeX)
- Default BLIS_[MNK]T values never actually set HOT 9
- fatal error: malloc.h: No such file or directory HOT 2
- Header path for default source build and Debian should match HOT 6
- bli_gemmsup_rd_haswell_asm_d6x8m.c:1296:1:error:bp cannot be used in ams here HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blis.