error in compiling namd

From: Kosar Khajeh (
Date: Tue Jun 11 2019 - 07:45:38 CDT

 Hello dear NAMD users
I am going to to compile NAMD source code on linux system.
I have tried the 2.13 and 2.12 source code versions on Ubuntu 18.
Also, I tried the version 2.12 of the NAMD source code on another
ubuntu system (version 14). Unfortunately, at both cases I faced to the
same error!
 I followed below steps in coimpiling NAMD based on the "note" file in
source code;
1 sudo apt-get update --fix-missing
2 sudo apt-get install g++
3 sudo apt-get install csh
4 compiling procedure based on the note file;
Unpack NAMD and matching Charm++ source code:
  tar xzf NAMD_2.12_Source.tar.gz
  cd NAMD_2.12_Source
  tar xf charm-6.7.1.tar

Build and test the Charm++/Converse library (single-node multicore version):
  cd charm-6.7.1
  ./build charm++ multicore-linux64 --with-production
  cd multicore-linux64/tests/charm++/megatest
  make pgm
  ./pgm +p4 (multicore does not support multiple nodes)
  cd ../../../../..

Build and test the Charm++/Converse library (ethernet version):
  cd charm-6.7.1
  ./build charm++ netlrts-linux-x86_64 --with-production
  cd netlrts-linux-x86_64/tests/charm++/megatest
  make pgm
  ./charmrun ++local +p4 ./pgm (forks processes on local node)
  cd ../../../../..

Build and test the Charm++/Converse library (InfiniBand version):
  cd charm-6.7.1
  ./build charm++ verbs-linux-x86_64 --with-production
  cd verbs-linux-x86_64/tests/charm++/megatest
  make pgm
  ./charmrun ++mpiexec +p4 ./pgm (uses mpiexec to launch processes)
  cd ../../../../..

Build and test the Charm++/Converse library (MPI version):
  cd charm-6.7.1
  env MPICXX=mpicxx ./build charm++ mpi-linux-x86_64 --with-production
  cd mpi-linux-x86_64/tests/charm++/megatest
  make pgm
  mpiexec -n 4 ./pgm (run as any other MPI program on your cluster)
  cd ../../../../..

Download and install TCL and FFTW libraries:
  (cd to NAMD_2.12_Source if you're not already there)
  tar xzf fftw-linux-x86_64.tar.gz
  mv linux-x86_64 fftw
  tar xzf tcl8.5.9-linux-x86_64.tar.gz
  tar xzf tcl8.5.9-linux-x86_64-threaded.tar.gz
  mv tcl8.5.9-linux-x86_64 tcl
  mv tcl8.5.9-linux-x86_64-threaded tcl-threaded

Optionally edit various configuration files:
  (not needed if charm-6.7.1, fftw, and tcl are in NAMD_2.12_Source)
  vi Make.charm (set CHARMBASE to full path to charm)
  vi arch/Linux-x86_64.fftw (fix library name and path to files)
  vi arch/Linux-x86_64.tcl (fix library version and path to TCL files)

Set up build directory and compile:
  multicore version: ./config Linux-x86_64-g++ --charm-arch
  ethernet version: ./config Linux-x86_64-g++ --charm-arch
  InfiniBand version: ./config Linux-x86_64-g++ --charm-arch
  MPI version: ./config Linux-x86_64-g++ --charm-arch mpi-linux-x86_64
  cd Linux-x86_64-g++
  make (or gmake -j4, which should run faster)

when I tried to do "infiniband version", I build "charm" successfully
and at this item
./charmrun ++mpiexec +p4 ./pgm
 I got below error;
IBVERBS version of charmrun
error attaching to node '127.0.01'
socket closed before recv.

After googling this error I tied to do;
# sudo apt-get update
# sudo apt-get install libibverbs-dev
However it did not work...
I decided to ignore this error and continue...
at final stage (doing "make") I got a big error

-lmoduleRefineLB -lmoduleHybridLB -lmoduleNeighborLB -lckmain -lck
-lmemory-default -lthreads-default -lconv-cplus-y -lconv-core -ltmgr
-lconv-util -lconv-partition -lmemory-default -lthreads-default
-lldb-rand -lconv-ldb -lpthread -lckqt -ldl -ltcl8.5 -ldl -lpthread
-lsrfftw -lsfftw -lm -lmoduleNeighborLB -lmoduleHybridLB
-lmoduleRefineLB -lmoduleGreedyLB -lmoduleCkMulticast -lmoduleCkLoop
-lmoduleGreedyRefineLB -lmoduleNDMeshStreamer -lmodulecompletion -lm
returned error code 1
charmc exiting...
rm -f moduleinit25210.C moduleinit25210.o
Makefile:474: recipe for target 'namd2' failed
make: *** [namd2] Error 1

I recieved below comment from a NAMD user in NAMD forum;
`.bss' can not be used when making a PIE object; recompile with -fPIC

I tried to add "-fPIC" to make file and recompile, however it did not
I do not know what is the exact problem? how can I solve it?
I am really confused.
Any help is appreciated.
I am waiting to receive your comment as soon as possible.

Best regards

Kosar Khajeh
PhD Student
Faculty of Mechanical Engineering
University of Tabriz, Tabriz, Iran

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2019 - 23:20:49 CST