With the current master branch, I get: clang -c -o vfromsp.o ../../../../jsrc/vfromsp.c -fPIC -O2 -g -fvisibility=hidden -fno-strict-aliasing -fwrapv -Werror -Wextra -Wno-unknown-warning-option -Wsign-compare -Wtautological-constant-out-of-range-compare -Wuninitialized -Wno-char-subscripts -Wno-consumed -Wno-delete-non-abstract-non-virtual-dtor -Wno-deprecated-non-prototype -Wno-empty-body -Wno-implicit-float-conversion -Wno-implicit-int-float-conversion -Wno-incompatible-function-pointer-types -Wno-int-conversion -Wno-int-in-bool-context -Wno-missing-braces -Wno-missing-field-initializers -Wno-null-pointer-arithmetic -Wno-null-pointer-subtraction -Wno-parentheses -Wno-pass-failed -Wno-pointer-sign -Wno-pointer-to-int-cast -Wno-shift-count-overflow -Wno-sometimes-uninitialized -Wno-string-plus-int -Wno-unknown-pragmas -Wno-unsequenced -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-value -Wno-unused-variable -DPYXES=1 -DSLEEF=1 -I../../../../mpir/include -DEMU_AVX2=1 -msse3 ../../../../jsrc/ve.c:295:1: error: passing '__emu__m256d' (aka 'union __emu__m256d') to parameter of incompatible type '__emu__m256' (aka 'union __emu__m256') primop256CE(plusZZ,0,Z,NAN0;,PREFNULL,PREFNULL,{z0=_mm256_add_pd(x0,y0); z1=_mm256_add_pd(x1,y1);},ASSERTWR(!NANTEST,EVNAN);) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/va.h:432:58: note: expanded from macro 'primop256CE' __m256i wrmask=_mm256_castpd_si256(_mm256_permutevar_ps(_mm256_broadcast_sd((D*)&maskec4123[len0]),_mm256_loadu_si256((__m256i*)&validitymask[2]))); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/avxintrin-emu.h:1817:29: note: expanded from macro '_mm256_broadcast_sd' #define _mm256_broadcast_sd __emu_mm256_broadcast_sd ^ ../../../../jsrc/avxintrin-emu.h:1196:1: note: passing argument to parameter 'm256_param1' here __EMU_M256_IMPL2_M2T( __m256, __m256i, permutevar_ps ); ^ ../../../../jsrc/avxintrin-emu.h:262:65: note: expanded from macro '__EMU_M256_IMPL2_M2T' static __emu_inline __emu##type __emu_mm256_##func( __emu##type m256_param1, __emu##type_2 m256_param2 ) \ ^ ../../../../jsrc/ve.c:295:1: error: passing '__emu__m256d' (aka 'union __emu__m256d') to parameter of incompatible type '__emu__m256' (aka 'union __emu__m256') primop256CE(plusZZ,0,Z,NAN0;,PREFNULL,PREFNULL,{z0=_mm256_add_pd(x0,y0); z1=_mm256_add_pd(x1,y1);},ASSERTWR(!NANTEST,EVNAN);) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/va.h:487:52: note: expanded from macro 'primop256CE' wrmask=_mm256_castpd_si256(_mm256_permutevar_ps(_mm256_broadcast_sd((D*)&maskec4123[len1&(NPAR-1)]),_mm256_loadu_si256((__m256i*)&validitymask[2]))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/avxintrin-emu.h:1817:29: note: expanded from macro '_mm256_broadcast_sd' #define _mm256_broadcast_sd __emu_mm256_broadcast_sd ^ ../../../../jsrc/avxintrin-emu.h:1196:1: note: passing argument to parameter 'm256_param1' here __EMU_M256_IMPL2_M2T( __m256, __m256i, permutevar_ps ); ^ ../../../../jsrc/avxintrin-emu.h:262:65: note: expanded from macro '__EMU_M256_IMPL2_M2T' static __emu_inline __emu##type __emu_mm256_##func( __emu##type m256_param1, __emu##type_2 m256_param2 ) \ ^ ../../../../jsrc/ve.c:296:1: error: passing '__emu__m256d' (aka 'union __emu__m256d') to parameter of incompatible type '__emu__m256' (aka 'union __emu__m256') primop256CE(minusZZ,1,Z,__m256d sgnbit=_mm256_broadcast_sd((D*)&Iimin); NAN0;,PREFNULL,PREFZNEG,{z0=_mm256_add_pd(x0,y0); z1=_mm256_add_pd(x1,y1);},ASSERTWR(!NANTEST,EVNAN);) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/va.h:432:58: note: expanded from macro 'primop256CE' __m256i wrmask=_mm256_castpd_si256(_mm256_permutevar_ps(_mm256_broadcast_sd((D*)&maskec4123[len0]),_mm256_loadu_si256((__m256i*)&validitymask[2]))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/avxintrin-emu.h:1817:29: note: expanded from macro '_mm256_broadcast_sd' #define _mm256_broadcast_sd __emu_mm256_broadcast_sd ^ ../../../../jsrc/avxintrin-emu.h:1196:1: note: passing argument to parameter 'm256_param1' here __EMU_M256_IMPL2_M2T( __m256, __m256i, permutevar_ps ); ^ ../../../../jsrc/avxintrin-emu.h:262:65: note: expanded from macro '__EMU_M256_IMPL2_M2T' static __emu_inline __emu##type __emu_mm256_##func( __emu##type m256_param1, __emu##type_2 m256_param2 ) \ ^ ../../../../jsrc/ve.c:296:1: error: passing '__emu__m256d' (aka 'union __emu__m256d') to parameter of incompatible type '__emu__m256' (aka 'union __emu__m256') primop256CE(minusZZ,1,Z,__m256d sgnbit=_mm256_broadcast_sd((D*)&Iimin); NAN0;,PREFNULL,PREFZNEG,{z0=_mm256_add_pd(x0,y0); z1=_mm256_add_pd(x1,y1);},ASSERTWR(!NANTEST,EVNAN);) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/va.h:487:52: note: expanded from macro 'primop256CE' wrmask=_mm256_castpd_si256(_mm256_permutevar_ps(_mm256_broadcast_sd((D*)&maskec4123[len1&(NPAR-1)]),_mm256_loadu_si256((__m256i*)&validitymask[2]))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../jsrc/avxintrin-emu.h:1817:29: note: expanded from macro '_mm256_broadcast_sd' #define _mm256_broadcast_sd __emu_mm256_broadcast_sd ^ ../../../../jsrc/avxintrin-emu.h:1196:1: note: passing argument to parameter 'm256_param1' here __EMU_M256_IMPL2_M2T( __m256, __m256i, permutevar_ps ); ^ ../../../../jsrc/avxintrin-emu.h:262:65: note: expanded from macro '__EMU_M256_IMPL2_M2T' static __emu_inline __emu##type __emu_mm256_##func( __emu##type m256_param1, __emu##type_2 m256_param2 ) \ ^ 4 errors generated. Thanks, -- Raul On Sat, Oct 28, 2023 at 11:25 AM bill lam <bbill....@gmail.com> wrote: > > @Raul Thank you for your suggestion. I have pushed a patch to fix force > macro emulation for some avx emulation. Please test again. > > On Sat, Oct 28, 2023 at 8:35 PM Raul Miller <rauldmil...@gmail.com> wrote: > > > Another workaround occurs to me: > > > > When compiling with -O0, only build the avx2 instance of jconsole. > > > > The /bin/sh test for -O0: > > > > case "$CFLAGS" in *-O0*) true;; *) false;; esac > > > > This could be used as is, as the control statement for a shell if > > statement. Though I'd like to restructure the script/buildga.sh script > > for conciseness and readability if I do this, if that would be ok. > > > > That said, I don't know where your efforts to fix the emulation issue are. > > > > Thanks, > > > > -- > > Raul > > > > On Thu, Oct 26, 2023 at 10:53 AM bill lam <bbill....@gmail.com> wrote: > > > > > > I can reproduce the asm error. I suspect the problem is that the > > particular > > > intel asm instruction only supports immediate addressing for i (value > > known > > > during compilation time), but the argument was passed in as an inline > > > function parameter. The workaround is to replace the inline function with > > > macro call. I will work on it over the weekend. > > > > > > All files under the script are meant for the github action yaml. They are > > > intended for github runners, Developers should run test/tsu.ijs directly > > > after building binaries (using shell scripts under make2 on *nix or > > makevs > > > etc on windows) on their local machine. > > > > > > On Thu, Oct 26, 2023 at 10:16 PM Raul Miller <rauldmil...@gmail.com> > > wrote: > > > > > > > Well.. I think a part of the answer is .github/workflows/jsource.yml > > > > > > > > There's lots of things going on, and some of them are difficult to > > > > understand. > > > > > > > > For my purposes, I don't mind supplying linux on the command line. If > > > > I had enough machines, and wanted to automate based on uname, I guess > > > > I'd update the script with tr '[A-Z]' '[a-z]' or create a wrapper > > > > script which did that. (Probably a wrapper script, patterned after the > > > > github workflow yaml.) > > > > > > > > I guess the fundamental problems here are: > > > > > > > > (1) different platforms require entirely different build chains, and > > > > > > > > (2) our developer community is relatively isolated, and > > > > > > > > (3) it takes energy and time to implement working changes > > > > > > > > I guess maybe I should submit a patch for testga.sh to fix what seem > > > > to be obvious problems (the unquoted $1 and the local context for > > > > tests). I was hoping that bill could say a few words about the state > > > > of and/or plan for the script, though. > > > > > > > > Thanks, > > > > > > > > -- > > > > Raul > > > > > > > > On Thu, Oct 26, 2023 at 9:36 AM 'Viktor Grigorov' via Source > > > > <sou...@jsoftware.com> wrote: > > > > > > > > > > On "9.5.0-beta6" the script has some issues. There are common to most > > > > the dash script I've seen in the zip and the main repo. Likely not > > what you > > > > are discussing, but worth mentioning, since you are trying to have a > > glibc > > > > unix release. > > > > > > > > > > I get > > > > > > > > > > script/testga.sh: line 16: [: =: unary operator expected > > > > > script/testga.sh: line 18: [: =: unary operator expected > > > > > script/testga.sh: line 22: [: =: unary operator expected > > > > > script/testga.sh: line 24: [: =: unary operator expected > > > > > script/testga.sh: line 26: [: =: unary operator expected > > > > > argument is linux|darwin|raspberry|openbsd|freebsd|wasm > > > > > > > > > > when running sans argument. $1 isn't doubly quoted on those lines. > > > > > > > > > > Running with an argument of linux---why lowercase when uname returns > > it > > > > capitalized..?---I get that j64 cannot be accessed. This is because it > > is > > > > suffixed with avx or avx2 or avx512. Symlinking my version to j64/ and > > > > running again, it cannot stat 'mpir/linux/x86_64/libgmpd.so'. I have > > only > > > > one such named file in mpir/linux/i386/. I don't know whether I can > > test > > > > whether I have extended integers, since I haven't got the library > > working > > > > yet, but any x prepended to an integer doesn't cause an issue. Whatever > > > > libgmpd.so does in addition to libgmp.so is beyond me currently. > > > > > > > > > > Could provide more info, if desired. > > > > > > > > > > Oct 26, 2023, 15:46 by rauldmil...@gmail.com: > > > > > > > > > > > I understand the error message in g13x.ijs > > > > > > > > > > > > I guess the question is: is script/testga.sh used anywhere (it sure > > > > > > looks like it's intended to be used broadly)? If so, why don't > > other > > > > > > people get this error? > > > > > > > > > > > > I haven't changed anything about the testing process. > > > > > > > > > > > > (Meanwhile - if anyone else stumbles over this - it looks like > > there's > > > > > > a comment in avx-intremu.h explaining the error and what to do > > about > > > > > > it.) > > > > > > > > > > > > Thanks, > > > > > > > > > > > > -- > > > > > > Raul > > > > > > > > > > > > > > > > > > On Thu, Oct 26, 2023 at 5:29 AM Henry Rich <henryhr...@gmail.com> > > > > wrote: > > > > > > > > > > > >> > > > > > >> I have nothing on the asm problem. > > > > > >> > > > > > >> On the other, the error is just what it looks like: you are > > publicly > > > > > >> assigning a name that was previously assigned privately. The > > scripts > > > > are > > > > > >> sometimes loaded under an explicit definition, sometimes not, so > > =. is > > > > > >> unpredictable. > > > > > >> > > > > > >> hhr > > > > > >> > > > > > >> On Thu, Oct 26, 2023, 1:34 AM Raul Miller <rauldmil...@gmail.com> > > > > wrote: > > > > > >> > > > > > >> > I'm testing out a change to the support for extended integers, > > and > > > > > >> > I've run across what seems like an unrelated issue in g13x.ijs, > > when > > > > > >> > running script/testga.sh linux: > > > > > >> > > > > > > >> > NB. 13!:13 > > > > > >> > ------------------------------------------------------------- > > > > > >> > > > > > > >> > mean=: sum % # > > > > > >> > sum =: [: +/ ".@('t=:13!:13 $0'&[) ] ] > > > > > >> > > > > > > >> > 13!:0 ]1 > > > > > >> > 1: mean x=: ?4 5$100 > > > > > >> > |domain error: sum > > > > > >> > |public assignment to a name with a private value > > > > > >> > | t =:13!:13$0 > > > > > >> > > > > > > >> > Not sure what to do about this... > > > > > >> > > > > > > >> > Meanwhile, running test/tsu.ijs manually shows me an error with > > my > > > > > >> > changes. I'd like to use a debugger to inspect what's happening > > to > > > > > >> > cause that error. However, when I attempt to build for > > debugging, I > > > > > >> > get a compiler error which I do not understand: > > > > > >> > > > > > > >> > CFLAGS="-ggdb -O0" script/buildga.sh linux > > > > > >> > ... > > > > > >> > clang -c -o viavx6.o ../../../../jsrc/viavx6.c -fPIC > > > > > >> > -fvisibility=hidden -fno-strict-aliasing -fwrapv -Werror > > -Wextra > > > > > >> > -Wno-unknown-warning-option -Wsign-compare > > > > > >> > -Wtautological-constant-out-of-range-compare -Wuninitialized > > > > > >> > -Wno-char-subscripts -Wno-consumed > > > > > >> > -Wno-delete-non-abstract-non-virtual-dtor > > > > > >> > -Wno-deprecated-non-prototype -Wno-empty-body > > > > > >> > -Wno-implicit-float-conversion > > -Wno-implicit-int-float-conversion > > > > > >> > -Wno-incompatible-function-pointer-types -Wno-int-conversion > > > > > >> > -Wno-int-in-bool-context -Wno-missing-braces > > > > > >> > -Wno-missing-field-initializers -Wno-null-pointer-arithmetic > > > > > >> > -Wno-null-pointer-subtraction -Wno-parentheses > > -Wno-pass-failed > > > > > >> > -Wno-pointer-sign -Wno-pointer-to-int-cast > > > > -Wno-shift-count-overflow > > > > > >> > -Wno-sometimes-uninitialized -Wno-string-plus-int > > > > > >> > -Wno-unknown-pragmas -Wno-unsequenced > > -Wno-unused-but-set-variable > > > > > >> > -Wno-unused-function -Wno-unused-parameter -Wno-unused-value > > > > > >> > -Wno-unused-variable -ggdb -O0 -DPYXES=1 -DSLEEF=1 > > > > > >> > -I../../../../mpir/include -DEMU_AVX2=1 -msse3 > > > > > >> > In file included from ../../../../jsrc/viavx4.c:6: > > > > > >> > In file included from ../../../../jsrc/j.h:119: > > > > > >> > ../../../../jsrc/avxintrin-emu.h:1112:19: error: invalid > > operand for > > > > > >> > inline asm constraint 'i' > > > > > >> > __asm__ ( "cmppd %[pred_], %[m2_], %[res_]" : [res_] > > "+x" > > > > > >> > (res) : [m2_] "x" (m2), [pred_] "i" (predicate) ); > > > > > >> > ^ > > > > > >> > ../../../../jsrc/avxintrin-emu.h:1112:19: error: invalid > > operand for > > > > > >> > inline asm constraint 'i' > > > > > >> > ../../../../jsrc/avxintrin-emu.h:1112:19: error: invalid > > operand for > > > > > >> > inline asm constraint 'i' > > > > > >> > ../../../../jsrc/avxintrin-emu.h:1112:19: error: invalid > > operand for > > > > > >> > inline asm constraint 'i' > > > > > >> > ../../../../jsrc/avxintrin-emu.h:1112:19: error: invalid > > operand for > > > > > >> > inline asm constraint 'i' > > > > > >> > ../../../../jsrc/avxintrin-emu.h:1112:19: error: invalid > > operand for > > > > > >> > inline asm constraint 'i' > > > > > >> > ... > > > > > >> > > > > > > >> > If anyone has clues for me, that would be great. > > > > > >> > > > > > > >> > Thanks, > > > > > >> > > > > > > >> > -- > > > > > >> > Raul > > > > > >> > > > > > ---------------------------------------------------------------------- > > > > > >> > For information about J forums see > > > > http://www.jsoftware.com/forums.htm > > > > > >> > > > > > > >> > > ---------------------------------------------------------------------- > > > > > >> For information about J forums see > > > > http://www.jsoftware.com/forums.htm > > > > > >> > > > > > > > > ---------------------------------------------------------------------- > > > > > > For information about J forums see > > http://www.jsoftware.com/forums.htm > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > For information about J forums see > > http://www.jsoftware.com/forums.htm > > > > ---------------------------------------------------------------------- > > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm