I found the issue.

The root problem is that, inside ${OBJ}/config.h,
/* The normal alignment of `double16', in bytes. */
#define ALIGNOF_DOUBLE16 0

/* The normal alignment of `float16', in bytes. */
#define ALIGNOF_FLOAT16 0


Notice the values for both of the alignof macros are 0.

This caused the posix_memalign() call inside pthread.c to fail, because it is not aligned on any power-of-2 boundary.

Once I put respective values of 128, 64 in, they are both fine.

All 3 examples apps run smoothly now.

I looked into ${POCL_SRC_0.8RC7}/configure, there is nothing in particular wrong with the configuration script. the default of ac_cv_alighof_double16 is 0, but the same script works fine on my Ubuntu/x64 box, with the proper alignment generated.

Did anybody ever seems to have seen such a behavior before?
Not sure if it is a compiler issue, or autoconf/automake issue, or is an issue with my particular pandaboard (I have only 1 panda board).

I changed a few versions of gcc, the issue remains.


Thank you

Chuck

On 7/19/2013 4:32 PM, Chuck Zhao wrote:
Omm, it doesn't even reach the kernel compilation stage.

The failure is inside clCreateBuffer() call;
Inside clCreateBuffer(), it failed on device_ptr = device->malloc(...),
This is the malloc() defined inside pthread.c:252-pocl_pthread_malloc();

continue debugging...

Chuck


On 7/19/2013 3:05 PM, Kalle Raiskila wrote:
On Fri, 19 Jul 2013 14:23:26 -0700
Chuck Zhao <[email protected]> wrote:

Kalle,

Thank you for the hints.

I noticed that when building the lib/kernel package, both
clang-3.3/3.2 complained heavily on "-target armv7", saying
"unrecognized flag, use -mfloat=soft" instead.

I hacked the Makefile a little bit, and use "-target
armv7l-unknown-linux-gnueabi" instead.
The original warning all go away.

However, the produced tests still fail.
E.g.
czhao@panda0:~/ResearchTools/Compiler/POCL/pocl-0.8/robj32-rc7/examples/example1/.libs$
./lt-example1
ERROR
(0.000000, 0.000000, 0.000000, 0.000000) . (0.000000, 0.000000,
0.000000, 0.000000) = -0.000007
FAIL
czhao@panda0:~/ResearchTools/Compiler/POCL/pocl-0.8/robj32-rc7/examples/example1/.libs$



I am debugging now.

Any hints/suggestions are highly appreciated.
Do save the intermediate files the kernel compiler creates (i.e. set
evnironment variable POCL_LEAVE_TEMP_DIRS, see doc/envs.txt), and have
a look at the target triple in the generated .bc files. Is it still the
original "armv7l-..."? At least with clang 3.2 I observed it was not,
causing errors as above.

HTH :)

kalle

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to