MPI関連

OSXでのMPIライブラリの導入

brew install libomp
brew install openmpi
g++ -fopenmp -I /opt/homebrew/opt/openmpi/include  -L /opt/homebrew/opt/openmpi/lib -lmpi z.cpp
OMP_NUM_THREADS=3 mpirun -np 4 ./a.out