How to compile this?

From: Bart Vandewoestyne (BartVandewoestyneNOSPAM_at_pandora.be)
Date: 02/12/04


Date: Thu, 12 Feb 2004 21:58:06 +0000 (UTC)

I would like to execute 'Algorithm 647' from the ACM Collected
Algorithms. The program is located at:

http://www.netlib.no/netlib/toms/647

When i download the source, and rename it to 647.f, and then try to
compile using the command:

$ f77 647.f

I get:

647.f: In program `testf':
647.f:4:
         SUBROUTINE INFAUR(FLAG,DIMEN,ATMOST,QSS)
                1
647.f:255: (continued):
        CALL INFAUR(FLAG,DIMEN,ATMOST)
                2
Too few arguments passed to `infaur' at (2) versus definition at (1)
[info -f g77 M GLOBALS]

This is weird... an 'official' algorithm having mismatch in arguments???
Did FORTRAN 77 allow this in some cases 'in the old days'?

Simply adding QSS as an argument at line 255 solves the problem party,
because then I get:

bartv@vonneumann:~/research/example_software/647$ f77 647.f
/tmp/ccxn8Xca.s: Assembler messages:
/tmp/ccxn8Xca.s:1980: Error: symbol `MAIN__' is already defined
/tmp/ccxn8Xca.s:4322: Error: symbol `MAIN__' is already defined
/tmp/ccxn8Xca.s:4949: Error: symbol `MAIN__' is already defined

which is probably due to the fact that there are 3 'PROGRAM's in that
file...

My question to the group is: how do i handle this thing? Can I compile
it without modifying it? Suppose it is necessary to add the QSS
argument at line 255, then how do I treat the fact of having more than
one PROGRAM statement in the source file?

By the way... the accompanying paper talks about the program being
compiled with the 'FTN 5.1' compiler...

The f77 compiler i use is:

GNU Fortran 0.5.25 20010319 (prerelease)

Thanks for the help,
Bart

-- 
Bart Vandewoestyne		      Bart.Vandewoestyne_at_pandora.be
Naamsesteenweg 328 bus 201		       GSM: +32 (0)478 397 697
B-3001 Heverlee
----------------------------------------------------------------------
	"Share what you know.  Learn what you don't."


Relevant Pages

  • Re: a clueless bloke tells Xilinx to get a move on
    ... suggestions in this thread (including anonymous: incremental compile) ... have merit independent of whether Brannon does floorplanning. ... Map/Par/Bitgen to finish, I hereby petition Xilinx, Inc., to consider ... Bound algorithm instead. ...
    (comp.arch.fpga)
  • Re: [cryptoapi/sysfs] display cipher details in sysfs
    ... > the attached code (does compile, don't think that it will boot, just ... > algorithm the preference is looked after (it should be made a writeable ... > algorithm very intuitive). ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Obfuscation and Salamander
    ... > exposed in its assemblies/builds? ... the compiler that a function should be compiled as x86 rather than IL, ... able to work out your algorithm. ... by compilers when they compile a class that use them. ...
    (microsoft.public.dotnet.faqs)
  • Re: how to detect the compile is 32 bits or 64 bits?
    ... determined by whether you have a 32- or 64-bit platform. ... Suppose I have an algorithm, such as a cryptography algorithm, that ... but the chunk size differs for the two cases. ... available at compile time increases compiler optimization opportunities ...
    (comp.lang.c)
  • Re: Simple Algorithm
    ... Once you have the algorithm, ... int main ... compile, link it and let it run. ... Also think about ways to verify that the program is ...
    (comp.lang.cpp)