- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
To compile the groundwater model MODFLOW code, requires the following settings (this page):
http://water.usgs.gov/nrp/gwsoftware/modflow2000/MFDOC/index.html?suggestions_on_compiling.htm
I use the Microsoft Visual Studio 2008 with Intel Fortran Compiler 11.1
After changes were made. I encountered the following error:
pls help me to resolve this
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note the names of the module files that were not found (MODULE_EXPORTDATA, etc.). Where are they defined? In the MODFLOW sources, or in additional code that you provided? You have to compile the Fortran source files containing those modules before attempting to compute files that USE those modules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
Note the names of the module files that were not found (MODULE_EXPORTDATA, etc.). Where are they defined? In the MODFLOW sources, or in additional code that you provided? You have to compile the Fortran source files containing those modules before attempting to compute files that USE those modules.
Thanks for your helpful answers.
Yes, problem solved. But the second problem is created:
new Error is:
error LNK2019: unresolved external symbol
The following descriptions on the company website software code is written:
The Aquaveo versions of MODFLOW that are posted on this website and shipped with the GMS and Arc Hydro Groundwater software contain modifications/additions made by Aquaveo staff to make using MODFLOW easier. All changes to the MODFLOW code have been clearly marked with a "!aq" comment. In addition to changes made in the FORTRAN source code, Aquaveo MODFLOW comprises a large C++ library of code called MODFLOWLIB. Many of the changes in the FORTRAN code make calls into MODFLOWLIB.
I've solved the first problem by introducing the modules. In fact, by adding the module files in the MODFLOWLIB folder.
Do you have a solution to new problems?
Other people were having the same problem. And I read responses to questions but my problem still exists.
I am a beginner :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have not told us how your VS project is configured, nor have you showed the commands/build-log pertaining to the failed build. The error messages suggest that you are attempting to produce an EXE or DLL from a single .OBJ file which contains references to several external symbols.
You should probably direct your request for help to the Modflow authors/user-groups, and educate yourself on how to build projects involving multiple source files and more than one source language.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
You have not told us how your VS project is configured, nor have you showed the commands/build-log pertaining to the failed build. The error messages suggest that you are attempting to produce an EXE or DLL from a single .OBJ file which contains references to several external symbols.
You should probably direct your request for help to the Modflow authors/user-groups, and educate yourself on how to build projects involving multiple source files and more than one source language.
Yes that's right.
Unfortunately, on the company website there is no good explanation. Nor any way call for questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the instructions shown on the site I assume you actually followed the instructions for Visual Studio?
Did you remember to do the dependencies? This ensures that the code is compiled in the correct order.
For example: If A depends on B which depends on C then C must be compiled first, then B, then finally A.
Perhaps if you attach your sln and proj files we might be able to offer more help.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Les Neilson wrote:
In the instructions shown on the site I assume you actually followed the instructions for Visual Studio?
Did you remember to do the dependencies? This ensures that the code is compiled in the correct order.
For example: If A depends on B which depends on C then C must be compiled first, then B, then finally A.
Perhaps if you attach your sln and proj files we might be able to offer more help.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The instructions for building Modflow 2000 may not work for building Modflow 2005. Furthermore, the Aquaveo version contains substantial modifications (an additional library with C++ sources, HDF file usage, etc.) and, again, you should not expect the build instructions for another version to work. The Aquaveo version contains some Python scripts, so you may need Python installed to use that version. You may also need Cmake.
Given that you are a self-declared beginner, I think that you are tackling something beyond your present capabilities. Even for an experienced person building the Aquaveo version would require a substantial investment of time.
You will probably be better off acquiring a pre-built version with the packages that you wish to use. The modflow.org site lists an E-mail address and a telephone number. That's where you need to seek help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
The instructions for building Modflow 2000 may not work for building Modflow 2005. Furthermore, the Aquaveo version contains substantial modifications (an additional library with C++ sources, HDF file usage, etc.) and, again, you should not expect the build instructions for another version to work. The Aquaveo version contains some Python scripts, so you may need Python installed to use that version. You may also need Cmake.
Given that you are a self-declared beginner, I think that you are tackling something beyond your present capabilities. Even for an experienced person building the Aquaveo version would require a substantial investment of time.
You will probably be better off acquiring a pre-built version with the packages that you wish to use. The modflow.org site lists an E-mail address and a telephone number. That's where you need to seek help.
The aim is to create a slight change in the orginal source code. Then, sensitivity analysis on parameters.
First, compile the code (code that has been edited) and replace the EXE result in the application directory (Graphical User Interface).
In fact, make a change and then compile the model.
It seems very difficult.
And disappointing!
Thank you for your information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Behzad S. wrote:
The aim is to create a slight change in the orginal source code. Then, sensitivity analysis on parameters.
First, compile the code (code that has been edited) and replace the EXE result in the application directory (Graphical User Interface).
In fact, make a change and then compile the model.
It seems very difficult.
And disappointing!
Thank you for your information
It has been more than 20 years since I worked with Modflow (I was writing an interface to Modflow from the main GUI software I was working on. At that time Modflow itself was quite easy to set up. But I am not familiar with the Aquaveo software.
I am also hampered by the fact that I no longer have a Fortran compiler available at work :-( But I did find when looking at the files from the download there were some missing files (CxxTest\1.0\runner.cpp comes to mind) and some relative paths were not found (Shared for example) so my efforts were limited.
Missing files / libraries elsewhere would cause your project to not compile or link. But I don't know whether this is the cause of your problems.
Sorry I couldn't be of more help.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I downloaded and built Modflow96, just to assess the complexity, if any, of the build process. This version is all-Fortran, and building was trivial.
I then tried Modflow 2005 (USGS version) and found that the build process can be difficult for a beginner. The main issue is that the number of source files is much larger, and they have to be compiled in such a way that modules get compiled before compiling source files that USE those modules. The USGS distribution does not provide a makefile, but I generated one using a Perl script that does just that. After generating the makefile, I compiled and built the program using the PS 2016-u4 compilers. The resulting EXE ran fine on the example problems that I tried, and ran about 10 to 20 percent faster than the EXE provided in the distribution. Note that I did not bother to use the USGS build instructions.
Behzad, you could use this makefile to build Modflow 2005. Perhaps, you can make the changes that you want to this version. If you only change the code in the files without adding new modules or new source files, you can continue to build using the makefile.
If you must use the Aquaveo version (you have not stated any reasons for doing so), I do not have anything helpful at this point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Les Neilson wrote:
Quote:
Behzad S. wrote:
The aim is to create a slight change in the orginal source code. Then, sensitivity analysis on parameters.
First, compile the code (code that has been edited) and replace the EXE result in the application directory (Graphical User Interface).
In fact, make a change and then compile the model.
It seems very difficult.
And disappointing!
Thank you for your information
It has been more than 20 years since I worked with Modflow (I was writing an interface to Modflow from the main GUI software I was working on. At that time Modflow itself was quite easy to set up. But I am not familiar with the Aquaveo software.
I am also hampered by the fact that I no longer have a Fortran compiler available at work :-( But I did find when looking at the files from the download there were some missing files (CxxTest\1.0\runner.cpp comes to mind) and some relative paths were not found (Shared for example) so my efforts were limited.
Missing files / libraries elsewhere would cause your project to not compile or link. But I don't know whether this is the cause of your problems.
Sorry I couldn't be of more help.
Les
Of course, I know I talk with professionals. I am sure that your efforts elsewhere have been scored.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
I downloaded and built Modflow96, just to assess the complexity, if any, of the build process. This version is all-Fortran, and building was trivial.
I then tried Modflow 2005 (USGS version) and found that the build process can be difficult for a beginner. The main issue is that the number of source files is much larger, and they have to be compiled in such a way that modules get compiled before compiling source files that USE those modules. The USGS distribution does not provide a makefile, but I generated one using a Perl script that does just that. After generating the makefile, I compiled and built the program using the PS 2016-u4 compilers. The resulting EXE ran fine on the example problems that I tried, and ran about 10 to 20 percent faster than the EXE provided in the distribution. Note that I did not bother to use the USGS build instructions.
Behzad, you could use this makefile to build Modflow 2005. Perhaps, you can make the changes that you want to this version. If you only change the code in the files without adding new modules or new source files, you can continue to build using the makefile.
If you must use the Aquaveo version (you have not stated any reasons for doing so), I do not have anything helpful at this point.
Your solution is very interesting. I'll think about it.
But why I chose this software?
I've developed a conceptual model. This work was done in GMS software. It is difficult to build a mathematical model in DOS environment (USGS MODFLOW). And the harder it is post-processing analysis. This is the main reason for working with Aquaveo GMS Code. However, I will test your good idea.
There is a new approach for me. I think it's time to do it! Here. Get advice from the software developers. They responded to my email:
Behzad,
thanks for your help mecej4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you may have done, is you took all the Fortran files and placed them into a single Project in your solution (? mf2k5). What mecej4 effectively did was to split the Fortran files into the equivalent of multiple projects, where the modules are created in one project and the code USE-ing the modules are in a different project and which is dependent upon the modules project.
What you can do in Visual Studio is to create a new project in your solution that is a Fortran static library (? mf2k5_mods). Move the sources that create modules from where they are at (? mf2k5) to the new project (? mf2k5_mods). Then set the dependencies of the former project to include the newer (module) project.
Note, depending on the modules USE-ing other modules, you may need to partition the module files into layers:
mf2k5_mods_0
mf2k5_mods_1
...
Where the higher number are dependent upon the lower numbered files.
This process is more of busy work that it is of programming.
Additionally, if you get the make file from mecej4 you should be able to determine the number of and order of projects that need to be created.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
What you may have done, is you took all the Fortran files and placed them into a single Project in your solution (? mf2k5). What mecej4 effectively did was to split the Fortran files into the equivalent of multiple projects, where the modules are created in one project and the code USE-ing the modules are in a different project and which is dependent upon the modules project.
What you can do in Visual Studio is to create a new project in your solution that is a Fortran static library (? mf2k5_mods). Move the sources that create modules from where they are at (? mf2k5) to the new project (? mf2k5_mods). Then set the dependencies of the former project to include the newer (module) project.
Note, depending on the modules USE-ing other modules, you may need to partition the module files into layers:
mf2k5_mods_0
mf2k5_mods_1
...Where the higher number are dependent upon the lower numbered files.
This process is more of busy work that it is of programming.
Additionally, if you get the make file from mecej4 you should be able to determine the number of and order of projects that need to be created.
Jim Dempsey
thank you.
The problem was eliminated. Code was compiled with success.
Finally I've used version of the listed software mentioned here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page