-
-
Save jszaday/486ee195180c42eed2a6f7b14462b123 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cordelia :: ~/workspace/junk % charmrun ++local ./a.out ++ppn 4 +p8 | |
Charmrun> scalable start enabled. | |
Charmrun> started all node programs in 0.045 seconds. | |
Charm++> Running in SMP mode: 2 processes, 4 worker threads (PEs) + 1 comm threads per process, 8 PEs total | |
Charm++> The comm. thread both sends and receives messages | |
Converse/Charm++ Commit ID: v7.1.0-devel-155-ga939c1621 | |
Charm++ built with internal error checking enabled. | |
Do not use for performance benchmarking (build without --enable-error-checking to do so). | |
Isomalloc> Synchronized global address space. | |
Charm++> scheduler running in netpoll mode. | |
CharmLB> Load balancer assumes all CPUs are same. | |
Charm++> Running on 1 hosts (1 sockets x 4 cores x 2 PUs = 8-way SMP) | |
Charm++> cpu topology info is gathered in 0.019 seconds. | |
Charm++> Warning: Running with more SMP threads (10) than physical cores (8). | |
Use +CmiSleepOnIdle (default behavior) or +CmiSpinOnIdle to silence this message. | |
CharmLB> Load balancing instrumentation for communication is off. | |
0> greetings from pe0~! | |
0> greetings from pe1~! | |
0> greetings from pe3~! | |
0> greetings from pe2~! | |
1> greetings from pe4~! | |
1> greetings from pe6~! | |
1> greetings from pe5~! | |
1> greetings from pe7~! | |
[Partition 0][Node 0] End of program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "qux.decl.h" | |
namespace qux { | |
struct main : public CBase_main { | |
main(CkArgMsg*) { | |
CProxy_nodes proxy = CProxy_nodes::ckNew(); | |
auto nPes = CkNumPes(); | |
for (auto pe = 0; pe < nPes; pe++) { | |
CkEntryOptions opts; | |
opts.setNodeGroupPe(pe); | |
proxy[CkNodeOf(pe)].greeting(&opts); | |
} | |
} | |
}; | |
struct nodes : public CBase_nodes { | |
int expected, received; | |
nodes(void) | |
: expected(CkMyNodeSize()), received(0) {} | |
void greeting(void) { | |
CkPrintf("%d> greetings from pe%d~!\n", CkMyNode(), CkMyPe()); | |
if (++(this->received) >= expected) { | |
CkCallback cb(CkCallback::ckExit); | |
this->contribute(cb); | |
} | |
} | |
}; | |
} | |
#include "qux.def.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mainmodule qux { | |
namespace qux { | |
mainchare main { | |
entry [nokeep] main(CkArgMsg*); | |
}; | |
nodegroup nodes { | |
entry nodes(void); | |
entry void greeting(void); | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment