1.23
2.0
main
test-branch
|
Last change
on this file since 67da504 was 48bfab9, checked in by Manchun Zheng <zmanchun@…>, 12 years ago |
|
added checking for memory leak when collecting a dyscope and for process leak when the main process returns; fixed all test cases accordingly; added a filesystem_destroy call for IOTransformer to get rid of memory leak.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@912 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
430 bytes
|
| Line | |
|---|
| 1 |
|
|---|
| 2 | $input int NPROCS;
|
|---|
| 3 | $proc __procs[NPROCS];
|
|---|
| 4 | _Bool __start = 0;
|
|---|
| 5 | $gcomm COMM_WORLD;
|
|---|
| 6 |
|
|---|
| 7 | void MPI_Process (int rank);
|
|---|
| 8 |
|
|---|
| 9 | void init() {
|
|---|
| 10 | for (int i=0; i<NPROCS; i++)
|
|---|
| 11 | __procs[i] = $spawn MPI_Process(i);
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | void finalize() {
|
|---|
| 15 | for (int i=0; i<NPROCS; i++)
|
|---|
| 16 | $wait(__procs[i]);
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | void main() {
|
|---|
| 20 | $atomic{
|
|---|
| 21 | init();
|
|---|
| 22 | COMM_WORLD = $gcomm_create($here, NPROCS);
|
|---|
| 23 | __start = 1;
|
|---|
| 24 | finalize();
|
|---|
| 25 | $gcomm_destroy(COMM_WORLD);
|
|---|
| 26 | }
|
|---|
| 27 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.