Zippo Sicortex machine
Jump to navigation
Jump to search
Please record useful notes about the new SiCortex machine here.
Specifying nodes
A node specific hello world program:
$ cat hosthello.c #include <unistd.h> #include <stdio.h> int main() { char name[100]; gethostname(name, sizeof(name)); printf("%s says hello!\n", name); return 0; }
Compile
$ gcc hosthello.c -o hosthello
and run one process (-n1) on one node (-N1) named sca-m0n10 with
$ srun -p sca -N1 -n1 -w sca-m0n10 ./hosthello sca-m0n10.scsystem says hello!
Run two processes (-n2) on two specific nodes (-N2), sca-m0n10 and sca-m0n11, with
$ srun -p sca -N2 -n2 -w sca-m0n10,sca-m0n11 ./hosthello
sca-m0n10.scsystem says hello! sca-m0n11.scsystem says hello!