You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

1. Use cases:

1.1. Wrapper modes:

  • interactive - user code is run directly from wrapper
  • batch - user executable is sent to a queue

1.2. Execution modes

User code can be:

  • Sequential
  • Parallel:
    • MPI
      • MPICH
      • OpenMPI
    • and/or OpenMP

1.3. Debugging modes:

  • standalone - debugger launches executable containing user code in a separate process
  • attach - debugger attaches to running process executing user code

1.4. Sandbox

2. Wrapper API - current status


def actor_name(integer0, integer1, core_profiles0, exec_type='ctypes', **kwargs):


2.1. Input arguments 

Argument can be

  • IDS
  • primitive type
  • array of primitive types
  • string

2.2. Execution type

  • Named argument (exec_type='').
  • Current values of exec_type :
    • ctypes - interactive execution (yes - this name is REALLY CONFUSING)
    • mpi_local - run as MPI job
    • dbg - to keep compatibility with obsolete 'debug' argument of wrapper

BP: IMHO it should be removed and defined in other way, as execution modes requires additional set of info

2.3. Additional arguments 

Auxiliary keyword arguments:

  • mpi_processes  - integer - number of MPI processes
  • lib_opt  - boolean - determines of alternative user library should be used, instead of the default one
  • get_output_idss  - boolean - determines, what actually will be returned if returned argument is IDS: an IDS object, or metadata describing it
  • strip_output  - boolean - it determines (if returned argument is a string) it it should be stripped or not
  • dbgmode  - boolean - unknown purpose

2.4. Returned values

Output values:

  • None - if nothing is returned from called F/C++ method 
  • A single object -  if called method returns only one value
  • A tuple of objects - if called methods returns more than one value. It contains also diagnostic_info if being used.

3. Weaknesses of current solution

  • very long list of arguments
    • it is easy to make a mistake providing  incorrect number of arguments 
    • it is easy to make a mistake providing incorrect order of arguments
  • lack of important information, so many features are not handled:
    • no debug mode
    • MPI parameters - only number of nodes is specified
    • no batch mode  


4. Wrapper API - new design

only kwargs !!!!

def actor_name(**kwargs):

All arguments will be stored in data holding objects and wrapper will check what is defined inside kwargs.

Separate objects will hold info about:

  • user code arguments - autogenerated
  • diagnostic info
  • execution modes
  • debug


5. Open points

  1. Sandbox:
    1. Do we need this feature?
  2. Alternative library:
    1. Do we need this feature?




  • No labels