b4e3ad8da0
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.
39 строки
757 B
C
39 строки
757 B
C
/* -*- C -*-
|
|
*
|
|
* $HEADER$
|
|
*
|
|
* A program that just spins - provides mechanism for testing user-driven
|
|
* abnormal program termination
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
#include "orte/util/proc_info.h"
|
|
#include "orte/runtime/runtime.h"
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
|
|
int i, rc;
|
|
double pi;
|
|
pid_t pid;
|
|
|
|
if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_NON_BARRIER))) {
|
|
fprintf(stderr, "spin: couldn't init orte - error code %d\n", rc);
|
|
return rc;
|
|
}
|
|
pid = getpid();
|
|
|
|
printf("spin: Name [%lu,%lu,%lu] Pid %ld\n", ORTE_NAME_ARGS(orte_process_info.my_name), (long)pid);
|
|
|
|
i = 0;
|
|
while (1) {
|
|
i++;
|
|
pi = i / 3.14159256;
|
|
if (i > 100) i = 0;
|
|
}
|
|
|
|
return 0;
|
|
}
|