rput (src, dest, size) prototype not found

Issue #41 resolved
Nenad Vukicevic created an issue

I have this code sample:

global_ptr<int> gp;
int lp[16];
...
  future<> f = rput (lp, gp, 16);
  future<> f1 = rput (lp, 16, gp);

First line, according to the spec, produces the following error:

y.cpp:10:32: error: no matching function for call to ‘rput(int [16], upcxx::global_ptr<int>&, int)’
   future<> f = rput (lp, gp, 16);

I just tried the second line even though it is not according to the spec, and got this error (but it seems that prototype was found):

/eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/rput.hpp: In instantiation of ‘typename upcxx::detail::rput_futures_of<S, R, O>::return_type upcxx::rput(const T*, std::size_t, upcxx::global_ptr<T>, upcxx::completions<S, R, O>) [with T = int; S = upcxx::nil_cx; R = upcxx::nil_cx; O = upcxx::future_cx<0>; typename upcxx::detail::rput_futures_of<S, R, O>::return_type = upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general> >; std::size_t = long unsigned int]’:
y.cpp:11:33:   required from here
/eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/rput.hpp:220:21: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
     backend::rma_put(gp_d.rank_, gp_d.raw_ptr_, buf_s, n*sizeof(T), cb);

Looks like function prototypes have arguments reversed.

Comments (3)

  1. Log in to comment