Fixup tests for recent api changes
cleanup a ton of warnings, include proper files fix orte_ring, it had a deadlock in it... fix the abort test so it can be used with less than 4 processes This commit was SVN r14787.
Этот коммит содержится в:
родитель
dd8bea2ea2
Коммит
b4e3ad8da0
@ -4,25 +4,24 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
int i = 0;
|
|
||||||
pid_t pid;
|
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
|
|
||||||
if (getrlimit (RLIMIT_NOFILE, &rlim) < 0)
|
if (getrlimit (RLIMIT_NOFILE, &rlim) < 0)
|
||||||
fprintf (stderr, "getrlimit (RLIMIT_NOFILE): %s\n", strerror (errno));
|
fprintf (stderr, "getrlimit (RLIMIT_NOFILE): %s\n", strerror (errno));
|
||||||
else {
|
else {
|
||||||
printf("softlimit on num_files: %d\thardlimit on num_files: %d\n", rlim.rlim_cur, rlim.rlim_max);
|
printf("softlimit on num_files: %d\thardlimit on num_files: %d\n", (int)rlim.rlim_cur, (int)rlim.rlim_max);
|
||||||
}
|
}
|
||||||
if (getrlimit (RLIMIT_NPROC, &rlim) < 0)
|
if (getrlimit (RLIMIT_NPROC, &rlim) < 0)
|
||||||
fprintf (stderr, "getrlimit (RLIMIT_NPROC): %s\n", strerror (errno));
|
fprintf (stderr, "getrlimit (RLIMIT_NPROC): %s\n", strerror (errno));
|
||||||
else {
|
else {
|
||||||
printf("softlimit on num_child: %d\thardlimit on num_child: %d\n", rlim.rlim_cur, rlim.rlim_max);
|
printf("softlimit on num_child: %d\thardlimit on num_child: %d\n", (int)rlim.rlim_cur, (int)rlim.rlim_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("RLIM_INFINITY: %d\n", RLIM_INFINITY);
|
printf("RLIM_INFINITY: %d\n", (int)RLIM_INFINITY);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "orte/runtime/runtime.h"
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
@ -19,7 +20,7 @@ int main(int argc, char* argv[])
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
char hostname[500];
|
char hostname[500];
|
||||||
|
|
||||||
if (0 > (rc = orte_init())) {
|
if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_USE_BARRIER))) {
|
||||||
fprintf(stderr, "orte_abort: couldn't init orte - error code %d\n", rc);
|
fprintf(stderr, "orte_abort: couldn't init orte - error code %d\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -34,7 +35,9 @@ int main(int argc, char* argv[])
|
|||||||
i++;
|
i++;
|
||||||
pi = i / 3.14159256;
|
pi = i / 3.14159256;
|
||||||
if (i > 10000) i = 0;
|
if (i > 10000) i = 0;
|
||||||
if (orte_process_info.my_name->vpid == 3 && i == 9995) {
|
if ((orte_process_info.my_name->vpid == 3 ||
|
||||||
|
(orte_process_info.num_procs <= 3 && orte_process_info.my_name->vpid == 0))
|
||||||
|
&& i == 9995) {
|
||||||
orte_abort(1, true);
|
orte_abort(1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "orte/runtime/runtime.h"
|
#include "orte/runtime/runtime.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
/*file .c : spawned the file Exe*/
|
/*file .c : spawned the file Exe*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "opal/threads/condition.h"
|
#include "opal/threads/condition.h"
|
||||||
|
#include "opal/util/argv.h"
|
||||||
|
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "orte/mca/rmgr/rmgr.h"
|
#include "orte/mca/rmgr/rmgr.h"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "orte/runtime/runtime.h"
|
#include "orte/runtime/runtime.h"
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "opal/threads/condition.h"
|
#include "opal/threads/condition.h"
|
||||||
|
#include "opal/util/argv.h"
|
||||||
|
|
||||||
|
#include "orte/runtime/runtime.h"
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "orte/dss/dss.h"
|
#include "orte/dss/dss.h"
|
||||||
#include "orte/mca/gpr/gpr.h"
|
#include "orte/mca/gpr/gpr.h"
|
||||||
@ -37,7 +39,7 @@ int main(int argc, char* argv[])
|
|||||||
OBJ_CONSTRUCT(&cond, opal_condition_t);
|
OBJ_CONSTRUCT(&cond, opal_condition_t);
|
||||||
waitexit = false;
|
waitexit = false;
|
||||||
|
|
||||||
if (0 > (rc = orte_init())) {
|
if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_USE_BARRIER))) {
|
||||||
fprintf(stderr, "couldn't init orte - error code %d\n", rc);
|
fprintf(stderr, "couldn't init orte - error code %d\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -106,6 +108,7 @@ static void job_state_callback(orte_jobid_t jobid, orte_proc_state_t state)
|
|||||||
|
|
||||||
static void eclipse_launch_cb(orte_gpr_notify_data_t *notify_data, void *user_tag)
|
static void eclipse_launch_cb(orte_gpr_notify_data_t *notify_data, void *user_tag)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
int len;
|
int len;
|
||||||
orte_std_cntr_t i;
|
orte_std_cntr_t i;
|
||||||
orte_std_cntr_t j;
|
orte_std_cntr_t j;
|
||||||
@ -118,6 +121,7 @@ static void eclipse_launch_cb(orte_gpr_notify_data_t *notify_data, void *user_ta
|
|||||||
char * res;
|
char * res;
|
||||||
char * kv = NULL;
|
char * kv = NULL;
|
||||||
char * vpid = NULL;
|
char * vpid = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, "launch cb entered\n");
|
fprintf(stderr, "launch cb entered\n");
|
||||||
orte_dss.dump(0, notify_data, ORTE_GPR_NOTIFY_DATA);
|
orte_dss.dump(0, notify_data, ORTE_GPR_NOTIFY_DATA);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "orte/runtime/runtime.h"
|
#include "orte/runtime/runtime.h"
|
||||||
|
|
||||||
#define MY_TAG 12345
|
#define MY_TAG 12345
|
||||||
#define MAX_COUNT 20
|
#define MAX_COUNT 3
|
||||||
|
|
||||||
# define false 0
|
# define false 0
|
||||||
# define true 1
|
# define true 1
|
||||||
@ -25,7 +25,6 @@ main(int argc, char *argv[]){
|
|||||||
orte_process_name_t left_peer_orte_name;
|
orte_process_name_t left_peer_orte_name;
|
||||||
int num_peers = 0;
|
int num_peers = 0;
|
||||||
struct iovec msg;
|
struct iovec msg;
|
||||||
int ret;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init
|
* Init
|
||||||
@ -81,6 +80,7 @@ main(int argc, char *argv[]){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while (counter <= MAX_COUNT ) {
|
while (counter <= MAX_COUNT ) {
|
||||||
int *cnt;
|
int *cnt;
|
||||||
|
|
||||||
@ -100,16 +100,19 @@ main(int argc, char *argv[]){
|
|||||||
cnt = (int *) msg.iov_base;
|
cnt = (int *) msg.iov_base;
|
||||||
counter = *cnt;
|
counter = *cnt;
|
||||||
|
|
||||||
if(counter > MAX_COUNT)
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Update */
|
/* Update */
|
||||||
printf("%s) Recv %d ... Send %d\n", my_name, counter, counter + 1);
|
printf("%s) Recv %d ... Send %d\n", my_name, counter, counter + 1);
|
||||||
if( orte_process_info.my_name->vpid == 0 ) {
|
if( orte_process_info.my_name->vpid == 0 ) {
|
||||||
sleep(2);
|
sleep(2);
|
||||||
}
|
}
|
||||||
counter++;
|
if(orte_process_info.my_name->vpid == 0) {
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(counter > MAX_COUNT && right_peer_orte_name.vpid == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Send to right */
|
/* Send to right */
|
||||||
msg.iov_base = (void *) &counter;
|
msg.iov_base = (void *) &counter;
|
||||||
msg.iov_len = sizeof(counter);
|
msg.iov_len = sizeof(counter);
|
||||||
@ -124,8 +127,6 @@ main(int argc, char *argv[]){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
|
||||||
|
|
||||||
orte_finalize();
|
orte_finalize();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "opal/threads/condition.h"
|
#include "opal/threads/condition.h"
|
||||||
|
#include "opal/util/argv.h"
|
||||||
|
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "orte/mca/rmgr/rmgr.h"
|
#include "orte/mca/rmgr/rmgr.h"
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "orte_config.h"
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif /* HAVE_SYS_TIME_H */
|
#endif /* HAVE_SYS_TIME_H */
|
||||||
|
|
||||||
#include "opal/runtime/opal.h"
|
#include "opal/runtime/opal.h"
|
||||||
|
#include "opal/util/output.h"
|
||||||
|
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "orte/runtime/runtime.h"
|
#include "orte/runtime/runtime.h"
|
||||||
|
@ -7,8 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
|
#include "orte/runtime/runtime.h"
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
@ -17,7 +19,7 @@ int main(int argc, char* argv[])
|
|||||||
double pi;
|
double pi;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
if (0 > (rc = orte_init())) {
|
if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_NON_BARRIER))) {
|
||||||
fprintf(stderr, "spin: couldn't init orte - error code %d\n", rc);
|
fprintf(stderr, "spin: couldn't init orte - error code %d\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user