next up previous contents
Next: 11.3 Compilation problems with Up: 11 Troubleshooting Previous: 11.1 pw.x problems   Contents

Subsections

11.2 Compilation problems with PLUMED

11.2.0.1 xlc compiler

If you get an error message like:
Operation between types "char**" and "int" is not allowed.
change in file clib/metadyn.h
#define snew(ptr,nelem) (ptr)= (nelem==0 ? NULL : (typeof(ptr)) calloc(nelem, sizeof(*(ptr))))
#define srenew(ptr,nelem) (ptr)= (typeof(ptr)) realloc(ptr,(nelem)*sizeof(*(ptr)))
with
#define snew(ptr,nelem) (ptr)= (nelem==0 ? NULL : (void*) calloc(nelem, sizeof(*(ptr))))
#define srenew(ptr,nelem) (ptr)= (void*) realloc(ptr,(nelem)*sizeof(*(ptr)))

11.2.0.2 Calling C from fortran

PLUMED assumes that fortran compilers add a single _ at the end of C routines. You may get an error message as :
ERROR: Undefined symbol: .init_metadyn
ERROR: Undefined symbol: .meta_force_calculation
eliminate the _ from the definition of init_metadyn and meta_force_calculation, i. e. change at line 529
void meta_force_calculation_(real *cell, int *istep, real *xxx, real *yyy, real *zzz,
with
void meta_force_calculation(real *cell, int *istep, real *xxx, real *yyy, real *zzz,
, and at line 961
  void init_metadyn_(int *atoms, real *ddt, real *mass, 
  void init_metadyn_(int *atoms, real *ddt, real *mass,


Build Daemon user 2012-05-24