fcomp ? 
Author Message
 fcomp ?

Today, I was clearing my homedirectory a bit, and I came across
the following binary named `fcomp' which is 1.6M in size:


fcomp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

I was wondering why I once placed this file into my bin
directory... i thought it was a compiler but somehow none of
these seem to work:


Unknown option -V

Unknown option --version

Unknown option --Version

Unknown option -h

Unknown option --h

It seems to accept the -v option, but without doing anything:



However, if i run fcomp on an f90 file, it seems to output some
C-file:


ls: *.c: No such file or directory



# line 1 "example_hello_world.f95"
#include <f95.h>
# line 1 "example_hello_world.f95"
int main(argc,argv)
# line 1 "example_hello_world.f95"
     int argc; char *argv[];
# line 1 "example_hello_world.f95"
{
# line 1 "example_hello_world.f95"
f90_init(argc,argv);
# line 5 "example_hello_world.f95"
__NAGf90_write(6,(char*)0,0,(char*)0,0,0);
# line 5 "example_hello_world.f95"
__NAGf90_lwrite_ch("Hello World!",12);
# line 5 "example_hello_world.f95"
__NAGf90_endwrite();
# line 7 "example_hello_world.f95"
f90_finish(0);
# line 7 "example_hello_world.f95"

Quote:
}

So it seems like it's doing some kind of fortran->C conversion,
and it is somehow related to the NAGWare compiler...

Does anybody have any idea what tool this is, where I could
possibly obtained it and what would be the URL of this tool?

Regards,
Bart

--
        "Share what you know.  Learn what you don't."



Tue, 05 Feb 2008 15:37:21 GMT  
 fcomp ?
I seem to recall that NAG uses a Fortran to C conversion and then compiles
the result using a C compiler to create the Fortran exe..
My guess?
fcomp was installed by some NAG Fortran installation and when user at a
later data un-installed it,
fcomp was left behind.


Tue, 05 Feb 2008 16:54:47 GMT  
 fcomp ?

Quote:
> I seem to recall that NAG uses a Fortran to C conversion and then compiles
> the result using a C compiler to create the Fortran exe..
> My guess?
> fcomp was installed by some NAG Fortran installation and when user at a
> later data un-installed it,
> fcomp was left behind.

Yep, I guess this was a `left-behind' from my installation of the
F-compiler... apparently, after unpacking the tarball containing
the F-compiler, you have an fcomp binary in the lib directory:


F_031017/lib/fcomp

Problem solved, and file removed :-)

Regards,
Bart

--
        "Share what you know.  Learn what you don't."



Tue, 05 Feb 2008 18:12:45 GMT  
 fcomp ?


Quote:
> However, if i run fcomp on an f90 file, it seems to output some
> C-file:
...
> So it seems like it's doing some kind of Fortran->C conversion,
> and it is somehow related to the NAGWare compiler...

> Does anybody have any idea what tool this is, where I could
> possibly obtained it and what would be the URL of this tool?

You have already found out that this was indeed part of the NAG compiler
(or, in this case, the F compiler, derived from NAG).

Just to answer the other part of your question, you can't buy it as a
separate standalone product, but if you get the NAG compiler, you can
use it's -S switch to output this C code file. You could consider the
Fortran->C conversion to be a tool included in the compiler. But note
that the generated C code tends to heavily reference the compiler's
run-time support library. You *CAN* compile and use the resulting C
code, but you have to bring along the support "baggage," which makes it
less than ideal as a standalone language conversion tool.

--
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain



Tue, 05 Feb 2008 23:24:00 GMT  
 fcomp ?

Quote:


> Unknown option -V

> Unknown option --version

> Unknown option --Version

> Unknown option -h

> Unknown option --h

Don't forget the ever-popular
    strings fcomp | less

(I know you solved your problem, but just in case it happens again).

--
pa at panix dot com



Tue, 05 Feb 2008 23:57:44 GMT  
 fcomp ?

Quote:

> Don't forget the ever-popular
>     strings fcomp | less

> (I know you solved your problem, but just in case it happens again).

Interesting!  I didn't know that one. :-)

Thanks,
Bart

--
        "Share what you know.  Learn what you don't."



Wed, 06 Feb 2008 00:11:50 GMT  
 fcomp ?
On Fri, 19 Aug 2005 16:11:50 +0000 (UTC),


Quote:

>> Don't forget the ever-popular
>>     strings fcomp | less
>> (I know you solved your problem, but just in case it happens again).
> Interesting!  I didn't know that one. :-)
> Thanks,
> Bart

strings can be most useful.  Although my desktop is a Windows machine, I
run cygwin on it to log onto various Linux/Unix machines and read my mail
on a Sun with pine.  Any dodgy attachments that got past the Uni's spam
catcher?  Save to file and run strings to look for Windows library entry-
points.  Suspicious URLs?  Retrieve them using wget then do the same.
It's worth spending a couple of minutes reading the man pages to learn
how to tailor its behaviour.

