.modとは Fortranプログラムでmoduleが含まれるファイルをコンパイルする場合(モジュール名).modというファイルができる。 .modファイルはuse文を使うことで他のファイルからでも参照可能である。 moduleを使った例(mod.f90) module mod integer ,parameter :: ten=10 end module mod useを使った例(use.f90) program use use mod write (*,*) ten end program use 上記二つのファイルをコンパイルして実行ファイルを作る場合、以下の操作が考えられる gfortran -c mod.f90 gfortran use.o -J(mod.modがあるディレクトリ) 依存関係 上記操作で最終的に生成されるa.outの依存関係を考えると以下の通りになる a.out→