[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling netcdf on win32 using visual studio NET & intel fortran compilers



"Simon Spagnol" <address@hidden> writes:

> Hi Ed,
> Managed to figure out (well hasn't caused the same error messages) the need
> for an uppercase 
> function name generation (that a #define CFC_(UN,LN) UN in cfortran.h, which
> would be activated by  -dPowerStationFortran (I just made an IntelFortran
> section just in case I stuffed up). Also assumes you leave default Intel
> fortran compiler external procedure settings of uppercase name and no
> trailing underscore. 
>
> Now only left to deal with the unresolved symbols like MAX_DOUBLE and UDEXT.
> Need to convert the USE DFPORT to USE IFPORT.
>
> Thanks for then info and will let you know how I go,
> Simon.
>
> -----Original Message-----
> From: Ed Hartnett [mailto:address@hidden] 
> Sent: Thursday, 23 June 2005 12:36
> To: Simon Spagnol
> Subject: Re: Compiling netcdf on win32 using visual studio NET & intel
> fortran compilers
>
> "Simon Spagnol" <address@hidden> writes:
>
>> Hi,
>> I am having a confusing time trying to compile netcdf 3.6.1 beta3 on 
>> windows using Visual Studio .NET and Intel fortran compiler. The 
>> included solution compiles (after some tweaking), but the fortran 
>> interface is not understood when try to link in the resultant library 
>> with either the F77 test code or F90 interface and test code. Is the 
>> problem a name mangling as defined in cfortran.h?
>>
>> Any pointers would be appreciated.
>> Thanks,
>> Simon.
>>
>> // Simon Spagnol, address@hidden // Australian Institute of 
>> Marine Science // PMB No 3, Townsville QLD 4810, Australia // ph: 
>> +61-7-47534444, fax: +61-7-47725852 // www.aims.gov.au
>>
>>
>>
>> ------------------------------------------------------------------------
>>  The information contained in this communication is  for the use of the 
>>  individual  or  entity  to  whom  it  is  addressed, and  may  contain 
>>  information which is the  subject of legal privilege and/or copyright. 
>>  If you have received this  communication in  error, please  notify the 
>>  sender by return E-Mail and delete the transmission, together with any 
>>  attachments, from your system. Thank you.
>> -------------------------------------------------------------------------
>>
>
> Is there a compiler flag set -DpgiFortran? Or -Df2cFortran?
>
> One of those is set. Try switching it to the other one and let me know
> if that solves your fortran problem.
>
> Thanks!
>
> Ed
> -- 
> Ed Hartnett  -- address@hidden
>

Howdy Simon!

Wow, sounds like you are really making progress! Please do package
this up when you're done, and send it to me. Especially since you are
in Australia, and have to program upside down!

I wanted to do the very thing you are doing, but haven't got the time
yet. 

Yet if you are changing cfortran.h, I am worried. That is not netCDF
code; it's a separate package developed elsewhere, and if you change
it, we can't incorporate your changes, because we need to get new
updates of the package from time to time.

cfortran is a way of providing fortran wrappers for our C
functions. Since the name mangling differs from compiler to compiler,
it knows what each compiler wants, and mangles the names
appropriately. That's about all I know about cfortran, but see
cfortran.doc for more information.

Have you contacted the programmer of cfortran, Burkhard Burow
(address@hidden)? The Intel compiler is very popular, and perhaps he
has a beta version or new release of cfortran.h which handles it
already.

If not, perhaps he would be interested in integrating your changes, so
that the entire community can benefit.

Please let me know how this goes for you!

Good luck!

Ed

-- 
Ed Hartnett  -- address@hidden