Good morning, I need help about the compile process of FFTW3 source files. I'm working on vxWorks operating system. I have edit a new config.h file using the #define I need. I'm using Altivec optimization so I have #define the HAVE_ALTIVEC option. I have follow all the advices in "Installation and Customization" chapter of the guide. So I have compiled all source files contained in kernel, dft, dft/codelets, dft/codelets/standard, rdft, rdft/codelets, rdft/codelets/r2hc, rdft/codelets/hc2r, rdft/codelets/r2r, reodft, api, simd, simd/nonportable, dft/simd, dft/simd/codelets directories. I have generated all obj files except files relating to the last directory: dft/simd/codelets. The complete list of compile options I'm using is the seguent: "-O2 -fvec-ebi -g -mcpu=604 -mstrict-align -ansi -fno-builtin -I. - ......." The diagnostic of compile process is the seguent: vxrm *.o *.rpo ctdt.c symTbl.c vxApp* *.out *.pl vxrm ..\prjComps.h ..\prjParams.h ..\prjConfig.c ..\linkSyms.c vxrm ..\libs.nm ..\libs.size ccppc -O2 -fvec-ebi -g -mcpu=604 -mstrict-align -ansi -fno-builtin -I. -ID:\FFTW3_Espanso\fftw-3.1.2 -ID:\FFTW3_Espanso\fftw-3.1.2\dft\simd -ID:\FFTW3_Esp anso\fftw-3.1.2\kernel -ID:\FFTW3_Espanso\fftw-3.1.2\dft -ID:\FFTW3_Espanso\fftw-3.1.2\sim d -DCPU=PPC604 -DTOOL_FAMILY=gnu -DTOOL=gnu -c D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\codlist.c ccppc -O2 -fvec-ebi -g -mcpu=604 -mstrict-align -ansi -fno-builtin -I. -ID:\FFTW3_Espanso\fftw-3.1.2 -ID:\FFTW3_Espanso\fftw-3.1.2\dft\simd -ID:\FFTW3_Esp anso\fftw-3.1.2\kernel -ID:\FFTW3_Espanso\fftw-3.1.2\dft -ID:\FFTW3_Espanso\fftw-3.1.2\sim d -DCPU=PPC604 -DTOOL_FAMILY=gnu -DTOOL=gnu -c D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c: In function `n1bv_3': D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:48: `KP500000000' undeclared (first use in this function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:48: (Each undeclared identifier is reported only once D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:48: for each function it appears in .) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:49: `KP866025403' undeclared (first use in this function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:50: parse error before `i' D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:53: `xi' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:54: `xo' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:55: `i' undeclared (first use in th is function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:56: `V' undeclared (first use in th is function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:56: parse error before `T1' D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:57: `T1' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:58: `T2' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:59: `T3' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:60: `T6' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:61: `T4' undeclared (first use in t his function) D:\FFTW3_Espanso\fftw-3.1.2\dft\simd\codelets\n1bv_3.c:62: `T5' undeclared (first use in t his function) make: *** [n1bv_3.o] Error 0x1 Done. 1. Is it possible that the error is the identification of the "vector" and "__vector" words? 2. if yes, are there any other options configuration (in config.h or as compile options) to activate the altivec optimization that is not indicated on the guide? 3. Do you think that there is any other kind of problem? If yes could you give me any indications to complete my compile process? I thank you in advance for all answers you want give me Massimo Baldasseroni
Compile process of FFTW3 on vxWorks O.S.
Started by ●October 10, 2006
Reply by ●October 10, 20062006-10-10
m.baldasseroni wrote:> I need help about the compile process of FFTW3 source files. > I'm working on vxWorks operating system.It sounds like you're compiling under Windows using a cross-compiler. The best thing to do would be to use FFTW's configure script, which supports cross-compilation and should do the right things. Just run FFTW's configure script under Cygwin or similar. See the autoconf documentation on cross-compilation (you need to use ./configure --host=.... at least). You'll need a compiler with Altivec support if you want to use that feature; recent versions of gcc support Altivec and VxWorks 5.5 on PowerPC (see the gcc documentation on how to install a cross-compiler). Steven
Reply by ●October 10, 20062006-10-10
"m.baldasseroni" <mbaldasseroni@progesi.it> writes:> Good morning, > I need help about the compile process of FFTW3 source files. > I'm working on vxWorks operating system. > I have edit a new config.h file using the #define I need. > I'm using Altivec optimization so I have #define the HAVE_ALTIVEC > option. > I have follow all the advices in "Installation and Customization" > chapter of the guide. > So I have compiled all source files contained in kernel, dft, > dft/codelets, dft/codelets/standard, rdft, rdft/codelets, > rdft/codelets/r2hc, rdft/codelets/hc2r, rdft/codelets/r2r, reodft, api, > simd, simd/nonportable, dft/simd, dft/simd/codelets directories. > I have generated all obj files except files relating to the last > directory: dft/simd/codelets. > > The complete list of compile options I'm using is the seguent: > "-O2 -fvec-ebi -g -mcpu=604 -mstrict-align -ansi -fno-builtin -I. - > ......." >Try removing ``-ansi -fno-builtin''. Altivec data types and intrinsic functions are by necessity not ANSI C compliant. Regards, Matteo Frigo
Reply by ●October 11, 20062006-10-11
Good evening, first of all thanks to everyone for your advices. Scuse me for the last message, I try to be more clear: I'm compiling under Windows using Tornado 2.2.1 as cross-compiler, while my final target is a vxWorks 5.5.1 machine with PowerPC processor. I have tried to remove the -ansi -fno-builtin option but the result is the same. So, under suggest of Steven, now I'm using the Cygwin. As configure option I have used --host=PPC604, --host=PPC, --host=PowerPC and --host=604 but every options are not recognized. The other options I have used are CFLAGS=02 --enable-altivec. I have read the part of the guide related to Installation on Unix Systems, and I have seen the configure and INSTALL files (under main directory) to find some indications about right options to assign to --host= ... I haven't found an adapt option to indicate the PowerPC processor. The questions are: 1. Do you know what is the correct way to indicate the PowerPC processor? (using Tornado my compile option was -mcpu=604 but it isn't right for configure script) 2. Another test I have done is to define the type vector V in the n1bv_2.c or n1bv_3.c files(because I throught that the files.h wouldn't be visible in some way). The result is the same. I hope to arrive at the end of compile process through configure script but I'd like to learn from my errors. Do you know why the system has problems on explain visibility's of Altivec vectors? Best Regards Massimo Baldasseroni stevenj@alum.mit.edu ha scritto:> m.baldasseroni wrote: > > I need help about the compile process of FFTW3 source files. > > I'm working on vxWorks operating system. > > It sounds like you're compiling under Windows using a cross-compiler. > The best thing to do would be to use FFTW's configure script, which > supports cross-compilation and should do the right things. > > Just run FFTW's configure script under Cygwin or similar. See the > autoconf documentation on cross-compilation (you need to use > ./configure --host=.... at least). You'll need a compiler with Altivec > support if you want to use that feature; recent versions of gcc support > Altivec and VxWorks 5.5 on PowerPC (see the gcc documentation on how to > install a cross-compiler). > > Steven
Reply by ●October 12, 20062006-10-12
> So, under suggest of Steven, now I'm using the Cygwin. As configure > option I have used --host=PPC604, --host=PPC, --host=PowerPC and > --host=604 but every options are not recognized.That's because the format of the --host command is operatingsystem-cpufamily. ./configure --host=powerpc-vxworks should be recognized. However, you must either install gcc as a cross compiler (configure gcc with --target=powerpc-vxworks) or tell configure to use your Tornado compiler (./configure --host=powerpc-vxworks CC=ccppc) None of this stuff is specific to FFTW; you should really read some documentation on cross-compiling with autoconf. (e.g. there is a chapter on cross-compiling in the autotools book, available online: http://sources.redhat.com/autobook/) Once you get the basic cross-compilation to work, *then* I would try configuring with --enable-altivec --enable-float. (Note that Altivec only works in single precision.)> 2. Another test I have done is to define the type vector V in the > n1bv_2.c or n1bv_3.c files(because I throught that the files.h > wouldn't be visible in some way). The result is the same.Stop and think. If we hadn't bothered to define one of our types, how would FFTW have *ever* compiled for *anyone*? The V type (typedef vector float V) is defined in simd-altivec.h, which is included in simd.h, which is included by n1b.h, which is included by those .c files. If you edit the FFTW sources, you are probably making a mistake -- you might want to start over with a pristine source tree. You should especially not edit the sources if you don't understand *why* you had problems -- blindly inserting you own definitions for things that must obviously be already defined somewhere is a recipe for disaster in *any* program. Steven
Reply by ●October 12, 20062006-10-12
stev...@alum.mit.edu wrote:> That's because the format of the --host command is > operatingsystem-cpufamily. > ./configure --host=powerpc-vxworks > should be recognized.Whoops, I of course meant cpufamily-operatingsystem, which is why powerpc-vxworks works. (Technically, the full name is cpufamily-manufacturer-operatingsystem, but the configure script still recognizes the name even if you leave out the manufacturer.) Again, the above command will not work unless you first configure, compile, and install gcc as a cross compiler for --target=powerpc-vxworks.
Reply by ●October 12, 20062006-10-12
>That's because the format of the --host command is >operatingsystem-cpufamily. > ./configure --host=powerpc-vxworks >should be recognized.Thanks. This morning I have found the correct format and now I'm using --host=powerpc-wrs-vxworks The complete instruction I have used is: ./configure CC=...ccppc --host=powerpc-wrs-vxworks --enable-altivec --enable-float CFLAGS=-O2 So, system has generated all files indicated on the guide. Next steps are "make" command to compile the package, and "make install" to install the programs (as indicated on the guide and on INSTALL file). My problem is that "make" command is unknown. I remember you that now I'm working under Cygwin. Do you know how can I activate the make command?>Stop and think. If we hadn't bothered to define one of our types, how >would FFTW have *ever* compiled for *anyone*? The V type (typedef >vector float V) is defined in simd-altivec.h, which is included in >simd.h, which is included by n1b.h, which is included by those .c >files. If you edit the FFTW sources, you are probably making a mistake >-- you might want to start over with a pristine source tree.Probably I was not clear. I know that the "typedef vector float V" is defined in simd-altivec.h and I have seen the disastrous consequence of strange define inserted in files.c. It was only a test to verify that there is a real problem about the identification of "vector" and "__vector" words. In any case I thank you for your clarification and for your help! Massimo
Reply by ●October 12, 20062006-10-12
m.baldasseroni wrote:> My problem is that "make" command is unknown. I remember you that > know I'm working under Cygwin. > Do you know how can I activate the make command?Install GNU make, which should come precompiled for Cygwin (I'm surprised it was not installed by default). (I don't use Cygwin myself, so I can't give further advice. You should probably ask further questions on a Cygwin (or VxWorks) mailing list, as none of this has anything to do with signal processing. Or with FFTW, for that matter.) Steven
Reply by ●October 18, 20062006-10-18
Good evening,
I'm going on through FFTW compile process; I remember you that I'm
compiling under Windows using ccppc Tornado 2.2.1 cross-compiler, while
my final target is a vxWorks 5.5.1 machine with PowerPC processor.
Now I'm working under Cygwin, I have followed the instructions about
installation on Unix Systems and so I have overcome some problems
related to compile process of FFTW.
However, I have again a problem about the compile process of a fragment
of simd-altivec.h.
To simplify the environment I'm trying to compile a source file
containing only the following fragment of simd-altivec.h :
1 #include <stdio.h>
2
3 #define VLIT(x0, x1, x2, x3) {x0, x1, x2, x3}
4 #define LDK(x) x
5 #define DVK(var, val) const V var = VLIT(val, val, val, val)
6
7 int main(void)
8 {
9 typedef __vector float V;
10
11 static inline V VADD(V a, V b) { return vec_add(a, b); }
12 static inline V VSUB(V a, V b) { return vec_sub(a, b); }
13 static inline V VFMA(V a, V b, V c) { return vec_madd(a, b, c); }
14 static inline V VFNMS(V a, V b, V c) { return vec_nmsub(a, b, c); }
15
16 static inline V VMUL(V a, V b)
17 {
18 DVK(zero, -0.0);
19 return VFMA(a, b, zero);
20 }
21
22
23 return 0;
24 }
I have inserted "__vector" instead of "vector" to allow the
compiler recognize the key-word.
The command I have used is:
$ /cygdrive/c/Tornado2.2/host/x86-win32/bin/ccppc.exe -g -mcpu=604
-fvec -mstrict-align -fno-builtin -DCPU=PPC604 -DTOOL_FAMILY=gnu
-DTOOL=gnu -c /cygdrive/c/Test_Compiler.c
The result is:
/cygdrive/c/Test_Compiler.c: In function `VMUL':
/cygdrive/c/Test_Compiler.c:18: incompatible types in initialization
/cygdrive/c/Test_Compiler.c:18: warning: excess elements in scalar
initializer
/cygdrive/c/Test_Compiler.c:18: warning: (near initialization for
`zero')
/cygdrive/c/Test_Compiler.c:18: warning: excess elements in scalar
initializer
/cygdrive/c/Test_Compiler.c:18: warning: (near initialization for
`zero')
/cygdrive/c/Test_Compiler.c:18: warning: excess elements in scalar
initializer
/cygdrive/c/Test_Compiler.c:18: warning: (near initialization for
`zero')
Could you help me to find the mistake?
I thank you in advance for every suggests
Regards
Massimo Baldasseroni
Reply by ●October 18, 20062006-10-18
m.baldasseroni wrote:> Good evening, > I'm going on through FFTW compile process; I remember you that I'm > compiling under Windows using ccppc Tornado 2.2.1 cross-compiler, while > my final target is a vxWorks 5.5.1 machine with PowerPC processor. > Now I'm working under Cygwin, I have followed the instructions about > installation on Unix Systems and so I have overcome some problems > related to compile process of FFTW. > > However, I have again a problem about the compile process of a fragment > of simd-altivec.h. > To simplify the environment I'm trying to compile a source file > containing only the following fragment of simd-altivec.h : > > 1 #include <stdio.h> > 2 > 3 #define VLIT(x0, x1, x2, x3) {x0, x1, x2, x3} > 4 #define LDK(x) x > 5 #define DVK(var, val) const V var = VLIT(val, val, val, val) > 6 > 7 int main(void) > 8 { > 9 typedef __vector float V; > 10 > 11 static inline V VADD(V a, V b) { return vec_add(a, b); } > 12 static inline V VSUB(V a, V b) { return vec_sub(a, b); } > 13 static inline V VFMA(V a, V b, V c) { return vec_madd(a, b, c); } > 14 static inline V VFNMS(V a, V b, V c) { return vec_nmsub(a, b, c); } > 15 > 16 static inline V VMUL(V a, V b) > 17 { > 18 DVK(zero, -0.0); > 19 return VFMA(a, b, zero); > 20 } > 21 > 22 > 23 return 0; > 24 } > > I have inserted "__vector" instead of "vector" to allow the > compiler recognize the key-word. > > The command I have used is: > $ /cygdrive/c/Tornado2.2/host/x86-win32/bin/ccppc.exe -g -mcpu=604 > -fvec -mstrict-align -fno-builtin -DCPU=PPC604 -DTOOL_FAMILY=gnu > -DTOOL=gnu -c /cygdrive/c/Test_Compiler.c > > > The result is: > /cygdrive/c/Test_Compiler.c: In function `VMUL': > /cygdrive/c/Test_Compiler.c:18: incompatible types in initialization > /cygdrive/c/Test_Compiler.c:18: warning: excess elements in scalar > initializer > /cygdrive/c/Test_Compiler.c:18: warning: (near initialization for > `zero') > /cygdrive/c/Test_Compiler.c:18: warning: excess elements in scalar > initializer > /cygdrive/c/Test_Compiler.c:18: warning: (near initialization for > `zero') > /cygdrive/c/Test_Compiler.c:18: warning: excess elements in scalar > initializer > /cygdrive/c/Test_Compiler.c:18: warning: (near initialization for > `zero') > > > Could you help me to find the mistake? > I thank you in advance for every suggests >I don't know if this is your problem, but if your target processor really is a PPC604 then it doesn't even have AltiVec. Paul






