- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am learning to use Intel FORTRAN command line to compiler ANSYS supplied demonstration programs.
One of the compiler examples is:
ifort -D__EFL -DNOSTDCALL -DARGTRAIL -DPCWINNT_SYS -DPCWIN64_SYS -DPCWINX64_SYS -DCADOE_ANSYS -Qfpp -4Yportlib -4Ya /nologo /c /Fo.\ /DFORTRAN /MD /include:"%ipath%" %srcfiles%
I get get help and understand the meaning of options: /nologo, /c, /Fo.\, /MD, /include
But I have few questions for the the rest
1. what are the options: -D__EFL -DNOSTDCALL -DARGTRAIL -DPCWINNT_SYS -DPCWIN64_SYS -DPCWINX64_SYS -DCADOE_ANSYS /DFORTRAN?
2. As conventions in ifort, options prefixed with dash are for Linux and OS X, and prefixed with slash are for windows OS. Why do they (such as -Qfpp and /c) appear simultaneously?
In addition, I want to link the library created by gfortran compiler. What are the corresponding compiler options of the above command line in gfortran?
Can someone give explanations in details of the above ifort compiler options?
Thanks in advance!
PS: the IVF compiler version is:
Intel(R) Visual Fortran Composer XE 2013 Update 5 Integration for Microsoft Visual Studio* 2012, 13.0.3636.11,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Command line options that begin with the letter D (Capitalized D) define macros used by the preprocessor. The letters following the "D" are the macro that is defined for the preprocessor.
In your code you might have a construct that looks like this:
#if defined (NOSTDCALL)
...
#endif
and the preprocessor would enable the code in-between the #if and #endif because you had passed the /DNOSTDCALL on the command line. That command line switch defines the macro called "NOSTDCALL".
RE: / vs -
Yes, it is true that the Windows convention is to use "/" and the Linux convention is to use "-". It is an interesting behavior of the Windows version of ifort that it will accept either "/" or "-". Although we do not advertise that behavior, nor encourage it, sometimes people will post the "-" in examples.
Please use "/" :-)
--Lorri
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Command line options that begin with the letter D (Capitalized D) define macros used by the preprocessor. The letters following the "D" are the macro that is defined for the preprocessor.
In your code you might have a construct that looks like this:
#if defined (NOSTDCALL)
...
#endif
and the preprocessor would enable the code in-between the #if and #endif because you had passed the /DNOSTDCALL on the command line. That command line switch defines the macro called "NOSTDCALL".
RE: / vs -
Yes, it is true that the Windows convention is to use "/" and the Linux convention is to use "-". It is an interesting behavior of the Windows version of ifort that it will accept either "/" or "-". Although we do not advertise that behavior, nor encourage it, sometimes people will post the "-" in examples.
Please use "/" :-)
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lorri,
Thanks for your reply. Any suggestions for the command line options in gfortran compiler?
There is another static library I need to used is created by gfortran compiler. But the IVF compiler can not link it. I think the alternative way to combine them together is to convert the command lines options in gfortran form and compile it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're unlikely to be able to use libraries built by gfortran and ifort together, unless there are no gfortran run-time library dependencies. The Abaqus distribution for ifort of course has many ifort run time library dependencies. You'd be well outside the range of what Abaqus could support, and this forum is hardly a substitute for Abaqus support.
If you're asking in general whether it may be possible to link Microsoft .obj and .lib files with a gfortran linking setup (and which might be a suitable choice among the gfortran implementations), that goes well beyond the scope of this forum. It's not simply a matter of command line options. You might start by looking up how people may have linked MKL with a Windows gfortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot link together ifort-compiled objects and gfortran-compiled objects. Please don't try. All Fortran sources must be recompiled by Intel Fortran.
![](/skins/images/DF2E495CEC88D713A66401CF495CD875/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