Changeset 79290f for pcp/src


Ignore:
Timestamp:
Jun 7, 2008, 1:13:29 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
02bc3c
Parents:
a97897
Message:

config.h is included in each and every file. After trying to compile on JUMP (with xlc).

Location:
pcp/src
Files:
45 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/data.h

    ra97897 r79290f  
    1717  $Id: data.h,v 1.102 2007-02-09 09:13:48 foo Exp $
    1818*/
    19 #include "mpi.h"
    20 
    21 // use double precision fft when we have it
     19
    2220#ifdef HAVE_CONFIG_H
    2321#include <config.h>
    2422#endif
    2523
     24#include "mpi.h"
     25
     26// use double precision fft when we have it
    2627#ifdef HAVE_DFFTW_H
    2728#include "dfftw.h"
     
    149150                            };
    150151
     152// Specifying the cast type to be read of a parameter, see ParseForParameter()
     153enum value_type { string_type, double_type, int_type, row_int, row_double, grid, lower_trigrid, upper_trigrid};
     154
     155// Specifting whether a value in the parameter file must be specified or is optional
     156enum necessity { optional,    //!< parameter is optional, if not given sensible value is chosen
     157                 critical     //!< parameter must be given or programme won't initiate
     158               };
     159
    151160
    152161#define perturbations 6
  • pcp/src/defs.h

    ra97897 r79290f  
    1616  $Id: defs.h,v 1.13 2007-03-29 13:35:22 foo Exp $
    1717*/
     18
     19#ifdef HAVE_CONFIG_H
     20#include <config.h>
     21#endif
    1822
    1923#include <float.h>
  • pcp/src/density.c

    ra97897 r79290f  
    2727*/
    2828
     29#ifdef HAVE_CONFIG_H
     30#include <config.h>
     31#endif
     32
    2933#include <stdlib.h>
    3034#include <stdio.h>
     
    5054void LockDensityArray(struct Density *Dens, enum UseType DensityType, enum complex re_im) {
    5155  enum UseType *marker;
    52   if (DensityType >=0 && DensityType < MaxDensityTypes) {
     56  if (DensityType < MaxDensityTypes) {
    5357    if (re_im == real)
    5458      marker = &Dens->LockArray[DensityType];
     
    7478void UnLockDensityArray(struct Density *Dens, enum UseType DensityType, enum complex re_im) {
    7579  enum UseType *marker;
    76   if (DensityType >=0 && DensityType < MaxDensityTypes) {
     80  if (DensityType < MaxDensityTypes) {
    7781    if (re_im == real)
    7882      marker = &Dens->LockArray[DensityType];
  • pcp/src/density.h

    ra97897 r79290f  
    1313  $Id: density.h,v 1.14 2006/10/16 11:09:05 foo Exp $
    1414*/
     15
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
    1519
    1620void InitDensity(struct Problem *const P);
  • pcp/src/energy.c

    ra97897 r79290f  
    2424  $Id: energy.c,v 1.68 2007/02/09 09:13:48 foo Exp $
    2525*/
     26
     27#ifdef HAVE_CONFIG_H
     28#include <config.h>
     29#endif
    2630
    2731#include <stdlib.h>
  • pcp/src/energy.h

    ra97897 r79290f  
    1313  $Id: energy.h,v 1.11 2007/02/05 13:49:56 foo Exp $
    1414*/
     15
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    1520void CalculatePsiEnergy(struct Problem *P, const int p, const int UseInitTime);
    1621void CalculateDensityEnergy(struct Problem *P, const int UseInitTime);
  • pcp/src/errors.c

    ra97897 r79290f  
    1212 *
    1313*/
     14
     15#ifdef HAVE_CONFIG_H
     16#include <config.h>
     17#endif
    1418
    1519#include<stdlib.h>
  • pcp/src/errors.h

    ra97897 r79290f  
    1515  $Id: errors.h,v 1.7 2006/03/30 22:19:52 foo Exp $
    1616*/
     17
     18#ifdef HAVE_CONFIG_H
     19#include <config.h>
     20#endif
    1721
    1822// taken out of TREMOLO
  • pcp/src/excor.c

    ra97897 r79290f  
    2727  $Id: excor.c,v 1.47 2007-03-29 13:37:25 foo Exp $
    2828*/
     29
     30#ifdef HAVE_CONFIG_H
     31#include <config.h>
     32#endif
    2933
    3034#include <stdlib.h>
  • pcp/src/excor.h

    ra97897 r79290f  
    1616  $Id: excor.h,v 1.14 2006/05/23 14:22:05 foo Exp $
    1717*/
     18
     19#ifdef HAVE_CONFIG_H
     20#include <config.h>
     21#endif
    1822
    1923//! exchange and correlation energy for the polarised or unpolarised one.
  • pcp/src/grad.c

    ra97897 r79290f  
    3030  $Id: grad.c,v 1.90 2007-03-29 13:38:04 foo Exp $
    3131*/
     32
     33#ifdef HAVE_CONFIG_H
     34#include <config.h>
     35#endif
    3236
    3337#include <stdlib.h>
  • pcp/src/grad.h

    ra97897 r79290f  
    1919
    2020
    21 // use double precision fft when we have it
    2221#ifdef HAVE_CONFIG_H
    2322#include <config.h>
    2423#endif
    2524
     25// use double precision fft when we have it
    2626#ifdef HAVE_DFFTW_H
    2727#include "dfftw.h"
  • pcp/src/gramsch.c

    ra97897 r79290f  
    1414*/
    1515
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    1620#include <stdlib.h>
    1721#include <stdio.h>
     
    2024
    2125// use double precision fft when we have it
    22 #ifdef HAVE_CONFIG_H
    23 #include <config.h>
    24 #endif
    25 
    2626#ifdef HAVE_DFFTW_H
    2727#include "dfftw.h"
     
    723723 * \param Type2test basically current minimisation type, see RunStruct#CurrentMin
    724724 */
    725 void TestGramSch(struct Problem *P, struct LatticeLevel *Lev, struct Psis *Psi, int Type2test) {
     725void TestGramSch(struct Problem *P, struct LatticeLevel *Lev, struct Psis *Psi, enum PsiTypeTag Type2test) {
    726726  double LocalSP=0.0,PsiSP;
    727727  int i,j,k,s,RecvSource;
     
    872872  } while ((NotOk != 0) && (iter < max_GramSch_iter));
    873873  if (P->Call.out[StepLeaderOut]) { // final check if there have been any un-orthogonal pairs
    874     if (Type2test != -1) {
     874    if (Type2test <= Extra) {
    875875      if (NotOk == 0) {
    876876        fprintf(stderr,"(%i)TestGramSchm on %s: Ok !\n",P->Par.my_color_comm_ST, P->R.MinimisationName[Type2test]);
  • pcp/src/gramsch.h

    ra97897 r79290f  
    1515*/
    1616
     17#ifdef HAVE_CONFIG_H
     18#include <config.h>
     19#endif
     20
    1721MPI_Datatype MPI_OnePsiElement;   //!< OnePsiElement defined for the MPI structure to exchange between processes
    1822
     
    3034void ResetGramSch(const struct Problem *P, struct Psis *Psi);
    3135void ResetGramSchTagType(const struct Problem *P, struct Psis *Psi, enum PsiTypeTag type, enum PsiGramSchStatusType ToDo);
    32 void TestGramSch(struct Problem *P, struct LatticeLevel *Lev, struct Psis *Psi, int Type2test);
     36void TestGramSch(struct Problem *P, struct LatticeLevel *Lev, struct Psis *Psi, enum PsiTypeTag Type2test);
    3337void TestForOrth(struct Problem *P, struct LatticeLevel *Lev, fftw_complex *psi);
    3438
  • pcp/src/helpers.c

    ra97897 r79290f  
    2525*/
    2626
     27#ifdef HAVE_CONFIG_H
     28#include <config.h>
     29#endif
     30
    2731#include <stdlib.h>
    2832#include <stdio.h>
     
    6266void* Malloc(size_t size, const char* output)
    6367{
    64   void* dummy = malloc(size);
     68  void* dummy = (void *) malloc(size);
    6569  if (!dummy)
    6670    Error(MallocError, output);
     
    7478 */
    7579char* MallocString(size_t size, const char* output) {
    76   int i;
     80  size_t i;
    7781  char *buffer;
    78   buffer = Malloc(sizeof(char) * (size+1), output); // alloc
     82  buffer = (char *) Malloc(sizeof(char) * (size+1), output); // alloc
    7983  for (i=0;i<size;i++)  // reset
    8084    buffer[i] = i % 2 == 0 ? 'p': 'c';
  • pcp/src/helpers.h

    ra97897 r79290f  
    1414  $Id: helpers.h,v 1.9 2007/02/09 09:13:48 foo Exp $
    1515*/
     16
     17#ifdef HAVE_CONFIG_H
     18#include <config.h>
     19#endif
    1620
    1721#include<stddef.h> /* fuer size_t */
  • pcp/src/init.c

    ra97897 r79290f  
    2222*/
    2323
     24#ifdef HAVE_CONFIG_H
     25#include <config.h>
     26#endif
     27
    2428#include <stdlib.h>
    2529#include <stdio.h>
     
    2832
    2933// use double precision fft when we have it
    30 #ifdef HAVE_CONFIG_H
    31 #include <config.h>
    32 #endif
    33 
    3434#ifdef HAVE_DFFTW_H
    3535#include "dfftw.h"
     
    13051305 * \sa ReadMainParameterFile Calling routine
    13061306 */
    1307 int ParseForParameter(int verbose, FILE *file, const char *const name, int sequential, int const xth, int const yth, enum value_type type, void *value, int repetition, enum necessity critical) {
     1307int ParseForParameter(int verbose, FILE *file, const char *const name, int sequential, int const xth, int const yth, enum value_type type, void *value, int repetition, enum necessity BreaksOrNot) {
    13081308        int i,j;        // loop variables
    13091309        int me, length, maxlength = -1;
     
    13261326                        fgets(dummy1, 256, file);       // Read the whole line
    13271327      if (feof(file)) {
    1328         if ((critical) && (found == 0)) {
     1328        if ((BreaksOrNot) && (found == 0)) {
    13291329          Free(free_dummy, "ParseForParameter: free_dummy");
    13301330          Error(InitReading, name);
     
    13691369                } else dummy = dummy1;
    13701370                // ... and check if it is the keyword!
    1371                 if ((name == NULL) || ((dummy-dummy1 >= 3) && (strncmp(dummy1, name, strlen(name)) == 0) && (dummy-dummy1 == strlen(name)))) {
     1371                if ((name == NULL) || ((dummy-dummy1 >= 3) && (strncmp(dummy1, name, strlen(name)) == 0) && ((size_t)(dummy-dummy1) == strlen(name)))) {
    13721372                        found++; // found the parameter!
    13731373                        //fprintf(stderr,"(%i) found %s at line %i\n",me, name, line);         
     
    13811381                                                        fgets(dummy1, 256, file);       // Read the whole line, skip commentary and empty ones
    13821382              if (feof(file)) {
    1383                 if ((critical) && (found == 0)) {
     1383                if ((BreaksOrNot) && (found == 0)) {
    13841384                  Free(free_dummy, "ParseForParameter: free_dummy");
    13851385                  Error(InitReading, name);
     
    14351435                                                                dummy = strchr(dummy1, '\n');    // ... at line end then
    14361436                                                                if ((i < xth-1) && (type < 4)) {        // check if xth value or not yet
    1437                   if (critical) {
     1437                  if (BreaksOrNot) {
    14381438                    if (verbose) fprintf(stderr,"(%i)Error: EoL or comment at %i and still missing %i value(s) for parameter %s\n", me, line, yth-j, name);
    14391439                    Free(free_dummy, "ParseForParameter: free_dummy");
  • pcp/src/init.h

    ra97897 r79290f  
    1717*/
    1818
    19 // Specifting whether a value in the parameter file must be specified or is optional
    20 enum necessity { optional,    //!< parameter is optional, if not given sensible value is chosen
    21                  critical     //!< parameter must be given or programme won't initiate
    22                };
    23 
    24 // Specifying the cast type to be read of a parameter, see ParseForParameter()
    25 enum value_type { string_type, double_type, int_type, row_int, row_double, grid, lower_trigrid, upper_trigrid};
     19#ifdef HAVE_CONFIG_H
     20#include <config.h>
     21#endif
    2622
    2723/* Bereite mainname vor: loescht von filename von rechts nach links bis zu erstem "/" oder ganz */
     
    3733void InitPsisValue(struct Problem *const P, int start, int end);
    3834
    39 /** Calculate the value \a x to the power of \a n.
    40  * \param x value
    41  * \param n power
    42  * \return \f$x^n\f$
    43  */
    44 static inline double tpow(double x, int n)
    45 {
    46   double y = 1;
    47   int neg = (n < 0);
    48 
    49   if (neg) n = -n;
    50 
    51   while (n) {   // go through every bit of the integer number n
    52     if (n & 1) y *= x;  // if bit set, multiply
    53     x *= x;   // go to next power of 2
    54     n >>= 1;   // and to the next bit
    55   }
    56   return neg ? 1.0/y : y; // if n was negative, return reciprocal value
    57 }
    5835#endif
    5936
  • pcp/src/ions.c

    ra97897 r79290f  
    2323*/
    2424
     25#ifdef HAVE_CONFIG_H
     26#include <config.h>
     27#endif
     28
    2529#include <stdlib.h>
    2630#include <stdio.h>
     
    3236#include "mymath.h"
    3337
    34 
    3538// use double precision fft when we have it
    36 #ifdef HAVE_CONFIG_H
    37 #include <config.h>
    38 #endif
    39 
    4039#ifdef HAVE_DFFTW_H
    4140#include "dfftw.h"
     
    144143        I->Thermostat = None;
    145144      }
    146     }
    147     if (I->Thermostat == -1) {
     145    } else {
    148146      if (P->Par.me == 0)
    149147        fprintf(stderr,"(%i) Warning: thermostat name was not understood!\n", P->Par.me);
  • pcp/src/ions.h

    ra97897 r79290f  
    2020
    2121
    22 // use double precision fft when available
    2322#ifdef HAVE_CONFIG_H
    2423#include <config.h>
    2524#endif
    2625
     26// use double precision fft when available
    2727#ifdef HAVE_DFFTW_H
    2828#include "dfftw.h"
  • pcp/src/mergesort2.c

    ra97897 r79290f  
    2626
    2727*/
     28
     29#ifdef HAVE_CONFIG_H
     30#include <config.h>
     31#endif
    2832
    2933#include<stdlib.h>
  • pcp/src/mergesort2.h

    ra97897 r79290f  
    2525*/
    2626
     27#ifdef HAVE_CONFIG_H
     28#include <config.h>
     29#endif
     30
    2731#include<stdlib.h>
    2832
  • pcp/src/myfft.c

    ra97897 r79290f  
    1818*/
    1919
     20#ifdef HAVE_CONFIG_H
     21#include <config.h>
     22#endif
     23
    2024#include<stdlib.h>
    2125#include<stdio.h>
     
    2529
    2630// use double precision fft when we have it
    27 #ifdef HAVE_CONFIG_H
    28 #include <config.h>
    29 #endif
    30 
    3131#ifdef HAVE_DFFTW_H
    3232#include "dfftw.h"
  • pcp/src/myfft.h

    ra97897 r79290f  
    1616*/
    1717
    18 // use double precision fft when we have it
    1918#ifdef HAVE_CONFIG_H
    2019#include <config.h>
    2120#endif
    2221
     22// use double precision fft when we have it
    2323#ifdef HAVE_DFFTW_H
    2424#include "dfftw.h"
  • pcp/src/mymath.c

    ra97897 r79290f  
    2121*/
    2222
     23#ifdef HAVE_CONFIG_H
     24#include <config.h>
     25#endif
     26
    2327#include<stdlib.h>
    2428#include<stdio.h>
     
    2933
    3034// use double precision fft when we have it
    31 #ifdef HAVE_CONFIG_H
    32 #include <config.h>
    33 #endif
    34 
    3535#ifdef HAVE_DFFTW_H
    3636#include "dfftw.h"
     
    338338 * \note formula and coefficients are taken from "Numerical Receipes in C"
    339339 */
    340 static double gammln(double xx) {
     340#ifdef HAVE_INLINE
     341inline double gammln(double xx)
     342#else
     343double gammln(double xx)
     344#endif
     345{
    341346  int j;
    342347  double x,tmp,ser;
     
    361366 * \warning maximum precision 1e-7
    362367 */
    363 static double gser(double a, double x) {
     368#ifdef HAVE_INLINE
     369inline double gser(double a, double x)
     370#else
     371double gser(double a, double x)
     372#endif
     373{
    364374  double gln = gammln(a);
    365375  double ap,sum,del;
     
    389399 * \note formula and coefficients are taken from "Numerical Receipes in C"
    390400 */
    391 static double gcf(double a, double x) {
     401#ifdef HAVE_INLINE
     402inline double gcf(double a, double x)
     403#else
     404double gcf(double a, double x)
     405#endif
     406{
    392407  double gln = gammln(a);
    393408  double gold = 0.0;
     
    429444 * \note formula and coefficients are taken from "Numerical Receipes in C"
    430445 */
    431 static double gammp(double a, double x) {
     446#ifdef HAVE_INLINE
     447inline double gammp(double a, double x)
     448#else
     449double gammp(double a, double x)
     450#endif
     451{
    432452  double res;
    433453  if (x < a+1.) {
  • pcp/src/mymath.h

    ra97897 r79290f  
    2020*/
    2121
    22 // use double precision fft when we have it
    2322#ifdef HAVE_CONFIG_H
    2423#include <config.h>
     
    3938#include "defs.h"
    4039
     40// use double precision fft when we have it
    4141#ifdef HAVE_DFFTW_H
    4242#include "dfftw.h"
     
    6060#define CNORMSQ3(a) ((a).re[0]*(a).re[0] + (a).re[1]*(a).re[1] + (a).re[2]*(a).re[2] + (a).im[0]*(a).im[0] + (a).im[1]*(a).im[1] + (a).im[2]*(a).im[2]) //!< square of complex euclidian norm
    6161
    62 inline int Rest(int n, int m);
    63 inline void RTranspose3(double *A);
    64 inline void RMatMat33(double C[NDIM*NDIM], const double A[NDIM*NDIM], const double B[NDIM*NDIM]);
    65 inline void RMat33Vec3(double C[NDIM], const double M[NDIM*NDIM], const double V[NDIM]);
    66 inline int RMatReci3(double B[NDIM_NDIM], const double A[NDIM_NDIM]);
    67 inline void RVec3Mat33(double C[NDIM], const double V[NDIM], const double M[NDIM*NDIM]);
    68 inline void VP3(double V[NDIM], double A[NDIM], double B[NDIM]);
    69 /* Skalarprodukt */
    70 inline double SP(const double *a, const double *b, const int n);
    71 /* Multiplikation mit Skalar */
    72 inline void SM(double *a, const double c, const int n);
    73 /* Nullvektor erzeugen */
    74 inline void NV(double *a, int n);
    75 inline double dSum(int n, double *dx, int incx);
    76 inline double Simps(int n, double *f, double h);
    77 inline double derf(double x);
    78 /* Initialisiere a array[3] mit b - c Orte mit periodisch */
     62#ifdef HAVE_INLINE
     63  inline double tpow(double x, int n);
     64  inline int Rest(int n, int m);
     65  inline void RTranspose3(double *A);
     66  inline void RMatMat33(double C[NDIM*NDIM], const double A[NDIM*NDIM], const double B[NDIM*NDIM]);
     67  inline void RMat33Vec3(double C[NDIM], const double M[NDIM*NDIM], const double V[NDIM]);
     68  inline int RMatReci3(double B[NDIM_NDIM], const double A[NDIM_NDIM]);
     69  inline void RVec3Mat33(double C[NDIM], const double V[NDIM], const double M[NDIM*NDIM]);
     70  inline void VP3(double V[NDIM], double A[NDIM], double B[NDIM]);
     71  /* Skalarprodukt */
     72  inline double SP(const double *a, const double *b, const int n);
     73  /* Multiplikation mit Skalar */
     74  inline void SM(double *a, const double c, const int n);
     75  /* Nullvektor erzeugen */
     76  inline void NV(double *a, int n);
     77  inline double dSum(int n, double *dx, int incx);
     78  inline double Simps(int n, double *f, double h);
     79  inline void SetArrayToDouble0(double *a, int n);
     80  /* Gamma functions */
     81  inline double gammln(double xx);
     82  inline double gser(double a, double x);
     83  inline double gcf(double a, double x);
     84  inline double gammp(double a, double x);
     85  inline double derf(double x);
     86#else
     87  double tpow(double x, int n);
     88  int Rest(int n, int m);
     89  void RTranspose3(double *A);
     90  void RMatMat33(double C[NDIM*NDIM], const double A[NDIM*NDIM], const double B[NDIM*NDIM]);
     91  void RMat33Vec3(double C[NDIM], const double M[NDIM*NDIM], const double V[NDIM]);
     92  int RMatReci3(double B[NDIM_NDIM], const double A[NDIM_NDIM]);
     93  void RVec3Mat33(double C[NDIM], const double V[NDIM], const double M[NDIM*NDIM]);
     94  void VP3(double V[NDIM], double A[NDIM], double B[NDIM]);
     95  /* Skalarprodukt */
     96  double SP(const double *a, const double *b, const int n);
     97  /* Multiplikation mit Skalar */
     98  void SM(double *a, const double c, const int n);
     99  /* Nullvektor erzeugen */
     100  void NV(double *a, int n);
     101  double dSum(int n, double *dx, int incx);
     102  double Simps(int n, double *f, double h);
     103  void SetArrayToDouble0(double *a, int n);
     104  /* Gamma functions */
     105  double gammln(double xx);
     106  double gser(double a, double x);
     107  double gcf(double a, double x);
     108  double gammp(double a, double x);
     109  double derf(double x);
     110#endif
     111
     112  /* Initialisiere a array[3] mit b - c Orte mit periodisch */
    79113double Dist(const double *a, const double *b, const int n);
    80 inline void SetArrayToDouble0(double *a, int n);
    81114void PrintCMat330(fftw_complex M[NDIM_NDIM]);
    82115void PrintRMat330(fftw_real M[NDIM_NDIM]);
  • pcp/src/opt.c

    ra97897 r79290f  
    1111 * $Id: opt.c,v 1.15 2007-02-12 09:44:56 foo Exp $
    1212 */
     13
     14#ifdef HAVE_CONFIG_H
     15#include <config.h>
     16#endif
    1317
    1418#include<stdio.h>
  • pcp/src/opt.h

    ra97897 r79290f  
    1414*/
    1515
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    1620void GetOptions(struct CallOptions *Call, int argc, char *const argv[]);
    1721/* parsen der Kommandozeile */
  • pcp/src/output.c

    ra97897 r79290f  
    3030  $Id: output.c,v 1.51.2.2 2007-04-21 12:55:50 foo Exp $
    3131*/
     32
     33#ifdef HAVE_CONFIG_H
     34#include <config.h>
     35#endif
     36
    3237#include<stdlib.h>
    3338#include<stdio.h>
     
    310315int OutputSrcPsiDensity(struct Problem *P, enum PsiTypeTag type)
    311316{
    312   int i,j,k, Index, zahl, owner;
     317  int i,j,k, Index, owner;
     318  size_t zahl;
    313319  struct Lattice *Lat = &P->Lat;
    314320  //struct RunStruct *R = &P->R;
     
    414420              Error(SomeError, "OutputSrcPsiDensity: MPI_Recv of loaded coefficients failed!");
    415421            MPI_Get_count(&status, MPI_DOUBLE, &zahl);
    416             if (zahl != LevS->Dens->LocalSizeR) // check number of elements
     422            if (zahl != (size_t)LevS->Dens->LocalSizeR) // check number of elements
    417423              fprintf(stderr,"(%i)OutputSrcPsiDensity: MPI_Recv of loaded coefficients of GlobalNo %i, owner %i failed: Too few coefficients - %i instead of %i!\n", P->Par.me, k, i, zahl, LevS->Dens->LocalSizeR);
    418424            //else       
     
    423429                Error(SomeError, "OutputSrcPsiDensity: MPI_Recv of loaded coefficients failed!");
    424430              MPI_Get_count(&status, MPI_DOUBLE, &zahl);
    425               if (zahl != LevS->Dens->LocalSizeR) // check number of elements
     431              if (zahl != (size_t)LevS->Dens->LocalSizeR) // check number of elements
    426432                fprintf(stderr,"(%i)OutputSrcPsiDensity: MPI_Recv of loaded coefficients of GlobalNo %i, owner %i failed: Too few coefficients - %i instead of %i!\n", P->Par.me, k, i, zahl, LevS->Dens->LocalSizeR);
    427433              //else       
     
    445451                  Error(SomeError, "OutputSrcPsiDensity: MPI_Recv of loaded coefficients failed!");
    446452                MPI_Get_count(&status, MPI_DOUBLE, &zahl);
    447                 if (zahl != LevS->Dens->LocalSizeR) // check number of elements
     453                if (zahl != (size_t)LevS->Dens->LocalSizeR) // check number of elements
    448454                  fprintf(stderr,"(%i)OutputSrcPsiDensity: MPI_Recv of loaded coefficients of GlobalNo %i, owner %i failed: Too few coefficients - %i instead of %i!\n", P->Par.me, k, owner, zahl, LevS->Dens->LocalSizeR);
    449455                //else       
     
    570576  int N[NDIM], GlobalNo[2];
    571577  int LevelNo, readnr=0;
    572   int zahl, signal = test ? 1 : 2; // 0 - ok, 1 - test failed, 2 - throw Error
     578  int breaksignal = test ? 1 : 2; // 0 - ok, 1 - test failed, 2 - throw Error
     579  size_t zahl;
    573580  char suffixdat[MAXSTRINGSIZE], suffixdoc[MAXSTRINGSIZE];
    574   int read_type, Num = 0, colorNo = 0;
     581  int Num = 0, colorNo = 0;
     582  enum PsiTypeTag read_type;
    575583  char spin[20];
    576584  double Eps[2];
     
    611619      debug(P,"ReadSrcPsiDensity: doc file pointer NULL\n");
    612620      if (test) {
    613         if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     621        if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    614622          Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    615623        return 0;
    616624      }
    617       if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     625      if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    618626        Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    619627      Error(SomeError,"ReadSrcPsiDensity: cannot open doc file!");
     
    635643      fclose(SrcPsiDoc);
    636644      if (test) {
    637         if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     645        if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    638646          Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    639647        return 0;
    640648      }
    641649      fprintf(stderr,"ReadSrcPsiDensity: Only %i items read!\n",readnr);
    642       if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     650      if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    643651        Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    644652      Error(SomeError, "ReadSrcPsiDensity: read error");
     
    649657      fclose(SrcPsiDoc);
    650658      if (test) {
    651         if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     659        if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    652660          Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    653661        return 0;
    654662      }
    655       if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     663      if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    656664        Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    657665      Error(SomeError,"ReadSrcPsiDensity: Mismatching levels!");
     
    666674      if (test) {
    667675        fprintf(stderr,"(%i) Min\t N(x,y,z)\tPsiNo+AddNo\n file: %s\t %i %i %i\t %i + %i\nsystem: %s\t %d %d %d\t %d + %d\n",P->Par.me, R->MinimisationName[read_type], N[0], N[1], N[2], GlobalNo[0], GlobalNo[1], R->MinimisationName[R->CurrentMin], LevS->N[0] , LevS->N[1], LevS->N[2], Lat->Psi.GlobalNo[PsiMaxNoDouble], Lat->Psi.GlobalNo[PsiMaxAdd]);
    668         if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     676        if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    669677          Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    670678        return 0;
    671679      }
    672680      fprintf(stderr,"ReadSrcPsiDensity: Type %i != CurrentMin %i || N[0] %i != %i || N[1] %i != %i || N[2] %i != %i || %s %i + %i != %i + %i\n", read_type, R->CurrentMin, N[0], LevS->N[0], N[1], LevS->N[1], N[2], LevS->N[2], spin, GlobalNo[0], GlobalNo[1], Num, P->Lat.Psi.GlobalNo[PsiMaxAdd]);
    673       if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     681      if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    674682        Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    675683      Error(SomeError,"ReadSrcPsiDensity: srcpsi file does not fit to system");
    676684    }
    677     signal = 0; // everything went alright, signal ok
    678     if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     685    breaksignal = 0; // everything went alright, signal ok
     686    if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    679687      Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    680688  } else {  // others wait for signal from root process
    681     if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     689    if (MPI_Bcast(&breaksignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    682690      Error(SomeError,"ReadSrcPsiDensity: Bcast of signal failed\n");
    683     if (signal == 1)
     691    if (breaksignal == 1)
    684692      return 0;
    685     else if (signal == 2)
     693    else if (breaksignal == 2)
    686694      Error(SomeError, "ReadSrcPsiDensity: Something went utterly wrong, see root process");
    687695    else if (P->Call.out[PsiOut])
     
    748756                  Error(SomeError, "ReadSrcPsiDensity: MPI_Recv of loaded coefficients failed!");
    749757                MPI_Get_count(&status, MPI_DOUBLE, &zahl);
    750                 if (zahl != LevS->Dens->LocalSizeR) // check number of elements
     758                if (zahl != (size_t)LevS->Dens->LocalSizeR) // check number of elements
    751759                  fprintf(stderr,"(%i)ReadSrcPsiDensity: MPI_Recv from process 0 of loaded coefficients of GlobalNo %i, owner %i failed: Too few coefficients - %i instead of %i!\n", P->Par.me, k, owner, zahl, LevS->Dens->LocalSizeR);
    752760                //else       
     
    766774                Error(SomeError, "ReadSrcPsiDensity: MPI_Recv of loaded coefficients failed!");
    767775              MPI_Get_count(&status, MPI_DOUBLE, &zahl);
    768               if (zahl != LevS->Dens->LocalSizeR) // check number of elements
     776              if (zahl != (size_t)LevS->Dens->LocalSizeR) // check number of elements
    769777                fprintf(stderr,"(%i)ReadSrcPsiDensity: MPI_Recv of loaded coefficients of GlobalNo %i, owner %i failed: Too few coefficients - %i instead of %i!\n", P->Par.me, k, P->Par.me_comm_ST_Psi, zahl, LevS->Dens->LocalSizeR);
    770778              //else       
  • pcp/src/output.h

    ra97897 r79290f  
    1414  $Id: output.h,v 1.17.2.1 2007-04-21 12:55:50 foo Exp $
    1515*/
     16
     17#ifdef HAVE_CONFIG_H
     18#include <config.h>
     19#endif
    1620
    1721static const char suffixdensdat[] = ".density.data";  //!< Suffix for density data file
  • pcp/src/parsetest.c

    ra97897 r79290f  
    11//#include "init.h"
     2
     3#ifdef HAVE_CONFIG_H
     4#include <config.h>
     5#endif
     6
    27#include <stdio.h>
    3 
    4 enum value_type { string_type, double_type, int_type, grid, lower_trigrid, upper_trigrid};      //!< Specifying the type to be read of a parameter
    5 
     8#include "data.h"
    69
    710/** Reads parameter from a parsed file.
  • pcp/src/pcp.c

    ra97897 r79290f  
    517517 * &copy; 2006 Frederik Heber
    518518 */
     519
     520#ifdef HAVE_CONFIG_H
     521#include <config.h>
     522#endif
    519523
    520524#include<signal.h>
  • pcp/src/pcp.h

    ra97897 r79290f  
    1515  $Id: pcp.h,v 1.6 2006/03/30 22:19:51 foo Exp $
    1616*/
     17
     18#ifdef HAVE_CONFIG_H
     19#include <config.h>
     20#endif
     21
    1722#include <signal.h>
    1823 
  • pcp/src/pdbformat.c

    ra97897 r79290f  
    44   $Id: pdbformat.c,v 1.9 2006/03/30 22:19:52 foo Exp $
    55*/
     6
     7#ifdef HAVE_CONFIG_H
     8#include <config.h>
     9#endif
    610
    711#include<stdio.h>
  • pcp/src/pdbformat.h

    ra97897 r79290f  
    1414*/
    1515
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    1620int WritePDBLine(FILE *f, unsigned id, const char* atomname, const char* residuename,
    1721                 unsigned residuenr, double x, double y, double z,
  • pcp/src/perturbed.c

    ra97897 r79290f  
    3737
    3838*/
     39
     40#ifdef HAVE_CONFIG_H
     41#include <config.h>
     42#endif
    3943
    4044#include <stdlib.h>
     
    354358  struct RunStruct *R = &P->R;
    355359  struct LatticeLevel *LevS = R->LevS;
    356   const int state = R->CurrentMin;
     360  const enum PsiTypeTag state = R->CurrentMin;
    357361  const int l_normal = Psi->TypeStartIndex[Occupied] + (l - Psi->TypeStartIndex[state]);  // offset l to \varphi_l^{(0)}
    358362  const int ActNum = l - Psi->TypeStartIndex[state] + Psi->TypeStartIndex[1] * Psi->LocalPsiStatus[l].my_color_comm_ST_Psi;
     
    14561460  double result = 0., E0 = 0., Elambda = 0., E1 = 0.;//, E2 = 0.;
    14571461  int i,m,j;
    1458   const int state = R->CurrentMin;
     1462  const enum PsiTypeTag state = R->CurrentMin;
    14591463  //const int l_normal = R->ActualLocalPsiNo - Psi->TypeStartIndex[state] + Psi->TypeStartIndex[Occupied];
    14601464  const int ActNum =  R->ActualLocalPsiNo - Psi->TypeStartIndex[state] + Psi->TypeStartIndex[1] * Psi->LocalPsiStatus[R->ActualLocalPsiNo].my_color_comm_ST_Psi;
     
    16651669 * \note Continuous Set of Damped Gauge Transformations according to Keith and Bader
    16661670 */
    1667 #ifdef HAVE_INLINE
    1668 inline double ShiftGaugeOrigin(struct Problem *P, double r[NDIM], const int index)
    1669 #else
    16701671double ShiftGaugeOrigin(struct Problem *P, double r[NDIM], const int index)
    1671 #endif
    16721672{
    16731673  struct Ions *I = &P->Ion;
     
    17601760 * \return linearly interpolated value of \a *grid for position \a R[NDIM]
    17611761 */
    1762 double LinearInterpolationBetweenGrid(struct Problem *P, struct Lattice *Lat, struct LatticeLevel *Lev, double R[NDIM], fftw_real *grid)
     1762double LinearInterpolationBetweenGrid(struct Problem *P, struct Lattice *Lat, struct LatticeLevel *Lev, double R[NDIM], fftw_real *fftgrid)
    17631763{
    17641764  double x[2][NDIM];
     
    17881788    if ((k[g][0] >= N0*myPE) && (k[g][0] < N0*(myPE+1))) {
    17891789      //fprintf(stderr,"(%i) grid[%i]: sigma = %e\n", P->Par.me,  k[g][2]+N[2]*(k[g][1]+N[1]*(k[g][0]-N0*myPE)), sigma);
    1790       sigma += (x[g][0]*x[0][1]*x[0][2])*grid[k[0][2]+N[2]*(k[0][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
     1790      sigma += (x[g][0]*x[0][1]*x[0][2])*fftgrid[k[0][2]+N[2]*(k[0][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
    17911791      //fprintf(stderr,"(%i) grid[%i]: sigma += %e * %e \n", P->Par.me,  k[g][2]+N[2]*(k[g][1]+N[1]*(k[g][0]-N0*myPE)), (x[g][0]*x[0][1]*x[0][2]), grid[k[0][2]+N[2]*(k[0][1]+N[1]*(k[g][0]-N0*myPE))]*mu0);
    1792       sigma += (x[g][0]*x[0][1]*x[1][2])*grid[k[1][2]+N[2]*(k[0][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
     1792      sigma += (x[g][0]*x[0][1]*x[1][2])*fftgrid[k[1][2]+N[2]*(k[0][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
    17931793      //fprintf(stderr,"(%i) grid[%i]: sigma += %e * %e \n", P->Par.me,  k[g][2]+N[2]*(k[g][1]+N[1]*(k[g][0]-N0*myPE)), (x[g][0]*x[0][1]*x[1][2]), grid[k[1][2]+N[2]*(k[0][1]+N[1]*(k[g][0]-N0*myPE))]*mu0);
    1794       sigma += (x[g][0]*x[1][1]*x[0][2])*grid[k[0][2]+N[2]*(k[1][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
     1794      sigma += (x[g][0]*x[1][1]*x[0][2])*fftgrid[k[0][2]+N[2]*(k[1][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
    17951795      //fprintf(stderr,"(%i) grid[%i]: sigma += %e * %e \n", P->Par.me,  k[g][2]+N[2]*(k[g][1]+N[1]*(k[g][0]-N0*myPE)), (x[g][0]*x[1][1]*x[0][2]), grid[k[0][2]+N[2]*(k[1][1]+N[1]*(k[g][0]-N0*myPE))]*mu0);
    1796       sigma += (x[g][0]*x[1][1]*x[1][2])*grid[k[1][2]+N[2]*(k[1][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
     1796      sigma += (x[g][0]*x[1][1]*x[1][2])*fftgrid[k[1][2]+N[2]*(k[1][1]+N[1]*(k[g][0]-N0*myPE))]*mu0; // if it's local and factor from inverse fft
    17971797      //fprintf(stderr,"(%i) grid[%i]: sigma += %e * %e \n", P->Par.me,  k[g][2]+N[2]*(k[g][1]+N[1]*(k[g][0]-N0*myPE)), (x[g][0]*x[1][1]*x[1][2]), grid[k[1][2]+N[2]*(k[1][1]+N[1]*(k[g][0]-N0*myPE))]*mu0);
    17981798    }
  • pcp/src/perturbed.h

    ra97897 r79290f  
    1212
    1313*/
     14
     15#ifdef HAVE_CONFIG_H
     16#include <config.h>
     17#endif
    1418
    1519
     
    3640void OutputOrbitalPositions(struct Problem *P, const enum PsiTypeTag type);
    3741void fft_Psi(struct Problem *P, const fftw_complex *Psi, fftw_real *PsiR, const int index, const int symmetry);
    38 inline int cross(const int i, const int j);
    39 inline int crossed(int i, int j);
    4042void AllocCurrentDensity(struct Density *Dens0);
    4143void DisAllocCurrentDensity(struct Density *Dens0);
    4244void PlotVectorPlane(struct Problem *P, int B_Index, int n_orth);
    4345void ReadSrcPerturbedPsis(struct Problem *P, enum PsiTypeTag type);
    44 inline double ShiftGaugeOrigin(struct Problem *P, double r[NDIM], const int index);
    45 inline double sawtooth(struct Lattice *Lat, double L[NDIM], const int index);
    46 inline void MinImageConv(struct Lattice *Lat, const double R[NDIM], const double r[NDIM], double *result);
     46double ShiftGaugeOrigin(struct Problem *P, double r[NDIM], const int index);
     47#ifdef HAVE_INLINE
     48  inline double sawtooth(struct Lattice *Lat, double L[NDIM], const int index);
     49  inline void MinImageConv(struct Lattice *Lat, const double R[NDIM], const double r[NDIM], double *result);
     50  inline int cross(const int i, const int j);
     51  inline int crossed(int i, int j);
     52#else
     53  double sawtooth(struct Lattice *Lat, double L[NDIM], const int index);
     54  void MinImageConv(struct Lattice *Lat, const double R[NDIM], const double r[NDIM], double *result);
     55  int cross(const int i, const int j);
     56  int crossed(int i, int j);
     57#endif
    4758void test_fft_symmetry(struct Problem *P, const int l);
    4859void test_rxp(struct Problem *P);
  • pcp/src/pseudo.c

    ra97897 r79290f  
    2323*/
    2424
     25#ifdef HAVE_CONFIG_H
     26#include <config.h>
     27#endif
     28
    2529#include <stdlib.h>
    2630#include <stdio.h>
     
    2933#include <string.h>
    3034
    31 
    3235// use double precision fft when we have it
    33 #ifdef HAVE_CONFIG_H
    34 #include <config.h>
    35 #endif
    36 
    3736#ifdef HAVE_DFFTW_H
    3837#include "dfftw.h"
  • pcp/src/pseudo.h

    ra97897 r79290f  
    1717
    1818
    19 // use double precision fft when we have it
    2019#ifdef HAVE_CONFIG_H
    2120#include <config.h>
    2221#endif
    2322
     23// use double precision fft when we have it
    2424#ifdef HAVE_DFFTW_H
    2525#include "dfftw.h"
  • pcp/src/riemann.c

    ra97897 r79290f  
    1111  $Id: riemann.c,v 1.8 2006/03/30 22:19:52 foo Exp $
    1212*/
     13
     14#ifdef HAVE_CONFIG_H
     15#include <config.h>
     16#endif
    1317
    1418#include <stdlib.h>
     
    440444  fft_3d_complex_to_real(plan, LevS->LevelNo, (int)FFTNFSVecUp, RTAC[RTAA], work);
    441445  RiemannRTransformPos(LevS, RTAR[RTAA], workR, NFields[RTAA]);
    442   /* All RTAŽs in R*/
     446  /* All RTAᅵs in R*/
    443447  for (i=0; i < LocalSizeR[RTAIRT]; i++) {
    444448    destDet[i] = 1./RDET3(&srcRT[NDIM_NDIM*i]);
  • pcp/src/riemann.h

    ra97897 r79290f  
    1414*/
    1515
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    1620void CalculateRiemannLaplaceS(const struct Lattice *Lat, struct RiemannTensor *RT, fftw_complex *src, fftw_complex *Lap/*, const double FactorC_R, const double FactorR_C*/);
    1721void CalculateRiemannLaplace0(const struct Lattice *Lat, struct RiemannTensor *RT, fftw_complex *src, fftw_complex *Lap/*, const double FactorC_R, const double FactorR_C*/);
  • pcp/src/run.c

    ra97897 r79290f  
    2222  $Id: run.c,v 1.101.2.2 2007-04-21 13:01:13 foo Exp $
    2323*/
     24
     25#ifdef HAVE_CONFIG_H
     26#include <config.h>
     27#endif
    2428
    2529#include <signal.h>
  • pcp/src/run.h

    ra97897 r79290f  
    1616  $Id: run.h,v 1.42 2007/02/09 09:37:29 foo Exp $
    1717*/
     18
     19#ifdef HAVE_CONFIG_H
     20#include <config.h>
     21#endif
     22
    1823
    1924#define RUNMAXOLD 2   //!< store this many old values of relative kinetic and total energ in RunStruct
  • pcp/src/wannier.c

    ra97897 r79290f  
    1414  $Id: wannier.c,v 1.7 2007-10-12 15:50:38 heber Exp $
    1515*/
     16
     17#ifdef HAVE_CONFIG_H
     18#include <config.h>
     19#endif
    1620
    1721#include <math.h>
     
    19751979  double WannierCentre[NDIM+1]; // combined centre and spread
    19761980  MPI_Status status;
    1977   int signal = 0; // 1 - ok, 0 - error
     1981  int errorsignal = 0; // 1 - ok, 0 - error
    19781982
    19791983  switch (Lat->Psi.PsiST) {
     
    19931997    tagname = (char *) Malloc(sizeof(char)*MAXSTRINGSIZE, "ParseWannierFile: *tagname");
    19941998    if(!OpenFile(P, &SpreadFile, suffix, "r", P->Call.out[ReadOut])) { // check if file exists
    1995       if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     1999      if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    19962000        Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    19972001      return 0;
    19982002      //Error(SomeError,"ParseWannierFile: Opening failed\n");
    19992003    }
    2000     signal = 1;
    2001     if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     2004    errorsignal = 1;
     2005    if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    20022006      Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    20032007  } else {
    2004     if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     2008    if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    20052009      Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    2006     if (signal == 0)
     2010    if (errorsignal == 0)
    20072011      return 0;
    20082012  }
     
    20142018      if (P->Par.me_comm_ST == 0) { // only process 0 may access the spread file
    20152019        sprintf(tagname,"Psi%d_Lev%d",i,R->LevSNo);
    2016         signal = 0;
     2020        errorsignal = 0;
    20172021        if (!ParseForParameter(0,SpreadFile,tagname,0,3,1,row_double,WannierCentre,1,optional)) {
    20182022          //Error(SomeError,"ParseWannierFile: Parsing WannierCentre failed");
    2019           if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     2023          if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    20202024            Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    20212025          return 0;
     
    20232027        if (!ParseForParameter(0,SpreadFile,tagname,0,4,1,double_type,&WannierCentre[NDIM],1,optional)) {
    20242028          //Error(SomeError,"ParseWannierFile: Parsing WannierSpread failed");
    2025           if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     2029          if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    20262030            Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    20272031          return 0;
    20282032        }
    2029         signal = 1;
    2030         if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     2033        errorsignal = 1;
     2034        if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    20312035          Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    20322036      } else {
    2033         if (MPI_Bcast(&signal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
     2037        if (MPI_Bcast(&errorsignal,1,MPI_INT,0,P->Par.comm_ST) != MPI_SUCCESS)
    20342038          Error(SomeError,"ParseWannierFile: Bcast of signal failed\n");
    2035         if (signal == 0)
     2039        if (errorsignal == 0)
    20362040          return 0;
    20372041      }
  • pcp/src/wannier.h

    ra97897 r79290f  
    1414  $Id: wannier.h,v 1.3 2007-10-08 15:43:29 heber Exp $
    1515*/
     16
     17#ifdef HAVE_CONFIG_H
     18#include <config.h>
     19#endif
    1620
    1721#include <gsl/gsl_complex.h>
Note: See TracChangeset for help on using the changeset viewer.