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