Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UPC: -network=smp on Citris broken?

1 view
Skip to first unread message

Mark Frederick Augustine Hoemmen

unread,
Mar 26, 2004, 11:31:16 PM3/26/04
to
Is the `-network=smp' option for UPCC broken on Citris, or am I making
a mistake? When I compile with a fixed number of threads, the UPC
runtime gives me an error message, no matter whether I specify (with
upcrun) the correct number of threads, the incorrect number of threads,
or don't specify the number of threads at all. Yet when I don't compile
with a fixed number of threads, the UPC runtime only gives me one
thread. In the examples below, `test.upc' is the "printf("main: thread
%d", MYTHREAD);" variant of Hello, World. It works as expected when
compiled with `-network=mpi'.

mfh

mhoemmen@c122:~$ upcc -network=smp -T=2 test.upc
mhoemmen@c122:~$ upcrun -n 2 ./a.out
UPC Runtime error: program ./a.out was compiled with 2 static threads,
but executed with 1 threads.

mhoemmen@c122:~$ upcrun -n 1 ./a.out
upcrun: Requested thread count (1) differs from compiled static thread
count (2)

mhoemmen@c122:~$ upcrun ./a.out
UPC Runtime error: program ./a.out was compiled with 2 static threads,
but executed with 1 threads.

mhoemmen@c122:~$ ./a.out
UPC Runtime error: program ./a.out was compiled with 2 static threads,
but executed with 1 threads.

mhoemmen@c122:~$ upcc -network=smp test.upc
mhoemmen@c122:~$ upcrun -n 1 ./a.out
main: thread 0
mhoemmen@c122:~$ upcrun -n 2 ./a.out
main: thread 0
mhoemmen@c122:~$ upcrun -n 4 ./a.out
main: thread 0
mhoemmen@c122:~$ ./a.out
main: thread 0

Here is the source code of test.upc:

#include <upc.h>
#include <stdio.h>

int
main()
{
printf ("main: thread %d\n", MYTHREAD);
return 0;
}

Mark Frederick Augustine Hoemmen

unread,
Mar 26, 2004, 11:56:18 PM3/26/04
to
Same problems happen on Seaborg. I'm guessing the mistake is mine
(the Berkeley UPC compiler on Seaborg is even a newer version, 1.1.1
as opposed to 1.1.0 on Citris), but just wanted to make sure.

mfh

Edward Jason Riedy

unread,
Mar 29, 2004, 2:15:17 PM3/29/04
to
And Mark Hoemmen writes:
- Is the `-network=smp' option for UPCC broken on Citris, or am I making
- a mistake?

There's an undocumented dependency, I guess. You need both
the -network=smp flag and the -pthreads flag.

Jason
--

0 new messages