1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2019.2 (Released June 5, 2019) -->
<HTML lang="EN">
<HEAD>
<TITLE>5.1 Compilation problems with PLUMED</TITLE>
<META NAME="description" CONTENT="5.1 Compilation problems with PLUMED">
<META NAME="keywords" CONTENT="user_guide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
<META NAME="Generator" CONTENT="LaTeX2HTML v2019.2">
<LINK REL="STYLESHEET" HREF="user_guide.css">
<LINK REL="previous" HREF="node21.html">
<LINK REL="next" HREF="node23.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A
HREF="node23.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="node21.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node21.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<A ID="tex2html242"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A
HREF="node23.html">About this document ...</A>
<B> Up:</B> <A
HREF="node21.html">5 Troubleshooting</A>
<B> Previous:</B> <A
HREF="node21.html">5 Troubleshooting</A>
<B> <A ID="tex2html243"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A ID="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><UL>
<LI><A ID="tex2html244"
HREF="node22.html#SECTION00061010000000000000">5.1.0.1 xlc compiler</A>
<LI><A ID="tex2html245"
HREF="node22.html#SECTION00061020000000000000">5.1.0.2 Calling C from fortran</A>
</UL></UL>
<!--End of Table of Child-Links-->
<HR>
<H2><A ID="SECTION00061000000000000000">
5.1 Compilation problems with <TT>PLUMED</TT></A>
</H2>
<P>
<H4><A ID="SECTION00061010000000000000">
5.1.0.1 xlc compiler</A>
</H4>
If you get an error message like:
<PRE>
Operation between types "char**" and "int" is not allowed.
</PRE>
change in file <TT>clib/metadyn.h</TT>
<PRE>
#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)))
</PRE>
with
<PRE>
#define snew(ptr,nelem) (ptr)= (nelem==0 ? NULL : (void*) calloc(nelem, sizeof(*(ptr))))
#define srenew(ptr,nelem) (ptr)= (void*) realloc(ptr,(nelem)*sizeof(*(ptr)))
</PRE>
<P>
<H4><A ID="SECTION00061020000000000000">
5.1.0.2 Calling C from fortran</A>
</H4>
PLUMED assumes that fortran compilers add a single <TT>_</TT> at the end of C routines. You
may get an error message as :
<PRE>
ERROR: Undefined symbol: .init_metadyn
ERROR: Undefined symbol: .meta_force_calculation
</PRE>
eliminate the <TT>_</TT> from the definition of init_metadyn and meta_force_calculation, i. e.
change at line 529
<PRE>
void meta_force_calculation_(real *cell, int *istep, real *xxx, real *yyy, real *zzz,
</PRE>
with
<PRE>
void meta_force_calculation(real *cell, int *istep, real *xxx, real *yyy, real *zzz,
</PRE>,
and at line 961
<PRE>
void init_metadyn_(int *atoms, real *ddt, real *mass,
void init_metadyn_(int *atoms, real *ddt, real *mass,
</PRE>
<P>
<BR><HR>
</BODY>
</HTML>
|