Fixed a bug with extra being nullptr when _host_view is true: always allocate extra
(Note that BaseAmoeba has its own cast_extra_data() that doesn't know if extra is allocated properly, it is the case when _host_view is false for dedicated GPUs for example)
This commit is contained in:
@ -490,7 +490,7 @@ int DeviceT::init(Answer<numtyp,acctyp> &ans, const bool charge,
|
||||
_data_in_estimate++;
|
||||
if (!atom.velocity() && vel)
|
||||
_data_in_estimate++;
|
||||
if (atom.using_extra()==false && extra_fields>0)
|
||||
if (atom.using_extra() && extra_fields>0)
|
||||
_data_in_estimate++;
|
||||
if (!atom.add_fields(charge,rot,gpu_nbor,gpu_nbor>0 && maxspecial,vel,extra_fields))
|
||||
return -3;
|
||||
|
||||
Reference in New Issue
Block a user