User Tools

Site Tools


write_and_run_your_programs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
write_and_run_your_programs [2018/05/14 18:47]
yutaka
write_and_run_your_programs [2018/05/14 19:05] (current)
yutaka
Line 147: Line 147:
 Let's compile it. Let's compile it.
 //​Compilation//​ means the program you have written (source code) is converted to the machine code (executable program). //​Compilation//​ means the program you have written (source code) is converted to the machine code (executable program).
-We have a compiler, named ''​ifort''​ (Intel Fortran Compiler), on the server.+We have a compiler, named ''​gfortran''​ (GNU Fortran Compiler), on the server. 
 +We would use a different compiler so please ask the lecturer which compilers are available. 
 Call the compiler with your source file. Call the compiler with your source file.
  
-   ​$ ​ifort prog1.f90+   ​$ ​gfortran ​prog1.f90
  
 If there is no problem, you will not get any message from the compiler. If there is no problem, you will not get any message from the compiler.
Line 178: Line 180:
 The following example creates ''​prog1''​ instead of ''​a.out''​. The following example creates ''​prog1''​ instead of ''​a.out''​.
  
-   ​$ ​ifort prog1.f90 -o prog1+   ​$ ​gfortran ​prog1.f90 -o prog1
  
 You can execute it. You can execute it.
Line 191: Line 193:
 This is useful when you compile modules and subroutines in a separate file. This is useful when you compile modules and subroutines in a separate file.
  
-   ​$ ​ifort -c prog1.f90+   ​$ ​gfortran ​-c prog1.f90
  
  
  
write_and_run_your_programs.txt · Last modified: 2018/05/14 19:05 by yutaka