[AMBER] random number generators visible from nab: choice necessary?

From: M. L. Dodson <activesitedynamics.comcast.net>
Date: Mon, 7 Jun 2010 15:22:43 -0500

Hello folks,

I have been investigating the random number generators available in nab (for a project interfacing nab to a simulated annealing routine written in Fortran) and find that the function gauss() is implemented in rand2.c as

REAL_T gauss( REAL_T *mean, REAL_T *sd ) {
        etc.
}

but it is also defined in random.f as

!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!+ Default generator wrapper for gauss_gen
subroutine gauss(am,sd,v)
   implicit none
#include "random.h"
   _REAL_, intent (in) :: am, sd
   _REAL_, intent (out) :: v
   type (rand_gen_state) :: def_gen
   common /raset1/ def_gen
   call gauss_gen(def_gen, am, sd, v)
end subroutine gauss

Trying to save myself some detailed tracing for possible interactions, should I be concerned with the wrong version being linked in? Or should I be calling

gauss_gen(def_gen, am, sd, v)

directly with my own wrapper? Or maybe I should add the library containing the compiled random.f to the command line so that it will be chosen first by the linker?

Thanks!
Bud Dodson

PS, the SA routine has its own enclosed version of the Marsaglia generator, but I would like to restrict the added code to the minimum necessary.

-- 
M. L. Dodson
Business email: activesitedynamics-at-comcast-dot-net
Personal email: mldodson-at-comcast-dot-net
Phone: eight_three_two-five_63-386_one
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jun 07 2010 - 13:30:03 PDT
Custom Search