I'm just setting up the new WW3 and have compiled and run the test case ctest
and that works fine.
Then when I try and compile and link one of the main programs I get the following error message:
-----------------------------------------------
----compiling WAVEWATCH III----
-----------------------------------------
Scratch Directory : /home/ww3/scratch
Save source codes : yes
Save listings : yes
Processing ww3_grid
---------------------
ad3 : processing w3servmd
w3servmd.mod
ad3 : processing w3gdatmd
*** compile error ***
file w3gdatmd.o not found
mv: cannot stat `w3gdatmd.o': No such file or directory
make: *** [/home/ww3/obj/w3gdatmod.o] Error 5
**********************
*** end of compilation ***
**********************
So it converts w3servmd.ftn
correctly to w3servmd.f90
and then succesfully compiles and produces w3servmd.mod
and places this in a /mod
directory.
The next step is to compile w3gdatmd.f90
, but in the error script for this file is says:
"can't open w3servmd.mod for reading, no such file or directory"
But w3servmd.mod
exists!
So I'm thinking there maybe an error in the comp
code with it not directing to the /mod
folder for .mod
files.
The thing is in the comp
file it states:
"make sure the compiler point to the proper directory where the modules are stored ($m_path), see examples below."
But I can't see where this is in the cod开发者_如何学运维e below this at all. Any hints?
Most Fortran >=90 compilers that I am familiar with create their output files in the current directory: object, module and executable. Then additional compilation steps of source files in the directory easily find previously made module files. Is the script that you have moving the module files to the directory /mod? Then this is a question about the script or the specific compiler -- how to tell the compiler that it should also look in /mod for the modules. Is $m_path already set since the script is moving the files there? Maybe they are suggesting that you should use a compiler option to cause the compiler to look into this directory. gfortran provides options -M and -J (equivalent): "This option specifies where to put ‘.mod’ files for compiled modules. It is also added to the list of directories to searched by an USE statement. The default is the current directory." Which compiler are you using?
精彩评论