Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29251 Discussions

Compiling DYRESM-CAEDYM by running IVF v9.1 through Cygwin

trolle
Beginner
414 Views

Hi all,

I am trying to compile DYRESM-CAEDYM (a freeware complex lake ecosystem model developed at Centre for Water Research (CWR), the University of Western Australia) using the Intel Visual Fortran v9.1 compiler for Windows.

The model source code bundle can be obtained free from http://www.cwr.uwa.edu.au/services/models.php (or by emailing CWR). I am running the IVF compiler through Cygwin (Linux emulator), since this enables some unix commands that have been implemented in the source code bundle by CWR to make the compilation faster (optionally see http://www.cwr.uwa.edu.au/services/models/forum/viewtopic.php?t=8). Cygwin is also freeware, and can be downloaded from www.cygwin.com .

There is a main makefile that should start the compilation of the whole source code and I have specified that I am using an IVF (ifort) compiler in this particular makefile. However, when I try to run the compilation (by running the make command under the Cygwin bash shell) the compilation crashes/stops. I have tried contacting CWR, but they are not familiar with IVF since they use a Lahey Fortran compiler (which readily compiles the source code through Cygwin using the same makefile).

Have anyone experienced anything similar or even better, worked with the DYRESM-CAEDYM model?

Any suggestions/ideas are highly appreciated.

Many thanks

Dennis

0 Kudos
2 Replies
TimP
Honored Contributor III
414 Views
Lahey Windows compiler customers often use a commercial make which does not accept the same Makefile as cygwin make. If you had a Makefile set up to work with Lahey compilers and cygwin make, you should need only to change the compiler flags.
For using cygwin make with Windows compilers, you must decide whether you will use .o files or .obj files, and whether you are making a 32-bit or 64-bit build. As Lahey was not an early supporter of 64-bit Windows, perhaps the latter is ruled out.
I would suggest that you open a command prompt window for the Intel Windows compiler of your choice, then run the cygwin.bat setup script in that window. This will set up all the PATH variables you require, except that the cygwin ld may have to be removed from the search paths. Then it will not matter whether you used the ifort installation option to add ifort to the default Windows environment paths.
If your Makefile uses .obj .lib .exe and such suffixes, you would need to set them in a
.SUFFIXES rule. See the documentation of gnu make. I would think that would have been done already for you, if cygwin make is in use. If you use .o rather than .obj, I would suggest permitting ifort to make a .obj and then adding a line
mv $*.obj $*.o to rename it in your make rules.
Microsoft linker will accept .o files, although it complains about them (by default). If you are doing a 32-bit build, you may be able to use the cygwin ar and ld.
If you need any more information, you will have to be more specific, unless you expect someone to study this application for you.
0 Kudos
trolle
Beginner
414 Views

Hi Tim

Thanks a lot for your input.

The developers at CWR have told me, as you also wrote, that I in principle only need to change the compiler flags in the main Makefile (necessary path variables is setup during install). However, they also said that I might need to modify the main Makefile a bit further before I would be able to compile using the IVF v9.1. They have previously had success with compiling an older version of DYRESM-CAEDYM (DYCD) using IVF v8 after modifying the Makefile. I have tried to modify the Makefile, but I guess my code developing skills are not good enough yet (since the compilation is still not running).

I guess you would need to have the same OS (win XP), compiler (IVF v9.1), Cygwin and source code bundle, to experience the compiler issues I am facing (and to compensate for the fact that I am still relatively new to FORTRAN and code developing in general - which makes it hard for me to specify any information that might be helpful to you and others).

Thanks again

0 Kudos
Reply