|
|
Up |
|
|
  |
Author: rudrarudra Date: May 8, 2008 10:20
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 !- - - - - - - - - - - - - - - - - - - - - - - - ...
|
| Show full article (1.77Kb) |
|
| | 13 Comments |
|
  |
Author: Steven G. KarglSteven G. Kargl Date: May 8, 2008 10:38
In article p25g2000pri.googlegroups.com>,
rudra gmail.com> writes:
> 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)
Why subtract 0.0?
|
| Show full article (2.48Kb) |
|
| | no comments |
|
  |
Author: rudrarudra Date: May 10, 2008 23:09
this is a subroutine and seed, boxl is supplied`
|
| |
| no comments |
|
  |
Author: Craig PowersCraig Powers Date: May 12, 2008 10:57
rudra wrote:
> 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?
Are you certain that it necessarily will converge? Are you getting the
same random sequence from the two compilers?
What have you done to try to characterize the nonconvergence? Do you
even have the slightest idea where the two compilers are diverging? I
would strongly recommend that you study that, using write statements or
a debugger.
|
| |
| no comments |
|
  |
Author: Steven G. KarglSteven G. Kargl Date: May 12, 2008 11:09
> this is a subroutine and seed, boxl is supplied`
>
Nothing like deleting all context from your follow up.
When I asked 'what is seed?', I literally meant give
us the value. Did you actually RTFM, which tells you
how to use RAN() in gfortran? When I asked 'What is
boxl?' Either show us the code or at least tell us
what boxl() does.
|
| |
| no comments |
|
  |
Author: glen herrmannsfeldtglen herrmannsfeldt Date: May 12, 2008 12:22
Craig Powers wrote:
> rudra wrote:
>> 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?
> Are you certain that it necessarily will converge? Are you getting the
> same random sequence from the two compilers?
I agree. A program could be very sensitive to roundoff such that
it doesn't converge or doesn't seem to converge. In some cases,
the result can alternate between values differing in the low order
but, and so will 'fail to converge' if compared for equality.
If it diverges (goes to infinity) then that is very different.
-- glen
|
| |
| no comments |
|
  |
Author: Michael MetcalfMichael Metcalf Date: May 12, 2008 13:04
"glen herrmannsfeldt" ugcs.caltech.edu> wrote in message
news:mKednd9g_6UrCrXVnZ2dnUVZ_srinZ2d@comcast.com...
> differing in the low order but ...
Some form of fuzzy logic?
Regards,
Mike Metcalf
|
| |
| no comments |
|
  |
Author: glen herrmannsfeldtglen herrmannsfeldt Date: May 12, 2008 14:17
Michael Metcalf wrote:
> "glen herrmannsfeldt" ugcs.caltech.edu> wrote in message
> news:mKednd9g_6UrCrXVnZ2dnUVZ_srinZ2d@comcast.com...
>>differing in the low order but ...
> Some form of fuzzy logic?
http://en.wikipedia.org/wiki/Periodic_point
http://en.wikipedia.org/wiki/Limit_set
When using something like Newton-Raphson, it is non
unusual that the limit, even for a scalar, has a
period greater than one. For multi-dimensional systems
the result can be much more complicated.
Since the OP didn't give many details, it is hard to know,
but it might be that on one system it does converge to
a fixed point (period one cycle), and on others it doesn't.
-- glen
|
| |
| no comments |
|
  |
Author: Craig PowersCraig Powers Date: May 12, 2008 14:45
glen herrmannsfeldt wrote:
> Michael Metcalf wrote:
>> "glen herrmannsfeldt" ugcs.caltech.edu> wrote in message
>> news:mKednd9g_6UrCrXVnZ2dnUVZ_srinZ2d@comcast.com...
>
>>> differing in the low order but ...
>
>> Some form of fuzzy logic?
>
> http://en.wikipedia.org/wiki/Periodic_point
>
> http://en.wikipedia.org/wiki/Limit_set
>
> When using something like Newton-Raphson, it is non
> unusual that the limit, even for a scalar, has a
> period greater than one. For multi-dimensional systems
> the result can be much more complicated.
>
> Since the OP didn't give many details, it is hard to know,
> but it might be that on one system it does converge to ...
|
| Show full article (2.39Kb) |
| no comments |
|
  |
|
|
  |
Author: Michael MetcalfMichael Metcalf Date: May 12, 2008 15:32
"glen herrmannsfeldt" ugcs.caltech.edu> wrote in message
news:5fudneccWLcaL7XVnZ2dnUVZ_gudnZ2d@comcast.com...
> Michael Metcalf wrote:
>> "glen herrmannsfeldt" ugcs.caltech.edu> wrote in message
>> news:mKednd9g_6UrCrXVnZ2dnUVZ_srinZ2d@comcast.com...
>
>>>differing in the low order but ...
>
>> Some form of fuzzy logic?
Well, I looked as those references, but 'low order buts' were nowhere
mentioned :-).
Regards,
Mike Metcalf
|
| |
| no comments |
|
|
|
|