刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt

上传人:本田雅阁 文档编号:2595781 上传时间:2019-04-15 格式:PPT 页数:18 大小:928.01KB
返回 下载 相关 举报
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第1页
第1页 / 共18页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第2页
第2页 / 共18页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第3页
第3页 / 共18页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第4页
第4页 / 共18页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第5页
第5页 / 共18页
点击查看更多>>
资源描述

《刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt》由会员分享,可在线阅读,更多相关《刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt(18页珍藏版)》请在三一文库上搜索。

1、,劉庠宏、林合治編著 國立高雄大學應用數學系 2005年3月1日,如何利用本系Linux 主機群編譯與執行程式,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),2,What are the “Number Machines (NMs)”?,zero.math.nuk.edu.tw nine.math.nuk.edu.tw,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),3,How to log in the NMs?,Host Name: zero.math.nuk.edu.twnine.math.nuk.edu.tw User Name: Same a

2、s 高大應數學習資源網 user name Default password: redhat,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),4,How to log in the NMs? (cont.),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),5,How to log in the NMs? (cont.),New File transfer windows,terminal windows,New terminal/file transfer windows,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),6,The S

3、ecure Shell Client (SSH) terminal windows view,Editing windows,Status bar,Menu,Mouse-enabled scroll bar,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),7,The file transfer windows view,files on number machine,Status bar,Files on your computer,Menu,Mouse-enabled scroll bar,Message of transfer,利用本系Linux主機編譯程式,高大應數課

4、程講義 (2005/3),8,How to upload/download files to/from the NMs?,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),9,Basic Linux commands,顯示目前的目錄: pwd 顯示檔案內容,如超過一頁則暫停 : more (檔案名稱) Ex: more hello.c 更改密碼:yppasswd(passwd) 變換目錄:cd Ex: cd math (到math這個目錄),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),10,Basic Linux commands (cont.),到根

5、目錄: cd / 建立一個新目錄: mkdir Ex: mkdir math (建立math這個目錄) 刪除一個空目錄:rmdir Ex: rmdir math (刪除math這個目錄),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),11,Basic Linux commands (cont.),列出資料夾檔案: ls 複製檔案: cp (來源檔) (目的地) Ex: cp hello.c math (複製hello.c到math資料夾) 刪除檔案:rm (檔名) Ex: rm hello.c (刪除hello.c),利用本系Linux主機編譯程式,高大應數課程講義 (2

6、005/3),12,Basic Linux commands (cont.),查詢指令用法: man (指令名稱) 按q離開 到上一層目錄: cd ,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),13,How to edit codes by Emacs?,啟動 emacs: emacs 結束 emacs: Ctrl-x Ctrl-c 取消執行: Ctrl-g 開啟新檔案: Ctrl-x Ctrl-f 輸入檔名 例如: Ctrl-x Ctrl-f hello.c 刪除游標目前指的/後面的字: Ctrl-d 存檔: Ctrl-s,利用本系Linux主機編譯程式,高大應數課程

7、講義 (2005/3),14,Source code,#include -我是標頭檔 int main() /- 主程式碼區塊 /- return 0; ,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),15,動手寫程式吧,程式目的:列印出 “hello!world!” 的字樣,#include int main() Return 0; ,Printf(“Hello! World!n”);,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),16,程式說明,Printf(“列印出字樣”); :列印出字樣 Printf(“n”); :換下一行,利用本系Linu

8、x主機編譯程式,高大應數課程講義 (2005/3),17,編譯程式與執行程式,C Language: b45_chadfive b45_chad$ gcc hello.c -o hello b45_chadfive b45_chad$ ./hello Hello! World! 執行結果 C+ Language: b45_chadfive b45_chad$ g+ hello.cpp o hello b45_chadfive b45_chad$ ./hello Hello! World! 執行結果,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),18,編譯程式與執行程式(計時),C Language: b45_chadfive b45_chad$ ./hello Hello! World! 計時:time ./(執行檔) Ex: time ./hello (計算非常粗略,不準確!) Hello! World! real 0m4.193s user 0m0.040s sys 0m0.040s,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1