X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fnlsop.git;a=blobdiff_plain;f=nlsop_client.c;h=9718270fcfa7a7a67c2e53eb5c612052faeea288;hp=3f7654992c2d43752580e09041b71909ec01547e;hb=dd664a3acbc39be7bc2f75e2a9378f989c75baa8;hpb=b947acff653562c5be7d21128555a16f87924d18 diff --git a/nlsop_client.c b/nlsop_client.c index 3f76549..9718270 100644 --- a/nlsop_client.c +++ b/nlsop_client.c @@ -305,29 +305,15 @@ u32 get_reject_graph(info *my_info,d3_lattice *d3_l,char *file,u32 *graph) { void send_data(int signum) { int c; - unsigned char data; c=gd3_l->max_x*gd3_l->max_y*gd3_l->max_z; - printf("%d <-\n",c); - - network_send(gnet->connection[0].fd,&dc,1); - /* - network_send(gnet->connection[0].fd,(unsigned char *)gd3_l, - sizeof(d3_lattice)); - network_send(gnet->connection[0].fd,(unsigned char *)gmy_info,sizeof(info)); - */ - printf("debug: sent dc\n"); - network_send(gnet->connection[0].fd,gd3_l->status,c*sizeof(unsigned char)); - network_receive(gnet->connection[0].fd,&data,sizeof(unsigned char)); - printf("debug: sent ac\n"); - network_send(gnet->connection[0].fd,(unsigned char *)gd3_l->extra, - c*sizeof(int)); - network_receive(gnet->connection[0].fd,&data,sizeof(unsigned char)); - printf("debug: sent cc\n"); - network_send(gnet->connection[0].fd,(unsigned char *)gi,sizeof(int)); - network_receive(gnet->connection[0].fd,&data,sizeof(unsigned char)); - + network_send_chan(gnet,0,&dc,1); + network_send_chan(gnet,0,(unsigned char *)gd3_l,sizeof(d3_lattice)); + network_send_chan(gnet,0,(unsigned char *)gmy_info,sizeof(info)); + network_send_chan(gnet,0,gd3_l->status,c*sizeof(unsigned char)); + network_send_chan(gnet,0,(unsigned char *)gd3_l->extra,c*sizeof(int)); + network_send_chan(gnet,0,(unsigned char *)gi,sizeof(int)); } @@ -348,7 +334,7 @@ int main(int argc,char **argv) gnet=&net; /* default values */ - strcpy(server_ip,""); + strcpy(server_ip,"137.250.82.105"); strcpy(p_file,IMP_PROFILE); strcpy(n_e_file,NEL_PROFILE); strcpy(r_file,""); @@ -414,6 +400,8 @@ int main(int argc,char **argv) int nop(t_event *event,void *allineed) { + printf("\ni did a nop :)\n"); + return 1; } @@ -558,6 +546,9 @@ int get_data_and_calc(t_event *event,void *allineed) { /* shutdown/free/close everything now ... */ free(d3_l.status); free(d3_l.extra); + free(c_profile); + free(n_e_loss); + free(nel_z); return 1; }