fortran >> GETARG in ifc

by tholen » Thu, 19 Aug 2004 20:07:47 GMT

I have given some source code to a third party who has only the older
ifc compiler and doesn't have a lot of motivation to get the newer ifort
compiler for Linux. The source code uses the GETARG subroutine to access
a command line argument, but the ifc compiler doesn't recognize it, so
we have an unresolved reference.

I'm wondering if ifc actually has a library routine to access command
line arguments, but called something other than GETARG, or whether it
might have GETARG tucked away in some optional library that one has to
explicitly include on the compiler command line. I tried -vaxlib, but
that didn't work. I have no easy access to whatever documentation there
may be for the older ifc compiler.

Another option is to provide that third party with an ifort executable
built on the Linux machine we use. However, the last time I tried to
do that for a different third party, he couldn't run it because of
missing libraries. What I need is something equivalent to the -Bstatic
option that the Sun Fortran compiler has. I tried using -static, but
the resulting executable still had missing libraries. Is there an easy
way to built an executable using ifort that a third party Linux user
can use without having a copy of the compiler?


fortran >> GETARG in ifc

by Rich Townsend » Thu, 19 Aug 2004 20:46:46 GMT



Are you sure that you're using -static at the *link* stage? I find this
works fine with ifort -- and you can check by running ldd on the
resulting executable.

cheers,

Rich

--
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware

[ Delete VOID for valid email address ]

fortran >> GETARG in ifc

by Steve Lionel » Thu, 19 Aug 2004 23:11:24 GMT


GETARG is an intrinsic in Intel Fortran 8. If you have an EXTERNAL
declaration for it, remove it.


Use -static. But even if you don't, you're allowed to redistribute the .so
files that come with the compiler. See the license and the file fredist.txt
for details.

Please note that we run helpful forums for users of Intel compilers at
http://softwareforums.intel.com/ See also the link below for technical
support details.


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/

fortran >> GETARG in ifc

by tholen » Fri, 20 Aug 2004 05:35:02 GMT

Steve Lionel writes:



The problem is finding a counterpart to GETARG in Intel Fortran 7
(the ifc version). That would be easiest for the third party, because
then they can tinker with my source code to customize things like how
the output filenames are automatically generated.



I tried -static for a different third party some time ago and it didn't
work (or so the third party said). I guess it's worth trying again with
the latest version of the compiler.

fortran >> GETARG in ifc

by Madhusudan Singh » Fri, 20 Aug 2004 07:43:16 GMT


Have you tried -Vaxlib ?

fortran >> GETARG in ifc

by TimC » Fri, 20 Aug 2004 12:18:44 GMT

On Thu, 19 Aug 2004 at 12:07 GMT, XXXX@XXXXX.COM (aka Bruce)
was almost, but not quite, entirely unlike tea:

Capital "V"



--
TimC -- http://astronomy.swin.edu.au/staff/tconnors/
Er, RFC 882 put the dot in .com.

fortran >> GETARG in ifc

by tholen » Fri, 20 Aug 2004 16:18:11 GMT

Madhusudan Singh writes:









I tried it, but I may have spelled it -vaxlib. Whichever way I spelled it,
the compiler did not complain about the option, so I assumed that I spelled
it right.

fortran >> GETARG in ifc

by tholen » Fri, 20 Aug 2004 16:19:56 GMT

TimC < XXXX@XXXXX.COM > writes:


What does the "aka Bruce" nonsense have to do with a Fortran question,
Connors?

fortran >> GETARG in ifc

by TimC » Fri, 20 Aug 2004 17:01:10 GMT

On Fri, 20 Aug 2004 at 08:19 GMT, XXXX@XXXXX.COM (aka Bruce)
was almost, but not quite, entirely unlike tea:

There's a very funny explanation in there somewhere, just I can't seem
to google it right now.

Anyways, we are all Bruce here. Can we just cause call you Bruce to
make it less confusing?

--
TimC -- http://astronomy.swin.edu.au/staff/tconnors/
Some witty text here,
can be any number of lines
long

fortran >> GETARG in ifc

by Ian Bush » Fri, 20 Aug 2004 18:07:20 GMT


Not necessarily. Some compilers if they don't recognise a flag assume that
it is something relevant to the linker, and quietly ignore it. And many linkers
if they don't recognise a flag assume it is something for the compiler and,
errr......., quietly ignore it. So it is quite possible that if you misspell a
flag that it will not be reported as a warning or error,

Ian

fortran >> GETARG in ifc

by Ian Bush » Fri, 20 Aug 2004 19:06:58 GMT


Monty Python init. Philosopher's song and such like,

Bruce

fortran >> GETARG in ifc

by tholen » Fri, 20 Aug 2004 20:37:43 GMT

