Re: OPENMP

new topic     » goto parent     » topic index » view thread      » older message » newer message
EUWX said...

Matt: I think Euphoria would benefit from the use of OPENMP, considering the fact that most processors these days support parallelism.

If I can paraphrase this ... Euphoria would benefit from the use of parallel processing, of which OPENMP could be a useful paradigm/specification.

Yes, parallel processing can be a great performance booster for certain operations and algorithms. When done 'by hand' it is difficult to do well - I know because I used to do this when working on some assembler written applications. OPENMP specifies a protocol to enable generated code (eg. output from a compiler) to be created to implement the OPENMP protocol.

Parallel processing requires at least two critical concepts - re-entrant code and access synchronization.

It so happens that a lot of Euphoria's internals are not re-entrant and changing that would require SIGNIFICANT rewrites and thus enormous testing. This also applies to the C code generated by the translator. One can't even 'bolt' on parallel operations to routines written in the Euphoria language, because ultimately they would use Euphoria internals, which would cause weird and wonderful crashes to occur and probably at random.

While the idea is a very good one, the implementation using the current code base for Euphoria is cost-prohibitive. In order to take advantage of OPENMP, Euphoria would need to be rewritten in C from scratch with parallel processing in-built. An alternative would be to rewrite it using the D Programming language which has parallel processing as the default protocol between tasks.

The idea of creating am openmp.e library, written in Euphoria, that 'wraps' or implements the OPENMP protocol, is doomed to failure due to the inherent limitations re parallel processing in its internals.

EUWX said...

There are many other Euphoria developers who also are equally able. Anybody whose mind can understand the "voids" of C language (my mind is completely void of it) can implement it easily.

Just on a side-note, this is probably not a good thing to admit to if you are charging the rates you do.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu