Lecture 15: Charm++
Abhinav Bhatele, Department of Computer Science
Introduction to Parallel Computing (CMSC498X / CMSC818X)
Lecture 15: Charm++ Abhinav Bhatele, Department of Computer Science - - PowerPoint PPT Presentation
Introduction to Parallel Computing (CMSC498X / CMSC818X) Lecture 15: Charm++ Abhinav Bhatele, Department of Computer Science Task-based programming models Describe program / computation in terms of tasks Tasks might be short-lived or
Abhinav Bhatele, Department of Computer Science
Introduction to Parallel Computing (CMSC498X / CMSC818X)
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
2
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
3
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
4
Charm++ Tutorial: http://charmplusplus.org/tutorial/ArrayHelloWorld.html
mainmodule hello { array [1D] Hello { entry Hello(); entry void sayHi(); }; };
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
4
Charm++ Tutorial: http://charmplusplus.org/tutorial/ArrayHelloWorld.html
mainmodule hello { array [1D] Hello { entry Hello(); entry void sayHi(); }; }; void Hello ::sayHi() { CkPrintf("Hello from chare %d on processor %d.\n”, thisIndex, CkMyPe()); }
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
4
Charm++ Tutorial: http://charmplusplus.org/tutorial/ArrayHelloWorld.html
mainmodule hello { array [1D] Hello { entry Hello(); entry void sayHi(); }; }; void Hello ::sayHi() { CkPrintf("Hello from chare %d on processor %d.\n”, thisIndex, CkMyPe()); } Main::Main(CkArgMsg* msg) { numObjects = 5; // number of objects CProxy_Hello helloArray = CProxy_Hello::ckNew(numObjects); helloArray.sayHi(); }
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
5
charmc hello.ci charmc -c hello.C charmc -o hello hello.o
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
6
CProxy_Hello helloArray = CProxy_Hello::ckNew(numElements);
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
7
User View System View
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
8
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
9
Abhinav Bhatele (CMSC498X/CMSC818X) LIVE RECORDING
10
Abhinav Bhatele 5218 Brendan Iribe Center (IRB) / College Park, MD 20742 phone: 301.405.4507 / e-mail: bhatele@cs.umd.edu