Re: Compiling NAMD_2.9b2_Source with GCC 4.7.0

From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Mar 30 2012 - 08:32:19 CDT

On Fri, Mar 30, 2012 at 9:25 AM, Fabien Archambault
<fabien.archambault_at_univ-amu.fr> wrote:
> Dear list,
>
> I tried to compile NAMD using GCC 4.7.0 and the OpenMPI 1.4.5 on CentOS 6.2
> but it fails at some point. When I try using Intel Compiler 12.1 and the
> OpenMPI compiled with it all works.
>
> All steps for charm-6.4.0  work. The error occurs when doing make in
> Linux-x86_64-g++:
> [...]
> g++ -m64 -O3 -I.rootdir/charm-6.4.0/mpi-linux-x86_64/include
> -DCMK_OPTIMIZE=1 -Isrc -Iinc   -Iplugins/include -DSTATIC_PLUGIN
> -I.rootdir/tcl/include -DNAMD_TCL -I.rootdir/fftw/include -DNAMD_FFTW
> -DNAMD_VERSION=\"2.9b2\" -DNAMD_PLATFORM=\"Linux-x86_64-MPI\"
> -DREMOVE_PROXYRESULTMSG_EXTRACOPY -DNODEAWARE_PROXY_SPANNINGTREE
> -DUSE_NODEPATCHMGR    -fexpensive-optimizations -ffast-math  -o
> obj/ComputeAngles.o -c src/ComputeAngles.C
> In file included from inc/NamdHybridLB.decl.h:10:0,
>                  from inc/LdbCoordinator.decl.h:8,
>                  from src/LdbCoordinator.h:24,
>                  from src/ComputeSelfTuples.h:11,
>                  from src/ComputeAngles.h:11,
>                  from src/ComputeAngles.C:15:
> .rootdir/charm-6.4.0/mpi-linux-x86_64/include/CentralLB.h: In member
> function 'void
> CentralLB::FutureModel::changePredictor(LBPredictorFunction*)':
> .rootdir/charm-6.4.0/mpi-linux-x86_64/include/CentralLB.h:166:16: warning:
> converting 'false' to pointer type 'bool*' [-Wconversion-null]
> In file included from src/ComputeAngles.h:11:0,
>                  from src/ComputeAngles.C:15:
> src/ComputeSelfTuples.h: In instantiation of 'void ComputeSelfTuples<T, S,
> P>::initialize() [with T = AngleElem; S = angle; P = AngleValue]':
> src/ComputeAngles.C:193:1:   required from here
> src/ComputeSelfTuples.h:147:7: error: 'setNumPatches' was not declared in
> this scope, and no declarations were found by argument-dependent lookup at
> the point of instantiation [-fpermissive]
> src/ComputeSelfTuples.h:147:7: note: declarations in dependent base
> 'Compute' are not found by unqualified lookup
> src/ComputeSelfTuples.h:147:7: note: use 'this->setNumPatches' instead
> make: *** [obj/ComputeAngles.o] Error 1
>
>
> I tried patching the file src/ComputeSelfTuples.h as suggested by the GCC
> compiler:
> Change:
> setNumPatches(this->tuplePatchList.size());
> To:
> this->setNumPatches(this->tuplePatchList.size());
>
> Then everything compiles but when running the apoa1 simulation I get:
> Charm++> Running on MPI version: 2.1
> Charm++> level of thread support used: MPI_THREAD_SINGLE (desired:
> MPI_THREAD_SINGLE)
> Charm++> Running on non-SMP mode
> Converse/Charm++ Commit ID: v6.4.0-beta1-0-g5776d21
>
> namd2:26972 terminated with signal 11 at PC=3fe5e0947f SP=7fff890eb9e0.
> Backtrace:
> CharmLB> Load balancer assumes all CPUs are same.
> --------------------------------------------------------------------------
> mpirun noticed that process rank 9 with PID 26972 on node node036 exited on
> signal 11 (Segmentation fault).
> --------------------------------------------------------------------------
>
> I hope this can be fixed easily. I am no expert of C++ so I cannot expertise
> more the problem.

if you are no c++ expert, the you should not
use a newly released compiler. this is *asking* for trouble.

use the default compiler that comes with centos and be happy.

axel.

>
> Thanks,
> Fabien Archambault

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science and Technology
Temple University, Philadelphia PA, USA.

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:21:22 CST