Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/mips/sgemv_n_msa.c:426:33: error: incompatible types when initializing type ‘v4f32’ using type ‘double’ #1561

Closed
lancezhangsf opened this issue May 15, 2018 · 7 comments · Fixed by #1562

Comments

@lancezhangsf
Copy link

HI :
i compile the openblas , using the doc:
MTI_TOOLCHAIN_DIR={/home/zsf/WorkSpace/Kernel/JunZheng/mips-mti-linux-gnu/2016.05-03/bin}
MTI_GCC_PREFIX=mips-mti-linux-gnu
MTI_TOOLCHAIN=${IMG_TOOLCHAIN_DIR}/${IMG_GCC_PREFIX}

make BINARY=32 BINARY32=1 CC=$MTI_TOOLCHAIN-gcc AR=$MTI_TOOLCHAIN-ar FC="$MTI_TOOLCHAIN-gfortran -EL" RANLIB=$MTI_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=P5600

but have the error 👍
ITY -I.. -UDOUBLE -UCOMPLEX -UDOUBLE -UCOMPLEX -DTRANS ../kernel/mips/../mips/sgemv_t_msa.c -o sgemv_t.o
../kernel/mips/../mips/sgemv_n_msa.c: In function ‘sgemv_n’:
../kernel/mips/../mips/sgemv_n_msa.c:426:33: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 v_alpha, x0, x1, y0 = 0.0, y1 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:426:43: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 v_alpha, x0, x1, y0 = 0.0, y1 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:17: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:28: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:39: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:50: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:61: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:72: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:83: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
../kernel/mips/../mips/sgemv_n_msa.c:428:94: error: incompatible types when initializing type ‘v4f32’ using type ‘double’
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
^
make[1]: *** [sgemv_n.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/zsf/WorkSpace/Kernel/JunZheng/OpenBLAS/kernel'
make: *** [libs] Error 1

@martin-frbg
Copy link
Collaborator

Looking at the other _msa.c sources there, this should probably be "{0,0,0,0}" rather than 0.0 for each initializer.

@martin-frbg
Copy link
Collaborator

Also looks to be fallout from #1419 - these variables used to be uninitialized until somebody tried to do a code cleanup.

@brada4
Copy link
Contributor

brada4 commented May 15, 2018

I did not look in mips doc what data types stand for... after seeing sort-of float uninitialised in cppcheck.
kernel/mips/cgemv_n_msa.c line 514 needs your treatment too.

@martin-frbg
Copy link
Collaborator

Nope, that one is declared as FLOAT :)

@brada4
Copy link
Contributor

brada4 commented May 15, 2018

:-)

@martin-frbg
Copy link
Collaborator

Should be fixed on the "develop" branch now, can you confirm please ? (And I also wonder if your build passes all parts of the utest - my mips32 system does not support msa).

@martin-frbg martin-frbg reopened this May 15, 2018
@martin-frbg
Copy link
Collaborator

I had to add a few more fixes for mips32, for my own wrongdoings this time. Best update to the current state of "develop" before trying again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants