diff --git a/opal/mca/timer/aix/Makefile.am b/opal/mca/timer/aix/Makefile.am new file mode 100644 index 0000000000..84e2ce4d21 --- /dev/null +++ b/opal/mca/timer/aix/Makefile.am @@ -0,0 +1,26 @@ +# +# 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. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +include $(top_srcdir)/config/Makefile.options + +noinst_LTLIBRARIES = libmca_timer_aix.la + +libmca_timer_aix_la_SOURCES = \ + timer_aix.h \ + timer_aix_component.c + +EXTRA_DIST = \ + $(doc_DATA) diff --git a/opal/mca/timer/aix/configure.m4 b/opal/mca/timer/aix/configure.m4 new file mode 100644 index 0000000000..05bf2bb1dc --- /dev/null +++ b/opal/mca/timer/aix/configure.m4 @@ -0,0 +1,59 @@ +# -*- shell-script -*- +# +# 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. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_timer_aix_COMPILE_MODE], [ + AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) + $4="static" + AC_MSG_RESULT([$$4]) +]) + + +# MCA_timer_aix_CONFIG(action-if-can-compile, +# [action-if-cant-compile]) +# ------------------------------------------------ +AC_DEFUN([MCA_timer_aix_CONFIG],[ + AC_ARG_WITH([timer], + [AC_HELP_STRING([--with-timer=TYPE], + [high resolution timer component])]) + + AS_IF([test "$with_timer" = "aix"], + [timer_aix_happy="yes" + timer_aix_should_use=1], + [timer_aix_should_use=0 + AS_IF([test "$with_timer" = ""], + [timer_aix_happy="yes"], + [timer_aix_happy="no"])]) + + AS_IF([test "$timer_aix_happy" = "yes"], + [AC_CHECK_FUNC([time_base_to_time], + [timer_aix_happy="yes"], + [timer_aix_happy="no"])]) + + AS_IF([test "$timer_aix_happy" = "yes"], + [AC_CHECK_FUNC([pm_cycles], + [timer_aix_happy="yes"], + [timer_aix_happy="no"])]) + + AS_IF([test "$timer_aix_happy" = "no" -a \ + "$timer_aix_should_use" = "1"], + [AC_MSG_ERROR([AIX timer requested but not available. Aborting.])]) + + AS_IF([test "$timer_aix_happy" = "yes"], + [timer_base_include="aix/timer_aix.h" + $1], + [$2]) +]) diff --git a/opal/mca/timer/aix/configure.params b/opal/mca/timer/aix/configure.params new file mode 100644 index 0000000000..e46dca60d8 --- /dev/null +++ b/opal/mca/timer/aix/configure.params @@ -0,0 +1,21 @@ +# -*- shell-script -*- +# +# 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. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# Specific to this module + +PARAM_CONFIG_PRIORITY=30 +PARAM_CONFIG_FILES="Makefile" diff --git a/opal/mca/timer/aix/timer_aix.h b/opal/mca/timer/aix/timer_aix.h new file mode 100644 index 0000000000..5b8050211c --- /dev/null +++ b/opal/mca/timer/aix/timer_aix.h @@ -0,0 +1,51 @@ +/* + * 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. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef OPAL_MCA_TIMER_AIX_TIMER_AIX_H +#define OPAL_MCA_TIMER_AIX_TIMER_AIX_H + +#if 0 +#include +#include +#endif + +typedef uint64_t opal_timer_t; + +static inline opal_timer_t +opal_timer_base_get_cycles() +{ + return 0; +} + +static inline opal_timer_t +opal_timer_base_get_usec() +{ + return 0; +} + +static inline opal_timer_t +opal_timer_base_get_freq() +{ + return 0; +} + + +#define OPAL_TIMER_CYCLE_NATIVE 0 +#define OPAL_TIMER_CYCLE_SUPPORTED 0 +#define OPAL_TIMER_USEC_NATIVE 0 +#define OPAL_TIMER_USEC_SUPPORTED 0 + +#endif diff --git a/opal/mca/timer/aix/timer_aix_component.c b/opal/mca/timer/aix/timer_aix_component.c new file mode 100644 index 0000000000..c830cc9861 --- /dev/null +++ b/opal/mca/timer/aix/timer_aix_component.c @@ -0,0 +1,47 @@ +/* + * 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. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "opal/mca/timer/timer.h" +#include "opal/mca/timer/aix/timer_aix.h" + + +const opal_timer_base_component_1_0_0_t mca_timer_aix_component = { + /* First, the mca_component_t struct containing meta information + about the component itself */ + { + /* Indicate that we are a timer v1.0.0 component (which also + implies a specific MCA version) */ + OPAL_TIMER_BASE_VERSION_1_0_0, + + /* Component name and version */ + "aix", + OPAL_MAJOR_VERSION, + OPAL_MINOR_VERSION, + OPAL_RELEASE_VERSION, + + /* Component open and close functions */ + NULL, + NULL + }, + + /* Next the MCA v1.0.0 component meta data */ + { + /* Whether the component is checkpointable or not */ + true + }, +};