Re: How to compile with PAL libraries
Posted:
Thu Nov 05, 2015 12:08 pm
by cardosojc
Imagine i want to build a completely new program to run on epiphany and i want to use pal libraries.
Can someone provide a step-by-step tutorial to compile and run with pal? For example, like ePython!
Re: How to compile with PAL libraries
Posted:
Sat Nov 14, 2015 11:40 am
by cardosojc
Well, finally i was able to compile! it was missing the "-lpal" option on gcc.
But now i'm facing another problem:
// Execution setup
dev0 = p_init(1, 0); // initialize device and team
prog0 = p_load(dev0, file, func, 0); // load a program from file system
all = p_query(dev0,P_PROP_WHOAMI); // find number of nodes in system
team0 = p_open(dev0, 0, all); // create a team
printf("Number of cores = %d\n", all);
// Running program
for (i = 0; i < all; i++) {
printf("here\n");
sprintf(argbuf, "%d", i); // string args needed to run main asis
args[0] = argbuf;
status = p_run(prog0, team0, i, 1, nargs, args, 0);
}
"all" variable is equal to "-22" instead of expected "16", so it will never enter the for cycle and execute the code on cores..
Has someone executed correcty this code ?