# 多處理機平行程式設計 作業3評分 ###### tags: `成大多處理機平行程式設計` [ToC] ## HW3 [test](https://classroom.github.com/a/KQJulhXs) 作業一共四個項目 每個項目25分 ### 兩台虛擬機正常開機,能登入系統 1. 打開兩台虛擬機,輸入hostname -s 2. 應分別顯示為node1, node2 ### 於 node1 建立檔案,應於 node2 可見 1. 在node1輸入touch test.txt 2. 在node2檢查是否存在 test.txt檔案與時間 ### 於 node1 建立新使用者,應要可以無密碼登入 node2 1. 在node1輸入以下指令創建新使用者 useradd test -m -s /bin/bash passwd test /usr/lib/yp/ypinit -m su test 2. 設定ssh免密碼 ssh-keygen cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 3. 測試能否免密碼登入node2 ssh node2 ### 正常編譯 mpi 程式,且於兩 node 間正常執行 1. 設定mpi mpd & mpdtrace ssh node2 mpd -n -h node1 -p number & exit 2. 下載cpi.c並平行化執行 mkdir test cd test wget https://laplace.physics.ubc.ca/VN/cpi-mpi-intel/cpi.c mpicc -c cpi.c mpicc -o cpi cpi.o -lm mpirun -np 2 ./cpi
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up