💻 Parallel Programing with OpenMP 💻
Some parallel programing implementations using OpenMP + Docker + Docker Compose
▶️ Getting Started
To use this repository you need to make a git clone:
git clone --depth 1 https://github.com/lpmatos/parallel-programing.git -b master
Pull requests are welcome. If you'd like to support the work and buy me a ☕, I greatly appreciate it!
OpenMP Functions
Para execução do Ambiente
Name | Description |
---|---|
omp_set_num_threads | Define o número de threadhs em regiões paralelas futuras a menos que seja substituído pela cláusula num_threads |
omp_get_num_threads | Retorna o número de threads dentro da região paralela |
omp_get_thread_num | Retorna o ID da thread em execução. |
omp_get_num_procs | Retorna o número de processadores disponível no momento em que a função é chamada. |
Para rotinas de tempo
Name | Description |
---|---|
omp_get_wtime | Retorna um valor em segundos do tempo decorrido de algum ponto |
omp_get_wtick | Retorna o número de segundos entre os clocks do processador |
🐋 Development with Docker
Steps to build a Docker Image.
Build
docker image build -t <IMAGE_NAME> -f <PATH_DOCKERFILE> <PATH_CONTEXT_DOCKERFILE>
docker image build -t <IMAGE_NAME> . (This context)
Run
Steps to run a Docker Container.
- Linux running:
docker container run -d -p <LOCAL_PORT:CONTAINER_PORT> <IMAGE_NAME> <COMMAND>
docker container run -it --rm --name <CONTAINER_NAME> -p <LOCAL_PORT:CONTAINER_PORT> <IMAGE_NAME> <COMMAND>
- Windows running:
winpty docker.exe container run -it --rm <IMAGE_NAME> <COMMAND>
For more information, access the Docker documentation or this.
🐋 Development with Docker Compose
Build and run a docker-compose.
docker-compose up --build
Down all services deployed by docker-compose.
docker-compose down
Down all services and delete all images.
docker-compose down --rmi all
Link Reference
- http://www.inf.ufsc.br/~bosco.sobral/ensino/ine5645/Exemplos-Diretivas-Clausulas.pdf
- https://docs.microsoft.com/en-us/cpp/parallel/openmp/reference/openmp-functions?view=vs-2019
➤ Author
👤 Hey!! If you like this project or if you find some bugs feel free to contact me in my channels:
- Linktree: https://linktr.ee/lpmatos
➤ Versioning
To check the change history, please access the CHANGELOG.md file.
➤ Project status
This repository is a study project, therefore, it will not always be maintained 👻.