|
From: | Joost de Graaf |
Subject: | Re: [ESPResSo-users] Bug in C++-code of LB-Algorithm (??) |
Date: | Tue, 17 Jun 2014 19:05:54 +0200 |
There is a fix for the problem in my pull requestwhich you can cherry pick to ensure that the GPU LB compiles.
https://github.com/jdegraaf/espresso/commit/96c500420c342a9d4bfc9680a16de6f635db7fbb
On 17 June 2014 17:35, Marcello Sega <address@hidden> wrote:
Hi,
we just noticed it with Stefan, a patch will come soon.
In the meanwhile you can declare lblattice as
Lattice lblattice;
and change the other line as follows:
lblattice.map_position_to_lattice_global(p, ind, delta, lbpar_gpu.agrid);
This should fix the problem.
Kind regards,
Marcello
--
On Tue, Jun 17, 2014 at 5:29 PM, Wink, Markus
<address@hidden> wrote:
> Dear all,
>
>
>
> I have downloaded Espresso version 3.3 from
> git://git.savannah.nongnu.org/espressomd.git. I have created a “test-binary”
> with the default myconfig header, which worked fine.
>
> Now I wanted to create a binary to simulate a lattice Boltzmann fluid. I am
> able to run configure, but by typing make, I get the following error
> messages (no binary is produced):
>
>
>
> /usr/local/src/espressomd/src/core/lb.cpp:100: error: conversion from
> 'Lattice*' to non-scalar type 'Lattice' requested
>
> /usr/local/src/espressomd/src/core/lb.cpp: In function 'int
> lb_lbfluid_get_interpolated_velocity_global(double*, double*)':
>
> /usr/local/src/espressomd/src/core/lb.cpp:1082: error:
> 'map_position_to_lattice_global' was not declared in this scope
>
>
>
> The source code of lb.cpp looks like this (line 100):
>
>
>
> Lattice lblattice=new Lattice();
>
>
>
> As far, as I understood, the command new is a language construct to
> dynamically allocate an array. So shouldn’t it be something like (I am not
> exactly sure)
>
> Lattice *lblattice=new Lattice(); ?
>
>
>
> In an older code, I found the line Lattice lblattice = { {0,0,0}, {0,0,0},
> 0, 0, 0, 0, -1.0, -1.0, NULL, NULL }; instead. Replacing that line did not
> work with the newer code, the error message there is:
>
>
>
> /usr/local/src/espressomd/src/core/lb.cpp:100: error: in C++98 'lblattice'
> must be initialized by constructor, not by '{...}'
>
> /usr/local/src/espressomd/src/core/lb.cpp:100: warning: extended initializer
> lists only available with -std=c++0x or -std=gnu++0x
>
> /usr/local/src/espressomd/src/core/lb.cpp:100: error: no matching function
> for call to 'Lattice::Lattice(<brace-enclosed initializer list>)'
>
> /usr/local/src/espressomd/src/core/lattice.hpp:85: note: candidates are:
> Lattice::Lattice()
>
> /usr/local/src/espressomd/src/core/lattice.hpp:53: note:
> Lattice::Lattice(const Lattice&)
>
>
>
>
>
> Concerning the second error message: where do I exactly have to declare the
> function 'map_position_to_lattice_global'?
>
>
>
> Thank you in advance,
>
> Greetings
>
>
>
> Markus
>
>
Institut für Computergestützte Biologische Chemie
University of Vienna
PGP public key on MIT server http://goo.gl/zlIZix
[Prev in Thread] | Current Thread | [Next in Thread] |