[gmx-users] is NOASSEMBLYLOOPS broken?

Justin Lemkul jalemkul at vt.edu
Sat Jul 21 06:03:09 CEST 2012



On 7/20/12 11:47 PM, Mark Abraham wrote:
> On 20/07/2012 11:32 PM, francesco oteri wrote:
>> Dear gromacs users (and eventually developers too),
>> I am trying to debug gromacs and on the gromacs website
>> http://www.gromacs.org/Developer_Zone/Programming_Guide/Programmer's_Guide#local_index
>>
>>
>> It is stated:
>>
>> "gromacs can be forced to use non assembly routines to do force
>> calculations (easier to debug) by defining "NOASSEMBLYLOOPS=1" as
>> environment variable (e.g. put "export NOASSEMBLYLOOPS=1" without the
>> quotes in your /etc/profile)"
>>
>> I tried to use this approach, but it doesn't work since gdb goes
>> inside the assembly loop.
>>
>> Moreover, in order to check spelling errors I got each getenv call:
>>
>> grep -R getenv  `find -name *.c`
>
> You can also search git history with commands like
>
> git log -p -SNOASSEMBLYLOOPS
>
>>
>>
>> ./src/kernel/fflibutil.c:        lib = getenv("GMXLIB");
>> ./src/kernel/runner.c:        if ((env = getenv("GMX_MAX_THREADS")) != NULL)
>> ./src/kernel/runner.c:
>> getenv("GMXGHAT"),inputrec, (Flags & MD_REPRODUCIBLE));
>> ./src/kernel/readir.c:  if (getenv("GALACTIC_DYNAMICS") == NULL) {
>> ./src/kernel/pdb2gmx.c:    bFFRTPTERRNM =
>> (getenv("GMX_NO_FFRTP_TER_RENAME") == NULL);
>> ./src/kernel/do_gct.c:    if ((buf = getenv("DISTGCT")) == NULL)
>> ./src/kernel/md.c:        if (getenv("GMX_FORCE_UPDATE"))
>> ./src/ngmx/logo.c:  if ((newcol=getenv("LOGO"))!=NULL)
>> ./src/ngmx/x11.c:  fontname=getenv("GMXFONT");
>> ./src/ngmx/x11.c:  display=getenv("DISPLAY");
>> ./src/contrib/do_multiprot.c:    if ((mptr=getenv("MULTIPROT")) == NULL) {
>> ./src/contrib/do_shift.c:  if ((dptr=getenv("TOTAL")) == NULL)
>> ./src/gmxlib/tpxio.c:            env = getenv("GMX_NOCHARGEGROUPS");
>> ./src/gmxlib/checkpoint.c:        if
>> (getenv(GMX_IGNORE_FSYNC_FAILURE_ENV)==NULL)
>> ./src/gmxlib/checkpoint.c:            if
>> (getenv("GMX_ALLOW_CPT_MISMATCH") == NULL)
>> ./src/gmxlib/statutil.c:        select = getenv("GMXTIMEUNIT");
>> ./src/gmxlib/statutil.c:    select = getenv("GMX_VIEW_XVG");
>> ./src/gmxlib/statutil.c:    envstr = getenv("GMXNPRIALL");
>> ./src/gmxlib/statutil.c:        envstr = getenv("GMXNPRI");
>> ./src/gmxlib/mtop_util.c:    env = getenv("GMX_MAXRESRENUM");
>> ./src/gmxlib/disre.c:    ptr = getenv("GMX_DISRE_ENSEMBLE_SIZE");
>> ./src/gmxlib/viewit.c:    if (getenv("DISPLAY") == NULL) {
>> ./src/gmxlib/viewit.c:    if ( ! (cmd=getenv(env)) ) {
>> ./src/gmxlib/viewit.c:      if ( getenv("XMGR") )
>> ./src/gmxlib/viewit.c:    if ( ! (cmd=getenv(env)) )
>> ./src/gmxlib/enxio.c:    if (getenv("GMX_ENX_NO_FATAL") != NULL)
>> ./src/gmxlib/main.c:    if (getenv(GMX_CHECK_MPI_ENV) == NULL)
>> ./src/gmxlib/network.c:  if (getenv("GMX_NO_NODECOMM") == NULL) {
>> ./src/gmxlib/gmx_fatal.c:        if ((temp=getenv("WHERE")) != NULL)
>> ./src/gmxlib/futil.c:        env = getenv("GMX_MAXBACKUP");
>> ./src/gmxlib/futil.c:        if (bUnbuffered ||
>> ((bufsize=getenv("LOG_BUFS")) != NULL)) {
>> ./src/gmxlib/futil.c:            if (!found && (s=getenv("PATH")) != NULL)
>> ./src/gmxlib/futil.c:    lib=getenv("GMXLIB");
>> ./src/gmxlib/copyrite.c:  return (getenv("GMX_NO_QUOTES") == NULL);
>> ./src/gmxlib/vmdio.c:    pathenv = getenv("VMD_PLUGIN_PATH");
>> ./src/gmxlib/txtdump.c:  if (getenv("LONGFORMAT") != NULL)
>> ./src/gmxlib/sighandler.c:    if (getenv("GMX_NO_TERM") == NULL)
>> ./src/gmxlib/sighandler.c:    if (getenv("GMX_NO_INT") == NULL)
>> ./src/gmxlib/sighandler.c:    if (getenv("GMX_NO_USR1") == NULL)
>> ./src/gmxlib/nonbonded/nonbonded.c:
>> if(getenv("GMX_NOOPTIMIZEDKERNELS") != NULL)
>> ./src/mdlib/shellfc.c:  shfc->bPredict   = (getenv("GMX_NOPREDICT") == NULL);
>> ./src/mdlib/shellfc.c:    shfc->bForceInit = (getenv("GMX_FORCEINIT") != NULL);
>> ./src/mdlib/qm_orca.c: buf = getenv("BASENAME");
>> ./src/mdlib/qm_orca.c: buf = getenv("ORCA_PATH");
>> ./src/mdlib/ns.c:   fr->ns.bCGlist = (getenv("GMX_NBLISTCG") != 0);
>> ./src/mdlib/ns.c:        char *ptr=getenv("GMX_DUMP_NL");
>> ./src/mdlib/tpi.c:    ptr = getenv("GMX_TPIC_MASSES");
>> ./src/mdlib/tpi.c:  dump_pdb = getenv("GMX_TPI_DUMP");
>> ./src/mdlib/forcerec.c:    if (getenv("GMX_NO_SOLV_OPT"))
>> ./src/mdlib/forcerec.c:         getenv("GMX_NO_ALLVSALL") == NULL
>> ./src/mdlib/forcerec.c:    env = getenv("GMX_SCSIGMA_MIN");
>> ./src/mdlib/forcerec.c:    if (getenv("GMX_NB_GENERIC") != NULL)
>> ./src/mdlib/forcerec.c:    fr->UseOptimizedKernels =
>> (getenv("GMX_NOOPTIMIZEDKERNELS") == NULL);
>> ./src/mdlib/forcerec.c:    if (getenv("GMX_FORCE_TABLES"))
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("NCPUS");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("MEM");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("ACC");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("CPMCSCF");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("SASTEP");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("GAUSS_DIR");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("GAUSS_EXE");
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("DEVEL_DIR");
>> ./src/mdlib/qm_gaussian.c:   * environment using getenv().
>> ./src/mdlib/qm_gaussian.c:    buf = getenv("STATE");
>> ./src/mdlib/constr.c:  char *env=getenv("GMX_SUPPRESS_DUMP");
>> ./src/mdlib/constr.c:    env = getenv("GMX_MAXCONSTRWARN");
>> ./src/mdlib/gmx_wallcycle.c:    if (PAR(cr) &&
>> getenv("GMX_CYCLE_BARRIER") != NULL)
>> ./src/mdlib/gmx_wallcycle.c:    if (getenv("GMX_CYCLE_ALL") != NULL)
>> ./src/mdlib/nsgrid.c:    ptr = getenv("GMX_NSCELL_NCG");
>> ./src/mdlib/mdebin.c:        md->bConstrVir =
>> (getenv("GMX_CONSTRAINTVIR") != NULL);
>> ./src/mdlib/mdebin.c:            md->bEner[i] =  (EI_DYNAMICS(ir->eI)
>> && getenv("GMX_VIRIAL_TEMPERATURE"));
>> ./src/mdlib/mdebin.c:    bNoseHoover =
>> (getenv("GMX_NOSEHOOVER_CHAINS") != NULL); /* whether to print
>> Nose-Hoover chains */
>> ./src/mdlib/mdebin.c:        bNoseHoover =
>> (getenv("GMX_NOSEHOOVER_CHAINS") != NULL);
>> ./src/mdlib/pull.c:    if (getenv("GMX_NO_PULLVIR") != NULL)
>> ./src/mdlib/partdec.c:  cap_env = getenv("GMX_CAPACITY");
>> ./src/mdlib/domdec.c:    CartReorder = (getenv("GMX_NO_CART_REORDER") == NULL);
>> ./src/mdlib/domdec.c:    val = getenv(env_var);
>> ./src/mdlib/domdec.c:    if (getenv("GMX_DD_ORDER_ZYX") != NULL)
>> ./src/mdlib/domdec.c:            getenv("GMX_PMEONEDD") == NULL)
>> ./src/tools/gmx_tune_pme.c:        if ( (cp = getenv("MPIRUN")) != NULL)
>> ./src/tools/gmx_tune_pme.c:    if ( (cp = getenv("MDRUN" )) != NULL )
>> ./src/tools/gmx_eneconv.c:  if ((getenv("VERBOSE")) != NULL)
>> ./src/tools/do_dssp.c:  if ((dptr=getenv("DSSP")) == NULL)
>> ./src/tools/gmx_cluster.c:  if (getenv("TESTMC")) {
>> ./src/tools/gmx_dipoles.c:    if ((ptr = getenv("GKRWIDTH")) != NULL) {
>> ./src/tools/gmx_membed.c:        if (getenv("GMX_FORCE_UPDATE"))
>> ./src/tools/gmx_membed.c:
>> getenv("GMXGHAT"),inputrec, (Flags & MD_REPRODUCIBLE));
>> ./src/tools/gmx_energy.c:  if ((getenv("VERBOSE")) != NULL)
>> ./src/tools/gmx_energy.c:  if ((getenv("VERBOSE")) != NULL)
>> ./src/tools/gmx_wham.c:        if(!(Path=getenv("GMX_PATH_GZIP")))
>>
>> Interestingly, NOASSEMBLYLOOPS it is never checkd but the variable
>> GMX_NOOPTIMIZEDKERNELS seems to have the same meaning.
>> Is this an undocumented changement?
>

I would contend that it is not undocumented at all.  This particular environment 
variable has been in the manual since 2010, if I'm reading the git log 
correctly.  The list in the manual is, of course, woefully incomplete...

> Yes. It was changed 3.5 years ago in commit 6670f492. I expect nobody maintains
> that guide, but it was a welcome community contribution at the time.
>
>>
>> What about the documentation of the internal environment variable in
>> gromacs discussed in
>> http://lists.gromacs.org/pipermail/gmx-developers/2012-March/005714.html
>> ?
>
> It hasn't happened yet. People are too busy writing the code :-( I opened
> http://redmine.gromacs.org/issues/974 so we don't forget about it.
>

Great idea.  I will try to help out with this.  I started to improve the 
environment variable section but never finished.  Some of them aren't 
immediately clear to me, but I can do some more digging.

-Justin

-- 
========================================

Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================





More information about the gromacs.org_gmx-users mailing list