PDA

View Full Version : problems with input files!



Milenkonslisboa
July 15th, 2010, 01:45 PM
I have fortran code,try to make it with f77.I get this:
milenko@hp6830s:~/eik$ make
make: Circular eik.out <- eik dependency dropped.
f77 -O1 -o eik.o
/usr/bin/f77: No input files specified
make: *** [eik] Error 255
This is make makefile:
#
F77=f77
FFLAGS= -O1
# Executables
eik: eik.o eik.out vel1 eik.para velo
$(F77) $(FFLAGS) -o eik.o
# Object files
eik.o: eik.f eik.out vel1 eik.para velo
$(F77) $(FFLAGS) -c eik.f -o eik.o
I don't get where is the problem.

trent.josephsen
July 15th, 2010, 01:53 PM
This is why make echos command lines:

f77 -O1 -o eik.o
See a problem?

trent.josephsen
July 15th, 2010, 01:53 PM
Okay, what is it with the Quick Reply feature? Every single time I use it, it posts twice. <fume>

Milenkonslisboa
July 15th, 2010, 02:13 PM
Thanks,but where is the problem?More details if possible.

PaulM1985
July 15th, 2010, 02:18 PM
I think the problem is that the line that is echoed to the command line doesn't have any input files to compile.

Paul

Milenkonslisboa
July 15th, 2010, 02:38 PM
Code:
open(13,file='eik.out',status='unknown')
open(11,file='eik.para',status='unknown')
open(21,file='velo',status='unknown')
print* ,'enter input file name for velocity field'
read(*, 1003) fname
1003 format(a20)
open(12,file=fname,status='unknown')

Some Penguin
July 15th, 2010, 08:13 PM
SPECIFY THE INPUT FILE NAME IN THE COMMAND. Sheesh.

And in case it's still not obvious, "-o" means OUTPUT.

Milenkonslisboa
July 16th, 2010, 09:31 AM
How should I do that?
After make -d get this:
Must remake target `eik'.
f77 -O1 -o eik.o
Putting child 0x00e914d0 (eik) PID 4708 on the chain.
Live child 0x00e914d0 (eik) PID 4708
/usr/bin/f77: No input files specified
Reaping losing child 0x00e914d0 PID 4708
make: *** [eik] Error 255
Removing child 0x00e914d0 PID 4708 from chain.

PaulM1985
July 16th, 2010, 10:22 AM
You will probably find a solution here:

http://lmgtfy.com/?q=how+to+compile+fortran+code+in+linux

Paul