- changed status to resolved
REGRESSION: dist_id::here() does not compile
Issue #312
resolved
#include <upcxx/upcxx.hpp>
#include <iostream>
#include <assert.h>
int main() {
upcxx::init();
upcxx::dist_object<int> dobj(1);
upcxx::dist_id<int> di = dobj.id();
upcxx::dist_object<int> &ref = di.here();
assert(&ref == &dobj);
upcxx::team &tm = upcxx::local_team();
upcxx::team_id ti = tm.id();
upcxx::team &tr = ti.here();
assert(&tr == &tm);
upcxx::barrier();
if (!upcxx::rank_me()) std::cout << "SUCCESS" << std::endl;
upcxx::finalize();
return 0;
}
On dirac/gcc-9.2 using develop @ 726c75b
In file included from /usr/local/pkg/upcxx-dirac/gcc-9.2.0/nightly-2020.02.06/upcxx.debug.gasnet_seq.ibv/include/upcxx/upcxx.hpp:24,
from id-here.cc:1:
/usr/local/pkg/upcxx-dirac/gcc-9.2.0/nightly-2020.02.06/upcxx.debug.gasnet_seq.ibv/include/upcxx/dist_object.hpp: In instantiation of 'upcxx::dist_object<T>& upcxx::dist_id<T>::here() const [with T = int]':
id-here.cc:10:42: required from here
/usr/local/pkg/upcxx-dirac/gcc-9.2.0/nightly-2020.02.06/upcxx.debug.gasnet_seq.ibv/include/upcxx/dist_object.hpp:32:65: error: 'struct upcxx::detail::future_header_promise<upcxx::dist_object<int>&>' has no member named 'get_future'
32 | return detail::registered_promise<dist_object<T>&>(dig_)->get_future().result();
|
This is a regression relative to the 2019.9.0 release, probably introduced in pull request #141
Comments (1)
-
- Log in to comment
Fixed issue 312. dist_id::here() was broken by the "promise lifetime GC" refactor (PR 141).
→ <<cset c09cef51fdf7>>