2004-01-15 07:47:20 +03:00
|
|
|
/*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-15 07:47:20 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-15 07:47:20 +03:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2004-10-14 23:39:21 +04:00
|
|
|
#include <stdarg.h>
|
2004-01-15 07:47:20 +03:00
|
|
|
|
2004-03-19 00:35:28 +03:00
|
|
|
#include "include/constants.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "runtime/runtime.h"
|
2005-07-04 03:31:27 +04:00
|
|
|
#include "opal/util/output.h"
|
2004-01-15 07:47:20 +03:00
|
|
|
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
int orte_abort(int status, char *fmt, ...)
|
2004-01-15 07:47:20 +03:00
|
|
|
{
|
2005-07-12 23:33:37 +04:00
|
|
|
va_list arglist;
|
2004-01-19 20:46:34 +03:00
|
|
|
|
2005-07-12 23:33:37 +04:00
|
|
|
/* If there was a message, output it */
|
2004-01-19 20:46:34 +03:00
|
|
|
|
2005-07-12 23:33:37 +04:00
|
|
|
va_start(arglist, fmt);
|
|
|
|
if( NULL != fmt ) {
|
|
|
|
char* buffer = NULL;
|
|
|
|
vasprintf( &buffer, fmt, arglist );
|
|
|
|
opal_output( 0, buffer );
|
|
|
|
free( buffer );
|
|
|
|
}
|
|
|
|
va_end(arglist);
|
2004-01-15 07:47:20 +03:00
|
|
|
|
2005-07-12 23:33:37 +04:00
|
|
|
/* Shut down and exit */
|
2004-01-15 07:47:20 +03:00
|
|
|
|
2005-07-12 23:33:37 +04:00
|
|
|
orte_finalize();
|
|
|
|
exit(status);
|
2004-01-15 07:47:20 +03:00
|
|
|
}
|