int c;
unsigned char data;
+ int fd;
c=gd3_l->max_x*gd3_l->max_y*gd3_l->max_z;
network_receive(gnet->connection[0].fd,&data,sizeof(unsigned char));
printf("debug: sent steps\n");
+ if(signum==121) {
+ printf("save test file\n");
+ fd=open("./test.save",O_WRONLY|O_CREAT);
+ write(fd,gd3_l,sizeof(d3_lattice));
+ write(fd,gmy_info,sizeof(info));
+ write(fd,gd3_l->status,c*sizeof(unsigned char));
+ write(fd,gd3_l->extra,c*sizeof(int));
+ close(fd);
+ }
+
}
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,"");
int nop(t_event *event,void *allineed) {
+ printf("\ni did a nop :)\n");
+
return 1;
}
i++;
if(i%my_info.save_rate==0) {
dc=DC_OK;
- send_data(0);
+ send_data(120);
dc=DC_QUIT;
}
if(i%my_info.s_rate==0) sputter(&d3_l);
/* finished */
dc=DC_END;
- send_data(0);
+ send_data(121);
dc=DC_QUIT;
/* 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;
}