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

Trying to compile my hello.c program in PVM

27 views
Skip to first unread message

David Hernández

unread,
Jun 30, 2015, 1:21:37 PM6/30/15
to
Hi.

I have installed pvm using sudo apt-get install pvm following this link:
http://varuagdiary.blogspot.com.es/2011/06/installing-pvm-on-ubuntu-1010-64bit.html

so I have my pvm up and running correctly.

Later I have downloaded dist from: http://www.netlib.org/pvm3/pvm3.4.6.tgz

in /home/david

unpacking using tar -xvf pvm3.4.6.tgz which create a folder called pvm3

I have established this variables

export PVM_ROOT=/usr/lib/pvm3
export PVM_ARCH=LINUX64
PATH=$PVM_ROOT/bin:$PATH

and make

Everything seems to be ok

Now I create my first hello.c project in /home/david/hello.c

and trying to compile:

gcc hello.c -o hello (FAILS)

gcc hello.c -o hello -lpvm3 (WORKS, but show Hello World, THIS IS NOT MINE)

gcc hello.c -o hello -I$PVM_ROOT/include -L$PVM_ROOT/lib/$PVM_ARCH -lpvm3 (WORKS, but show Hello World, THIS IS NOT MINE)

gcc hello.c -o hello -I$PVM_ROOT/include -L$PVM_ROOT/lib/$PVM_ARCH
ERROR:
hello.c:(.text+0x9): undefined reference to `pvm_mytid'
hello.c:(.text+0x28): undefined reference to `pvm_exit'

hello.c

#include <stdio.h>
#include <pvm3.h>

int main()
{
int mytid;

mytid = pvm_mytid();
printf("My TID is %d\n", mytid);
pvm_exit();
return 0;
}


I don't know what else to try.

Any help.

Thanks



PS: ubuntun 12.04 x64
0 new messages