Re: [AMBER] a possible typo bug while building pmemd with mpi

From: Jason Swails <>
Date: Thu, 29 Apr 2010 11:50:28 -0400


On Thu, Apr 29, 2010 at 11:18 AM, Alan <> wrote:

> Hi there,
> So compilation of Amber11 with mpi was going fine and the I got this:
> mpif90 -opmemd gbl_constants.o gbl_datatypes.o state_info.o file_io_dat.o
> mdin_ctrl_dat.o mdin_ewald_dat.o mdin_debugf_dat.o prmtop_dat.o
> inpcrd_dat.o
> dynamics_dat.o img.o parallel_dat.o parallel.o gb_parallel.o pme_direct.o
> pme_recip_dat.o pme_slab_recip.o pme_blk_recip.o pme_slab_fft.o
> pme_blk_fft.o pme_fft_dat.o fft1d.o bspline.o pme_force.o pbc.o
> nb_pairlist.o nb_exclusions.o cit.o dynamics.o bonds.o angles.o dihedrals.o
> extra_pnts_nb14.o runmd.o loadbal.o shake.o prfs.o mol_list.o runmin.o
> constraints.o axis_optimize.o gb_ene.o veclib.o gb_force.o timers.o
> pmemd_lib.o runfiles.o file_io.o bintraj.o pmemd_clib.o pmemd.o random.o
> degcnt.o erfcfun.o nmr_calls.o nmr_lib.o get_cmdline.o master_setup.o
> pme_alltasks_setup.o pme_setup.o ene_frc_splines.o gb_alltasks_setup.o
> nextprmtop_section.o angles_ub.o dihedrals_imp.o cmap.o charmm.o
> charmm_gold.o ../../netcdf/lib/libnetcdf.a
> ld: unknown option: -opmemd
> collect2: ld returned 1 exit status
> make: *** [pmemd] Error 1
> Clearly is should be:
> mpif90 -o pmemd gbl_constants.o ...

It's a little strange that you got this error (I haven't gotten it on any
systems I tried building on), however, here is, in my opinion, the most
logical explanation.

This has to do with LDOUT defined at the bottom of your config.h file. Mine
says: LDOUT= -o . For me, there is a space after the -o in my config.h
file. If we then look at $AMBERHOME/src/pmemd/src/Makefile, we see the

pmemd$(SFX): $(NETCDF) $(OBJS)

Notice that there is no space between $(LDOUT) and $.. This is undoubtedly
the error you ran into. I think it would be a better idea to simply put a
space between those options in the Makefile, but perhaps there is a good
reason why that's not done (i.e. for compatibility with other, non-GNU
unices? I have no experience with those). My guess is that something
removed that extra space at the end of -o in your config.h file...

Ross and/or other developers, should we patch the Makefile to put a space
there? (and the same for pmemd.MPI and pmemd.cuda as well)

All the best,

> and when do this by hand all goes fine. But, trying to pinpoint the error
> was very challenging for me so I could solve that.
> Cheers,
> Alan
> --
> Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
> Department of Biochemistry, University of Cambridge.
> 80 Tennis Court Road, Cambridge CB2 1GA, UK.
> >> <><<
> _______________________________________________
> AMBER mailing list

Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
AMBER mailing list
Received on Thu Apr 29 2010 - 09:00:04 PDT
Custom Search