OpenFAM Reference Implementation

OPENFAM MULTI-THREADED & CONTEXT MODEL

OpenFAM 2.0 provides a basic threading and context framework for invoking the data path APIs. All the data path APIs use a single communication context there by restricting the grouping of I/O operation to a single context group. Hence fam_quiet invoked by the application will enforce completion of all the operations invoked from the fam object. Though application may be multi-threaded and share the fam object across multiple threads, it is the applications responsibility to serialize all the OpenFAM APIs from different threads. This thread model does not allow application to optimally utilize cpu and network resources available on the compute node. In order to address these issues to an extent, a concept of user-specific thread model has been added in OpenFAM 3.0.

Now OpenFAM supports following threading models:
  • FAM_THREAD_SERIALIZE
    • Program may be multi-threaded
    • No concurrent invocation of OpenFAM APIs by multiple threads
    • Quiet will enforce completion of all the operations invoked from all the threads.
  • FAM_THREAD_MULTIPLE
    • Program may be multi-threaded
    • Any thread may invoke OpenFAM APIs
    • Quiet will enforce completion of all the operations invoked from all thread.

    To open and close of user specific contexts two new API’s - fam_context_open and fam_context_close has been added.
    • fam_ctx* fam->fam_context_open()
    • void fam->fam_context_close(fam_ctx*)
    fam_context_open returns a user specific FAM context object. OpenFAM API’s can be invoked from the fam_context object too. All OpenFAM API invoked from this FAM context object will be grouped together for completion. Quiet invoked from a FAM context object will enforce completion of all operations invoked from the FAM context object. Application can use both FAM context object and FAM object in the application, however OpenFAM APIs invoked from these objects are tracked using separate contexts. Only data path APIs can be invoked from FAM context object