Home | Forum | MAN Pages | Tutorials | Directory | HOWTOs | About Me | Contact
 
FAQS
» Advanced Routing & Traffic Control
» General FAQ
» Squid Proxy Server
» Sendmail
» Fetchmail
» Postfix
» Connecting Mobile Phone
» Paging from Linux
» Standard Commands
» Some common terms
HOW-TOs
» ADSL Bandwidth Management
» Compile Apache
» Make a Bootdis
» Linux-Windows9x-Grub
» Linux-Windows
» Linux Crash Recovery
» Optimise Squid
» Block websites in Squid
» broadcast webcam in linux
» Compile RedHat Linux kernel
» Implement Firewall Security
» Increase Harddrive Performance
» Mount NTFS filesystem
» Patch / rebuild SRPM
» Secure Linux
» Set up a DHCP Server
» Set up an FTP server
» Set up Linux as a Router
» Use Cron
Miscellaneous
» All Ports
» Hardware Guides
» Hardware Review Guides
» Fav Troubleshooting forums
» Spammers fetch email addresses
» Mounting NTFS in linux


 

7. Run A Program

Once you can do all the tests shown above, you should be able to run a program. From here on in, the instructions are lam specific.

Go back to the head node, log in as wolf, and enter the following commands:

cat > /nnt/wolf/lamhosts 
wolf01 
wolf02 
wolf03 
wolf04 
<control d>

Go to the lam examples directory, and compile "hello.c":

mpicc -o hello hello.c 
cp hello /mnt/wolf 

Then, as shown in the lam documentation, start up lam:

[wolf@wolf00 wolf]$ lamboot -v lamhosts 
LAM 7.0/MPI 2 C++/ROMIO - Indiana University 
n0<2572> ssi:boot:base:linear: booting n0 (wolf00) 
n0<2572> ssi:boot:base:linear: booting n1 (wolf01) 
n0<2572> ssi:boot:base:linear: booting n2 (wolf02) 
n0<2572> ssi:boot:base:linear: booting n3 (wolf04) 
n0<2572> ssi:boot:base:linear: finished

So we are now finally ready to run an app. [Remember, I am using lam; your message passing interface may have different syntax].

[wolf@wolf00 wolf]$ mpirun n0-3 /mnt/wolf/hello 
Hello, world! I am 0 of 4 
Hello, world! I am 3 of 4 
Hello, world! I am 2 of 4 
Hello, world! I am 1 of 4 
[wolf@wolf00 wolf]$

Recall I mentioned the use of NFS above. I am telling the nodes to all use the nfs shared directory, which will bottleneck when using a larger number of boxes. You could easily copy the executable to each box, and in the mpirun command, specify node local directories: mpirun n0-3 /home/wolf/hello. The prerequisite for this is to have all the files available locally. In fact I have done this, and it worked better than using the nfs shared executable. Of course this theory breaks down if my cluster application needs to modify a file shared across the cluster.


 
Random Linux Commands
RPM
Red Hat Package Manager, which is a system for working with complete software packages. Files usually have a .rpm extension and can be installed using various tools, including KPackage and RPMDrake. The system will alert you if other packages are needed before you can install new software.

Common Linux terms
Linux-FAQs Forum Categories
» About Forum
» Hardware Troubleshooting in Linux
» Linux Entertainment
» Resources
» Software toubleshooting and configuration
All Linux-FAQs Forums
» Crash Recovery
» FAQs
» Forum Talk
» Games
» General
» Linux Audio Support
» Linux Hardware / Driver
» Linux Installation Support
» Linux misc.
» Linux Networking
» Linux Newbies
» Linux Printing Support
» Linux Security
» Linux Video Support
» Mail Server
» Multimedia
» Tutorials
» Web Proxy Server
» Web Server


 
Powered by HTML
Linux-faqs.com Copyright, All rights reserved www.linux-faqs.com. Peeyush Maurya.