Zippo Sicortex machine: Difference between revisions

From CUC3
Jump to navigation Jump to search
import>Cen1001
No edit summary
 
import>Jg525
No edit summary
Line 1: Line 1:
Please record useful notes about the new SiCortex machine here.
Please record useful notes about the new SiCortex machine here.


== Specifying nodes ==
System docs are at:
A node specific hello world program:
<pre>
$ cat hosthello.c


#include <unistd.h>
http://www-theor.ch.cam.ac.uk/IT/servers/zippo/
#include <stdio.h>

int main()
{
char name[100];
gethostname(name, sizeof(name));
printf("%s says hello!\n", name);
return 0;
}
</pre>
Compile
<pre>
$ gcc hosthello.c -o hosthello
</pre>
and run one process (-n1) on one node (-N1) named sca-m0n10 with
<pre>
$ srun -p sca -N1 -n1 -w sca-m0n10 ./hosthello

sca-m0n10.scsystem says hello!
</pre>
Run two processes (-n2) on two specific nodes (-N2), sca-m0n10 and sca-m0n11, with
<pre>
$ srun -p sca -N2 -n2 -w sca-m0n10,sca-m0n11 ./hosthello
</pre>
<pre>
sca-m0n10.scsystem says Hello!
sca-m0n11.scsystem says Hello!
</pre>

== System documentation ==
See: http://www-theor.ch.cam.ac.uk/IT/servers/zippo/

Revision as of 13:07, 27 February 2009

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!

System documentation

See: http://www-theor.ch.cam.ac.uk/IT/servers/zippo/