[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Altivec matmul kernel (attachment)



Greetings!  OK, I've unpackged the special gcc et. al. into my home
directory from www.altivec.org (File AltiVec-linux-bin.tar.gz, unpacks
into /home/camm/usr/local/AltiVec/...)  I've then set the PATH via

export PATH=/home/camm/usr/local/AltiVec/bin:$PATH

and GCC_EXEC_PREFIX via

export GCC_EXEC_PREFIX=/home/camm/usr/local/AltiVec/lib/gcc-lib/

But I still can't compile the kernel.  Here is the strace:

=============================================================================
camm@voltaire:~/atlas-3.2.1/tune/blas/gemm/Linux_fpu_shared$ strace gcc  -DL2SIZE=4194304 -I/home/camm/atlas-3.2.1/include -I/home/camm/atlas-3.2.1/include/Linux_fpu_shared -I/home/camm/atlas-3.2.1/include/contrib  -DAdd__ -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_PPC604 -fomit-frame-pointer -O -fPIC -c smm.c
execve("/home/camm/usr/local/AltiVec/bin/gcc", ["gcc", "-DL2SIZE=4194304", "-I/home/camm/atlas-3.2.1/include", "-I/home/camm/atlas-3.2.1/include/Linux_fpu_shared", "-I/home/camm/atlas-3.2.1/include/contrib", "-DAdd__", "-DStringSunStyle", "-DATL_OS_Linux", "-DATL_ARCH_PPC604", "-fomit-frame-pointer", "-O", "-fPIC", "-c", "smm.c"], [/* 19 vars */]) = 0
uname({sys="Linux", node="voltaire", ...}) = 0
brk(0)                                  = 0x18558a0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30015000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(0x3, 0x7fffee60)                = 0
mmap(NULL, 37499, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30016000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\2\245"..., 1024) = 1024
fstat64(0x3, 0x7fffee68)                = 0
mmap(0x6feac000, 1326520, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x6feac000
mprotect(0x6ffbc000, 212408, PROT_NONE) = 0
mmap(0x6ffbc000, 192512, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x100000) = 0x6ffbc000
mmap(0x6ffeb000, 19896, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x6ffeb000
close(3)                                = 0
munmap(0x30016000, 37499)               = 0
getpid()                                = 18585
brk(0)                                  = 0x18558a0
brk(0x18558c8)                          = 0x18558c8
brk(0x1856000)                          = 0x1856000
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x18086f8, [INT], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x18086f8, [HUP], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x18086f8, [TERM], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {0x18086f8, [PIPE], SA_RESTART}, {SIG_IGN}, 8) = 0
brk(0x1857000)                          = 0x1857000
brk(0x1858000)                          = 0x1858000
brk(0x1859000)                          = 0x1859000
access("smm.c", R_OK)                   = 0
brk(0x185a000)                          = 0x185a000
access("/home/camm/usr/local/AltiVec/lib/gcc-lib/powerpc-redhat-linux-gnu/2.95.2/specs", R_OK) = 0
open("/home/camm/usr/local/AltiVec/lib/gcc-lib/powerpc-redhat-linux-gnu/2.95.2/specs", O_RDONLY) = 3
stat("/home/camm/usr/local/AltiVec/lib/gcc-lib/powerpc-redhat-linux-gnu/2.95.2/specs", {st_mode=S_IFREG|0644, st_size=10340, ...}) = 0
brk(0x185d000)                          = 0x185d000
read(3, "*asm:\n%(asm_cpu) %{.s: %{mregnam"..., 10340) = 10340
close(3)                                = 0
brk(0x185e000)                          = 0x185e000
brk(0x185f000)                          = 0x185f000
brk(0x1860000)                          = 0x1860000
brk(0x1861000)                          = 0x1861000
brk(0x1862000)                          = 0x1862000
access("/usr/local/AltiVec/lib/gcc-lib/powerpc-redhat-linux-gnu/specs", R_OK) = -1 ENOENT (No such file or directory)
brk(0x1863000)                          = 0x1863000
access("/tmp", R_OK|W_OK|X_OK)          = 0
gettimeofday({995472159, 17600}, NULL)  = 0
getpid()                                = 18585
open("/tmp/ccihD1uc.i", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
access("/home/camm/usr/local/AltiVec/lib/gcc-lib/powerpc-redhat-linux-gnu/2.95.2/cpp", X_OK) = 0
fork()                                  = 18586
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 18586
--- SIGCHLD (Child exited) ---
brk(0x1864000)                          = 0x1864000
access("/tmp", R_OK|W_OK|X_OK)          = 0
gettimeofday({995472159, 57121}, NULL)  = 0
getpid()                                = 18585
open("/tmp/ccqkYpGg.s", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
access("/home/camm/usr/local/AltiVec/lib/gcc-lib/powerpc-redhat-linux-gnu/2.95.2/cc1", X_OK) = 0
fork()                                  = 18587
wait4(-1, smm.c: In function `ATL_sJIK64x64x64TN64x64x0_a1_b1':
smm.c:121: `vector' undeclared (first use in this function)
smm.c:121: (Each undeclared identifier is reported only once
smm.c:121: for each function it appears in.)
smm.c:121: parse error before `unsigned'
smm.c:142: parse error before `float'
smm.c:146: `v_beta' undeclared (first use in this function)
smm.c:157: `p_vector' undeclared (first use in this function)
smm.c:157: parse error before `unsigned'
smm.c:157: `low' undeclared (first use in this function)
smm.c:157: parse error before `unsigned'
smm.c:157: `high' undeclared (first use in this function)
smm.c:157: parse error before `unsigned'
smm.c:157: `cr0' undeclared (first use in this function)
smm.c:157: parse error before `float'
smm.c:158: parse error before `unsigned'
smm.c:158: parse error before `unsigned'
smm.c:158: parse error before `unsigned'
smm.c:158: `cr1' undeclared (first use in this function)
smm.c:158: parse error before `float'
smm.c:159: parse error before `unsigned'
smm.c:159: parse error before `unsigned'
smm.c:159: parse error before `unsigned'
smm.c:159: `cr2' undeclared (first use in this function)
smm.c:159: parse error before `float'
smm.c:160: parse error before `unsigned'
smm.c:160: parse error before `unsigned'
smm.c:160: parse error before `unsigned'
smm.c:160: `cr3' undeclared (first use in this function)
smm.c:160: parse error before `float'
smm.c:163: `s0' undeclared (first use in this function)
smm.c:163: `s1' undeclared (first use in this function)
smm.c:163: `s2' undeclared (first use in this function)
smm.c:163: `s3' undeclared (first use in this function)
smm.c:166: `s00' undeclared (first use in this function)
smm.c:166: `s01' undeclared (first use in this function)
smm.c:166: `s02' undeclared (first use in this function)
smm.c:166: `s03' undeclared (first use in this function)
smm.c:167: `s10' undeclared (first use in this function)
smm.c:167: `s11' undeclared (first use in this function)
smm.c:167: `s12' undeclared (first use in this function)
smm.c:167: `s13' undeclared (first use in this function)
smm.c:168: `s20' undeclared (first use in this function)
smm.c:168: `s21' undeclared (first use in this function)
smm.c:168: `s22' undeclared (first use in this function)
smm.c:168: `s23' undeclared (first use in this function)
smm.c:169: `s30' undeclared (first use in this function)
smm.c:169: `s31' undeclared (first use in this function)
smm.c:169: `s32' undeclared (first use in this function)
smm.c:169: `s33' undeclared (first use in this function)
smm.c:169: `minus_zero' undeclared (first use in this function)
smm.c:174: `ar0' undeclared (first use in this function)
smm.c:175: `ar1' undeclared (first use in this function)
smm.c:176: `ar2' undeclared (first use in this function)
smm.c:177: `ar3' undeclared (first use in this function)
smm.c:180: `bc0' undeclared (first use in this function)
smm.c:181: `bc1' undeclared (first use in this function)
smm.c:182: `bc2' undeclared (first use in this function)
smm.c:183: `bc3' undeclared (first use in this function)
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: `mask' undeclared (first use in this function)
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:249: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:250: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:251: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
smm.c:252: parse error before `unsigned'
[WIFEXITED(s) && WEXITSTATUS(s) == 33], 0, NULL) = 18587
--- SIGCHLD (Child exited) ---
stat("/tmp/ccqkYpGg.s", {st_mode=S_IFREG|0600, st_size=1038, ...}) = 0
unlink("/tmp/ccqkYpGg.s")               = 0
stat("/tmp/ccihD1uc.i", {st_mode=S_IFREG|0600, st_size=88008, ...}) = 0
unlink("/tmp/ccihD1uc.i")               = 0
exit(1)                                 = ?
camm@voltaire:~/atlas-3.2.1/tune/blas/gemm/Linux_fpu_shared$ 
=============================================================================

Any advice appreciated!

Nicholas Coult <coult@augsburg.edu> writes:

> Hi,
> 
> There is actually a version of gcc that recognizes altivec keywords.  It 
> is available in source or rpm binary form for Linux at www.altivec.org.  
> (I actually used Mac OS X for writing the code; the compiler is also a 
> patched version of gcc that recognizes altivec instructions, among other 
> things).
> 
> However, I recognize that Debian users won't find that so convenient.  
> I'm not sure how to go about generating assembly output, though, since 
> my kernel source file isn't compiled directly but rather is used by 
> Atlas to generate code...any suggestions?
> 
> -Nick
> 
> 
> On Tuesday, July 17, 2001, at 03:22  PM, Camm Maguire wrote:
> 
> >
> > Greetings!  I was just checking out your kernel, and realized that it
> > requires a compiler which recognizes the altivec extension keywords,
> > which gcc alas does not.  Could you perhaps compile with the -S flag
> > to generate assembly output files, and post these?  gcc can wrap this
> > code in a C macro.  Many Debian PPC users might appreciate your
> > kernel!
> >
> > Take care,
> > --
> > Camm Maguire			     			camm@enhanced.com
> > =========================================================================
> > =
> > "The earth is but one country, and mankind its citizens."  --  
> > Baha'u'llah
> >
> 
> --
> Nicholas Coult, Ph.D.,  web: http://melby.augsburg.edu/~coult
> Assistant Professor, Department of Mathematics, Augsburg College
> coult@augsburg.edu, phone:  (612) 330-1064 office: Science Hall 137B
> 
> 

-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah