[30-IX-2013]
Hi amber users,
I am working with amber11 code and I would like to do a test with the MPI communicators. In order to do this, I need to create an integer variable to be read on the command line BEFORE the MPI code at "multisander.f" is executed (this variable is used in a if-statement block before the MPI "commsander and commmaster" communicators asre created). Something like:
$AMBERHOME/exe/sander.MPI -ng 8 -myVariable 1 -groupfile myGroupFile
I want to do something like the -rem variable for the Replica Exchange MD. It has to be initialised before the MPI code is started.
I have already included some lines in "mdfil.f" to be able to parse the argument into sander (similarly to -rem). Also, the variable is initialised to zero at multisander.f in a similar way to rem=0 (actually, just after rem=0 is initialised).
But the variable has to be declared as global beforehand to be used and to be accesible to all the program.
At the beginning I tried different combinations including the variable in "md.h" and "parallel.h" to make it available to all the program and also in "mdread.f" to print its value in the output file, but I obtained some error messages reading that the variable was of a type "undefined".
Later, I tried to do something similar to "-rem" variable. I thought that if I define the variable similarly as the rem variable is defined, it will work. Then I declared the variable as an "integer, save" at "remd.f" (this module is first read in multisander.f so rem variable is accesible). But doing this I also get errors saying that the variable is undefined in mdread.f:
_mdread.f(2715): error #6404: This name does not have a type, and must have an explicit type. [MYVAR]
This happens even after loading the module including a new line in the MPI SOFT-CORE section:
#ifdef MPI /* SOFT CORE */
use softcore, only : scalpha, scbeta, ifsc, scmask, logdvdl, dvdl_norest, dynlmb
use mbar, only : ifmbar, bar_intervall, bar_l_min, bar_l_max, bar_l_incr
use remd, only : myVar !! KBG new variable
#endif
Probably I have missed something really simple but I cannot guess what I am doing wrong.
Could anyone tell me where I should declare this variable to be read on the command line and be accesible to all the sander.MPI after compilation?
Than you very much!!
Kepa K.
****************************************************************
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Sep 30 2013 - 09:00:04 PDT