Open main menu

CDOT Wiki β

Changes

GPU621/Group 5

512 bytes added, 01:39, 10 April 2023
no edit summary
brew update
 
If you have not install homebrew in your enviroment please use the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
<ol >
Congratulations! You’ve successfully started your journey working in a parallel environment on Mac. While the fundamentals are here, it’s not the entire picture, you may run into problems that were not covered here. For example to change the optimization level, you can use these flags:
# -O0 (for no optimization)# -O1 (for slight optimization)# -O2 (for lots of optimization)
Google is your friend, but when you’re lost here are some great resources:
=== General G++ ===
[https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/ https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/]
g++ -o2 helloworld.cpp -o ./helloworld
 
=== OpenMP: ===
[https://gcc.gnu.org/projects/gomp/#usage https://gcc.gnu.org/projects/gomp/#usage]
g++ -fopenmp -O2 helloworld.cpp -O2 ./helloworld
=== TBB: ===
[https://oneapi-src.github.io/oneTBB/ https://oneapi-src.github.io/oneTBB/]
g++ -O2 -ltbb helloworld.cpp -o ./helloworld
=== MPI: ===
[https://www.open-mpi.org/doc/current/man1/mpic++.1.php https://www.open-mpi.org/doc/current/man1/mpic++.1.php] mpic++ helloworld.cpp -o ./helloworld
[https://www.open-mpi.org/doc/current/man1/mpirun.1.php https://www.open-mpi.org/doc/current/man1/mpirun.1.php]
mpirun -np number_of_processors ./helloworld argument1 argument 2
mpirun -np 4 ./helloworld
=== File Directory System: ===
[https://mac.r-project.org/openmp/ https://mac.r-project.org/openmp/]
 
[https://brew.sh/ https://brew.sh/]
24
edits