Reputation: 11
I am trying to run a fortran code with the below command: f95 -lm extrapolate3-node-irregularv2.f
and I got the below error
extrapolate3-node-irregularv2.f:1.14:
PROGRAM extrapolate3c--------------------------------------------
1
Error: Invalid form of PROGRAM statement at (1)
The beginning of my program like this:
PROGRAM extrapolate3
c------------------------------------------------------
c 2nd step after runnin extrapolate-node-master...-v5(all dat).f
c so take the xxx-NODUP.dat file and proceed ..
c ------- This extrapolates the int pts to the nodal values
c and then it outputs as per TECPLOT requirements~
c ---------------------------------------
IMPLICIT NONE
integer tot_node,dim,tot_elem,d1
parameter (dim=8,tot_elem=25,tot_node=72)
INTEGER i,j,k,writecount,count
DOUBLE PRECISION x(tot_elem*8),y(tot_elem*8),
$ z(tot_elem*8)
double precision val(tot_elem*8),d3
integer kstep,KINC
integer jelem(tot_elem*8),
$ kintk(tot_elem*8)
integer l_jelem,l_kintk(dim)
double precision l_x(dim),l_y(dim),l_z(dim)
double precision l_val(dim),l_nodal(dim)
double precision xi(dim),eta(dim),zeta(dim),wvar
double precision shfn(dim,dim),shfninv(dim,dim),one,eighth
double precision det
integer ii,jj,kk,err10
integer conn(tot_elem,dim+2)
double precision g_nodal(tot_node)
double precision g_x_node(tot_node),
$ g_y_node(tot_node),
$ g_z_node(tot_node)
double precision v1,v2,v3,dummy
double precision l_x_node(dim),l_y_node(dim),l_z_node(dim)
integer g_common_node(tot_node)
Did anyone meet the same problem before?
Upvotes: 1
Views: 4507
Reputation: 78316
Look closely at the error message, which reports an error in the statement
PROGRAM extrapolate3c--------------------------------------------
which appears to be the first two lines of your program, i.e.
PROGRAM extrapolate3
c------------------------------------------------------
run together. I suspect an invalid line-end or carriage-return character between the lines. Do some editing, with a proper programmer's editor such as vi
or emacs
and make sure that all the whitespace in the source file is space characters (no tabs, no funny invisible non-printing characters) and all line-endings are, well, whatever is the default on your platform. That kind of error sometimes occurs when copying source from, say, Windows to, say, Linux, and recompiling.
Upvotes: 2