Solved

Installing PVM

Posted on 2006-11-02
22
2,109 Views
Last Modified: 2012-05-05
I want to install PVM (Parallel Virtual Machine) on RedHat9 and on Windows Xp by using cygwin but could not do it. Is there anybody that could help thanks.

0
Comment
Question by:new_x
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 6
  • 4
22 Comments
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 17871271
Can you give a bit more detail as to what went wrong please?
0
 
LVL 1

Author Comment

by:new_x
ID: 17875333
Hi duncan_roe, I am new to Linux world what I am trying to do is to install pvm on a redhat9,
and want to write some parallel code by using PVM library. I downloaded an rmp for pvm and installed it onto linux. after that I typed pvm to get into the pvm console it responded as expected and gave the prompt  "pvm>" i tested it by using some console commands like conf and it was running successfully.

I downloaded hello.c and world.c written by some experinced authors (these codes use pvm) but could not compile them by using gcc hello.c -o hello -lpvm3 command.

Compilation gave the result
hello.c:3:18: pvm3.h: No such file or directory
then I changed the include<pvm3.h> line to the include</usr/local/pvm3/include/pvm3.h>

and tried to compile then it gave the error
/usr/bin/ld: cannot find -lpvm3
without  -lpvm3 it gave the following errors;
undefined reference to pcm_recv
.....

I searched the internet and found that I must set some environement variables $PVM_ROOT and $PVM_ARCH but I could not eventually.

So could you provide me how to make this pvm running, by listing the steps

Regards,
 
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 17875966
Go back to the original unmodified source. Your command line should look like:
   gcc -g3 -ggdb -I/usr/local/pvm3/include -L/usr/local/pvm3/lib hello.c -o hello -lpvm3
Use the extensive documentation available at http://www.csm.ornl.gov/pvm/pvm_home.html to resolve any problems you encounter thereafter.
-g3 -ggdb are debugging options for max debugging info - it will work without these but I recommend them.
You never want to supply absolute pathnames in #include lines. The reason for this is that it that an included (header() file may well include other files which it is entitled to expect will be found in the same directory as itself.
PVM_ROOT & PVM_ARCH might be required by some Makefiles but will make no difference to the gcc command line you are using. I expect you would set them as:
   export PVM_ROOT=/usr/local/pvm3
   export PVM_ARCH=i386
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:new_x
ID: 17876192
I typed the following and got the following answers;

echo $PVM_ROOT
/usr/local/pvm3

echo $PVM_ARCH
i386

After correcting the source file I gave command you gave me(gcc....) ; it returned
/usr/bin/ld: cannot find -lpvm3

collect2: ld returned 1 exit status

regards
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 17876305
You need to find out where libpvm3 is installed, and give -L{that dir} on the command line instead of -L/usr/local/pvm3/lib.
To find out where the libraray is, type
   locate libpvm3
This should find a .a or a .so file somewhere. If it doesn't find a library, your installation is incomplete.
0
 
LVL 1

Author Comment

by:new_x
ID: 17876433
locate libpvm3 gave the following lines
/usr/share/pvm3/lib/LINUXI386/libpvm3
/usr/share/pvm3/src/LINUXI386/libpvm3.a
/usr/local/pvm3/lib/WIN32/libpvm3.dll
/usr/local/pvm3/lib/WIN32/libpvm3.lib

then do i have to  use  -L/usr/share/pvm3/lib/LINUXI386 and are you sure to set PVM_ARCH to i386?

regards
0
 
LVL 1

Author Comment

by:new_x
ID: 17876484
and searched the net someone asked the following


Subject: cannot find -lpvm3
> On Thu, 2004-10-21 at 14:00, A Nayar wrote:
> > I am having this error when trying to compile my mw app. However the
> > funny thing is this doesnt happen everytime, it looks like I need to set
> > reference to pvm somewhere when logging in. Any ideas??
> >
> > Arun

then he also sent another message just saying;
"Solved I hadnt set PVM_ARCH in my environment.."

regards
0
 
LVL 24

Expert Comment

by:slyong
ID: 17877994
Hi,

Try to use these environment settting:

PVM_ROOT=/usr/share/pvm3
PVM_ARCH=LINUXI386

and compile using:
gcc -o myprog myprog.c -lpvm3 -I$(PVM_ROOT)/include -L$(PVM_ROOT)/lib/$(PVM_ARCH)