TimC < XXXX@XXXXX.COM > writes:


What does the "aka Bruce" nonsense have to do with a Fortran question,
Connors?





What does your inability to google it have to do with a Fortran
question, Connors?


Classic unsubstantiated and erroneous claim.


You're erroneously presupposing that calling everybody "Bruce" would
be less confusing, Connors.

fortran >> GETARG in ifc

by tholen » Fri, 20 Aug 2004 20:39:30 GMT

Ian Bush writes:





That is all well and good, but not being in the office right now and
unable to try it for myself, I'm wondering if folks know for a fact
that -Vaxlib includes the GETARG routine, or whether it was merely
something worth trying.

fortran >> GETARG in ifc

by Steve Lionel » Fri, 20 Aug 2004 22:34:55 GMT


I believe it does - but you could check the manual - there is a Libraries
reference. I don't happen to have the ifc 7.x docs handy right now to check.


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/

fortran >> GETARG in ifc

by Paul Van Delst » Fri, 20 Aug 2004 22:43:07 GMT


In Oz all the blokes are called Bruce and all the shielas are called, well, Shiela.
Now.... who's for an after dinner mint?

cheers,

paulv

Similar Threads

1. GETARG, IARGC and lack of USE statements in VF

Hello,

IIRC, there's more than one getarg/iargc pair in VF's libraries.

The one with the MS-compatible definition has the property that
iargc() returns a 4 byte integer, but getarg()'s "which arg"
argument is a 2 byte integer.  Perhaps that's defeating,
or at least confounding, your efforts.

-- 
Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.

On Wed, 09 Jul 2003 13:16:04 -0700, chris
< XXXX@XXXXX.COM > wrote:

>I was debugging some code written by others and found unexpected
>behavior.  The program uses the IARGC and GETARG functions, but does
>not have any USE DFPORT or USE DFLIB statements, for the respective 
>functions.  When compiling with Visual Fortran 6.6, the program 
>compiles and runs fine.  I see in the help file that the default 
>compile option is for /fpscomp:libs, which links in the dfport 
>library even without the USE statement.  So that explains why the 
>IARGC function didn't cause an error.  But why doesn't the GETARG 
>function cause an error?  GETARG is supposedly in the DFLIB library, 
>which isn't linked in by the compiler automatically, from what I 
>can tell.  If I use the /fpscomp:nolibs compiler option, the compiler 
>chokes on both functions.
>
>Can someone explain this behavior?  Is it just a matter of missing 
>(or hard to find) information in the help file that discusses the 
>default linking to DFLIB.lib?  Or is GETARG also in DFPORT.lib (as 
>well as being available though 'USE DFLIB')?
>
>Thanks,
>Chris

2. getenv, getarg, iargc, system etc with intel fortran compiler

3. getarg & 8.3 filename

Hi,
Does anyone know how to get the long file name instead of the 8.3
(DOS) when using CALL GETARG(1,FILNAME)in CVS 6.6 & Windows2000/XP.
Program started by doble click on the file in explorer.
Regards,
Dan

4. ioctl(sockfd, SIOCGIFCONF, &ifc)

5. IFC website problem - request for Steve Lionel

Hi

 More than a month ago, I submitted an issue to the forum at
premier.intel.com.

 However, when I tried to logon a few days later (in response to an email
notification), I got a wierd message (I do not remember it verbatim now but
it seemed to refer to an expired password or some such thing). Around the
same time, I stopped receiving email updates.

 I sent an email to quadsupport but haven't received a response. Could Steve
please look into what is going on ?

Thanks

6. Pointer allocation/association -- ifc compiler bug?

7. ifc 7.0 linking error problem

Hi, All.

I'm using a Intel Fortran Compiler 7.0 on Redhat Linux9 in IA32 mode.
I do compile to object file(-c option), and then I try to linking..
But I get an error that reads:

/opt/intel/compiler70/ia32/lib/libIEPCF90.a(f90file.o)(.text+0x4746): In function `FileOpen':
: undefined reference to `errno'
/opt/intel/compiler70/ia32/lib/libIEPCF90.a(f90fioerr.o)(.text+0x4d3): In function `f_f77ioerr':
: undefined reference to `__ctype_b'
/opt/intel/compiler70/ia32/lib/libIEPCF90.a(f90fioerr.o)(.text+0x6d9): In function `f_fiomess.':
: undefined reference to `errno'
/opt/intel/compiler70/ia32/lib/libIEPCF90.a(f90fioerr.o)(.text+0x76b): In function `f_seterrno':
: undefined reference to `errno'

Any one know what the problem is?
Thanks a lot in advance,
Park.

8. NetCDF 3.5 memory limitation (?) w/ ifc and pgf90