Presentation is loading. Please wait.

Presentation is loading. Please wait.

Coding environment infrastructure for efficient parallel computing Industrial Project - 234313.

Similar presentations


Presentation on theme: "Coding environment infrastructure for efficient parallel computing Industrial Project - 234313."— Presentation transcript:

1 Coding environment infrastructure for efficient parallel computing Industrial Project - 234313

2 Team Developers: Vlad Krasnov Ady Abraham Supervisor: Dr. Roee Engelberg, LSI

3 Goals Make programming with asynchronous non-blocking APIs intuitive. Preserve maximal efficiency. A(){ //some code here... some_async_IO(decision1); } decision1(){ if(...) C(); else B(); } B(){ //some code here... some_async_IO(A); } C(){ //some code here... some_async_IO(exit_func); } exit_func(){ return; } Legacy model: The Project’s Goal: START(EXAMPLE); ASYNC(A); WHILE(...) ASYNC(B); ASYNC(A); ENDWHILE; ASYNC(C); END; // execution point EXEC(EXAMPLE);

4 Methodology Define abstract computation model Syntax definition. Framework implementation in order to run the required flow. Debug and validation.

5 Achievements Framework with MACRO based syntax that provides Turing-complete semantics. Second tier API with debugging capabilities. Natural easy-to-use easy-to-read syntax. No training required.

6 Achievements Supports: Synchronous functions. Asynchronous functions. If While Break Goto / Labels Exit

7 Example (legacy code) void GetAddressForWrite(void* ctx) { read_map(ctx, Continue1, ctx); // top snapshot } void Continue1(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } if(map_exists(ctx)){ // in top snapshot update_address(ctx); return; } Loop(ctx); } void Loop(void* ctx) { if(!map_does_not_exist(ctx)){ ContinueFromLoop(ctx); return; } get_next_snapshot(ctx); read_map(ctx, Continue2, ctx); // of next snapshot } void Continue2(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } Loop(ctx); } void ContinueFromLoop(void* ctx) { get_new_chunk(ctx); init_new_chunk(ctx, Continue3, ctx); }

8 Example (legacy code) cont. void Continue3(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } update_map(ctx, Continue4, ctx); // of top snapshot } void Continue4(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } update_address(ctx); Done(ctx); }

9 Example START(GET_ADDRESS_FOR_WRITE); ASYNC(read_map); // top snapshot IF(error_occured); GOTO(bail); ENDIF; IF(map_exists); // in top snapshot SYNC(update_address); EXIT; ENDIF; WHILE(map_does_not_exist); SYNC(get_next_snapshot); ASYNC(read_map); // of next snapshot IF(error_occured); GOTO(bail); ENDIF; ENDWHILE; SYNC(get_new_chunk); ASYNC(init_new_chunk); IF(error_occured); GOTO(bail); ENDIF; ASYNC(update_map); // of top snapshot IF(error_occured); GOTO(bail); ENDIF; SYNC(update_address); EXIT; LABEL(bail); SYNC(give_up_chunk); // only if was allocated SYNC(set_error); EXIT; END; EXEC(GET_ADDRESS_FOR_WRITE, ctx, Done);

10 Example Output ASYNC: read_map Done with async... map_exists(): FALSE map_does_not_exist(): TRUE SYNC: get_next_snapshot ASYNC: read_map Done with async... map_does_not_exist(): TRUE SYNC: get_next_snapshot ASYNC: read_map Done with async... map_does_not_exist(): TRUE SYNC: get_next_snapshot ASYNC: read_map Done with async... map_does_not_exist(): FALSE SYNC: get_new_chunk ASYNC: init_new_chunk Done with async... ASYNC: update_map Done with async... SYNC: update_address Flow terminated

11 Conclusions The project is more user friendly and useful than was expected at first. Writing code with async function has now became easy! No reason to be afraid of programming with async functions anymore.


Download ppt "Coding environment infrastructure for efficient parallel computing Industrial Project - 234313."

Similar presentations


Ads by Google