or just put everything in hardcoded:
gcc -o myprog myprog.c -lpvm3 -I/usr/share/pvm3/include -L/usr/share/pvm3/lib/LINUXI386
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 17878120
You need to us -L/usr/share/pvm3/src/LINUXI386. For some strange reason, the file created in lib has lost its ".a" extension. Did you build from source? I just did - see below (my architecture is different from yours, don't worry about that).

In your case, set PVM_ARCH to LINUXI386

I visited the web site, fetched the source tarball, untarred and tried building it myself:

10:25:32$ pwd
/usr/src/pvm3
10:26:16$ ./lib/pvmtmparch   # Found in Makefile
LINUX64
10:27:47$ export PVM_ARCH=LINUX64
10:29:54$ export PVM_ROOT=`pwd`
10:31:16$ make 2>&1|tee hee   # keep log in hee file in case it went wrong, or to check for warnings afterwards
(copious output)
10:34:58$ find . -name 'libpvm3*' -print
./src/LINUX64/libpvm3.a
./lib/LINUX64/libpvm3.a
10:44:41$ diff src/LINUX64/libpvm3.a ./lib/LINUX64/libpvm3.a
10:44:54$

The files in src & lib are identical, so it's OK to use either.

There are a number of warnings which are nothing to worry about concerning the use of "sys_nerr" & "sys_errlist".

I get 2 potentially serious warnings which you won't get "cast to pointer from integer of different size" which may indicate some 64-bit non-compliance. 32-bit linux will be fine because int long & pointer are all 32 bits.

Now you should be all set to build your test app.
0
 
LVL 1

Author Comment

by:new_x
ID: 17878708
Hi duncan_roe,

in fact I am from one click world (M$ Windows) so I might have done something wrong, What I have done so far is the following;

- I searched google and downloaded an rpm for redhat9.
- I used rpm -i .... to install that package. No error came out when installing..
- I tried to check if installation successfull by typing pvm
  it gave me pvm> prompt I typed conf to check if it was functioning it was ok then gave command halt.

no reboot no compilation or anything else.

So I am not sure whether I did the installation properly or not... Or Do I have to install it from sources and compile then.

if so and if I am not too much could you provide me a step by step guideline. (like for dummies series... :) )

Regards,
0
 
LVL 24

Expert Comment

by:slyong
ID: 17879455
hi,

have you been able to compile using:

$ gcc -o myprog myprog.c -lpvm3 -I/usr/share/pvm3/include -L/usr/share/pvm3/lib/LINUXI386

??

Regards
0
 
LVL 35

Accepted Solution

by:
Duncan Roe earned 200 total points
ID: 17879933
rpm -i should have installed it properly. Did locate really find /usr/share/pvm3/lib/LINUXI386/libpvm3 and not /usr/share/pvm3/lib/LINUXI386/libpvm3.a? Anyway using -L/usr/share/pvm3/src/LINUXI386 as I suggested before should work based on what you posted earlier (and from my own testing). Please do confirm the .a or not in /usr/share/pvm3/lib/LINUXI386.
As for installing from source, I documented most of the steps in my previous post, except the really early ones: go to the home url in previous post, select "download source" which will fetch you the file pvm3.4.5.tgz; get your browser to store that where you want; untar it: "cd {your source path}" "tar -xzf {pathname}/pvm3.4.5.tgz". This will create {your source path}/pvm3: cd there then follow the steps in my previous post. You don't need to type the comments ("#" character and following text). You will not need to reboot linux.
0
 
LVL 1

Author Comment

by:new_x
ID: 17887887
Hi experts,
 I was using Linux on VMPlayer today I deleted and Redhat VMWare files recopied them install the rpm and did what you said and finally have a working PVM now. (Both of two experts' comments are correct)

I will restart writing program that uses PVM library if I have troubles and open new threads for my questions, Could you help me?..

Best Regards
0
 
LVL 1

Author Comment

by:new_x
ID: 17887910
For slyong, I specially want to thank you for your comment, (your solution was also correct one) as soon as I will have another 200 points I will open a dummy question for you.

Thanks,
0
 
LVL 1

Author Comment

by:new_x
ID: 17890139
If I am not too much; one final question

In parallel computing programming if I spawned programs (slaves) more than the number of available processors, does PVM make neccessary adjustments or Do I have to take the number of hosts into account...


Regards,
0
 
LVL 24

Expert Comment

by:slyong
ID: 17891455
Hi new_x,

You are welcome.  For your final question, if you have 2 nodes (1 master, 1 slave) and pvm_spawn 3 processes, one of the node will get 2 processes and the other get one process.  This can be controlled within the program itself (e.g. which process to be spawn on which specific node).
0
 
LVL 1

Author Comment

by:new_x
ID: 17895310
But if I do not make any arrangements than PVM does it automatically in an efficient way?
0
 
LVL 1

Author Comment

by:new_x
ID: 17895372
Could you also provide some sites about some basic parallel algorithms?
Regards,
0
 
LVL 24

Expert Comment

by:slyong
ID: 17895742
The whole PVM book is actually online and downloadable (http://www.netlib.org/pvm3/book/pvm-book.html).  If you look at man pvm_spawn (http://www.physics.oregonstate.edu/~rubin/nacphy/PVM/ref/routines/pvm_spawn.html), the default if I am correct is in a round-robin fashion.  There are some toy examples in the PVM book that you should try out first.  Once you are familiar with the architecture, the you should read up about parallel algorithm, there are a lot of algorithm out there like matrix multiplication and such.
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 17896257
You already have the man pages on your computer if you downloaded the source, and possibly from the RPM. Look in $PVM_ROOT/man for man subdirs (man1, man3 &c). Put $PVM_ROOT/man in your MANPATH environment variable to access them where they are, or copy them to e.g. the /usr/local/man tree
0
 
LVL 1

Author Comment

by:new_x
ID: 17903949
Thanks you both for your kind help.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question