|
|
|
@ -45,8 +45,6 @@ void getParams(paddle_pserver_client c) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
char addr[] = "localhost:3000";
|
|
|
|
|
paddle_pserver_client c = paddle_new_pserver_client(addr, 1);
|
|
|
|
@ -54,7 +52,9 @@ int main() {
|
|
|
|
|
size_t config_proto_len = 0;
|
|
|
|
|
ssize_t nread;
|
|
|
|
|
FILE *fp = fopen("testdata/optimizer.pb.txt", "r");
|
|
|
|
|
if(!fp) { fail(); }
|
|
|
|
|
if (!fp) {
|
|
|
|
|
fail();
|
|
|
|
|
}
|
|
|
|
|
while ((nread = getline(&config_proto, &config_proto_len, fp)) != -1) {
|
|
|
|
|
printf("%s", config_proto);
|
|
|
|
|
}
|
|
|
|
@ -70,7 +70,8 @@ retry:
|
|
|
|
|
param.name = name_a;
|
|
|
|
|
param.content = content_a;
|
|
|
|
|
param.content_len = 2000;
|
|
|
|
|
int error = paddle_init_param(c, param, (void *)config_proto, config_proto_len);
|
|
|
|
|
int error =
|
|
|
|
|
paddle_init_param(c, param, (void *)config_proto, config_proto_len);
|
|
|
|
|
if (error != 0) {
|
|
|
|
|
goto retry;
|
|
|
|
|
}
|
|
|
|
|