colvars icon indicating copy to clipboard operation
colvars copied to clipboard

The latest (lepton) version causes compilation error of NAMD

Open fhh2626 opened this issue 3 years ago • 5 comments

Hi,

When the latest devel version of NAMD was patched with the master (with downloaded lepton) version of Colvars, the compilation yielded the following error: Make.depends:1: *** recipe commences before first target. Stop.

However, everything works if an old version (2022.5) of Colvars (without lepton) was used.

Any suggestion about how to address this issue is appreciated.

Thanks, Haohao

fhh2626 avatar Aug 09 '22 03:08 fhh2626

This is caused by a problem at the beginning of Make.depends:

        $(CC) $(CXXFLAGS) $(COPTO)obj/AVXTiles.o $(COPTC) src/AVXTiles.c
        $(CC) $(CXXFLAGS) $(COPTO)obj/AVXTilesKernel.o $(COPTC) src/AVXTilesKernel.c
        $(CC) $(CXXFLAGS) $(COPTO)obj/AVXTileLists.o $(COPTC) src/AVXTileLists.c
obj/ComputeMoa.o: \
        obj/.exists \
        src/ComputeMoa.C \

Trying to figure out how to prevent this from happening.

jhenin avatar Aug 11 '22 09:08 jhenin

Alternately, it could come from various conflicts between the Makefile of NAMD and a previous version. It's hard to say more without more details.

jhenin avatar Aug 11 '22 13:08 jhenin

Thanks for your reply! Is there any way to circumvent this issue?

fhh2626 avatar Aug 11 '22 13:08 fhh2626

Based on my experience today, I would recommend:

  1. check all Makefiles for traces of incomplete merges (lines with <<<< ==== >>>>) and remove them :-)
  2. make clean
  3. make depends
  4. make

jhenin avatar Aug 11 '22 15:08 jhenin

Thanks! I will try!

Haohao

fhh2626 avatar Aug 12 '22 02:08 fhh2626

@fhh2626 You should be able to patch the clean namd/devel repo now and build without issues. Thanks for your report!

jhenin avatar Sep 02 '22 13:09 jhenin

Thanks for the fix!

fhh2626 avatar Sep 03 '22 04:09 fhh2626

Hi, @jhenin ,

I got in function `Lepton::ParsedExpression::createCompiledVectorExpression(int) const': ParsedExpression.cpp:(.text+0xbba): undefined reference to `Lepton::CompiledVectorExpression::CompiledVectorExpression(Lepton::ParsedExpression const&, int)' error when compiling NAMD with the latest of Colvars. I used the master branch of OpenMM. Could you please have a look at it?

Thanks, Haohao

fhh2626 avatar Sep 03 '22 10:09 fhh2626

@fhh2626 Sorry, we had agreed to stop tracking the NAMD core files but I forgot to disable the script that keeps them up to date in the Colvars repository nightly.

The latest commit fixes this, and the test runs correctly now: https://github.com/Colvars/colvars/runs/8169263173?check_suite_focus=true

giacomofiorin avatar Sep 03 '22 12:09 giacomofiorin

@giacomofiorin Sorry, I downloaded the latest version but still got the same issue.

fhh2626 avatar Sep 03 '22 15:09 fhh2626

Can you please try with clean worktrees for both Colvars and NAMD and using the devel-tools/compile-namd.sh provided in this repo?

giacomofiorin avatar Sep 03 '22 20:09 giacomofiorin

It worked when I use OpenMM 7.7 instead of the master branch. I assume that there is a major update of Lepton inducting the conflict with Colvars.

fhh2626 avatar Sep 04 '22 05:09 fhh2626

Strange, I cannot reproduce this issue. By default update-colvars-code.sh clones the master branch of OpenMM as well, and this is working for me.

jhenin avatar Sep 04 '22 12:09 jhenin

Same here, the error is from an outdated build recipe from Lepton that misses a new file that they added upstream. But the Colvars patch script has been updating this recipe for a while now.

The problem fixed in #494 was Colvars overwriting NAMD 3's Makefile with the NAMD 2 one, which needed fixing but seems unrelated to this issue.

That said, we can confirm on three different platform (@jhenin's computer, mine and the GH Actions environment) that there are no issues with Lepton.

To move forward I'd recommend confirming what I asked earlier, i.e. using clean repositories and a build procedure for NAMD that can be reproduced easily (doesn't have to be the one I mentioned, but it should be clear what it is).

giacomofiorin avatar Sep 04 '22 13:09 giacomofiorin

@giacomofiorin Sorry I did not succeed in using devel-tools/compile-namd.sh.

Still, I used a clean computer, downloaded the latest version of NAMD (devel branch), Colvars (master branch) and OpenMM (master branch). Then I downloaded charm-6.10.2 and proper versions of tcl and fftw (which I provided here).

I first patched NAMD using the Colvars and OpenMM. Then untar charm, tcl and fftw in the NAMD folder and compile charm and NAMD. I still got this issue in function Lepton::ParsedExpression::createCompiledVectorExpression(int) const': ParsedExpression.cpp:(.text+0xbba): undefined reference to Lepton::CompiledVectorExpression::CompiledVectorExpression(Lepton::ParsedExpression const&, int)' Not sure why.

tcl_fftw.zip

charm-6.10.2.zip

fhh2626 avatar Sep 04 '22 15:09 fhh2626

How did you patch NAMD? If you use something different from the procedure listed here, please include it in detail.

giacomofiorin avatar Sep 04 '22 18:09 giacomofiorin

How did you patch NAMD? If you use something different from the procedure listed here, please include it in detail.

export OPENMM_SOURCE=.......
update-colvars-code.sh .......

fhh2626 avatar Sep 05 '22 01:09 fhh2626

@fhh2626 Please be more complete. We have already tried several times and the procedure used in the CI: https://github.com/Colvars/colvars/blob/da4ccd8af334d3b3f831915e7042ae6216fe268e/.github/workflows/backend-template.yml#L144-L147 works offline as well.

Can you post here a link to a full script that reproduces your issue on a recent Linux AMD64 machine? Your pick of the distribution, but if you can use a pre-build VM that is freely downloadable (e.g. from OSBoxes), it's all the better. Presumably since you used pre-compiled versions of Tcl and FFTW, there are no further dependencies to install than the C++ compiler and GNU Make. Please include also the commands that you used to clone repositories, etc. You can't distribute a copy of NAMD, but do specify the commit SHA from its repository.

giacomofiorin avatar Sep 06 '22 19:09 giacomofiorin