After Debian is installed, take notes -- Debian, the Linux release technology. For more information, see the following. I chose Linux as the operating system, and of course I used Debian for no reason. It is very convenient to install the software. Debian installation settings are omitted here.
After the operating system Debian is installed, you must make some settings and adjustments, mainly including:
1) # apt-get install etherconf
This software is installed to facilitate the setting of NIC parameters.
2) # apt-get install rcconf
Install the software to cancel unnecessary services. Of course, this step can be omitted.
3) # apt-get install g77
Because high-performance scientific computing is involved, it must involve Fortran. Early Fortran was synonymous with scientific computing. Therefore, this Fortran compiler was installed.
4) install the Debian system on eight PC machines, and set the IP address
192.168.1.101 ---- 192.168.1.108
The machine names are set:
Hpc1 hpc2 hpc3... hpc8
Here you can make changes based on your own situation.
5) edit the/etc/hosts file on each machine and add the following lines:
192.168.1.101 hpc1.test.com hpc1
192.168.1.102 hpc2.test.com hpc2
......
The role here is to enable the system to correctly resolve the domain name. Obviously, my domain name is assumed to be test.com
6) edit/root/. rhosts on each computer. The file content is:
Hpc1.test.com root
Hpc2.test.com root
......
The role here is to tell the system which computer users can log on to and remotely operate the system through rlogin rsh.
PVM can also be remotely operated through ssh instead of rsh, which should be more secure. Obviously, I do not consider security issues here. All the settings are operated by the root account.
Another method is to edit the/etc/hosts. equiv file on each computer with the following content:
Hpc1.test.com
Hpc2.test.com
....
Next, we will start to install the parallel compiling environment PVM and MPI. We can use the convenient apt-get method of Debian to install the two software, however, I have chosen a more complex method to compile the source code. The reason is:
1) use the latest versions of the two software
2) master more common methods for building the PVM environment.
3) use resources such as sample programs and help files in the source code.
4. Build a PVM environment under Debian:
The entire process is:
1) edit the/root/. bashrc file on each machine and add two lines to the file:
PVM_ROOT =/root/pvm3
Export PVM_ROOT
This is because the environment variable PVM_ROOT is very important and must be set correctly. Here I have installed pvm under/root/pvm3.
2) download the latest source code and decompress it:
# Cd
# Wget http://www.netlib.org/pvm3/pvm3.4.5.tgz
# Tar zxvf pvm3.4.5.tgz
3) Compile the PVM system:
# Cd pvm3
# PVM_ROOT =/root/pvm3
# Export PVM_ROOT
# Make
4) Important!
On each computer:
# Rm-rf/tmp /*
In general, the Help file does not emphasize the importance of this step, but many of my early failures were due to omitting this step.
5) Start PVM
# Cd
# Enter the pvm console after pvm3/lib/PVM.
Pvm> add hpc2.test.com
Pvm> add hpc3.test.com
.....
You can view:
Pvm> conf
Or run examples.
All right, the PVM environment has been built.
5. Build the MPI Environment under Debian:
It should be noted that MPI is just a standard, not a software name-this is different from PVM. There are several software implementing the MPI standard, the most famous of which are MPICH and LAM, this article selects the former. The entire process is:
1) download the latest source code and decompress it:
# Cd
# Wget http://www-unix.mcs.anl.gov/mpi/mpic...s/mpich.tar.gz
# Tar zxvf mpich. tgz
# Ln-s mpich-1.2.7p1 mpich build a symbolic connection simpler
2) Compile the MPI system:
# Cd mpich
#./Configure
All use the default parameters. If you want to modify the system architecture, log on via ssh, and install it to a different directory, set it here, for example:
./Configure-rsh = ssh
You can use ssh to replace rsh.
# Make
3) Compile a test program:
# Cd/root/mpich
# Cd examples
# Cd basic
# Make cpi
4) copy the mpich directory to the same location on each other computer.
5) Start MPI
# Cd/root/mpich/examples/basic
# ../Bin/mpirun-np 6 cpi
At this time, the results of the program show that all processes are running on the local machine. To start other machines to run the process, you must tell the system that mpi can also use those computers, modify/root/mpich/util/machines. LINUX file with the following content:
Hpc1.test.com
Hpc2.test.com
.....
Repeat the above test process to find that the process appears on different machines.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.