compiler problem



hello friends,
i was just trying to see the performance of different compiler
(gfortran and ifort) and there is a problem inthis part of the code:
"===============Creating Initial Configuration=============="
58 write(*,&
59 '(1x,"Minimum distance between any two particle is",
1x,f6.4)'),rcut !rcut=1.5
60 !-----------------------------------------------
61 ! INITIALISE POSITION
62 !-----------------------------------------------
63 10 do i=1,ntot
64 x(i)=boxl*(ran(seed)-0.0)
65 y(i)=boxl*(ran(seed)-0.0)
66 z(i)=boxl*(ran(seed)-0.0)
67 call pbc(x,y,z,boxl)
68 end do
69 !- - - - - - - - - - - - - - - - - - - - - - - -
70 ! KEEPING MINIMUM DIST. BETWEEN ANY TWO
71 ! ATOM GREATER THEN RCUT
72 !- - - - - - - - - - - - - - - - - - - - - - - -
73 do i=1,nap-1
74 do j=i+1,nap
75 dx=x(i)-x(j)
76 dy=y(i)-y(j)
77 dz=z(i)-z(j)
78
79 dist=dsqrt(dx*dx+dy*dy+dz*dz)
80 tr=tr+1
81 ! write(*,*) tr
82 if (dist<rcut)go to 10
83 end do
84 end do
85 write(*,'(1x,"Success after",1x,i0,1x,"try")')tr
86 call mindist(x,y,z)
87 write(*,*) &
88
"==========================================================="
89 write(*,*) ""
90
91 !-----------------------------------------------
92 ! INITIAL CONFIGURATION DONE
93 !-----------------------------------------------
while compiling with ifort, its converging after 160k steps, but even
after waiting for 1000k steps with gfortran, its not
converging......do you think its problem with ran? can you suggest a
better way?
.



Relevant Pages

  • Re: f90 with linux 2.6 kernel
    ... > gfortran compiler. ... > Any other advice much appreciated. ... I got the same result as with ifort 8.0.046. ...
    (comp.lang.fortran)
  • Re: compiler problem
    ... i was just trying to see the performance of different compiler ... and there is a problem inthis part of the code: ... while compiling with ifort, its converging after 160k steps, but even ... after waiting for 1000k steps with gfortran, ...
    (comp.lang.fortran)
  • Re: gfortran and ifort unformatted files
    ... Is there some set of compiler options to make it possible for gfortran and ifort to share unformatted files? ... At least with the default options, it appears that they write unformatted files with different header information. ... files I always use the "-assume byterecl" switch with ifort since I've adopted the convention in my code that record lengths are measured in 8-bit bytes as opposed to 4-byte words. ...
    (comp.lang.fortran)
  • Re: Trouble with Hollerith
    ... Although the Intel compiler allows this (it is an extension dating ... lobbying to have it give a warning by default in ifort. ... exponentiation operator is not evaluated until the minus operator is ... Note that the multiplication operator is evaluated first, ...
    (comp.lang.fortran)
  • Re: Specific names for intrinsic functions and optional arguments
    ... nor gfortran to work right. ... ifort 9.something, and SGI IRIX f90. ... if I specify an "optional" BACK dummy arg in the interface ...
    (comp.lang.fortran)