brain initiation

This commit is contained in:
2025-11-05 09:18:11 +01:00
commit 933aa8a985
191 changed files with 6203 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
:PROPERTIES:
:ID: e56e90b1-ae5b-4344-97eb-993e5a81263e
:END:
#+title: OpenMPI
#+filetags: :CLUSTER:
OpenMPI is a Message Passing Interface (MPI) library project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI). It is used by many TOP500 supercomputers including Roadrunner, which was the world's fastest supercomputer from June 2008 to November 2009, and K computer, the fastest supercomputer from June 2011 to June 2012.
Note: To use OpenMPI, [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]-keys are created just like for [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]].
* Configure the Host file
Here map the IP adresses to the host names so that it is not requiered to type the ip adresses again and again...
For that you need [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]])
#+begin_src bash
sudo nano /etc/hosts
#+end_src
* Example for map the IP adresses
#+begin_src bash
# Standard host addresses
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# This host address
127.0.1.1 <client1>
#MPI SETUP
<local IP adress of master> <master>
<local IP adress of client> <client1 but set annother name >
#+end_src
NOTE: Do this for all [[id:70899526-8b7d-4976-94fc-cc07c41e550a][clients]] and for the master. The master must known all clients but the clients only there self and the master.
* Setting up NFS
NFS is used to share object file among all the systems and sharable datas in this [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
[[id:c69a77dc-f87f-418c-9870-eedddc43be37][Mounting]] the sharable folder:
** NFS on Master
#+begin_src bash
yay nfs-utils
mkdir <name of sharable folder>
cat /etc/exports #/home/<user>/<name of sharbel folder>* (rw,sync,no_root_squash,no_subtree_check)
exportfs -a
sudo systemctl enable nfs-utils && sudo systemctl start nfs-utils && sudo systemctl restart nfs-utils
#+end_src
** NFS on Clients
#+begin_src bash
yay nfs-utils
mkdir <name of sharable folder>
sudo mount -t nfs <master>:/home/<user>/<name of sharable folder> ~/storage
df -h
sudo systemctl enable nfs-utils && sudo systemctl start nfs-utils && sudo systemctl restart nfs-utils
#+end_src
** Add the entry to the file system table on clients
#+begin_src bash
cat /etc/fstab
#MPI Cluster SetUP
<master>:/home/<smad>/<name of sharable folder> /home/<smad>/<name of sharable folder> nfs
#+end_src
** Write a program in C and compile the code
- the file have to be a <name of file>.c on the Master-Node
#+begin_src bash
cd <name of sharable folder>
pwd /home/<user>/<name of sharable folder>
mpicc <name of file>.c
#+end_src
** Run the C-Code on Master-Node
#+begin_src bash
mpirund -np 4 -hosts <master>,<client1>,<client2> ./a.out
#+end_src
NOTE: The file.c can be every file from [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]], [[id:2d45175d-7fcc-4a55-b81c-14da72247eef][FEA-Tool]] or other c compatible program.