We recently changed servers and I have this program I need to get to work on the new server.
Under the old server it never had a problem.
On this server it gives no errors when compiling but when I attempt to run the output file it keeps giving a Segmentation fault (core dumped) error message
I've tried changing just about everything I can think of but keep getting the same result.
program gaussian
implicit none
! This program will calculate pollutant concentration profile
! in x direction based on down wind distance from the source
Real q, u, s, t, h, i, j, k, l, o
Character p, a, b, c, d, e, f
Double precision w
Real g(21,21,7)
Integer n, m, x, y, z
integer ix, iy, iz
real dx, dy, dz
real pi
! The variables used are as follows:
! q=Emission Rate (g/s) ,u= wind velocity, s=sigma y (m),
! t=sigma z calculation (m), i=Ry, j=ry k=Rz, l=rz coefficient
! w=concentration (g/m^3), o= placeholder variable in w calc
! (a-f) = stability estimate p=placeholder (ph) coefficient
! n= ph for intensity of solar radiation, m= ph for day/night
! x= dist in plume direction (m), y= horiz dist off plume axis (m)
! z=height (m), h= emission height (m)
u = 2
q = 200000
pi=3.14
h=10
l=.273
i=.594
j=.262
k=.500
dx = 25
dy = 1
dz = 1
Write(3,*), ' Xdist Ydist Zdist Pollutant Conc '
do 5000 ix = 1, 2000
x = ix*dx
y = 0
z = 0
s=l*(x**i)
t=j*(x**k)
o=exp(-((z-h)**2)/(2*(t**2)))+exp(-((z+h)**2)/(2*(t**2)))
w=q/(2*pi*u*s*t)*exp(-(y**2)/(2*(s**2)))*o
Write(3,*), ' ',x,' ',y, ' ',z, ' ', w
Write(3,*), '*', s, ' ', t, '*'
g(ix,iy,iz)=w
Write(4,*), 'The array value is ...', g(ix,iy,iz)
Print*, g(ix,iy,iz), x,y, z
5000 CONTINUE
END
Under the old server it never had a problem.
On this server it gives no errors when compiling but when I attempt to run the output file it keeps giving a Segmentation fault (core dumped) error message
I've tried changing just about everything I can think of but keep getting the same result.
program gaussian
implicit none
! This program will calculate pollutant concentration profile
! in x direction based on down wind distance from the source
Real q, u, s, t, h, i, j, k, l, o
Character p, a, b, c, d, e, f
Double precision w
Real g(21,21,7)
Integer n, m, x, y, z
integer ix, iy, iz
real dx, dy, dz
real pi
! The variables used are as follows:
! q=Emission Rate (g/s) ,u= wind velocity, s=sigma y (m),
! t=sigma z calculation (m), i=Ry, j=ry k=Rz, l=rz coefficient
! w=concentration (g/m^3), o= placeholder variable in w calc
! (a-f) = stability estimate p=placeholder (ph) coefficient
! n= ph for intensity of solar radiation, m= ph for day/night
! x= dist in plume direction (m), y= horiz dist off plume axis (m)
! z=height (m), h= emission height (m)
u = 2
q = 200000
pi=3.14
h=10
l=.273
i=.594
j=.262
k=.500
dx = 25
dy = 1
dz = 1
Write(3,*), ' Xdist Ydist Zdist Pollutant Conc '
do 5000 ix = 1, 2000
x = ix*dx
y = 0
z = 0
s=l*(x**i)
t=j*(x**k)
o=exp(-((z-h)**2)/(2*(t**2)))+exp(-((z+h)**2)/(2*(t**2)))
w=q/(2*pi*u*s*t)*exp(-(y**2)/(2*(s**2)))*o
Write(3,*), ' ',x,' ',y, ' ',z, ' ', w
Write(3,*), '*', s, ' ', t, '*'
g(ix,iy,iz)=w
Write(4,*), 'The array value is ...', g(ix,iy,iz)
Print*, g(ix,iy,iz), x,y, z
5000 CONTINUE
END