1 / 51

Towards programming environment for personal supercomputing

Towards programming environment for personal supercomputing. Nikolay Mirenkov, Rentaro Yoshioka, and Yutaka Watanobe University of Aizu. Aizu-Wakamatsu. Tokyo. Introduction Examples of programs of a new type Visual symbols of an icon language

ling
Download Presentation

Towards programming environment for personal supercomputing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Towards programming environment for personal supercomputing Nikolay Mirenkov, Rentaro Yoshioka, and Yutaka Watanobe University of Aizu

  2. Aizu-Wakamatsu Tokyo IFIP

  3. IFIP

  4. Introduction Examples of programs of a new type Visual symbols of an icon language Filmification of methods and self-explanatory components Conclusion Outline IFIP

  5. Programming languages are good for computers, but they are not so good for people: unfriendly, unnatural, and difficult to use, These features are main reasons of existing software engineering difficulties. Our present New programming languages should be, in a sense, for people (!) communication. IFIP

  6. Personal supercomputers, Terascale embedded systems, Super-intelligent agents and global knowledge integration, Networks of smart devices as planetary creature organisms. Our future We need a really new programming environment and formats for data/knowledge representation. IFIP

  7. PCs are on track to keep adding processing power as Intel, AMD, and IBM add more cores to chips, perhaps hundreds within a decade will be available. PCs are becoming supercomputers and we need breakthrough research and more training in the programming that's necessary to tap that horsepower. Cell Processor of Playstation3 is a real example. More about our future IFIP

  8. Our approach • Multiple view formats, • Self-explanatory components, and • Filmification of methods. IFIP

  9. A multi-grid method for boundary value problems Numerical Recipes in C: The art of scientific computing, William H. Press and others, Cambridge University Press, 2nd edition IFIP

  10. A multi-grid method for boundary value problems Icon language program: IFIP

  11. Dijkstra’s algorithm for finding the shortest path #include<studio's> #include<stl.h> #include<vector> #include<slist> /** * class: graph * usage: #include <slist> */ class graph { public: vector<vector<int> > m; vector<vector<int> > adj; vector<vector<int>::iterator> pos; /** * Constructor * @param the number of nodes */ graph(){} graph( int n ){ resize(n); } /** * @param the number of node */ void resize( int n ){ m.resize(n), adj.resize(n), pos.resize(n); for ( int i = 0; i < n; i++ ){ m[i].resize(n); fill( m[i].begin(), m[i].end(), 0 ); adj[i].clear(); } } /** * @return the number of node */ int size(){ return m.size(); } /** * insert e between i and j; * @param i, j, e(weight) * if it is non-weighted graph, e should be 1. * if it is undirected graph, Do insert(i, j, e) and insert(j, i, e). */ void insert( int i, int j, int e ){ m[i][j] = e; adj[i].push_back(j); } /** * refer to weight. * usage: using g[i][j], edge weight can be refered. */ vector<int> & operator[](int i){ return m[i]; } /** * refere to adjacency list of node i, and move one. */ int next( int i ){ if( pos[i]==adj[i].end() ) return -1; return *pos[i]++; } /** * begin again of adjacency list reference of node i. */ void reset(int i){ pos[i] = adj[i].begin(); } /** * begin again of adjacency list reference of all node. * Before use graph, it must be called !!!. */ void reset(){ for(int i=0; i<size(); i++) reset(i); } /* less used methods */ void erase( int i, int j ){ m[i][j] = 0; for ( slist<int>::iterator it = adj[i].begin(); it != adj[i].end(); it++ ){ if ( *it == j ){ adj[i].erase( it ); break; } } } /** clear all nodes */ void clear(){ m.clear(), adj.clear(), pos.clear(); } }; #include<stdio.h> /************* * Dijkstra * ************/ #include "graph.h" graph g; int n; void dijkstra(graph &g, vector<int> &pi, vector<int> &d, int s); /** * Dijkstra * @param * pi: previous node * -1 --> source and not visited node * cost: distance from source * 0 --> source * INT_MAX --> not visited node * Solved 10171, */ void dijkstra( graph &g, vector<int> &pi, vector<int> &cost, int s ){ cost.resize( g.size(), INT_MAX ); pi.resize( g.size(), -1 ); vector<int> visited( g.size(), 0 ); cost[s] = 0; g.reset(); while ( 1 ){ int min = INT_MAX; int x; for ( int i = 0; i < g.size(); i++ ){ if ( visited[i] == 0 && min > cost[i] ){ min = cost[i]; x = i; } } if( min == INT_MAX ) break; visited[x] = 1; int v; while ( ( v = g.next(x) ) != -1 ){ if( !visited[v] && cost[x] + g.m[x][v] < cost[v] ){ cost[v] = cost[x] + g.m[x][v]; pi[v] = x; } } } } void read(){ int i, j, e; cin >> n; g = graph(n); while(1){ cin >> i >> j >> e; if( cin.eof() ) break; g.insert(i, j, e); g.insert(j, i, e); } } main(){ read(); /* read graph */ vector<int> pi, cost; g.reset(); dijkstra(g, pi, cost, 0); cout << "pi: "; for(int i=0; i<n; i++) printf("%3d", pi[i]); cout << endl; cout << "cost : "; for(int i=0; i<n; i++) printf("%3d", cost[i]); cout << endl; } C++ code for the Dijkstra’s algorithm with a general graph structure IFIP

  12. Dijkstra’s algorithm for finding the shortest path Icon language code for the Dijkstra’s algorithm with a general graph structure IFIP

  13. Generalized graph search scheme IFIP

  14. These visual programs are physically much smaller than the text they replace because: High level representation of computational structures, activities on these structures, branching statements, etc. Reduced number of variables, Simplified index expressions and formulas, etc. Compactness of the new type programs IFIP

  15. Part 1 IFIP

  16. An open set of micro-icons for 2D schemes IFIP

  17. Other micro-icons for 2D schemes IFIP

  18. A 2D scheme: example IFIP

  19. Pyramid pattern micro-icons IFIP

  20. Pyramid mask micro-icons IFIP

  21. Micro-icons for pyramid schemes IFIP

  22. A pyramid scheme IFIP

  23. Flash types IFIP

  24. Frames of a matrix computation IFIP

  25. All they can be reduced to 1-D, 2-D, and 3-D structures like lists, queues, stacks, grids, trees, general graphs, pyramids, multistage-networks, some lines, surfaces, moving particles, and compositions of these structures, and to partial orders of structure node (particle) traversals represented by explicit or implicit forms. Observation of computational schemes IFIP

  26. A cyberFilm classification IFIP

  27. Self-explanatory components in cyberFilm formats, cyberFilm management systems and adaptive human-computer interface, cyberFilm databases and data/ knowledge acquisition. A basis of our project IFIP

  28. A cyberFilmis a set of series of color pictures, A pictureis to represent a view (a feature) of an object or process, A series of picturesis to represent a multiple view (a lot of features) of an object or process. CyberFilm concept IFIP

  29. Multiple viewis to make the corresponding object or process be self-explained, Self-explained film means that the associated pictures are organized and presented in such a way that the semantic richness of data/ knowledge is clearly brought out. Self-explanatory concept IFIP

  30. Algorithmic cyberFilms Algorithmic Skeleton Variables Activity I/O Operations Integrated feature • Presented/Specified rather independently by special multimedia language and subsystem, • Automatic frame creation, • One construct can be used to explain meaning of other’s. IFIP

  31. Algorithmic Skeletons View • structures and flows of computation IFIP

  32. Algorithmic action View • Examples: indexing iu[ i ][ j ] = 0.5 x ( iu[ i – 1 ][ j ] + iu[ i + 1 ][ j ] ) IFIP

  33. Algorithmic action view • Examples of formulas: iu[i-1][j] + iu[i-1][j-1] + iu[i+1][j+1] + iu[i+1][j] + iu[i+1][j-1] + iu[i+1][j+1] + iu[i][j-1] + iu[i][j+1] – 4*iu[i][j] IFIP

  34. Integrated View • compact form of: algorithmic skeletons, variables/formulas, I/O In fact, our icon language allows programming of a conventional text type, but with characters and symbols of much higher level. Other views of the program are used to explain its features. IFIP

  35. Background & Foreground • Background & Foreground Images • Decrease abstractness of contents, • Simplify understanding of the contents, • Comments and annotations. • Control Background & Control Foreground Images • Used in reference icons of activity expressions, • Differentiate activity states. IFIP

  36. Background images Examples: IFIP

  37. Control Foreground/Background Images Example: IFIP

  38. CyberFrame Examples: IFIP

  39. Extended set of CyberFim views • the most appropriate media for each feature • right time to show an appropriate feature through a right channel • self-explanatory features IFIP

  40. IFIP

  41. IFIP

  42. IFIP

  43. CyberFilm library Template library Programming Environment User Filmification of Methods Browsers/editors Algorithmic CyberFilm Template Program Program Generator Computer IFIP

  44. IFIP

  45. Classification of templates and computational scenario prediction • To keepperformance: • A set of templates for each scene taking into account possible levels of parallelism should be behind. IFIP

  46. A number of features presented by multimedia frames are assembled into a structure (cyberFilm), In right time a right group of corresponding frames is extracted and presented through a right channel. Once more about cyberFilm concept IFIP

  47. Features of the programming environment • Acquisition of data-knowledge as self- explanatory components • CyberFilms: high performance for people, • Template programs: high performance for parallel machines. • Programming through multiple-view descriptions • Program development is split into a set of more simple tasks/views, with automatic integrations of partial decisions. • In spite of the high-level descriptions, efficiency of generated codes can be saved. IFIP

  48. This approach allows developing more compact, understandable, and reusable software components. Different computational features can be described/specified rather independently in a set of visual languages. Acquisition of data-knowledge. The knowledge in cyberFilm format supported by a set of template programs Conclusion IFIP

  49. Meaning is a product of thought. Multiple views minimize energy spending for this activity. Corresponding data/knowledge is easier to understand for a shorter period and remember for a prolonged period. This keeps at a minimum rote memorization. The multimedia format allow to a much larger population of users not only to improve accessibility, understandability, and usability of information resources, but also to express such things as beauty or feeling. Conclusion 2 IFIP

  50. Thank you !! IFIP

More Related