diff --git a/c5b77c78-9ee3-11e6-8068-20e37f5e8655.png b/c5b77c78-9ee3-11e6-8068-20e37f5e8655.png new file mode 100644 index 0000000..7cb4ede Binary files /dev/null and b/c5b77c78-9ee3-11e6-8068-20e37f5e8655.png differ diff --git a/mpi.adoc b/mpi.adoc new file mode 100644 index 0000000..8919217 --- /dev/null +++ b/mpi.adoc @@ -0,0 +1,155 @@ += mpi ! +Apostolos rootApostolos@swarmlab.io +// Metadata: +:description: Intro and Install +:keywords: mpi +:data-uri: +:toc: right +:toc-title: Πίνακας περιεχομένων +:toclevels: 4 +:source-highlighter: highlight +:icons: font +:sectnums: + +{empty} + + + +[[cheat-Docker]] +== Install mpi + +- Install docker + +http://docs.vlabs.uniwa.gr/Howtos/docker/install.adoc.html[^] + +- Clone repo + + +https://git.vlabs.uniwa.gr:3000/swarmlab/swarmlab-mpi + +See http://docs.vlabs.uniwa.gr/Howtos/git/use-git.adoc.html + + +[[cheat-swarmlab-mpi]] +== Usage (swarmlab-adoc) + + +- Open a console + +- Create a directory + + +``` +cd dir +swarmlab-mpi + +create create project (swarmlab-mpi create) +up start swarmlab-mpi (swarmlab-mpi up size=10) +scale resize swarmlab-mpi (swarmlab-mpi scale size=30) +reload rebuild image (swarmlab-mpi reload size=15) +login login swarmlab-mpi (swarmlab-mpi login) +exec execute command (swarmlab-mpi exec [SHELL COMMAND]) +down stop swarmlab-mpi (swarmlab-mpi down) +clean clean project (swarmlab-mpi clean) +list show instances (swarmlab-mpi swarmlab-mpi list) +help show help (swarmlab-mpi help) +``` + +[NOTE] +==== +Using the tab key to automatically complete unambiguous commands and paths in Bash +==== + + +[[cheat-swarmlab-create]] +== Create swarmlab project + +``` +mkdir myproject +cd myproject +swarmlab-mpi create +``` +.Relevant files: +[NOTE] +==== +Project +├── Dockerfile # Image specification +├── project # Sample program source code +│ └── mpi_hello_world.c +├── ssh # keys for accessing +│ ├── id_rsa # (could generate your own) +│ └── id_rsa.pub +├── docker-compose.yml # Container orchestration + +==== + +[[cheat-swarmlab-up]] +== Spin up the swarmlab cluster + +``` +cd myproject +swarmlab-mpi up size=5 +``` + +[[cheat-swarmlab-up1]] +== Login to the swarmlab cluster + +``` +cd myproject +swarmlab-mpi login +``` + +[[cheat-swarmlab-complile]] +== Compile and Run the sample program. + +``` +cd myproject +mpicc -o mpi_hello_world ./mpi_hello_world.c +mpirun ./mpi_hello_world +``` + +.New files +[NOTE] +==== +copy or create files into the project directory. Compile and Run! +==== + + + +[[cheat-swarmlab-scale]] +== Scale cluster in real-time + +As the cluster running, without having to close the session, open a different terminal and go back to the project directory. + +``` +cd myproject +swarmlab-mpi scale size=10 +``` + +[[cheat-swarmlab-down]] +== shutdown swarmlab-mpi cluster + + +``` +cd myproject +swarmlab-mpi down +``` + +:hardbreaks: + +{empty} + +{empty} + +{empty} + +:!hardbreaks: + +''' + +.Reminder +[NOTE] +==== +:hardbreaks: +Caminante, no hay camino, +se hace camino al andar. + +Wanderer, there is no path, +the path is made by walking. + +*Antonio Machado* Campos de Castilla +====