What you are seeing is more likely DEC Fortran extensions, which
predate the Intel compilers. The DEC Fortran team eventually became
the Intel Fortran team.
On 13 Mar 2012, at 2:58 AM, Jeannieboef wrote:
> 1) JFIX, is an intel library function which converts many types to
> INTEGER(4), so I'm using INT instead.
JFIX was a non-standard variant of IFIX (from Fortran-77, one of the
specific intrinsic functions for generic intrinsic function INT) from
the days when you might tell the compiler to use 16-bits for the
default Integer size (non-compliant).
> 2) There is a syntax in the formating section that looks like this:
> A<maxDescripLength> which is supposed to read in maxDescripLength = 25
> and combine it to the format to make A25. This is not working, I am
> hard coding this.
This was a DEC Format statement extension that used a variable in the
I/O list to specify the field width. Today, you could accomplish the
same thing by dynamically writing a Format into a character variable
using an internal write, then using that character variable as the
Format in an I/O statement.
> 3) The spacing of 5 empty spaces is crutial for the line continuation
> from the left margin. Tab spaces must be deleted and replaced with
> spaces.
Tabs in liu of spaces at the start of a line in fixed format Fortran
source is commonly permitted by a number of Fortran compilers, but has
never been legal Fortran.
> 4) The intrinsic funtion DMOD is not found. Does anyone know an
> alternitive or what it means?
DMOD is the specific intrinsic function for the MOD generic intrinsic
function when the argument is Double Precision. It returns a Double
Precision result. It is standard Fortran. But, you might want to
change it to use the MOD generic intrinsic function so that it
automatically chooses the proper specific intrinsic function depending
on the type of the argument.
Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov
Sent from my iPhone
Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov
On 27 Mar 2012, at 9:53 AM, jeannieboef wrote:
> Dear Larry,
> Thanks for all the help. Do you know how I deal with the old style !
> DEC$ATTRIBUTES to link up other dlls? I find these often in my
I have the following situation. There exists a kind of "main" dll
called TrnDll.dll which was written and compiled in intell visual
fortran. In that compiled code there are !DEC$ Atributes Dllimport
lines which 'decorate' the subroutine or function names as I
understand it. Other external dlls, like the one I'm working on, are
compiled to be linked to it. The source code I'm trying to use has
been modified by me for compilation with the g95 compiler, but the !DEC
$ Attributes DllExport line (directly the main subroutine name and
some of the function names) is not supported by g95. gcc has, I think,
a !gcc$ dllexport statement which is in the gcc 4.x.x directive.
gfortran has implimented this. Will this work in g95? is this a simple
find and replace? are there alternitives?
I have found some explainations of what the !DEC$ statements do, but
as I'm not a programmer explanations of how the callee or called
function pops variable from a stack is pretty Greek to me.
Your experience is sorely needed in lighting my way.
Kind regards,
Jean
Sent from my iPhone
Subroutine JUNK( intarg )
The actual entry point would be named JUNK@4.
Perhaps this was only for their Fortran PowerStation compiler.
I would guess the code you have is calling C routines and is trying to
get the external reference correct. g95/gfortran do not mangle names
like that. But, they can and may by default (varies with compiler and
version) prepend or append extra underscores. A lot of times you will
see makefiles with --no-second-underscore for g95/gfortran to deal
with that.
Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov
On 28 Mar 2012, at 11:38 PM, jeannieboef wrote:
> dear Larry, dear group,
>
> I have the following situation. There exists a kind of "main" dll
> called TrnDll.dll which was written and compiled in intell visual
> fortran. In that compiled code there are !DEC$ Atributes Dllimport
> lines which 'decorate' the subroutine or function names as I
> understand it. Other external dlls, like the one I'm working on, are
> compiled to be linked to it. The source code I'm trying to use has
> been modified by me for compilation with the g95 compiler, but the !
> DEC$ Attributes DllExport line (directly the main subroutine name
> and some of the function names) is not supported by g95. gcc has, I
> think, a !gcc$ dllexport statement which is in the gcc 4.x.x
> directive. gfortran has implimented this. Will this work in g95? is
> this a simple find and replace? are there alternitives?
>
> I have found some explainations of what the !DEC$ statements do, but
> as I'm not a programmer explanations of how the callee or called
> function pops variable from a stack is pretty Greek to me.
>
> Your experience is sorely needed in lighting my way.
>
> Kind regards,
>
> Jean
>
> Sent from my iPhone
>
> On 27.03.2012, at 19:21, Larry Baker <ba...@usgs.gov> wrote:
>
>> You will have to research what their meaning is and then deduce why
>> they are being used. I think the only time I have ever used them
>> was to force a common alignment on an Alpha processor so that it
>> was exactly the same as on a VAX processor. You will want to
>> search the Internet for a DEC Fortran manual.
>>
>> Larry Baker
>> US Geological Survey
>> 650-329-5608
>> ba...@usgs.gov
>>
>> On 27 Mar 2012, at 9:53 AM, jeannieboef wrote:
>>
>>> Dear Larry,
>>> Thanks for all the help. Do you know how I deal with the old
>>> style !DEC$ATTRIBUTES to link up other dlls? I find these often in
On Microsoft Windows targets the `dllexport' attribute causes the
compiler to provide a global pointer to a pointer in a dll, so
that it can be referenced with the `dllimport' attribute. The
pointer name is formed by combining `_imp__' and the function or
variable name.
Currently, the `dllexport'attribute is ignored for inlined
functions, but export can be forced by using the
`-fkeep-inline-functions' flag. The attribute is also ignored for
undefined symbols.
When applied to C++ classes. the attribute marks defined
non-inlined member functions and static data members as exports.
Static consts initialized in-class are not marked unless they are
also defined out-of-class.
On cygwin, mingw and arm-pe targets, `__declspec(dllexport)' is
recognized as a synonym for `__attribute__ ((dllexport))' for
compatibility with other Microsoft Windows compilers.
Alternative methods for including the symbol in the dll's export
table are to use a .def file with an `EXPORTS' section or, with
GNU ld, using the `--export-all' linker flag.
You can specify multiple attributes in a declaration by separating
This is beyond my experience with DEC Fortran. If I had to guess, what you are seeing are instructions to the compiler for performing name mangling of external references so that they are compatible with entry point names created by a different compiler. I remember something about Microsoft compilers adding the number of bytes in the argument list to the name of an entry point. Thus, if you wrote a subroutine:
Subroutine JUNK( intarg )
The actual entry point would be named JUNK@4.
Perhaps this was only for their Fortran PowerStation compiler.
I would guess the code you have is calling C routines and is trying to get the external reference correct. g95/gfortran do not mangle names like that. But, they can and may by default (varies with compiler and version) prepend or append extra underscores. A lot of times you will see makefiles with --no-second-underscore for g95/gfortran to deal with that.
Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov
On 28 Mar 2012, at 11:38 PM, jeannieboef wrote:dear Larry, dear group,
I have the following situation. There exists a kind of "main" dll called TrnDll.dll which was written and compiled in intell visual fortran. In that compiled code there are !DEC$ Atributes Dllimport lines which 'decorate' the subroutine or function names as I understand it. Other external dlls, like the one I'm working on, are compiled to be linked to it. The source code I'm trying to use has been modified by me for compilation with the g95 compiler, but the !DEC$ Attributes DllExport line (directly the main subroutine name and some of the function names) is not supported by g95. gcc has, I think, a !gcc$ dllexport statement which is in the gcc 4.x.x directive. gfortran has implimented this. Will this work in g95? is this a simple find and replace? are there alternitives?
I have found some explainations of what the !DEC$ statements do, but as I'm not a programmer explanations of how the callee or called function pops variable from a stack is pretty Greek to me.Your experience is sorely needed in lighting my way.Kind regards,JeanSent from my iPhoneOn 27.03.2012, at 19:21, Larry Baker <ba...@usgs.gov> wrote:You will have to research what their meaning is and then deduce why they are being used. I think the only time I have ever used them was to force a common alignment on an Alpha processor so that it was exactly the same as on a VAX processor. You will want to search the Internet for a DEC Fortran manual.Larry BakerUS Geological Survey650-329-5608ba...@usgs.govOn 27 Mar 2012, at 9:53 AM, jeannieboef wrote:Dear Larry,Thanks for all the help. Do you know how I deal with the old style !DEC$ATTRIBUTES to link up other dlls? I find these often in my Source Code.Regards,JeanSent from my iPhoneOn 13.03.2012, at 20:10, Larry Baker <ba...@usgs.gov> wrote:Jean,What you are seeing is more likely DEC Fortran extensions, which predate the Intel compilers. The DEC Fortran team eventually became the Intel Fortran team.On 13 Mar 2012, at 2:58 AM, Jeannieboef wrote:1) JFIX, is an intel library function which converts many types toINTEGER(4), so I'm using INT instead.
JFIX was a non-standard variant of IFIX (from Fortran-77, one of the specific intrinsic functions for generic intrinsic function INT) from the days when you might tell the compiler to use 16-bits for the default Integer size (non-compliant).