#include "../common/nm_examples_helper.h"
#include <stdio.h>
static int a = 0;
int main(int argc, char**argv)
{
{
int*p_a = &a;
printf("a = %d (1)\n", a);
printf("a = %d (2)\n", a);
a = 3;
printf("a = %d (4)\n", a);
int c = 0;
printf("a = %d (5); c = %d (1)\n", a, c);
a = 6;
c = 0;
printf("c = %d (1)\n", c);
}
else
{
int*p_a = NULL;
a = 1;
a = 2;
printf("a = %d (3)\n", a);
a = 4;
int c = 1;
a = 5;
printf("a = %d (6)\n", a);
}
}
void nm_coll_barrier(nm_comm_t comm, nm_tag_t tag)
void nm_onesided_put(nm_onesided_t p_onesided, struct nm_gate_s *p_gate, void *p_ptr, nm_len_t len, uintptr_t dest_addr)
blocking version of iput
void nm_onesided_fence(nm_onesided_t p_onesided, struct nm_gate_s *p_gate)
blocking version of ifence
void nm_onesided_finalize(nm_onesided_t p_onesided)
void nm_onesided_init(nm_session_t p_session, nm_onesided_t *pp_onesided)
initialize the interface, using the given session.
void nm_onesided_ifence(nm_onesided_t p_onesided, struct nm_gate_s *p_gate, nm_onesided_request_t *p_req)
ensures all put operations to the remote node are completed
void nm_onesided_iput_data(nm_onesided_t p_onesided, struct nm_gate_s *p_gate, struct nm_data_s *p_data, uintptr_t dest_addr, nm_onesided_request_t *p_req)
remotely write to destination memory; local data described by p_data; dest_addr is the address in the...
void nm_onesided_req_wait(nm_onesided_request_t *p_req)
wait for this request completion
void nm_onesided_iget_data(nm_onesided_t p_onesided, struct nm_gate_s *p_gate, struct nm_data_s *p_data, uintptr_t dest_addr, nm_onesided_request_t *p_req)
remotely read data from target memory (nm_data flavor).
void nm_onesided_req_wait_all(nm_onesided_request_t **p_reqs, int n)
wait for completion of a vector of requests
void nm_onesided_iput_with_target(nm_onesided_t p_onesided, struct nm_gate_s *p_gate, void *p_ptr, nm_len_t len, uintptr_t dest_addr, void *p_target_ptr, nm_len_t target_len, nm_onesided_request_t *p_req)
send a put request with target-side completion.
void nm_onesided_target_irecv(nm_onesided_t p_onesided, nm_gate_t p_gate, void *p_ptr, nm_len_t len, nm_onesided_target_request_t *p_req)
posts a recv request for target-side completion
void nm_onesided_iget_with_target(nm_onesided_t p_onesided, struct nm_gate_s *p_gate, void *p_ptr, nm_len_t len, uintptr_t dest_addr, void *p_target_ptr, nm_len_t target_len, nm_onesided_request_t *p_req)
send a get request with target-side completion
void nm_onesided_target_wait(nm_onesided_target_request_t *p_req)
wait completion of a request on target side
nm_tag_t tag
the user-supplied tag
static void nm_data_contiguous_build(struct nm_data_s *p_data, void *ptr, nm_len_t len)
static void nm_examples_init(int *argc, char *argv[])
static nm_session_t p_session
static void nm_examples_exit(void)
static int nm_sr_recv(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, void *data, nm_len_t len)
blocking recv
static int nm_sr_send(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, const void *data, nm_len_t len)
blocking send
uint64_t nm_tag_t
user tags, 64 bits, contained in indirect hashtable
a data descriptor, used to pack/unpack data from app layout to/from contiguous buffers
a send request for onesided
an instance of interface 'onesided'
a request used for target-side completions