3 | | * [http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-3.0-on-a-headless-ubuntu-9.04-server VBoxHeadless - Running Virtual Machines With VirtualBox 3.0 On A Headless Ubuntu 9.04 Server] - 在 Ubuntu 9.04 上裝 VirtualBox 3.0 並用指令方式產生/啟動虛擬機器 |
| 3 | * 排解 intel C++ compiler 雙字元字集編譯問題 |
| 4 | {{{ |
| 5 | Catastrophic error: could not set locale "" to allow processing of multibyte characters |
| 6 | compilation aborted for k.c (code 4) |
| 7 | }}} |
| 8 | {{{ |
| 9 | LANG=C icc -openmp icctest.c |
| 10 | }}} |
| 11 | {{{ |
| 12 | #!c |
| 13 | #include <stdio.h> |
| 14 | #include <omp.h> |
| 15 | int main(void) |
| 16 | { |
| 17 | int i,j; |
| 18 | int a[100]; |
| 19 | int b[100]; |
| 20 | int sum; |
| 21 | |
| 22 | for (i=0;i<100;i++) { |
| 23 | a[i] = i+32; |
| 24 | b[i] = 983-i; |
| 25 | } |
| 26 | |
| 27 | sum = 0; |
| 28 | #pragma omp for |
| 29 | for (i=0;i<100;i++) { |
| 30 | sum = sum + a[i] + b[i]; |
| 31 | |
| 32 | fprintf(stderr,"DEBUG: i = %d, by thread %d\n",i,omp_get_thread_num()); |
| 33 | fflush(stderr); |
| 34 | } |
| 35 | } |
| 36 | }}} |