--
Ivan Reid, Electronic & Computer Engineering,     ___     CMS  Collaboration,

        KotPT -- "for stupidity above and beyond the call of duty".



Wed, 06 Feb 2008 03:25:32 GMT  
 fcomp ?

Quote:

> strings can be most useful.  Although my desktop is a Windows machine, I
> run cygwin on it to log onto various Linux/Unix machines and read my mail
> on a Sun with pine.

Going slightly off-topic right now, but Ivan, you know that there
is something like PuTTY I guess?  If all you want to do is log on
to *nix machine, then PuTTY is a much more lightweight solution
than installing a whole cygwin...  See

http://www.chiark.greenend.org.uk/~sgtatham/putty/

Quote:
> Any dodgy attachments that got past the Uni's spam
> catcher?  Save to file and run strings to look for Windows library entry-
> points.  Suspicious URLs?  Retrieve them using wget then do the same.

By the way, wget is also available as a native Windows binary...
it's supposed to be downloadable somewhere from
http://wget.sunsite.dk/ but I see the webpage is updated very
recently and they don't provide a download link yet... Google
should be your friend...

But OK... you probably do more things on your Windows machine
than just using ssh and wget... so actually cygwin might not be a
bad solution after all ;-)

And of course, there's a lot of other Open Source Software for
your Windwos desktop out there... often as a native Windows binary
without the need to install cygwin.  You might want to take a look at my
OSSwin page at http://osswin.sourceforge.net/

Quote:
> It's worth spending a couple of minutes reading the man pages to learn
> how to tailor its behaviour.

OK.  Will do.

Best wishes,
Bart

--
        "Share what you know.  Learn what you don't."



Wed, 06 Feb 2008 05:44:33 GMT  
 fcomp ?
On Fri, 19 Aug 2005 21:44:33 +0000 (UTC),


Quote:

>> strings can be most useful.  Although my desktop is a Windows machine, I
>> run cygwin on it to log onto various Linux/Unix machines and read my mail
>> on a Sun with pine.
> Going slightly off-topic right now, but Ivan, you know that there
> is something like PuTTY I guess?  If all you want to do is log on
> to *nix machine, then PuTTY is a much more lightweight solution
> than installing a whole cygwin...  See
> http://www.chiark.greenend.org.uk/~sgtatham/putty/

        Yes, I usually use PuTTy from home to check mail and news.
At work with a 100 Mbps connection it's handy to run X and throw back
windows to the cygwin display, especially from CERN where I might need
to have rxvt and emacs open in 4 or 5 different library directories at
once when I'm debugging -- fvwm2 with 8 display panes does nicely.

Quote:
>> Any dodgy attachments that got past the Uni's spam
>> catcher?  Save to file and run strings to look for Windows library entry-
>> points.  Suspicious URLs?  Retrieve them using wget then do the same.

> By the way, wget is also available as a native Windows binary...
> it's supposed to be downloadable somewhere from
> http://wget.sunsite.dk/ but I see the webpage is updated very
> recently and they don't provide a download link yet... Google
> should be your friend...

        I didn't know that but as I said, I usually have X/fvwm2 running so
a local rxvt window is little more than a mouse click away.  It also means
I can load up gfortran for F95 code testing (to stay slightly on-topic).
Cut-'n'-paste works in X windows these days too, and is a bit more convenient
than in a DOS-box.

Quote:
> But OK... you probably do more things on your Windows machine
> than just using ssh and wget... so actually cygwin might not be a
> bad solution after all ;-)
> And of course, there's a lot of other Open Source Software for
> your Windwos desktop out there... often as a native Windows binary
> without the need to install cygwin.  You might want to take a look at my
> OSSwin page at http://osswin.sourceforge.net/

        Thanks, I'll do that.  There's probably a version of strings for
Windows too, I vaguely recall something for DOS.

Quote:
>> It's worth spending a couple of minutes reading the man pages to learn
>> how to tailor its behaviour.
> OK.  Will do.

--
Ivan Reid, Electronic & Computer Engineering,     ___     CMS  Collaboration,

GSX600F, RG250WD, DT175MX   "You Porsche. Me pass!"  DoD #484  JKLO# 003, 005
WP7# 3000   LC Unit #2368 (tinlc)   UKMC#00009   BOTAFOT#16    UKRMMA#7 (Hon)
        KotPT -- "for stupidity above and beyond the call of duty".


Thu, 07 Feb 2008 07:11:22 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. fcomp error using 80bit numbers

2. HELP: fcomip doesn't work, (fcomp+fnstsw) does

3. newbie:fcomp message, core dumped

 

 
Powered by phpBB® Forum Software