- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're simply trying to use netcdf, learning how to convert a linux Makefile for use with ifort windows may be a red herring. I don't think you will find specific advice about using a Makefile with netcdf on Windows. If you are actually intending to use linux, there are "offficial" posted Intel recipes for netcdf.
Some of the advice previously posted on this forum may be useful
https://software.intel.com/en-us/forums/topic/281318
and you will need to observe the advice from the ucar site about Visual Studio compatible libraries (assuming you intend to use ifort).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to modify the makefile for use with IFort-Windows, you will need to contend with the fact that IFort gives the object files that it produces the extension ".OBJ".
One way of doing this is to tell IFort the name of the output object file, using the /Fo option, perhaps in a dependency rule for ".f90.o:". It would have been easier if IFort had an option to specify the file extension for all object files, which would allow building multiple objects in parallel with the nice /MP option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> It would have been easier if IFort had an option to specify the file extension for all object files, which would allow building multiple objects in parallel with the nice /MP option.
It would be nice if you could use wild cards in /Fo and /object (e.g. "/Fo *.o")
Maybe it does. If I were to add this, I would do it this way.
Intel:
Consider a MAKE file that you wish to compile on a Windows Host to produce files for use on a Xeon Phi (running Linux) as well as on the host. And consider that you also want to use the /MP option, meaning you elect NOT to use the MAKE file means of iteratively producing compiler statements. For this you might want to use "/MP /Fo *_xphi.o".
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Among the ways to use gnu make (which doesn't come with ifort Windows) with Microsoft style conventions are to include definitions such as
CC = cl
FC = ifort
.SUFFIXES: .obj .f90
and build rules you will require e.g.
.f90.obj:
$(FC) $(FFLAGS) -c $*.f90
.f.obj:
$(FC) $(FFLAGS) -c $*.f
If you wish to stay with .o suffixes, you could use build rules such as
.f.o:
$(FC) $(FFLAGS) -c $*.f
mv $*.obj $*.o
(or whatever the shell of your choice uses for rename)
Microsoft link.exe accepts .o files but gives a verbose warning for each one.
You would also need to change your ifort options from linux to Windows style.
There are also make utilities oriented toward Microsoft compatiblity such as nmake, but I don't know any which comply with posix definition for make utility.
As it appeared that the original implied question may have been about building netcdf, and no hint was given about important considerations such as 32- vs. 64-bit and choices of shells or C compiler, all this is probably tangential.
You will note that past advice given on this forum included using the "official" Intel advice for linux builds, implying that Intel experts don't recommend running netcdf (or standard make, for that matter) on Windows. There's a deficiency of documentation about netcdf with Windows ifort, although Microsoft C++ is covered on the ucar site.
![](/skins/images/895D6060305DF45A57FACF854B5A8CD1/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page