... | ... |
@@ -12,28 +12,22 @@ published: true |
12 | 12 |
|
13 | 13 |
## What is FastX?{#fastx} |
14 | 14 |
|
15 |
-FastX is a X Window System that can connect to supercomputer systems using HTTPS (443/TCP). |
|
16 |
-Communication traffic is suppressed by data compression technology and you can use the system comfortably such as GUI-based application operations even in remote areas. |
|
17 |
- |
|
18 |
-A web browser such as Google Chrome or Firefox is required to use remote access service of FastX. |
|
19 |
-It is not necessary to install dedicated client software or plug-in for the web browser. |
|
15 |
+FastX is a X Window System that can connect to supercomputer systems using HTTPS (443/TCP). Communication traffic is suppressed by data compression technology and you can use the system comfortably such as GUI-based application operations even in remote areas. |
|
20 | 16 |
|
17 |
+A web browser such as Google Chrome or Firefox is required to use remote access service of FastX. It is not necessary to install dedicated client software or plug-in for the web browser. |
|
21 | 18 |
<!-- |
22 | 19 |
専用のクライアントソフト(Windows版)からの利用のほか、ブラウザから利用することも可能です。この場合はクライアントソフトのインストール不要でご利用できます。 |
23 | 20 |
--> |
24 | 21 |
|
25 | 22 |
## Prerequisites{#before} |
26 | 23 |
|
27 |
-* Generate a key pair by the procedure of [Generating Key Pair and Registering Public Key](/login/pubkey), and then register a public key from [User Portal](https://web.kudpc.kyoto-u.ac.jp/portal/). Also, **the private key must be saved in OpenSSH format (PEM format prior to 7.7).** |
|
28 |
-* Compatible browsers:Edge, Firefox, Chrome |
|
24 |
+* Generate a key pair by the procedure of [Generating Key Pair and Registering Public Key](/login/pubkey), and then register a public key from [User Portal](https://web.kudpc.kyoto-u.ac.jp/portal/) . Also, **the private key must be saved in OpenSSH format (PEM format prior to 7.7).** |
|
25 |
+* Compatible browsers:Edge, Firefox, Chrome |
|
29 | 26 |
* Bidirectional copy-pasting is only supported by Chrome. With other browsers, you can only copy and paste from the server side to the client side. |
30 | 27 |
|
31 |
- |
|
32 | 28 |
### Format of the Private Key{#format} |
33 | 29 |
|
34 |
-FastX is not available in ECDSA and ED25519 format keys, so please use RSA format keys. |
|
35 |
-The private key in OpenSSH 7.8 or later formats cannot be loaded. |
|
36 |
-In OpenSSH 7.8 or later formats, the private key has the following contents. |
|
30 |
+FastX is not available in ECDSA and ED25519 format keys, so please use RSA format keys. The private key in OpenSSH 7.8 or later formats cannot be loaded. In OpenSSH 7.8 or later formats, the private key has the following contents. |
|
37 | 31 |
|
38 | 32 |
```nohighlight |
39 | 33 |
-----BEGIN OPENSSH PRIVATE KEY----- |
... | ... |
@@ -64,7 +58,7 @@ DEK-Info: AES-128-CBC,7A30F993641D4093A373703A3F644D2D |
64 | 58 |
|
65 | 59 |
## How to Log in{#procedure} |
66 | 60 |
<!-- |
67 |
-### ブラウザの場合{#procedure_browser} |
|
61 |
+### For Browser{#procedure_browser} |
|
68 | 62 |
--> |
69 | 63 |
1. Start your browser and go to one of the following addresses. |
70 | 64 |
|
... | ... |
@@ -72,8 +66,8 @@ DEK-Info: AES-128-CBC,7A30F993641D4093A373703A3F644D2D |
72 | 66 |
---------- | ------------ |
73 | 67 |
System A | [https://camphor31.kudpc.kyoto-u.ac.jp/](https://camphor31.kudpc.kyoto-u.ac.jp/) |
74 | 68 |
System B/C | [https://laurel31.kudpc.kyoto-u.ac.jp/](https://laurel31.kudpc.kyoto-u.ac.jp/) |
75 |
- System G | [https://gardenia11.kudpc.kyoto-u.ac.jp/](https://gardenia11.kudpc.kyoto-u.ac.jp/) |
|
76 |
- Application Server | [https://app.kudpc.kyoto-u.ac.jp/](https://app.kudpc.kyoto-u.ac.jp/) |
|
69 |
+ System G | [https://gardenia31.kudpc.kyoto-u.ac.jp/](https://gardenia11.kudpc.kyoto-u.ac.jp/) |
|
70 |
+ Application Server | [https://app.kudpc.kyoto-u.ac.jp/](https://app.kudpc.kyoto-u.ac.jp/) |
|
77 | 71 |
<!-- |
78 | 72 |
camphor31 | [https://camphor31.kudpc.kyoto-u.ac.jp/](https://camphor31.kudpc.kyoto-u.ac.jp/) |
79 | 73 |
camphor32 | [https://camphor32.kudpc.kyoto-u.ac.jp/](https://camphor32.kudpc.kyoto-u.ac.jp/) |
... | ... |
@@ -88,34 +82,38 @@ DEK-Info: AES-128-CBC,7A30F993641D4093A373703A3F644D2D |
88 | 82 |
なお、https://laurel.kudpc.kyoto-u.ac.jp/ や https://camphor.kudpc.kyoto-u.ac.jp/ 、https://gardenia.kudpc.kyoto-u.ac.jp/ (DNSラウンドロビンアドレス)にアクセスしても接続できますが、ブラウザのDNSキャッシュの更新タイミングで接続が切れる可能性があります。 |
89 | 83 |
--> |
90 | 84 |
|
91 |
-2. **(First time only)** Click "Manage Private Keys". A small window prompting you to upload the private key opens. Click "+" and select the private key of the **OpenSSH format**. |
|
85 |
+2. **(First time only)** Click "Manage Private Keys". A small window prompting you to upload the private key opens. Click "+" and select the private key of the OpenSSH format. |
|
92 | 86 |
![](01_pubkey_management.png?lightbox=100%&resize=600) |
93 | 87 |
![](02_add_pubkey.png?lightbox=100%&resize=600) |
94 | 88 |
|
95 |
-3. **(First time only)** Check that the name of the uploaded private key is displayed in the blue frame and click 'Done'. |
|
89 |
+3. **(First time only)**Check that the name of the uploaded private key is displayed in the blue frame and click 'Done'. |
|
96 | 90 |
![](03_select_pubkey.png?lightbox=100%&resize=600) |
97 | 91 |
|
98 | 92 |
4. Enter the user ID in the blue frame and click 'SSH Login'. |
99 | 93 |
![](04_login.png?lightbox=100%&resize=600) |
100 | 94 |
|
101 |
-5. Enter the passphrase in the blue frame and click 'Submit'. |
|
95 |
+5. Enter the passphrase in the blue frame and click 'Submit'. |
|
102 | 96 |
![](05_login_input_password.png?lightbox=100%&resize=600) |
103 | 97 |
|
104 |
-6. To launch a new desktop screen or terminal, click on '+'. |
|
105 |
- ![](06_new_session.png?lightbox=100%&resize=600) |
|
98 |
+6. Select the application to start.<br> |
|
99 |
+6-1. To use the terminal, double-click "GNOME Terminal" in the green frame.<br> |
|
100 |
+6-2. To use the desktop screen, double-click "GNOME" in the blue frame. |
|
101 |
+![](06_new_session_2.png?lightbox=100%&resize=600) |
|
106 | 102 |
|
107 |
-7. To use the desktop screen, double-click 'GNOME' in the blue frame; to use the terminal, double-click 'GNOME terminal' in the green frame. |
|
108 |
- ![](07_choose_app.png?lightbox=100%&resize=600) |
|
103 |
+7. Click Browser Client. |
|
104 |
+ ![](07_client_select.png?lightbox=100%&resize=600) |
|
109 | 105 |
|
110 |
-8. If a new tab opens and the desktop screen or terminal is displayed, the login will be successful. |
|
111 |
-Please note that the password used to lock the GNOME Desktop screen is the password of the user portal (not the passphrase for the private key). |
|
112 |
- ![](08_gnome_desktop.png?lightbox=100%&resize=600) |
|
106 |
+8. If the screen appears, you have successfully logged in.<br> |
|
107 |
+If you selected 6-1. terminal "GNOME Terminal" in step 6. |
|
113 | 108 |
![](09_gnome_terminal.png?lightbox=100%&resize=600) |
109 |
+If you selected 6-2. desktop screen "GNOME" in step 6.<br> |
|
110 |
+**Please note that the password used to lock the GNOME Desktop screen is the password of the user portal (not the passphrase for the private key). ** |
|
111 |
+ ![](08_gnome_desktop.png?lightbox=100%&resize=600) |
|
114 | 112 |
|
115 |
-9. By default, the keyboard layout is set to 'Japanese'. To set it to another language, pull down the tabs on the screen and click on the keyboard symbol. |
|
113 |
+9. By default, the keyboard layout is set to 'Japanese'. To set it to another language, pull down the tabs on the screen and click on the keyboard symbol. |
|
116 | 114 |
![](10_select_keyboard.png?lightbox=100%&resize=600) |
117 | 115 |
|
118 |
-10. Change Layout to the desired language. |
|
116 |
+10. Change Layout to the desired language. |
|
119 | 117 |
![](11_change_keyboard.png?lightbox=100%&resize=600) |
120 | 118 |
|
121 | 119 |
<!-- |
... | ... |
@@ -163,8 +161,7 @@ GNOME Desktopからのログアウトは、画面右上の電源マークを押 |
163 | 161 |
|
164 | 162 |
## References{#fyi} |
165 | 163 |
### Client Software{#client} |
166 |
-Client software is distributed on [the developer's official website](https://www.starnet.com/download/fastx-client). |
|
164 |
+Client software is distributed on [the developer's official website](https://www.starnet.com/download/fastx-client). |
|
167 | 165 |
Please use it if necessary. |
168 | 166 |
|
169 |
-The communication protocol used by the user should be **SSH**. |
|
170 |
-Also, password authentication is not available, so an SSH agent (such as [Pageant](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) that is included in Putty for Windows or ssh-agent for macOS and Linux) is required. |
|
167 |
+The communication protocol used by the user should be SSH. Also, password authentication is not available, so an SSH agent (such as [Pageant](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) that is included in Putty for Windows or ssh-agent for macOS and Linux) is required. |
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
--- |
2 | 2 |
title: FastXでのログイン |
3 |
-media_order: 'fastx_login_200.png,fastx_login_1022.png,fastx_login_101.png,fastx_login_102.png,fastx_login_103.png,fastx_login_104.png,fastx_login_105.png,fastx_login_106.png,fastx_login_107.png,fastx_login_108.png,fastx_login_109.png,fastx_login_110.png,fastx_login_201.png,fastx_login_202.png,fastx_login_203.png,fastx_login_204.png,fastx_login_205.png,fastx_login_301.png,fastx_login_206.png,fastx_login_207.png,fastx_login_208.png,fastx_login_209.png,fastx_login_210.png' |
|
3 |
+media_order: '03_select_pubkey.png,04_login.png,05_login_input_password.png,06_new_session.png,07_choose_app.png,08_gnome_desktop.png,08_logout.png,09_gnome_terminal.png,10_select_keyboard.png,11_change_keyboard.png,01_pubkey_management.png,02_add_pubkey.png,06_new_session_2.png,07_client_select.png' |
|
4 | 4 |
taxonomy: |
5 | 5 |
category: |
6 | 6 |
- docs |
... | ... |
@@ -74,7 +74,7 @@ DEK-Info: AES-128-CBC,7A30F993641D4093A373703A3F644D2D |
74 | 74 |
---------- | ------------ |
75 | 75 |
システムA | [https://camphor31.kudpc.kyoto-u.ac.jp/](https://camphor31.kudpc.kyoto-u.ac.jp/) |
76 | 76 |
システムB/C | [https://laurel31.kudpc.kyoto-u.ac.jp/](https://laurel31.kudpc.kyoto-u.ac.jp/) |
77 |
- システムG | [https://gardenia11.kudpc.kyoto-u.ac.jp/](https://gardenia11.kudpc.kyoto-u.ac.jp/) |
|
77 |
+ システムG | [https://gardenia31.kudpc.kyoto-u.ac.jp/](https://gardenia11.kudpc.kyoto-u.ac.jp/) |
|
78 | 78 |
アプリケーションサーバ | [https://app.kudpc.kyoto-u.ac.jp/](https://app.kudpc.kyoto-u.ac.jp/) |
79 | 79 |
<!-- |
80 | 80 |
camphor31 | [https://camphor31.kudpc.kyoto-u.ac.jp/](https://camphor31.kudpc.kyoto-u.ac.jp/) |
... | ... |
@@ -103,16 +103,20 @@ DEK-Info: AES-128-CBC,7A30F993641D4093A373703A3F644D2D |
103 | 103 |
5. 青色の枠の部分にパスフレーズを入力して「Submit」をクリックします。 |
104 | 104 |
![](05_login_input_password.png?lightbox=100%&resize=600) |
105 | 105 |
|
106 |
-6. 新しくデスクトップ画面やターミナルを立ち上げる場合は「+」をクリックします。 |
|
107 |
- ![](06_new_session.png?lightbox=100%&resize=600) |
|
106 |
+6. 起動するアプリケーションを選択します。<br> |
|
107 |
+6-1. ターミナルを使う場合は、緑色の枠に囲まれた「GNOME Terminal」をダブルクリックします。<br> |
|
108 |
+6-2. デスクトップ画面を使う場合は、青色の枠に囲まれた「GNOME」をダブルクリックします。 |
|
109 |
+![](06_new_session_2.png?lightbox=100%&resize=600) |
|
108 | 110 |
|
109 |
-7. デスクトップ画面を使う場合は、青色の枠に囲まれた「GNOME」をダブルクリック、ターミナルを使う場合は、緑色の枠に囲まれた「GNOME terminal」をダブルクリックします。 |
|
110 |
- ![](07_choose_app.png?lightbox=100%&resize=600) |
|
111 |
+7. Browser Clientをクリックします。 |
|
112 |
+ ![](07_client_select.png?lightbox=100%&resize=600) |
|
111 | 113 |
|
112 |
-8. 新しいタブが開き、デスクトップ画面またはターミナルが表示されればログイン成功です。 |
|
113 |
-なお、GNOME Desktop のスクリーンロック時のパスワードは、利用者ポータルのパスワードです(秘密鍵のパスフレーズではありません) |
|
114 |
- ![](08_gnome_desktop.png?lightbox=100%&resize=600) |
|
114 |
+8. 画面が表示されればログイン成功です。<br> |
|
115 |
+手順6 で 6-1. ターミナル「GNOME Terminal」を選択した場合 |
|
115 | 116 |
![](09_gnome_terminal.png?lightbox=100%&resize=600) |
117 |
+手順6 で 6-2. デスクトップ画面「GNOME」を選択した場合<br> |
|
118 |
+**GNOME のスクリーンロック時のパスワードは、利用者ポータルのパスワードです(秘密鍵のパスフレーズではありません)** |
|
119 |
+ ![](08_gnome_desktop.png?lightbox=100%&resize=600) |
|
116 | 120 |
|
117 | 121 |
9. デフォルトではキーボードレイアウトは「Japanese」に設定しております。他言語に設定する場合は、画面上のタブを引き出し、キーボードマークをクリックします。 |
118 | 122 |
![](10_select_keyboard.png?lightbox=100%&resize=600) |
119 | 123 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,131 @@ |
1 |
+--- |
|
2 |
+title: 'GNU Compiler' |
|
3 |
+taxonomy: |
|
4 |
+ category: |
|
5 |
+ - docs |
|
6 |
+external_links: |
|
7 |
+ process: true |
|
8 |
+ no_follow: true |
|
9 |
+ target: _blank |
|
10 |
+ mode: active |
|
11 |
+--- |
|
12 |
+ |
|
13 |
+[toc] |
|
14 |
+ |
|
15 |
+## Environment Settings{#enviroment} |
|
16 |
+ |
|
17 |
+### Software Version and System Requirements{#version} |
|
18 |
+ |
|
19 |
+Version | Module File Name | System A | System B/C | System G | Cloud System | Note |
|
20 |
+--- | --- | --- | --- | --- | --- | --- |
|
21 |
+12.2.0 | gcc/12.2.0 | + | + | + | + | Installed in November 2022 |
|
22 |
+8.5.0 | - | + | + | + | + | OS Standard |
|
23 |
+ |
|
24 |
+\+ : Available for all users |
|
25 |
+ |
|
26 |
+\- : Not available |
|
27 |
+ |
|
28 |
+When you log into the system, either the Intel compiler or the NVIDIA HPC SDK compiler is available by default. Please execute the module command as shown below to switch compilers. |
|
29 |
+ |
|
30 |
+```nohighlight |
|
31 |
+(System B, C, Cloud) |
|
32 |
+$ module switch PrgEnvIntel PrgEnvGCC |
|
33 |
+(System G) |
|
34 |
+$ module switch PrgEnvNvidia PrgEnvGCC |
|
35 |
+``` |
|
36 |
+ |
|
37 |
+You can use version 8.5.0 when you log into the system. If you want to use version 12.2.0, please execute the module command as follows with PrgEnvGCC loaded. |
|
38 |
+```nohighlight |
|
39 |
+$ module load gcc/12.2.0 |
|
40 |
+``` |
|
41 |
+ |
|
42 |
+<!-- |
|
43 |
+GNUコンパイラのバージョンを切り替えたい場合は、PrgEnvGCC がロードされている状態で、以下のようにmoduleコマンドを実行してください。 |
|
44 |
+ |
|
45 |
+```nohighlight |
|
46 |
+$ module switch gcc/4.8.2 gcc/4.6.2 |
|
47 |
+``` |
|
48 |
+ |
|
49 |
+ログイン時に自動で環境設定を行いたい場合は、ログインシェルの起動ファイルに必要なmoduleコマンドを記述してください。詳細は [環境設定](/config) をご覧ください。 |
|
50 |
+moduleコマンドの詳細は [Modules](/config/modules) をご覧ください。 |
|
51 |
+--> |
|
52 |
+ |
|
53 |
+## How to Compile{#usage} |
|
54 |
+ |
|
55 |
+### Compile Commands{#command} |
|
56 |
+ |
|
57 |
+Language | Command | Operands |
|
58 |
+--------- | --------- | ---------------------------- |
|
59 |
+Fortran | gfortran | gfortran Option File name |
|
60 |
+C | gcc | gcc Option File name |
|
61 |
+C++ | g++ | g++ Option File name |
|
62 |
+ |
|
63 |
+### Compile Options{#option} |
|
64 |
+ |
|
65 |
+* **Main options(e.g., parallelization, optimization)** |
|
66 |
+ |
|
67 |
+Option | Purpose |
|
68 |
+--------------------------------------- | -------------------------------- |
|
69 |
+-o _FILENAME_ | Specifies the name of the object file. |
|
70 |
+-mcmodel=medium | Supports more than 2 Gbytes of memory. |
|
71 |
+-fopenmp | Compile with OpenMP directives enabled. |
|
72 |
+-O0/-O1/-O2/-O3 | Specifies the level of optimization (default is -O0). |
|
73 |
+ |
|
74 |
+* **Message output and debugging options** |
|
75 |
+ |
|
76 |
+Option | Purpose |
|
77 |
+------- | ------------------ |
|
78 |
+-Wall | Displays all warning messages. |
|
79 |
+ |
|
80 |
+* **Fortran language options** |
|
81 |
+ |
|
82 |
+Option | Purpose |
|
83 |
+--------------- | ---------------------------- |
|
84 |
+-ffixed-form | Indicates that the program is written in a fixed format. |
|
85 |
+-ffree-form | Indicates that the program is written in a free format. |
|
86 |
+-pedantic | Warns against the use of Fortran extensions. |
|
87 |
+-fimplicit-none | Warns against implicit type declarations. |
|
88 |
+ |
|
89 |
+## Examples of Compiling{#sample} |
|
90 |
+ |
|
91 |
+### Sequential Program{#serial} |
|
92 |
+ |
|
93 |
+```nohighlight |
|
94 |
+$ gfortran test.f90 # For Fortran |
|
95 |
+$ gcc test.c # For C |
|
96 |
+$ g++ test.cpp # For C++ |
|
97 |
+$ tssrun ./a.out # Execution |
|
98 |
+``` |
|
99 |
+ |
|
100 |
+### Use of OpenMP{#openmp} |
|
101 |
+ |
|
102 |
+OpenMP is an open standard for parallelizing programs. |
|
103 |
+You can have the compiler perform parallelization automatically only by writing instructions starting with #pragma omp in the source code and compile with the given options. |
|
104 |
+ |
|
105 |
+To compile the source code with written instructions to OpenMP, use the -fopenmp option. |
|
106 |
+ |
|
107 |
+```nohighlight |
|
108 |
+$ gcc -fopenmp test.c |
|
109 |
+``` |
|
110 |
+ |
|
111 |
+When executing a compiled program, if you specify the number of parallels for t and c with the -A option, the program will be executed with the number of parallels. |
|
112 |
+ |
|
113 |
+```nohighlight |
|
114 |
+$ tssrun --rsc p=1:t=8:c=8 ./a.out # Execute with the number of parallels specified as 8 |
|
115 |
+``` |
|
116 |
+ |
|
117 |
+## Available Libraries{#library} |
|
118 |
+ |
|
119 |
+### MPI Library{#mpi_library} |
|
120 |
+ |
|
121 |
+IntelMPI library and OpenMPI library are available. |
|
122 |
+Please refer to [IntelMPI library](/compilers/intelmpi) and [OpenMPI library](/compilers/openmpi) on how to compile, link and execute MPI programs. |
|
123 |
+ |
|
124 |
+## Manuals{#manual} |
|
125 |
+ |
|
126 |
+* [GCC online documentation](http://gcc.gnu.org/onlinedocs/) |
|
127 |
+ |
|
128 |
+ |
|
129 |
+## Links{#link} |
|
130 |
+ |
|
131 |
+* [GCC, the GNU Compiler Collection](http://gcc.gnu.org/) |
0 | 132 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,130 @@ |
1 |
+--- |
|
2 |
+title: GNUコンパイラ |
|
3 |
+taxonomy: |
|
4 |
+ category: |
|
5 |
+ - docs |
|
6 |
+external_links: |
|
7 |
+ process: true |
|
8 |
+ no_follow: true |
|
9 |
+ target: _blank |
|
10 |
+ mode: active |
|
11 |
+published: true |
|
12 |
+--- |
|
13 |
+ |
|
14 |
+[toc] |
|
15 |
+ |
|
16 |
+## 利用環境{#enviroment} |
|
17 |
+ |
|
18 |
+### 利用できるバージョン・システム{#version} |
|
19 |
+ |
|
20 |
+バージョン | モジュールファイル名 | システムA | システムB/C | システムG | クラウドシステム | 備考 |
|
21 |
+--- | --- | --- | --- | --- | ---| --- |
|
22 |
+12.2.0 | gcc/12.2.0 | + | + | + | + | 2022年11月導入 |
|
23 |
+8.5.0 | - | + | + | + | + | OS標準 |
|
24 |
+ |
|
25 |
+\+ : すべてのユーザが利用可能 |
|
26 |
+\- : 利用不可 |
|
27 |
+ |
|
28 |
+システムにログインした時点では、IntelコンパイラもしくはNVIDIA HPC SDKコンパイラがデフォルトで利用できるようになっています。以下のようにmoduleコマンドを実行し、コンパイラを切り替えてください。 |
|
29 |
+ |
|
30 |
+```nohighlight |
|
31 |
+(システムA、B、C、クラウド) |
|
32 |
+$ module switch PrgEnvIntel PrgEnvGCC |
|
33 |
+(システムG) |
|
34 |
+$ module switch PrgEnvNvidia PrgEnvGCC |
|
35 |
+``` |
|
36 |
+ |
|
37 |
+システムにログインした時点で、バージョン8.5.0が使えます。バージョン12.2.0を使いたい場合は、PrgEnvGCC がロードされている状態で、以下のようにmoduleコマンドを実行してください。 |
|
38 |
+```nohighlight |
|
39 |
+$ module load gcc/12.2.0 |
|
40 |
+``` |
|
41 |
+ |
|
42 |
+<!-- |
|
43 |
+GNUコンパイラのバージョンを切り替えたい場合は、PrgEnvGCC がロードされている状態で、以下のようにmoduleコマンドを実行してください。 |
|
44 |
+ |
|
45 |
+```nohighlight |
|
46 |
+$ module switch gcc/4.8.2 gcc/4.6.2 |
|
47 |
+``` |
|
48 |
+ |
|
49 |
+ログイン時に自動で環境設定を行いたい場合は、ログインシェルの起動ファイルに必要なmoduleコマンドを記述してください。詳細は [環境設定](/config) をご覧ください。 |
|
50 |
+moduleコマンドの詳細は [Modules](/config/modules) をご覧ください。 |
|
51 |
+--> |
|
52 |
+ |
|
53 |
+## コンパイル方法{#usage} |
|
54 |
+ |
|
55 |
+### コマンド{#command} |
|
56 |
+ |
|
57 |
+言語 | コマンド | 実行形式 |
|
58 |
+--------- | --------- | ---------------------------- |
|
59 |
+Fortran | gfortran | gfortran オプション ファイル名 |
|
60 |
+C | gcc | gcc オプション ファイル名 |
|
61 |
+C++ | g++ | g++ オプション ファイル名 |
|
62 |
+ |
|
63 |
+### オプション{#option} |
|
64 |
+ |
|
65 |
+* **主要オプション(並列化、最適化など)** |
|
66 |
+ |
|
67 |
+オプション名 | 説明 |
|
68 |
+--------------------------------------- | -------------------------------- |
|
69 |
+-o _FILENAME_ | オブジェクトファイルの名前を指定します。 |
|
70 |
+-mcmodel=medium | 2Gbyteを超えるメモリをサポートします。 |
|
71 |
+-fopenmp | OpenMP指示子を有効にしてコンパイルします。 |
|
72 |
+-O0/-O1/-O2/-O3 | 最適化のレベルを指定します(デフォルトは-O0)。 |
|
73 |
+ |
|
74 |
+* **メッセージ出力とデバッグのオプション** |
|
75 |
+ |
|
76 |
+オプション名 | 説明 |
|
77 |
+------- | ------------------ |
|
78 |
+-Wall | すべての警告メッセージを表示します。 |
|
79 |
+ |
|
80 |
+* **Fortran言語固有オプション** |
|
81 |
+ |
|
82 |
+オプション名 | 説明 |
|
83 |
+--------------- | ---------------------------- |
|
84 |
+-ffixed-form | プログラムが固定形式で記述されていることを指示します。 |
|
85 |
+-ffree-form | プログラムが自由形式で記述されていることを指示します。 |
|
86 |
+-pedantic | Fortran拡張の利用を警告します。 |
|
87 |
+-fimplicit-none | 暗黙の型宣言を警告します。 |
|
88 |
+ |
|
89 |
+## コンパイル例{#sample} |
|
90 |
+ |
|
91 |
+### 逐次プログラム{#serial} |
|
92 |
+ |
|
93 |
+```nohighlight |
|
94 |
+$ gfortran test.f90 # Fortranの例 |
|
95 |
+$ gcc test.c # C言語の例 |
|
96 |
+$ g++ test.cpp # C++の例 |
|
97 |
+$ tssrun ./a.out # 実行 |
|
98 |
+``` |
|
99 |
+ |
|
100 |
+### OpenMPの利用{#openmp} |
|
101 |
+ |
|
102 |
+OpenMPは、プログラムの並列化のためのオープン規格です。 |
|
103 |
+ソースコードに#pragma ompで始まる指示を書き込み、所定のオプションをつけてコンパイルするだけで、コンパイラに自動で並列化を行わせることができます。 |
|
104 |
+ |
|
105 |
+OpenMPへの指示を書き込んだソースコードをコンパイルするには、-fopenmpオプションをつけます。 |
|
106 |
+ |
|
107 |
+```nohighlight |
|
108 |
+$ gcc -fopenmp test.c |
|
109 |
+``` |
|
110 |
+ |
|
111 |
+コンパイルしたプログラムを実行する時、-Aオプションでtとcに並列数を指定すると、その並列数でプログラムが実行されます。 |
|
112 |
+ |
|
113 |
+```nohighlight |
|
114 |
+$ tssrun --rsc p=1:t=8:c=8 ./a.out # 並列数8を指定して実行 |
|
115 |
+``` |
|
116 |
+ |
|
117 |
+## 利用可能なライブラリ{#library} |
|
118 |
+ |
|
119 |
+### MPIライブラリ{#mpi_library} |
|
120 |
+ |
|
121 |
+IntelMPIライブラリ、OpenMPIライブラリが利用できます。MPIプログラムのコンパイル、リンク、実行方法については、[IntelMPIライブラリ](/compilers/intelmpi)、 [OpenMPIライブラリ](/compilers/openmpi) をご覧ください。 |
|
122 |
+ |
|
123 |
+## マニュアル{#manual} |
|
124 |
+ |
|
125 |
+* [GCC online documentation](http://gcc.gnu.org/onlinedocs/) |
|
126 |
+ |
|
127 |
+ |
|
128 |
+## リンク{#link} |
|
129 |
+ |
|
130 |
+* [GCC, the GNU Compiler Collection](http://gcc.gnu.org/) |