On Mon, May 02, 2011 at 09:28:52AM +0900, Sho Nakatani wrote:
> I'm trying to make better libgomp implementation of task construct in
> a GSoC project.

First of all, if you haven't started with the FSF assignment paperwork,
please do so, it takes a while.  See http://gcc.gnu.org/contribute.html

> * Tell me good reference of OpenMP standards. What is referenced when
> libgomp was implemented.

http://openmp.org/wp/openmp-specifications/

> * How should user-level and kernel-level threads be implemented?
>   In my opinion, user-level threads should be a small data structure
> with call-stack
>   and kernel-level threads should be pthreads which are tied to CPUs
> by sched_setaffinity() system call.
>   (manpage says sched_setaffinity() is provided only in Linux, though..)

For #pragma omp parallel and tied tasks you just want user-level ==
kernel-level thread as implemented in libgomp, with affinity only
done when requested by the user (GOMP_CPU_AFFINITY resp. on gomp-3_1-branch
also the to be implemented OMP_PROC_BIND env vars).

> * Which interface (ABI) should be left in libgomp when I rewrite task feature?

IMHO you don't want to rewrite the task support, just primarily investigate
various scheduling algorithms and attempt to implement some of them and
benchmark.

>   I guess I should be very careful since task construct is related to other 
> ones
>   like taskwait, barrier, and parallel.

Of course it is and the OpenMP specification has various restrictions on
which tasks may be scheduled at which points.  Task scheduling needs to be
done / may be performed (for tied tasks at least) in task, barrier, end of
parallel, end of task, in taskwait and in OpenMP 3.1 also may be done in
taskyield.  That maps to GOMP_task, gomp_barrier_handle_tasks,
GOMP_taskwait and (for gomp-3_1-branch GOMP_taskyield as well).

        Jakub

Reply via email to