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 revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
write_and_run_your_programs [2018/05/14 18:46] yutakawrite_and_run_your_programs [2018/05/14 19:05] yutaka
Line 1: Line 1:
 ====== Write and run your programs ====== ====== Write and run your programs ======
 +
 +By Yutaka Masuda
  
 In the course, we will use a remote server to write and run (execute) your program. In the course, we will use a remote server to write and run (execute) your program.
Line 145: 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 176: 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 189: 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: 2024/03/25 18:22 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki