前提・実現したいこと
コンパイラーにgfortranをもちいています。
makeをもちいたところモジュールでエラーがでているようです。
(GDMAプログラムをインストールしたい)
発生している問題・エラーメッセージ
USE f90_unix_env, ONLY: getarg, iargc
1
Fatal Error: Can't open module file 'f90_unix_env.mod' for reading at (1): No su
ch file or directory
compilation terminated.
make[1]: *** [input.o] エラー 1
make[1]: ディレクトリ `C:/cygwin64/home/j_tsu/gdma/src' から出ます
make: *** [gdma] エラー 2
該当のソースコード
fortran
1$ make 2cd src; "C:/Program Files/GnuWin32/bin/make" FFLAGS="-O2" FC=gfortran 3make[1]: ディレクトリ `C:/cygwin64/home/j_tsu/gdma/src' に入ります 4gfortran -O2 -c input.f90 5input.f90:24:2: 6 7 #ifdef ARGS 8 1 9Warning: Illegal preprocessor directive 10input.f90:25:2: 11 12 #ifdef NAGF95 13 1 14Warning: Illegal preprocessor directive 15input.f90:27:2: 16 17 #endif 18 1 19Warning: Illegal preprocessor directive 20input.f90:28:2: 21 22 #endif 23 1 24Warning: Illegal preprocessor directive 25input.f90:32:2: 26 27 #ifdef ARGS 28 1 29Warning: Illegal preprocessor directive 30input.f90:33:2: 31 32 #ifndef NAGF95 33 1 34Warning: Illegal preprocessor directive 35input.f90:35:2: 36 37 #endif 38 1 39Warning: Illegal preprocessor directive 40input.f90:36:2: 41 42 #endif 43 1 44Warning: Illegal preprocessor directive 45input.f90:71:2: 46 47 #ifdef ARGS 48 1 49Warning: Illegal preprocessor directive 50input.f90:73:2: 51 52 #endif 53 1 54Warning: Illegal preprocessor directive 55input.f90:531:2: 56 57 #ifdef ARGS 58 1 59Warning: Illegal preprocessor directive 60input.f90:550:2: 61 62 #endif 63 1 64Warning: Illegal preprocessor directive 65input.f90:26:4: 66 67 USE f90_unix_env, ONLY: getarg, iargc 68 1 69Fatal Error: Can't open module file 'f90_unix_env.mod' for reading at (1): No su 70ch file or directory 71compilation terminated. 72make[1]: *** [input.o] エラー 1 73make[1]: ディレクトリ `C:/cygwin64/home/j_tsu/gdma/src' から出ます 74make: *** [gdma] エラー 2 75 76 77### 試したこと 78make を以下でおこなったところエラーがでました。 79 80INSTALL_DIR := /usr/local/bin 81 82ifndef COMPILER 83 COMPILER := gfortran 84endif 85 86FFLAGS := -O2 87FC := ${COMPILER} 88 89gdma: 90 cd src; "${MAKE}" FFLAGS="${FFLAGS}" FC=${FC} 91 mkdir -p bin 92 rm -f bin/gdma 93 ln src/gdma bin 94 95test tests: 96 cd examples; ./gdma_tests.py 97 98install: 99 cp -p bin/gdma ${INSTALL_DIR} 100 101clean: 102 cd src; rm -f *.mod *.o 103 104 105cd gdma 内にはまたmakefile があり以下の内容がかいてあります。 106 107gdma: gdma.o dma.o atom_grids.o input.o timing.o version.o 108 ${FC} ${FFLAGS} $^ -o gdma 109 110%.o: %.f90 ${FRC} 111 ${FC} ${FFLAGS} -c $< 112 113%.o: %.F90 ${FRC} 114 ${FC} ${FFLAGS} -c $< 115 116gdma.o: dma.o atom_grids.o input.o timing.o version.mod 117dma.o: atom_grids.o input.o 118 119version.mod: force 120 ./version.py ../VERSION version.f90 ${FC} 121 $(FC) -c ./version.f90 122 123force: 124 125
補足情報(FW/ツールのバージョンなど)
エラーの出たinput.oには以下が書いてあります。
長いので抜粋です。
fortran
1MODULE input 2 3! Fortran90 input parsing module 4! 5! Copyright (C) 2005 Anthony J. Stone 6! 7! This program is free software; you can redistribute it and/or 8! modify it under the terms of the GNU General Public License 9! as published by the Free Software Foundation; either version 2 10! of the License, or (at your option) any later version. 11! 12! This program is distributed in the hope that it will be useful, 13! but WITHOUT ANY WARRANTY; without even the implied warranty of 14! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15! GNU General Public License for more details. 16! 17! You should have received a copy of the GNU General Public License 18! along with this program; if not, write to 19! the Free Software Foundation, Inc., 51 Franklin Street, 20! Fifth Floor, Boston, MA 02110-1301, USA, or see 21! http://www.gnu.org/copyleft/gpl.html 22 23use iso_fortran_env, only: real128, real64 24#ifdef ARGS 25#ifdef NAGF95 26USE f90_unix_env, ONLY: getarg, iargc 27#endif 28#endif 29 30IMPLICIT NONE 31 32#ifdef ARGS 33#ifndef NAGF95 34INTEGER, EXTERNAL :: iargc 35#endif 36#endif 37 38CHARACTER(LEN=800), SAVE :: char="" 39LOGICAL, SAVE :: skipbl=.false., clear=.true., echo=.false., & 40 debug=.false., more 41INTEGER, SAVE :: item=0, nitems=0, loc(0:80)=0, end(80)=0, & 42 line(0:10)=0, level=0, input_error_flag=0, ir=5, last=0, unit(0:10) 43 44CHARACTER(LEN=26), PARAMETER :: & 45 upper_case="ABCDEFGHIJKLMNOPQRSTUVWXYZ", & 46 lower_case="abcdefghijklmnopqrstuvwxyz" 47CHARACTER, PARAMETER :: space = " ", bra = "(", ket = ")", & 48 comma = ",", squote = "'", dquote = '"', tab=achar(9), & 49 plus="+", minus="-", dot="." 50 51CHARACTER(LEN=8), SAVE :: concat = "+++" 52CHARACTER(LEN=40) :: file(10)="", error_file="error.msg" 53 54INTEGER, SAVE :: lc=3 55 56INTEGER, PARAMETER :: sp=kind(1.0), dp=kind(1d0)!, qp=selected_real_kind(30) 57 58INTERFACE readf 59 MODULE PROCEDURE read_single, read_double, readv_double, read_quad 60END INTERFACE readf 61
回答1件
あなたの回答
tips
プレビュー