diff --git a/Doxyfile b/Doxyfile index bd6b125056..fdfa013255 100644 --- a/Doxyfile +++ b/Doxyfile @@ -17,7 +17,7 @@ # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = LAM/MPI +PROJECT_NAME = OMPI/MPI # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or @@ -396,7 +396,7 @@ EXCLUDE_SYMLINKS = YES # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. -EXCLUDE_PATTERNS = static-modules.h *config*.h lam_stdint.h ltdl.h +EXCLUDE_PATTERNS = static-modules.h *config*.h ompi_stdint.h ltdl.h # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see diff --git a/HACKING b/HACKING index 879e767de7..d579cc765a 100644 --- a/HACKING +++ b/HACKING @@ -1,7 +1,7 @@ Overview ======== -This file is here for those who are building/exploring LAM/MPI in its +This file is here for those who are building/exploring OMPI/MPI in its source code form, most likely through a developer's tree (i.e., a CVS checkout). @@ -9,7 +9,7 @@ checkout). Use of GNU Autoconf, Automake, and Libtool ========================================== -If you are building LAM/MPI from a developer's tree, you must first +If you are building OMPI/MPI from a developer's tree, you must first use fairly recent versions of the GNU tools Autoconf, Automake, and Libtool. As of this writing, you need at least Autoconf v2.58, Automake v1.6, and Libtool 1.5. You can check what versions you have @@ -79,9 +79,9 @@ following advice: Autoconf and Automake build and install very quickly; Libtool will take a minute or two. -5. You can now run LAM's top-level "autogen.sh" script. This script +5. You can now run OMPI's top-level "autogen.sh" script. This script will invoke the GNU Autoconf, Automake, and Libtool commands in the - proper order and setup to run LAM's top-level "configure" script. + proper order and setup to run OMPI's top-level "configure" script. Running autogen.sh typically takes several minutes. It's not very exciting to watch. :-) @@ -89,14 +89,14 @@ following advice: 5a. You generally need to run autogen.sh whenever the file "configure.ac" changes, or any files in the config/ directory change (the config/ directory is where a lot of "include" files - for LAM's configure script live). + for OMPI's configure script live). 5b. You do *NOT* need to re-run autogen.sh if you modify a Makefile.am. - 5c. Note that "autogen.sh" automatically traverses the entire LAM + 5c. Note that "autogen.sh" automatically traverses the entire OMPI tree, running the GNU tools in all MCA modules. This is not - always necessary. As you become more familiar with the LAM + always necessary. As you become more familiar with the OMPI sources, you will come to understand the when you only need to re-generate the top-level configure script, and when you need to re-generate *all* configure scripts (it's complicated -- not diff --git a/INSTALL b/INSTALL index ed958f097f..d57bd5ad3d 100644 --- a/INSTALL +++ b/INSTALL @@ -10,18 +10,18 @@ mpicc your-code.c In order to run the program, you need to set some envs (use export for bash etc) -setenv MCA_common_lam_cofs_job_handle pcm-cofs-job-handle -setenv MCA_common_lam_cofs_comm_dir "/tmp/COFS" +setenv MCA_common_ompi_cofs_job_handle pcm-cofs-job-handle +setenv MCA_common_ompi_cofs_comm_dir "/tmp/COFS" setenv MCA_OOB_BASE_VPID 0 setenv MCA_REGISTRY_BASE_VPID 0 Then if you need to run say N nodes you need to set -setenv MCA_common_lam_cofs_num_procs N +setenv MCA_common_ompi_cofs_num_procs N Then in the shell for each you would set -setenv MCA_common_lam_cofs_my_vpid MYRANK +setenv MCA_common_ompi_cofs_my_vpid MYRANK where MYRANK is 0 in one, 1 in the next etc diff --git a/acinclude.m4 b/acinclude.m4 index 8d1e219819..0685a4babb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -5,7 +5,7 @@ dnl # -# LAM/MPI-specific tests +# OMPI/MPI-specific tests # sinclude(config/c_get_alignment.m4) @@ -20,25 +20,25 @@ sinclude(config/f77_find_ext_symbol_convention.m4) sinclude(config/f77_get_alignment.m4) sinclude(config/f77_get_sizeof.m4) -sinclude(config/lam_case_sensitive_fs_setup.m4) -sinclude(config/lam_check_optflags.m4) -sinclude(config/lam_config_subdir.m4) -sinclude(config/lam_config_subdir_args.m4) -sinclude(config/lam_configure_options.m4) -sinclude(config/lam_functions.m4) -sinclude(config/lam_get_version.m4) -sinclude(config/lam_get_libtool_linker_flags.m4) -sinclude(config/lam_mca.m4) -sinclude(config/lam_setup_cc.m4) -sinclude(config/lam_setup_cxx.m4) -sinclude(config/lam_setup_f77.m4) -sinclude(config/lam_setup_f90.m4) -sinclude(config/lam_setup_libevent.m4) +sinclude(config/ompi_case_sensitive_fs_setup.m4) +sinclude(config/ompi_check_optflags.m4) +sinclude(config/ompi_config_subdir.m4) +sinclude(config/ompi_config_subdir_args.m4) +sinclude(config/ompi_configure_options.m4) +sinclude(config/ompi_functions.m4) +sinclude(config/ompi_get_version.m4) +sinclude(config/ompi_get_libtool_linker_flags.m4) +sinclude(config/ompi_mca.m4) +sinclude(config/ompi_setup_cc.m4) +sinclude(config/ompi_setup_cxx.m4) +sinclude(config/ompi_setup_f77.m4) +sinclude(config/ompi_setup_f90.m4) +sinclude(config/ompi_setup_libevent.m4) -sinclude(config/lam_check_pthread_pids.m4) -sinclude(config/lam_config_pthreads.m4) -sinclude(config/lam_config_solaris_threads.m4) -sinclude(config/lam_config_threads.m4) +sinclude(config/ompi_check_pthread_pids.m4) +sinclude(config/ompi_config_pthreads.m4) +sinclude(config/ompi_config_solaris_threads.m4) +sinclude(config/ompi_config_threads.m4) # # The config/mca_no_configure_modules.m4 file is generated by autogen.sh diff --git a/autogen.sh b/autogen.sh index 76ff944273..4d1f784c85 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,7 +2,7 @@ # # $HEADER$ # -# This script is run on developer copies of LAM/MPI -- *not* +# This script is run on developer copies of OMPI/MPI -- *not* # distribution tarballs. @@ -12,15 +12,15 @@ # ############################################################################## -lam_aclocal_search="aclocal" -lam_autoheader_search="autoheader" -lam_autoconf_search="autoconf" -lam_libtoolize_search="libtoolize glibtoolize" -lam_automake_search="automake" +ompi_aclocal_search="aclocal" +ompi_autoheader_search="autoheader" +ompi_autoconf_search="autoconf" +ompi_libtoolize_search="libtoolize glibtoolize" +ompi_automake_search="automake" -lam_automake_version="1.7" -lam_autoconf_version="2.58" -lam_libtool_version="1.5" +ompi_automake_version="1.7" +ompi_autoconf_version="2.58" +ompi_libtool_version="1.5" ############################################################################## @@ -29,16 +29,16 @@ lam_libtool_version="1.5" # ############################################################################## -lam_aclocal_version="$lam_automake_version" -lam_autoheader_version="$lam_autoconf_version" -lam_libtoolize_version="$lam_libtool_version" +ompi_aclocal_version="$ompi_automake_version" +ompi_autoheader_version="$ompi_autoconf_version" +ompi_libtoolize_version="$ompi_libtool_version" # program names to execute -lam_aclocal="" -lam_autoheader="" -lam_autoconf="" -lam_libtoolize="" -lam_automake="" +ompi_aclocal="" +ompi_autoheader="" +ompi_autoconf="" +ompi_libtoolize="" +ompi_automake="" mca_no_configure_modules_file="config/mca_no_configure_modules.m4" mca_no_config_list_file="mca_no_config_list" @@ -123,9 +123,9 @@ find_app() { local min_version="99.99.99" local found=0 - eval "min_version=\"\$lam_${app_name}_version\"" + eval "min_version=\"\$ompi_${app_name}_version\"" - eval "search_path=\"\$lam_${app_name}_search\"" + eval "search_path=\"\$ompi_${app_name}_search\"" for i in $search_path ; do version="`${i} --version 2>&1`" if test "$?" != 0 ; then @@ -136,7 +136,7 @@ find_app() { version="`echo $version | cut -f1 -d' '`" if check_version $min_version $version ; then - eval "lam_${app_name}=\"${i}\"" + eval "ompi_${app_name}=\"${i}\"" found=1 break fi @@ -150,9 +150,9 @@ I am gonna abort. :-( Please make sure you are using at least the following versions of the GNU tools: -GNU Autoconf $lam_autoconf_version -GNU Automake $lam_automake_version -GNU Libtool $lam_libtool_version +GNU Autoconf $ompi_autoconf_version +GNU Automake $ompi_automake_version +GNU Libtool $ompi_libtool_version EOF exit 1 @@ -190,9 +190,9 @@ This *MAY* be caused by an older version of one of the required packages. Please make sure you are using at least the following versions: -GNU Autoconf $lam_autoconf_version -GNU Automake $lam_automake_version -GNU Libtool $lam_libtool_version +GNU Autoconf $ompi_autoconf_version +GNU Automake $ompi_automake_version +GNU Libtool $ompi_libtool_version ------------------------------------------------------------------------- EOF @@ -259,7 +259,7 @@ find_and_delete() { # # INPUT: # - directory to run in -# - LAM top directory +# - OMPI top directory # # OUTPUT: # none @@ -273,20 +273,20 @@ find_and_delete() { ############################################################################## run_gnu_tools() { rgt_dir="$1" - rgt_lam_topdir="$2" + rgt_ompi_topdir="$2" # Sanity check to ensure that there's a configure.in or # configure.ac file here, or if there's a configure.params # file and we need to run make_configure.pl. if test -f configure.params -a -f configure.stub -a \ - -x "$rgt_lam_topdir/config/mca_make_configure.pl"; then + -x "$rgt_ompi_topdir/config/mca_make_configure.pl"; then cat < configure.new mv configure.new configure chmod a+x configure else - run_and_check $lam_libtoolize --automake --copy + run_and_check $ompi_libtoolize --automake --copy fi - run_and_check $lam_automake --foreign -a --copy --include-deps + run_and_check $ompi_automake --foreign -a --copy --include-deps } @@ -385,19 +385,19 @@ EOF # # INPUT: # - directory to run in -# - LAM top directory +# - OMPI top directory # # OUTPUT: # none # # SIDE EFFECTS: -# - skips directories with .lam_no_gnu .lam_ignore +# - skips directories with .ompi_no_gnu .ompi_ignore # - uses provided autogen.sh if available # ############################################################################## process_dir() { pd_dir="$1" - pd_lam_topdir="$2" + pd_ompi_topdir="$2" pd_cur_dir="`pwd`" if test -d "$pd_dir"; then @@ -405,17 +405,17 @@ process_dir() { # See if the package doesn't want us to set it up - if test -f .lam_no_gnu; then + if test -f .ompi_no_gnu; then cat <> $pd_list_file <> $pd_amc_file <x) - ((char *)&p->c); fprintf(f, "%d\n", (diff >= 0) ? diff : -diff); return 0; -}],[lam_ac_align=`cat conftestval`],[lam_ac_align=-1],[lam_ac_align=-1]) +}],[ompi_ac_align=`cat conftestval`],[ompi_ac_align=-1],[ompi_ac_align=-1]) -if test "`expr $lam_ac_align \<= 0`" = "1"; then +if test "`expr $ompi_ac_align \<= 0`" = "1"; then AC_MSG_WARN([*** Problem running configure test!]) AC_MSG_WARN([*** See config.log for details.]) AC_MSG_ERROR([*** Cannot continue.]) fi -AC_MSG_RESULT([$lam_ac_align]) -AC_DEFINE_UNQUOTED($2, $lam_ac_align, [Alignment of type $1]) -eval "$2=$lam_ac_align" -unset lam_ac_align +AC_MSG_RESULT([$ompi_ac_align]) +AC_DEFINE_UNQUOTED($2, $ompi_ac_align, [Alignment of type $1]) +eval "$2=$ompi_ac_align" +unset ompi_ac_align /bin/rm -f conftest*])dnl diff --git a/config/c_weak_symbols.m4 b/config/c_weak_symbols.m4 index d6ad582162..4e73bfad95 100644 --- a/config/c_weak_symbols.m4 +++ b/config/c_weak_symbols.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -define([LAM_C_WEAK_SYMBOLS],[ +define([OMPI_C_WEAK_SYMBOLS],[ # # Arguments: None # @@ -11,7 +11,7 @@ define([LAM_C_WEAK_SYMBOLS],[ # # Check to see if the C compiler can handle weak symbols # -# Sets LAM_C_WEAK_SYMBOLS=1 if the C compiler has support for weak +# Sets OMPI_C_WEAK_SYMBOLS=1 if the C compiler has support for weak # symbols. # @@ -22,13 +22,13 @@ int real(int i); int real(int i) { return i; } int main(int argc, char* argv[]) { return fake(3); -}]]), lam_happy=1, lam_happy=0) -if test "$lam_happy" = "1"; then +}]]), ompi_happy=1, ompi_happy=0) +if test "$ompi_happy" = "1"; then AC_MSG_RESULT([yes]) - LAM_C_HAVE_WEAK_SYMBOLS=1 + OMPI_C_HAVE_WEAK_SYMBOLS=1 else AC_MSG_RESULT([no]) - LAM_C_HAVE_WEAK_SYMBOLS=0 + OMPI_C_HAVE_WEAK_SYMBOLS=0 fi -unset lam_happy])dnl +unset ompi_happy])dnl diff --git a/config/cxx_find_exception_flags.m4 b/config/cxx_find_exception_flags.m4 index ac3ce20196..dbb98de31b 100644 --- a/config/cxx_find_exception_flags.m4 +++ b/config/cxx_find_exception_flags.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -define([LAM_CXX_FIND_EXCEPTION_FLAGS],[ +define([OMPI_CXX_FIND_EXCEPTION_FLAGS],[ # # Arguments: none # @@ -13,7 +13,7 @@ define([LAM_CXX_FIND_EXCEPTION_FLAGS],[ # CXXFLAGS undisturbed. # Provides --with-exflags command line argument for configure as well. # -# Sets LAM_CXX_EXCEPTION_CXXFLAGS and LAM_CXX_EXCEPTION_LDFLAGS as +# Sets OMPI_CXX_EXCEPTION_CXXFLAGS and OMPI_CXX_EXCEPTION_LDFLAGS as # appropriate. # Must call AC_SUBST manually # @@ -23,18 +23,18 @@ define([LAM_CXX_FIND_EXCEPTION_FLAGS],[ AC_ARG_WITH(exflags, AC_HELP_STRING([--with-exflags], [Specify flags necessary to enable C++ exceptions]), - lam_force_exflags="$withval") + ompi_force_exflags="$withval") -lam_CXXFLAGS_SAVE="$CXXFLAGS" +ompi_CXXFLAGS_SAVE="$CXXFLAGS" AC_MSG_CHECKING([for compiler exception flags]) # See which flags to use -if test "$lam_force_exflags" != ""; then +if test "$ompi_force_exflags" != ""; then # If the user supplied flags, use those - lam_exflags="$lam_force_exflags" + ompi_exflags="$ompi_force_exflags" elif test "$GXX" = "yes"; then # g++ has changed their flags a few times. Sigh. @@ -43,15 +43,15 @@ elif test "$GXX" = "yes"; then AC_LANG_SAVE AC_LANG_CPLUSPLUS - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[]], [[try { int i = 0; } catch(...) { int j = 2; }]]), lam_happy=1, lam_happy=0) + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[]], [[try { int i = 0; } catch(...) { int j = 2; }]]), ompi_happy=1, ompi_happy=0) - if test "$lam_happy" = "1"; then - lam_exflags="-fexceptions"; + if test "$ompi_happy" = "1"; then + ompi_exflags="-fexceptions"; else CXXFLAGS="$CXXFLAGS_SAVE -fhandle-exceptions" - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[]], [[try { int i = 0; } catch(...) { int j = 2; }]]), lam_happy=1, lam_happy=0) - if test "$lam_happy" = "1"; then - lam_exflags="-fhandle-exceptions"; + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[]], [[try { int i = 0; } catch(...) { int j = 2; }]]), ompi_happy=1, ompi_happy=0) + if test "$ompi_happy" = "1"; then + ompi_exflags="-fhandle-exceptions"; fi fi AC_LANG_RESTORE @@ -59,21 +59,21 @@ elif test "`basename $CXX`" = "KCC"; then # KCC flags - lam_exflags="--exceptions" + ompi_exflags="--exceptions" fi -CXXFLAGS="$lam_CXXFLAGS_SAVE" +CXXFLAGS="$ompi_CXXFLAGS_SAVE" # Save the result -LAM_CXX_EXCEPTIONS_CXXFLAGS="$lam_exflags" -LAM_CXX_EXCEPTIONS_LDFLAGS="$lam_exflags" -if test "$lam_exflags" = ""; then +OMPI_CXX_EXCEPTIONS_CXXFLAGS="$ompi_exflags" +OMPI_CXX_EXCEPTIONS_LDFLAGS="$ompi_exflags" +if test "$ompi_exflags" = ""; then AC_MSG_RESULT([none necessary]) else - AC_MSG_RESULT([$lam_exflags]) + AC_MSG_RESULT([$ompi_exflags]) fi # Clean up -unset lam_force_exflags lam_CXXFLAGS_SAVE lam_exflags lam_happy])dnl +unset ompi_force_exflags ompi_CXXFLAGS_SAVE ompi_exflags ompi_happy])dnl diff --git a/config/cxx_find_template_parameters.m4 b/config/cxx_find_template_parameters.m4 index 986da07df1..acb50af472 100644 --- a/config/cxx_find_template_parameters.m4 +++ b/config/cxx_find_template_parameters.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -define(LAM_CXX_FIND_TEMPLATE_PARAMETERS,[ +define(OMPI_CXX_FIND_TEMPLATE_PARAMETERS,[ # # Arguments: none # diff --git a/config/cxx_find_template_repository.m4 b/config/cxx_find_template_repository.m4 index fbe9af232c..2ab47789bb 100644 --- a/config/cxx_find_template_repository.m4 +++ b/config/cxx_find_template_repository.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -define([LAM_CXX_FIND_TEMPLATE_REPOSITORY],[ +define([OMPI_CXX_FIND_TEMPLATE_REPOSITORY],[ # # Arguments: None # @@ -12,7 +12,7 @@ define([LAM_CXX_FIND_TEMPLATE_REPOSITORY],[ # See if the compiler makes template repository directories # Warning: this is a really screwy example! -JMS # -# Sets LAM_CXX_TEMPLATE_REPOSITORY to the template repository, or blank. +# Sets OMPI_CXX_TEMPLATE_REPOSITORY to the template repository, or blank. # Must call AC_SUBST manually # @@ -74,7 +74,7 @@ main(int argc, char *argv[]) } EOF -lam_template_failed= +ompi_template_failed= echo configure:__oline__: $CXX $CXXFLAGS -c conftest1.C >&5 $CXX $CXXFLAGS -c conftest1.C >&5 2>&5 if test ! -f conftest1.o ; then @@ -83,7 +83,7 @@ if test ! -f conftest1.o ; then cat conftest1.C >&5 echo configure:__oline__: here is conftest.h: >&5 cat conftest.h >&5 - lam_template_failed=1 + ompi_template_failed=1 else echo configure:__oline__: $CXX $CXXFLAGS -c conftest2.C >&5 $CXX $CXXFLAGS -c conftest2.C >&5 2>&5 @@ -96,43 +96,43 @@ else else rm -rf conftest* - for lam_file in `ls` + for ompi_file in `ls` do - if test "$lam_file" != "." -a "$lam_file" != ".."; then + if test "$ompi_file" != "." -a "$ompi_file" != ".."; then # Is it a directory? - if test -d "$lam_file"; then - lam_template_dir="$lam_file $lam_template_dir" + if test -d "$ompi_file"; then + ompi_template_dir="$ompi_file $ompi_template_dir" # Or is it a file? else - name="`echo $lam_file | cut -d. -f1`" + name="`echo $ompi_file | cut -d. -f1`" temp_mask= if test "$name" = "main" -o "$name" = "other"; then - temp_mask="`echo $lam_file | cut -d. -f2`" - if test "$lam_template_filemask" = ""; then - lam_template_filemask="$temp_mask"; - elif test "`echo $lam_template_filemask | grep $temp_mask`" = ""; then - lam_template_filemask="$lam_template_filemask $temp_mask" + temp_mask="`echo $ompi_file | cut -d. -f2`" + if test "$ompi_template_filemask" = ""; then + ompi_template_filemask="$temp_mask"; + elif test "`echo $ompi_template_filemask | grep $temp_mask`" = ""; then + ompi_template_filemask="$ompi_template_filemask $temp_mask" fi fi fi fi done - if test "$lam_template_filemask" != ""; then + if test "$ompi_template_filemask" != ""; then temp_mask= - for mask in $lam_template_filemask + for mask in $ompi_template_filemask do temp_mask="*.$mask $temp_mask" done - lam_template_filemask=$temp_mask + ompi_template_filemask=$temp_mask fi fi fi -LAM_CXX_TEMPLATE_REPOSITORY="$lam_template_dir $lam_template_filemask" +OMPI_CXX_TEMPLATE_REPOSITORY="$ompi_template_dir $ompi_template_filemask" -if test "`echo $LAM_CXX_TEMPLATE_REPOSITORY`" != ""; then - AC_MSG_RESULT([$LAM_CXX_TEMPLATE_REPOSITORY]) +if test "`echo $OMPI_CXX_TEMPLATE_REPOSITORY`" != ""; then + AC_MSG_RESULT([$OMPI_CXX_TEMPLATE_REPOSITORY]) else AC_MSG_RESULT([not used]) fi @@ -140,4 +140,4 @@ cd .. rm -rf conf_tmp_$$ # Clean up -unset lam_file lam_template_failed lam_template_dir])dnl +unset ompi_file ompi_template_failed ompi_template_dir])dnl diff --git a/config/cxx_have_exceptions.m4 b/config/cxx_have_exceptions.m4 index 65f9a0d71b..8337247671 100644 --- a/config/cxx_have_exceptions.m4 +++ b/config/cxx_have_exceptions.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -define([LAM_CXX_HAVE_EXCEPTIONS],[ +define([OMPI_CXX_HAVE_EXCEPTIONS],[ # # Arguments: None # @@ -11,15 +11,15 @@ define([LAM_CXX_HAVE_EXCEPTIONS],[ # # Check to see if the C++ compiler can handle exceptions # -# Sets LAM_CXX_EXCEPTIONS to 1 if compiler has exceptions, 0 if not +# Sets OMPI_CXX_EXCEPTIONS to 1 if compiler has exceptions, 0 if not # AC_MSG_CHECKING([for throw/catch]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[]], [[int i=1; throw(i);]]), - LAM_CXX_EXCEPTIONS=1, LAM_CXX_EXCPTIONS=0) -if test "$LAM_CXX_EXCEPTIONS" = "1"; then + OMPI_CXX_EXCEPTIONS=1, OMPI_CXX_EXCPTIONS=0) +if test "$OMPI_CXX_EXCEPTIONS" = "1"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) diff --git a/config/distscript.csh b/config/distscript.csh index 7542ed2b54..8156c82402 100755 --- a/config/distscript.csh +++ b/config/distscript.csh @@ -6,14 +6,14 @@ set srcdir="`pwd`" set distdir="$srcdir/$1" set verfile="$srcdir/VERSION" -set verscript="config/lam_get_version.sh" +set verscript="config/ompi_get_version.sh" -set LAM_VERSION="`sh $verscript $verfile --full`" -set LAM_MAJOR_VERSION="`sh $verscript $verfile --major`" -set LAM_MINOR_VERSION="`sh $verscript $verfile --minor`" -set LAM_RELEASE_VERSION="`sh $verscript $verfile --release`" -set LAM_ALPHA_VERSION="`sh $verscript $verfile --alpha`" -set LAM_BETA_VERSION="`sh $verscript $verfile --beta`" +set OMPI_VERSION="`sh $verscript $verfile --full`" +set OMPI_MAJOR_VERSION="`sh $verscript $verfile --major`" +set OMPI_MINOR_VERSION="`sh $verscript $verfile --minor`" +set OMPI_RELEASE_VERSION="`sh $verscript $verfile --release`" +set OMPI_ALPHA_VERSION="`sh $verscript $verfile --alpha`" +set OMPI_BETA_VERSION="`sh $verscript $verfile --beta`" if ("$distdir" == "") then echo "Must supply relative distdir as argv[1] -- aborting" @@ -23,7 +23,7 @@ endif set start=`date` cat < manfiles @@ -158,7 +158,7 @@ echo "*** Updating version number in $files..." foreach file ($files) echo " - Setting $file" if (-f $file) then - sed -e "s/LAMVERSION/$ver/g" $file > bar + sed -e "s/OMPI_VERSION/$ver/g" $file > bar mv -f bar $file endif end @@ -168,7 +168,7 @@ end # cat < conftestf.f < /dev/null 2>&1 if test $? = "0"; then AC_MSG_RESULT([double underscore]) - lam_fortran_double_underscore=1 - lam_ac_doubleunder=y + ompi_fortran_double_underscore=1 + ompi_ac_doubleunder=y else nm conftestf.o | grep foo_bar_ > /dev/null 2>&1 if test $? = "0"; then AC_MSG_RESULT([single underscore]) - lam_fortran_single_underscore=1 - lam_ac_singleunder=y + ompi_fortran_single_underscore=1 + ompi_ac_singleunder=y else # We may get into trouble here if we start accepting mixed # case compilers -- we may need to have caps underscore, @@ -41,20 +41,20 @@ else nm conftestf.o | grep FOO_bar > /dev/null 2>&1 if test $? = "0"; then AC_MSG_RESULT([mixed case, so FORTRANCAPS]) - lam_fortran_caps=1 - lam_ac_caps=y + ompi_fortran_caps=1 + ompi_ac_caps=y else nm conftestf.o | grep foo_bar > /dev/null 2>&1 if test $? = "0"; then AC_MSG_RESULT([no underscore]) - lam_fortran_plain=1 - lam_ac_nounder=y + ompi_fortran_plain=1 + ompi_ac_nounder=y else nm conftestf.o | grep FOO_BAR > /dev/null 2>&1 if test $? = "0"; then AC_MSG_RESULT([all upper case]) - lam_fortran_caps=1 - lam_ac_caps=y + ompi_fortran_caps=1 + ompi_ac_caps=y else AC_MSG_WARN([*** Could not find name of subroutine foo_bar]) AC_MSG_ERROR([Cannot continue]) @@ -65,14 +65,14 @@ else fi fi -AC_DEFINE_UNQUOTED(LAM_F77_DOUBLE_UNDERSCORE, - $lam_fortran_double_underscore, +AC_DEFINE_UNQUOTED(OMPI_F77_DOUBLE_UNDERSCORE, + $ompi_fortran_double_underscore, [Whether fortran symbols have a trailing double underscore or not]) -AC_DEFINE_UNQUOTED(LAM_F77_SINGLE_UNDERSCORE, $lam_fortran_single_underscore, +AC_DEFINE_UNQUOTED(OMPI_F77_SINGLE_UNDERSCORE, $ompi_fortran_single_underscore, [Whether fortran symbols have a trailing underscore or not]) -AC_DEFINE_UNQUOTED(LAM_F77_CAPS, $lam_fortran_caps, +AC_DEFINE_UNQUOTED(OMPI_F77_CAPS, $ompi_fortran_caps, [Whether fortran symbols are all caps or not]) -AC_DEFINE_UNQUOTED(LAM_F77_PLAIN, $lam_fortran_plain, +AC_DEFINE_UNQUOTED(OMPI_F77_PLAIN, $ompi_fortran_plain, [Whether fortran symbols have no trailing underscore or not]) /bin/rm -f conftestf.f conftestf.o])dnl diff --git a/config/f77_get_alignment.m4 b/config/f77_get_alignment.m4 index 4e93e1607d..c20547925d 100644 --- a/config/f77_get_alignment.m4 +++ b/config/f77_get_alignment.m4 @@ -3,19 +3,19 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_F77_GET_ALIGNMENT],[ +AC_DEFUN([OMPI_F77_GET_ALIGNMENT],[ # Determine FORTRAN datatype size. # First arg is type, 2nd arg is config var to define. AC_MSG_CHECKING(alignment of FORTRAN $1) -lam_ac_align_fn= -if test "x$lam_ac_doubleunder" = xy || test "x$lam_ac_singleunder" = xy; then - lam_ac_align_fn=align_ +ompi_ac_align_fn= +if test "x$ompi_ac_doubleunder" = xy || test "x$ompi_ac_singleunder" = xy; then + ompi_ac_align_fn=align_ else - if test "x$lam_ac_nounder" = xy; then - lam_ac_align_fn=align + if test "x$ompi_ac_nounder" = xy; then + ompi_ac_align_fn=align else - if test "x$lam_ac_caps" = xy; then - lam_ac_align_fn=ALIGN + if test "x$ompi_ac_caps" = xy; then + ompi_ac_align_fn=ALIGN else AC_MSG_WARN([*** FORTRAN external naming convention undefined]) AC_MSG_ERROR([*** Cannot continue.]) @@ -42,9 +42,9 @@ EOF # if test -f conftest.h; then - lam_conftest_h="#include \"conftest.h\"" + ompi_conftest_h="#include \"conftest.h\"" else - lam_conftest_h="" + ompi_conftest_h="" fi cat > conftest.c < @@ -54,7 +54,7 @@ $conftest #ifdef __cplusplus extern "C" { #endif -void $lam_ac_align_fn(char *w, char *x, char *y, char *z) +void $ompi_ac_align_fn(char *w, char *x, char *y, char *z) { unsigned long aw, ax, ay, az; FILE *f=fopen("conftestval", "w"); if (!f) exit(1); @@ -80,36 +80,36 @@ EOF # module files. # -LAM_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c], - LAM_LOG_COMMAND([$F77 $FFLAGS conftestf.f conftest.o -o conftest], - LAM_LOG_COMMAND([./conftest],[HAPPY=1],[HAPPY=0]), +OMPI_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c], + OMPI_LOG_COMMAND([$F77 $FFLAGS conftestf.f conftest.o -o conftest], + OMPI_LOG_COMMAND([./conftest],[HAPPY=1],[HAPPY=0]), [HAPPY=0]), [HAPPY=0]) if test "$HAPPY" = "1" -a -f conftestval; then - lam_ac_align=`cat conftestval` - AC_MSG_RESULT([$lam_ac_align]) + ompi_ac_align=`cat conftestval` + AC_MSG_RESULT([$ompi_ac_align]) if test -n "$2"; then - eval "$2=$lam_ac_align" + eval "$2=$ompi_ac_align" fi else AC_MSG_RESULT([unknown]) - LAM_LOG_MSG([here is the C program:], 1) - LAM_LOG_FILE([conftest.c]) + OMPI_LOG_MSG([here is the C program:], 1) + OMPI_LOG_FILE([conftest.c]) if test -f conftest.h; then - LAM_LOG_MSG([here is contest.h:], 1) - LAM_LOG_FILE([conftest.h]) + OMPI_LOG_MSG([here is contest.h:], 1) + OMPI_LOG_FILE([conftest.h]) fi - LAM_LOG_MSG([here is the fortran program:], 1) - LAM_LOG_FILE([conftestf.f]) + OMPI_LOG_MSG([here is the fortran program:], 1) + OMPI_LOG_FILE([conftestf.f]) AC_MSG_WARN([*** Problem running configure test!]) AC_MSG_WARN([*** See config.log for details.]) AC_MSG_ERROR([*** Cannot continue.]) fi -str="$2=$lam_ac_align" +str="$2=$ompi_ac_align" eval $str -unset lam_ac_align HAPPY lam_conftest_h +unset ompi_ac_align HAPPY ompi_conftest_h /bin/rm -f conftest*])dnl diff --git a/config/f77_get_sizeof.m4 b/config/f77_get_sizeof.m4 index 38297578b4..41bce513ec 100644 --- a/config/f77_get_sizeof.m4 +++ b/config/f77_get_sizeof.m4 @@ -3,19 +3,19 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_F77_GET_SIZEOF],[ +AC_DEFUN([OMPI_F77_GET_SIZEOF],[ # Determine FORTRAN datatype size. # First arg is type, 2nd arg is config var to define. AC_MSG_CHECKING([size of FORTRAN $1]) -lam_ac_size_fn= -if test "x$lam_ac_doubleunder" = xy || test "x$lam_ac_singleunder" = xy; then - lam_ac_size_fn=size_ +ompi_ac_size_fn= +if test "x$ompi_ac_doubleunder" = xy || test "x$ompi_ac_singleunder" = xy; then + ompi_ac_size_fn=size_ else - if test "x$lam_ac_nounder" = xy; then - lam_ac_size_fn=size + if test "x$ompi_ac_nounder" = xy; then + ompi_ac_size_fn=size else - if test "x$lam_ac_caps" = xy; then - lam_ac_size_fn=SIZE + if test "x$ompi_ac_caps" = xy; then + ompi_ac_size_fn=SIZE else AC_MSG_WARN([*** FORTRAN external naming convention undefined]) AC_MSG_ERROR([*** Cannot continue.]) @@ -45,19 +45,19 @@ EOF # if test -f conftest.h; then - lam_conftest_h="#include \"conftest.h\"" + ompi_conftest_h="#include \"conftest.h\"" else - lam_conftest_h="" + ompi_conftest_h="" fi cat > conftest.c < #include -$lam_conftest_h +$ompi_conftest_h #ifdef __cplusplus extern "C" { #endif -void $lam_ac_size_fn(char *a, char *b) +void $ompi_ac_size_fn(char *a, char *b) { int diff = (int) (b - a); FILE *f=fopen("conftestval", "w"); @@ -74,35 +74,35 @@ EOF # module files. # -LAM_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c], - LAM_LOG_COMMAND([$F77 $FFLAGS conftestf.f conftest.o -o conftest], - LAM_LOG_COMMAND([./conftest],[HAPPY=1],[HAPPY=0]), +OMPI_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c], + OMPI_LOG_COMMAND([$F77 $FFLAGS conftestf.f conftest.o -o conftest], + OMPI_LOG_COMMAND([./conftest],[HAPPY=1],[HAPPY=0]), [HAPPY=0]), [HAPPY=0]) -lam_ac_fortsize=-1 +ompi_ac_fortsize=-1 if test "$HAPPY" = "1" -a -f conftestval; then - lam_ac_fortsize=`cat conftestval` - AC_MSG_RESULT([$lam_ac_fortsize]) - eval "$2=$lam_ac_fortsize" + ompi_ac_fortsize=`cat conftestval` + AC_MSG_RESULT([$ompi_ac_fortsize]) + eval "$2=$ompi_ac_fortsize" else AC_MSG_RESULT([unknown]) - LAM_LOG_MSG([here is the C program:], 1) - LAM_LOG_FILE([conftest.c]) + OMPI_LOG_MSG([here is the C program:], 1) + OMPI_LOG_FILE([conftest.c]) if test -f conftest.h; then - LAM_LOG_MSG([here is contest.h:], 1) - LAM_LOG_FILE([conftest.h]) + OMPI_LOG_MSG([here is contest.h:], 1) + OMPI_LOG_FILE([conftest.h]) fi - LAM_LOG_MSG([here is the fortran program:], 1) - LAM_LOG_FILE([conftestf.f]) + OMPI_LOG_MSG([here is the fortran program:], 1) + OMPI_LOG_FILE([conftestf.f]) AC_MSG_WARN([*** Problem running configure test!]) AC_MSG_WARN([*** See config.log for details.]) AC_MSG_ERROR([*** Cannot continue.]) fi -str="$2=$lam_ac_fortsize" +str="$2=$ompi_ac_fortsize" eval $str -unset lam_ac_fortsize HAPPY lam_conftest_h +unset ompi_ac_fortsize HAPPY ompi_conftest_h /bin/rm -f conftest*])dnl diff --git a/config/lam_case_sensitive_fs_setup.m4 b/config/lam_case_sensitive_fs_setup.m4 index fc9febaba7..b2e592cf64 100644 --- a/config/lam_case_sensitive_fs_setup.m4 +++ b/config/lam_case_sensitive_fs_setup.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_CASE_SENSITIVE_FS_SETUP],[ +AC_DEFUN([OMPI_CASE_SENSITIVE_FS_SETUP],[ # # Arguments: none # @@ -50,29 +50,29 @@ AC_ARG_WITH(cs_fs, [Destination FS is case sensitive (default: set to value of the build FS's case sensitivity)])) if test "$with_cs_fs" = "yes"; then - LAM_WANT_CS_FS=1 + OMPI_WANT_CS_FS=1 elif test -z "$with_cs_fs"; then - LAM_WANT_CS_FS=$have_cs_fs + OMPI_WANT_CS_FS=$have_cs_fs else - LAM_WANT_CS_FS=0 + OMPI_WANT_CS_FS=0 fi -if test "$LAM_WANT_CS_FS" = "1"; then +if test "$OMPI_WANT_CS_FS" = "1"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi -AM_CONDITIONAL(CASE_SENSITIVE_FS, test "$LAM_WANT_CS_FS" = "1") +AM_CONDITIONAL(CASE_SENSITIVE_FS, test "$OMPI_WANT_CS_FS" = "1") -if test "$LAM_WANT_CS_FS" = "0"; then +if test "$OMPI_WANT_CS_FS" = "0"; then cat < conftest.c < #include #include -$lam_conftest_h +$ompi_conftest_h #ifdef __cplusplus extern "C" { #endif -void lam_pthread() +void ompi_pthread() { pthread_t th; pthread_join(th, 0); @@ -72,9 +72,9 @@ void lam_pthread() EOF # Try the compile -LAM_LOG_COMMAND( +OMPI_LOG_COMMAND( [$CC $CFLAGS -I. -c conftest.c], - LAM_LOG_COMMAND( + OMPI_LOG_COMMAND( [$F77 $FFLAGS conftestf.f conftest.o -o conftest $LIBS], [HAPPY=1], [HAPPY=0]), @@ -83,20 +83,20 @@ LAM_LOG_COMMAND( if test "$HAPPY" = "1"; then $1 else - LAM_LOG_MSG([here is the C program:], 1) - LAM_LOG_FILE([conftest.c]) + OMPI_LOG_MSG([here is the C program:], 1) + OMPI_LOG_FILE([conftest.c]) if test -f conftest.h; then - LAM_LOG_MSG([here is contest.h:], 1) - LAM_LOG_FILE([conftest.h]) + OMPI_LOG_MSG([here is contest.h:], 1) + OMPI_LOG_FILE([conftest.h]) fi - LAM_LOG_MSG([here is the fortran program:], 1) - LAM_LOG_FILE([conftestf.f]) + OMPI_LOG_MSG([here is the fortran program:], 1) + OMPI_LOG_FILE([conftestf.f]) $2 fi -unset HAPPY lam_conftest_h +unset HAPPY ompi_conftest_h /bin/rm -f conftest* -# END: LAM_INTL_PTHREAD_TRY_LINK_F77 +# END: OMPI_INTL_PTHREAD_TRY_LINK_F77 ])dnl @@ -105,11 +105,11 @@ unset HAPPY lam_conftest_h # Try to compile thread support without any special flags # # ******************************************************************** -AC_DEFUN([LAM_INTL_POSIX_THREADS_PLAIN_C], [ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN_C], [ # # C compiler # -if test "$lam_pthread_c_success" = "0"; then +if test "$ompi_pthread_c_success" = "0"; then AC_MSG_CHECKING([if C compiler and POSIX threads work as is]) if test "$HAVE_POSIX_THREADS" = "1" ; then run_this_test=1 @@ -138,10 +138,10 @@ if test "$lam_pthread_c_success" = "0"; then if test "$run_this_test" = "1" ; then AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_c_success=1, - lam_pthread_c_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_c_success=1, + ompi_pthread_c_success=0) AC_LANG_POP(C) - if test "$lam_pthread_c_success" = "1"; then + if test "$ompi_pthread_c_success" = "1"; then AC_MSG_RESULT([yes]) else PTHREAD_CPPFLAGS= @@ -153,11 +153,11 @@ fi ])dnl -AC_DEFUN([LAM_INTL_POSIX_THREADS_PLAIN_CXX], [ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN_CXX], [ # # C++ compiler # -if test "$lam_pthread_cxx_success" = "0"; then +if test "$ompi_pthread_cxx_success" = "0"; then AC_MSG_CHECKING([if C++ compiler and POSIX threads work as is]) if test "$HAVE_POSIX_THREADS" = "1" ; then run_this_test=1 @@ -186,10 +186,10 @@ if test "$lam_pthread_cxx_success" = "0"; then if test "$run_this_test" = "1" ; then AC_LANG_PUSH(C++) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_cxx_success=1, - lam_pthread_cxx_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_cxx_success=1, + ompi_pthread_cxx_success=0) AC_LANG_POP(C++) - if test "$lam_pthread_cxx_success" = "1"; then + if test "$ompi_pthread_cxx_success" = "1"; then AC_MSG_RESULT([yes]) else PTHREAD_CXXCPPFLAGS= @@ -201,11 +201,11 @@ fi ])dnl -AC_DEFUN([LAM_INTL_POSIX_THREADS_PLAIN_FC], [ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN_FC], [ # # Fortran compiler # -if test "$lam_pthread_f77_success" = "0" -a "$LAM_WANT_F77_BINDINGS" = "1"; then +if test "$ompi_pthread_f77_success" = "0" -a "$OMPI_WANT_F77_BINDINGS" = "1"; then AC_MSG_CHECKING([if F77 compiler and POSIX threads work as is]) if test "$HAVE_POSIX_THREADS" = "1" ; then run_this_test=1 @@ -223,10 +223,10 @@ if test "$lam_pthread_f77_success" = "0" -a "$LAM_WANT_F77_BINDINGS" = "1"; then if test "$run_this_test" = "1" ; then AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK_F77(lam_pthread_f77_success=1, - lam_pthread_f77_success=0) + OMPI_INTL_PTHREAD_TRY_LINK_F77(ompi_pthread_f77_success=1, + ompi_pthread_f77_success=0) AC_LANG_POP(C) - if test "$lam_pthread_f77_success" = "1"; then + if test "$ompi_pthread_f77_success" = "1"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -236,8 +236,8 @@ fi ])dnl -AC_DEFUN([LAM_INTL_POSIX_THREADS_PLAIN], [ -# BEGIN: LAM_INTL_POSIX_THREADS_PLAIN +AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN], [ +# BEGIN: OMPI_INTL_POSIX_THREADS_PLAIN # # Check if can compile without any special flags # we throw -D_REENTRANT or -D_THREAD_SAFE in here, just in @@ -248,18 +248,18 @@ AC_DEFUN([LAM_INTL_POSIX_THREADS_PLAIN], [ # Only run C++ and Fortran if those compilers already configured AC_PROVIDE_IFELSE([AC_PROG_CC], - [LAM_INTL_POSIX_THREADS_PLAIN_C], - [lam_pthread_c_success=1]) + [OMPI_INTL_POSIX_THREADS_PLAIN_C], + [ompi_pthread_c_success=1]) AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LAM_INTL_POSIX_THREADS_PLAIN_CXX], - [lam_pthread_cxx_success=1]) + [OMPI_INTL_POSIX_THREADS_PLAIN_CXX], + [ompi_pthread_cxx_success=1]) AC_PROVIDE_IFELSE([AC_PROG_F77], - [LAM_INTL_POSIX_THREADS_PLAIN_FC], - [lam_pthread_f77_success=1]) + [OMPI_INTL_POSIX_THREADS_PLAIN_FC], + [ompi_pthread_f77_success=1]) -# End: LAM_INTL_POSIX_THREADS_PLAIN +# End: OMPI_INTL_POSIX_THREADS_PLAIN ])dnl @@ -268,19 +268,19 @@ AC_PROVIDE_IFELSE([AC_PROG_F77], # Try to compile thread support with special compiler flags # # ******************************************************************** -AC_DEFUN([LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], [ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], [ # # C compiler # -if test "$lam_pthread_c_success" = "0"; then +if test "$ompi_pthread_c_success" = "0"; then for pf in $pflags; do AC_MSG_CHECKING([if C compiler and POSIX threads work with $pf]) CFLAGS="$orig_CFLAGS $pf" AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_c_success=1, - lam_pthread_c_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_c_success=1, + ompi_pthread_c_success=0) AC_LANG_POP(C) - if test "$lam_pthread_c_success" = "1"; then + if test "$ompi_pthread_c_success" = "1"; then PTHREAD_CFLAGS="$pf" AC_MSG_RESULT([yes]) break @@ -294,19 +294,19 @@ fi ]) -AC_DEFUN([LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], [ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], [ # # C++ compiler # -if test "$lam_pthread_cxx_success" = "0"; then +if test "$ompi_pthread_cxx_success" = "0"; then for pf in $pflags; do AC_MSG_CHECKING([if C++ compiler and POSIX threads work with $pf]) CXXFLAGS="$orig_CXXFLAGS $pf" AC_LANG_PUSH(C++) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_cxx_success=1, - lam_pthread_cxx_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_cxx_success=1, + ompi_pthread_cxx_success=0) AC_LANG_POP(C++) - if test "$lam_pthread_cxx_success" = "1"; then + if test "$ompi_pthread_cxx_success" = "1"; then PTHREAD_CXXFLAGS="$pf" AC_MSG_RESULT([yes]) break @@ -320,19 +320,19 @@ fi ]) -AC_DEFUN([LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], [ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], [ # # Fortran compiler # -if test "$lam_pthread_f77_success" = "0" -a "$LAM_WANT_F77_BINDINGS" = "1"; then +if test "$ompi_pthread_f77_success" = "0" -a "$OMPI_WANT_F77_BINDINGS" = "1"; then for pf in $pflags; do AC_MSG_CHECKING([if F77 compiler and POSIX threads work with $pf]) FFLAGS="$orig_FFLAGS $pf" AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK_F77(lam_pthread_f77_success=1, - lam_pthread_f77_success=0) + OMPI_INTL_PTHREAD_TRY_LINK_F77(ompi_pthread_f77_success=1, + ompi_pthread_f77_success=0) AC_LANG_POP(C) - if test "$lam_pthread_f77_success" = "1"; then + if test "$ompi_pthread_f77_success" = "1"; then PTHREAD_FFLAGS="$pf" AC_MSG_RESULT([yes]) break @@ -346,8 +346,8 @@ fi ]) -AC_DEFUN([LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS],[ -# Begin: LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS +AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS],[ +# Begin: OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS # # If above didn't work, try some super-special compiler flags # that get evaluated to the "right" things. @@ -366,18 +366,18 @@ pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads" # Only run C++ and Fortran if those compilers already configured AC_PROVIDE_IFELSE([AC_PROG_CC], - [LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], - [lam_pthread_c_success=1]) + [OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], + [ompi_pthread_c_success=1]) AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], - [lam_pthread_cxx_success=1]) + [OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], + [ompi_pthread_cxx_success=1]) AC_PROVIDE_IFELSE([AC_PROG_F77], - [LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], - [lam_pthread_f77_success=1]) + [OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], + [ompi_pthread_f77_success=1]) -# End: LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS +# End: OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS ])dnl @@ -386,11 +386,11 @@ AC_PROVIDE_IFELSE([AC_PROG_F77], # Try to compile thread support with extra libs # # ******************************************************************** -AC_DEFUN([LAM_INTL_POSIX_THREADS_LIBS_C],[ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_LIBS_C],[ # # C compiler # -if test "$lam_pthread_c_success" = "0"; then +if test "$ompi_pthread_c_success" = "0"; then for pl in $plibs; do AC_MSG_CHECKING([if C compiler and POSIX threads work with $pl]) case "${host_cpu}-${host-_os}" in @@ -409,10 +409,10 @@ if test "$lam_pthread_c_success" = "0"; then esac LIBS="$orig_LIBS $pl" AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_c_success=1, - lam_pthread_c_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_c_success=1, + ompi_pthread_c_success=0) AC_LANG_POP(C) - if test "$lam_pthread_c_success" = "1"; then + if test "$ompi_pthread_c_success" = "1"; then PTHREAD_LIBS="$pl" AC_MSG_RESULT([yes]) else @@ -426,12 +426,12 @@ fi ])dnl -AC_DEFUN([LAM_INTL_POSIX_THREADS_LIBS_CXX],[ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_LIBS_CXX],[ # # C++ compiler # -if test "$lam_pthread_cxx_success" = "0"; then - if test ! "$lam_pthread_c_success" = "0" -a ! "$PTHREAD_LIBS" = "" ; then +if test "$ompi_pthread_cxx_success" = "0"; then + if test ! "$ompi_pthread_c_success" = "0" -a ! "$PTHREAD_LIBS" = "" ; then AC_MSG_CHECKING([if C++ compiler and POSIX threads work with $PTHREAD_LIBS]) case "${host_cpu}-${host-_os}" in *-aix* | *-freebsd*) @@ -449,10 +449,10 @@ if test "$lam_pthread_cxx_success" = "0"; then esac LIBS="$orig_LIBS $PTHREAD_LIBS" AC_LANG_PUSH(C++) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_cxx_success=1, - lam_pthread_cxx_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_cxx_success=1, + ompi_pthread_cxx_success=0) AC_LANG_POP(C++) - if test "$lam_pthread_cxx_success" = "1"; then + if test "$ompi_pthread_cxx_success" = "1"; then PTHREAD_LIBS="$pl" AC_MSG_RESULT([yes]) else @@ -479,10 +479,10 @@ if test "$lam_pthread_cxx_success" = "0"; then esac LIBS="$orig_LIBS $pl" AC_LANG_PUSH(C++) - LAM_INTL_PTHREAD_TRY_LINK(lam_pthread_cxx_success=1, - lam_pthread_cxx_success=0) + OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_cxx_success=1, + ompi_pthread_cxx_success=0) AC_LANG_POP(C++) - if test "$lam_pthread_cxx_success" = "1"; then + if test "$ompi_pthread_cxx_success" = "1"; then PTHREAD_LIBS="$pl" AC_MSG_RESULT([yes]) else @@ -496,20 +496,20 @@ fi ])dnl -AC_DEFUN([LAM_INTL_POSIX_THREADS_LIBS_FC],[ +AC_DEFUN([OMPI_INTL_POSIX_THREADS_LIBS_FC],[ # # Fortran compiler # -if test "$lam_pthread_f77_success" = "0" -a "$LAM_WANT_F77_BINDINGS" = "1"; then - if test ! "$lam_pthread_c_success" = "0" -a ! "$PTHREAD_LIBS" = "" ; then +if test "$ompi_pthread_f77_success" = "0" -a "$OMPI_WANT_F77_BINDINGS" = "1"; then + if test ! "$ompi_pthread_c_success" = "0" -a ! "$PTHREAD_LIBS" = "" ; then AC_MSG_CHECKING([if F77 compiler and POSIX threads work with $PTHREAD_LIBS]) LIBS="$orig_LIBS $PTHREAD_LIBS" AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK_F77(lam_pthread_f77_success=1, - lam_pthread_f77_success=0) + OMPI_INTL_PTHREAD_TRY_LINK_F77(ompi_pthread_f77_success=1, + ompi_pthread_f77_success=0) AC_LANG_POP(C) LIBS="$orig_LIBS" - if test "$lam_pthread_f77_success" = "1"; then + if test "$ompi_pthread_f77_success" = "1"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -520,11 +520,11 @@ if test "$lam_pthread_f77_success" = "0" -a "$LAM_WANT_F77_BINDINGS" = "1"; then AC_MSG_CHECKING([if F77 compiler and POSIX threads work with $pl]) LIBS="$orig_LIBS $pl" AC_LANG_PUSH(C) - LAM_INTL_PTHREAD_TRY_LINK_F77(lam_pthread_f77_success=1, - lam_pthread_f77_success=0) + OMPI_INTL_PTHREAD_TRY_LINK_F77(ompi_pthread_f77_success=1, + ompi_pthread_f77_success=0) AC_LANG_POP(C) LIBS="$orig_LIBS" - if test "$lam_pthread_f77_success" = "1"; then + if test "$ompi_pthread_f77_success" = "1"; then PTHREAD_LIBS="$pl" AC_MSG_RESULT([yes]) break @@ -537,8 +537,8 @@ fi ])dnl -AC_DEFUN([LAM_INTL_POSIX_THREADS_LIBS],[ -# Begin: LAM_INTL_POSIX_THREADS_LIBS +AC_DEFUN([OMPI_INTL_POSIX_THREADS_LIBS],[ +# Begin: OMPI_INTL_POSIX_THREADS_LIBS # # if we can't find a super-special compiler flags, try some libraries. # we throw -D_REENTRANT or -D_THREAD_SAFE in here, just in case. Some @@ -552,18 +552,18 @@ plibs="-lpthreads -llthread -lpthread" # Only run C++ and Fortran if those compilers already configured AC_PROVIDE_IFELSE([AC_PROG_CC], - [LAM_INTL_POSIX_THREADS_LIBS_C], - [lam_pthread_c_success=1]) + [OMPI_INTL_POSIX_THREADS_LIBS_C], + [ompi_pthread_c_success=1]) AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LAM_INTL_POSIX_THREADS_LIBS_CXX], - [lam_pthread_cxx_success=1]) + [OMPI_INTL_POSIX_THREADS_LIBS_CXX], + [ompi_pthread_cxx_success=1]) AC_PROVIDE_IFELSE([AC_PROG_F77], - [LAM_INTL_POSIX_THREADS_LIBS_FC], - [lam_pthread_f77_success=1]) + [OMPI_INTL_POSIX_THREADS_LIBS_FC], + [ompi_pthread_f77_success=1]) -# End: LAM_INTL_POSIX_THREADS_LIBS] +# End: OMPI_INTL_POSIX_THREADS_LIBS] )dnl @@ -572,10 +572,10 @@ AC_PROVIDE_IFELSE([AC_PROG_F77], # External macro (aka, the real thing) # #******************************************************************** -AC_DEFUN([LAM_CONFIG_POSIX_THREADS],[ -lam_pthread_c_success=0 -lam_pthread_f77_success=0 -lam_pthread_cxx_success=0 +AC_DEFUN([OMPI_CONFIG_POSIX_THREADS],[ +ompi_pthread_c_success=0 +ompi_pthread_f77_success=0 +ompi_pthread_cxx_success=0 orig_CFLAGS="$CFLAGS" orig_FFLAGS="$FFLAGS" @@ -594,13 +594,13 @@ PTHREAD_LDFLAGS= PTHREAD_LIBS= # Try with the basics, mam. -LAM_INTL_POSIX_THREADS_PLAIN +OMPI_INTL_POSIX_THREADS_PLAIN # Try the super-special compiler flags. -LAM_INTL_POSIX_THREADS_SPECIAL_FLAGS +OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS # Try the normal linking methods (that's no fun) -LAM_INTL_POSIX_THREADS_LIBS +OMPI_INTL_POSIX_THREADS_LIBS CFLAGS="$orig_CFLAGS" FFLAGS="$orig_FFLAGS" @@ -610,13 +610,13 @@ CXXCPPFLAGS="$orig_CXXCPPFLAGS" LDFLAGS="$orig_LDFLAGS" LIBS="$orig_LIBS" -if test "$LAM_WANT_F77_BINDINGS" != "1"; then - lam_pthread_f77_success=1 +if test "$OMPI_WANT_F77_BINDINGS" != "1"; then + ompi_pthread_f77_success=1 fi -if test "$lam_pthread_c_success" = "1" -a \ - "$lam_pthread_cxx_success" = "1" -a \ - "$lam_pthread_f77_success" = "1"; then +if test "$ompi_pthread_c_success" = "1" -a \ + "$ompi_pthread_cxx_success" = "1" -a \ + "$ompi_pthread_f77_success" = "1"; then internal_useless=1 $1 else @@ -624,6 +624,6 @@ else $2 fi -unset lam_pthread_c_success lam_pthread_f77_success lam_pthread_cxx_success +unset ompi_pthread_c_success ompi_pthread_f77_success ompi_pthread_cxx_success unset internal_useless ])dnl diff --git a/config/lam_config_solaris_threads.m4 b/config/lam_config_solaris_threads.m4 index 728de30a02..b7e654bb50 100644 --- a/config/lam_config_solaris_threads.m4 +++ b/config/lam_config_solaris_threads.m4 @@ -1,17 +1,17 @@ dnl dnl $HEADER$ dnl -dnl LAM_CONFIG_SOLARIS_THREADS() +dnl OMPI_CONFIG_SOLARIS_THREADS() dnl # ******************************************************************** # -# Internal macros - do not call from outside LAM_CONFIG_SOLARIS_THREADS +# Internal macros - do not call from outside OMPI_CONFIG_SOLARIS_THREADS # # ******************************************************************** -AC_DEFUN([LAM_INTL_SOLARIS_TRY_LINK], [ -# BEGIN: LAM_INTL_SOLARIS_TRY_LINK +AC_DEFUN([OMPI_INTL_SOLARIS_TRY_LINK], [ +# BEGIN: OMPI_INTL_SOLARIS_TRY_LINK # # Make sure that we can run a small application in C or C++, which # ever is the current language. Do make sure that C or C++ is the @@ -20,12 +20,12 @@ AC_DEFUN([LAM_INTL_SOLARIS_TRY_LINK], [ [thread_t th; thr_join(th, 0, 0); thr_create(0,0,0,0,0,0); ], [$1], [$2]) -# END: LAM_INTL_SOLARIS_TRY_LINK +# END: OMPI_INTL_SOLARIS_TRY_LINK ])dnl -AC_DEFUN([LAM_INTL_SOLARIS_TRY_LINK_F77], [ -# BEGIN: LAM_INTL_SOLARIS_TRY_LINK_F77 +AC_DEFUN([OMPI_INTL_SOLARIS_TRY_LINK_F77], [ +# BEGIN: OMPI_INTL_SOLARIS_TRY_LINK_F77 # # Make sure that we can run a small application in Fortran, with # pthreads living in a C object file @@ -40,20 +40,20 @@ EOF # C module if test -f conftest.h; then - lam_conftest_h="#include \"conftest.h\"" + ompi_conftest_h="#include \"conftest.h\"" else - lam_conftest_h="" + ompi_conftest_h="" fi cat > conftest.c < #include #include -$lam_conftest_h +$ompi_conftest_h #ifdef __cplusplus extern "C" { #endif -void lam_pthread() +void ompi_pthread() { thread_t th; thr_join(th, 0, 0); @@ -65,9 +65,9 @@ void lam_pthread() EOF # Try the compile -LAM_LOG_COMMAND( +OMPI_LOG_COMMAND( [$CC $CFLAGS -I. -c conftest.c], - LAM_LOG_COMMAND( + OMPI_LOG_COMMAND( [$F77 $FFLAGS conftestf.f conftest.o -o conftest $LIBS], [HAPPY=1], [HAPPY=0]), @@ -76,24 +76,24 @@ LAM_LOG_COMMAND( if test "$HAPPY" = "1"; then $1 else - LAM_LOG_MSG([here is the C program:], 1) - LAM_LOG_FILE([conftest.c]) + OMPI_LOG_MSG([here is the C program:], 1) + OMPI_LOG_FILE([conftest.c]) if test -f conftest.h; then - LAM_LOG_MSG([here is contest.h:], 1) - LAM_LOG_FILE([conftest.h]) + OMPI_LOG_MSG([here is contest.h:], 1) + OMPI_LOG_FILE([conftest.h]) fi - LAM_LOG_MSG([here is the fortran program:], 1) - LAM_LOG_FILE([conftestf.f]) + OMPI_LOG_MSG([here is the fortran program:], 1) + OMPI_LOG_FILE([conftestf.f]) $2 fi -unset HAPPY lam_conftest_h +unset HAPPY ompi_conftest_h /bin/rm -f conftest* -# END: LAM_INTL_SOLARIS_TRY_LINK_F77 +# END: OMPI_INTL_SOLARIS_TRY_LINK_F77 ])dnl -AC_DEFUN([LAM_CONFIG_SOLARIS_THREADS_C], [ +AC_DEFUN([OMPI_CONFIG_SOLARIS_THREADS_C], [ if test "$BASECC" = "cc"; then STHREAD_CFLAGS="-mt" style="Workshop/Forte" @@ -108,10 +108,10 @@ CPPFLAGS="$STHREAD_CPPFLAGS $CPPFLAGS_orig" LDFLAGS="$STHREAD_LDFLAGS $LDFLAGS_orig" LIBS="$STHREAD_LIBS $LIBS_orig" AC_LANG_PUSH(C) -LAM_INTL_SOLARIS_TRY_LINK(lam_sthread_c_success=1, - lam_sthread_c_success=0) +OMPI_INTL_SOLARIS_TRY_LINK(ompi_sthread_c_success=1, + ompi_sthread_c_success=0) AC_LANG_POP(C) -if test "$lam_sthread_c_success" = "1"; then +if test "$ompi_sthread_c_success" = "1"; then AC_MSG_RESULT([yes - $style]) else AC_MSG_RESULT([no]) @@ -119,7 +119,7 @@ fi ])dnl -AC_DEFUN([LAM_CONFIG_SOLARIS_THREADS_CXX], [ +AC_DEFUN([OMPI_CONFIG_SOLARIS_THREADS_CXX], [ if test "$BASECXX" = "CC"; then STHREAD_CXXFLAGS="-mt" style="Workshop/Forte" @@ -137,10 +137,10 @@ LDFLAGS="$STHREAD_LDFLAGS $LDFLAGS_orig" LIBS="$STHREAD_LIBS $LIBS_orig" AC_MSG_CHECKING([if C++ compiler and Solaris threads work]) AC_LANG_PUSH(C++) -LAM_INTL_SOLARIS_TRY_LINK(lam_sthread_cxx_success=1, - lam_sthread_cxx_success=0) +OMPI_INTL_SOLARIS_TRY_LINK(ompi_sthread_cxx_success=1, + ompi_sthread_cxx_success=0) AC_LANG_POP(C++) -if test "$lam_sthread_cxx_success" = "1"; then +if test "$ompi_sthread_cxx_success" = "1"; then AC_MSG_RESULT([yes - $style]) else AC_MSG_RESULT([no]) @@ -148,8 +148,8 @@ fi ])dnl -AC_DEFUN([LAM_CONFIG_SOLARIS_THREADS_FC], [ -if test "$LAM_WANT_F77_BINDINGS" = "1"; then +AC_DEFUN([OMPI_CONFIG_SOLARIS_THREADS_FC], [ +if test "$OMPI_WANT_F77_BINDINGS" = "1"; then if test "$BASEFC" = "f77"; then STHREAD_FFLAGS="-mt" style="Workshop/Forte" @@ -164,24 +164,24 @@ if test "$LAM_WANT_F77_BINDINGS" = "1"; then LIBS="$STHREAD_LIBS $LIBS_orig" AC_MSG_CHECKING([if F77 compiler and Solaris threads work]) AC_LANG_PUSH(C) - LAM_INTL_SOLARIS_TRY_LINK_F77(lam_sthread_f77_success=1, - lam_sthread_f77_success=0) + OMPI_INTL_SOLARIS_TRY_LINK_F77(ompi_sthread_f77_success=1, + ompi_sthread_f77_success=0) AC_LANG_POP(C) - if test "$lam_sthread_f77_success" = "1"; then + if test "$ompi_sthread_f77_success" = "1"; then AC_MSG_RESULT([yes - $style]) else AC_MSG_RESULT([no]) fi else - lam_sthread_f77_success=1 + ompi_sthread_f77_success=1 fi ])dnl -AC_DEFUN([LAM_CONFIG_SOLARIS_THREADS],[ -lam_sthread_c_success=0 -lam_sthread_f77_success=0 -lam_sthread_cxx_success=0 +AC_DEFUN([OMPI_CONFIG_SOLARIS_THREADS],[ +ompi_sthread_c_success=0 +ompi_sthread_f77_success=0 +ompi_sthread_cxx_success=0 orig_CFLAGS="$CFLAGS" orig_FFLAGS="$FFLAGS" @@ -201,16 +201,16 @@ STHREAD_LIBS= # Only run C++ and Fortran if those compilers already configured AC_PROVIDE_IFELSE([AC_PROG_CC], - [LAM_CONFIG_SOLARIS_THREADS_C], - [lam_sthread_c_success=1]) + [OMPI_CONFIG_SOLARIS_THREADS_C], + [ompi_sthread_c_success=1]) AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LAM_CONFIG_SOLARIS_THREADS_CXX], - [lam_sthread_cxx_success=1]) + [OMPI_CONFIG_SOLARIS_THREADS_CXX], + [ompi_sthread_cxx_success=1]) AC_PROVIDE_IFELSE([AC_PROG_F77], - [LAM_CONFIG_SOLARIS_THREADS_FC], - [lam_sthread_f77_success=1]) + [OMPI_CONFIG_SOLARIS_THREADS_FC], + [ompi_sthread_f77_success=1]) CFLAGS="$orig_CFLAGS" FFLAGS="$orig_FFLAGS" @@ -220,9 +220,9 @@ CXXCPPFLAGS="$orig_CXXCPPFLAGS" LDFLAGS="$orig_LDFLAGS" LIBS="$orig_LIBS" -if test "$lam_sthread_c_success" = "1" -a \ - "$lam_sthread_cxx_success" = "1" -a \ - "$lam_sthread_f77_success" = "1"; then +if test "$ompi_sthread_c_success" = "1" -a \ + "$ompi_sthread_cxx_success" = "1" -a \ + "$ompi_sthread_f77_success" = "1"; then internal_useless=1 $1 else @@ -230,7 +230,7 @@ else $2 fi -unset lam_sthread_c_success lam_sthread_f77_success lam_sthread_cxx_success +unset ompi_sthread_c_success ompi_sthread_f77_success ompi_sthread_cxx_success unset internal_useless ])dnl diff --git a/config/lam_config_subdir.m4 b/config/lam_config_subdir.m4 index 1411e8345d..ca60ec53af 100644 --- a/config/lam_config_subdir.m4 +++ b/config/lam_config_subdir.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_CONFIG_SUBDIR],[ +AC_DEFUN([OMPI_CONFIG_SUBDIR],[ # # Invoke configure in a specific subdirectory. # @@ -22,7 +22,7 @@ subdir_failure="$4" # if test "$subdir_dir" != ":" -a -d $srcdir/$subdir_dir; then - AC_MSG_NOTICE([LAM configuring in $subdir_dir]) + AC_MSG_NOTICE([OMPI configuring in $subdir_dir]) # # Gotta check where srcdir is for VPATH builds. If srcdir is not diff --git a/config/lam_config_subdir_args.m4 b/config/lam_config_subdir_args.m4 index 5c90f2ef17..00653fe369 100644 --- a/config/lam_config_subdir_args.m4 +++ b/config/lam_config_subdir_args.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_CONFIG_SUBDIR_ARGS],[ +AC_DEFUN([OMPI_CONFIG_SUBDIR_ARGS],[ # # Invoke configure in subdirectories. # diff --git a/config/lam_config_threads.m4 b/config/lam_config_threads.m4 index 1a4192062f..4e4e178963 100644 --- a/config/lam_config_threads.m4 +++ b/config/lam_config_threads.m4 @@ -2,7 +2,7 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_CONFIG_THREADS],[ +AC_DEFUN([OMPI_CONFIG_THREADS],[ # # Arguments: none # @@ -15,15 +15,15 @@ AC_DEFUN([LAM_CONFIG_THREADS],[ # # create templates -AH_TEMPLATE([LAM_HAVE_SOLARIS_THREADS], +AH_TEMPLATE([OMPI_HAVE_SOLARIS_THREADS], [Do we have native Solaris threads]) -AH_TEMPLATE([LAM_HAVE_POSIX_THREADS], +AH_TEMPLATE([OMPI_HAVE_POSIX_THREADS], [Do we have POSIX threads]) # # Check for thread types - add your type here... # -LAM_CONFIG_POSIX_THREADS(HAVE_POSIX_THREADS=1, HAVE_POSIX_THREADS=0) +OMPI_CONFIG_POSIX_THREADS(HAVE_POSIX_THREADS=1, HAVE_POSIX_THREADS=0) AC_MSG_CHECKING([for working POSIX threads package]) if test "$HAVE_POSIX_THREADS" = "1" ; then AC_MSG_RESULT([yes]) @@ -32,7 +32,7 @@ else fi export HAVE_POSIX_THREADS -LAM_CONFIG_SOLARIS_THREADS(HAVE_SOLARIS_THREADS=1, HAVE_SOLARIS_THREADS=0) +OMPI_CONFIG_SOLARIS_THREADS(HAVE_SOLARIS_THREADS=1, HAVE_SOLARIS_THREADS=0) AC_MSG_CHECKING([for working Solaris threads package]) if test "$HAVE_SOLARIS_THREADS" = "1" ; then AC_MSG_RESULT([yes]) @@ -103,9 +103,9 @@ AC_MSG_RESULT($THREAD_TYPE) # Blah - this should be made better, but I don't know how... # if test "$THREAD_TYPE" = "solaris"; then - AC_DEFINE(LAM_HAVE_SOLARIS_THREADS, 1) - AC_DEFINE(LAM_HAVE_POSIX_THREADS, 0) - AC_DEFINE(LAM_THREADS_HAVE_DIFFERENT_PIDS, 0) + AC_DEFINE(OMPI_HAVE_SOLARIS_THREADS, 1) + AC_DEFINE(OMPI_HAVE_POSIX_THREADS, 0) + AC_DEFINE(OMPI_THREADS_HAVE_DIFFERENT_PIDS, 0) THREAD_CFLAGS="$STHREAD_CFLAGS" THREAD_FFLAGS="$STHREAD_FFLAGS" @@ -115,8 +115,8 @@ if test "$THREAD_TYPE" = "solaris"; then THREAD_LDFLAGS="$STHREAD_LDFLAGS" THREAD_LIBS="$STHREAD_LIBS" elif test "$THREAD_TYPE" = "posix"; then - AC_DEFINE(LAM_HAVE_SOLARIS_THREADS, 0) - AC_DEFINE(LAM_HAVE_POSIX_THREADS, 1) + AC_DEFINE(OMPI_HAVE_SOLARIS_THREADS, 0) + AC_DEFINE(OMPI_HAVE_POSIX_THREADS, 1) THREAD_CFLAGS="$PTHREAD_CFLAGS" THREAD_FFLAGS="$PTHREAD_FFLAGS" @@ -126,10 +126,10 @@ elif test "$THREAD_TYPE" = "posix"; then THREAD_LDFLAGS="$PTHREAD_LDFLAGS" THREAD_LIBS="$PTHREAD_LIBS" - LAM_CHECK_PTHREAD_PIDS + OMPI_CHECK_PTHREAD_PIDS elif test "$THREAD_TYPE" = "none"; then - AC_DEFINE(LAM_HAVE_SOLARIS_THREADS, 0) - AC_DEFINE(LAM_HAVE_POSIX_THREADS, 0) + AC_DEFINE(OMPI_HAVE_SOLARIS_THREADS, 0) + AC_DEFINE(OMPI_HAVE_POSIX_THREADS, 0) TRHEAD_CFLAGS= THREAD_FFLAGS= @@ -143,14 +143,14 @@ else ************************************************************************ -LAM/MPI was unable to find threading support on your system. In the -near future, the LAM development team is considering requiring -threading support for proper LAM execution. This is in part because +OMPI/MPI was unable to find threading support on your system. In the +near future, the OMPI development team is considering requiring +threading support for proper OMPI execution. This is in part because we are not aware of any users that do not have thread support - so we -need you to e-mail us at lam@lam-mpi.org and let us know about this +need you to e-mail us at ompi@ompi-mpi.org and let us know about this problem. -To build this version of LAM/MPI without thread support, re-run +To build this version of OMPI/MPI without thread support, re-run configure with the '--without-threads' option. ************************************************************************ diff --git a/config/lam_configure_options.m4 b/config/lam_configure_options.m4 index e272a3c115..51e507089d 100644 --- a/config/lam_configure_options.m4 +++ b/config/lam_configure_options.m4 @@ -3,8 +3,8 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_CONFIGURE_OPTIONS],[ -lam_show_subtitle "Configuration options" +AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[ +ompi_show_subtitle "Configuration options" # # Memory debugging @@ -27,7 +27,7 @@ if test "$WANT_MEM_DEBUG" = "0" -a -z "$enable_mem_zero" -a -d .svn; then echo "--> developer override: enable mem profiling by default" fi #################### Early development override #################### -AC_DEFINE_UNQUOTED(LAM_ENABLE_MEM_DEBUG, $WANT_MEM_DEBUG, +AC_DEFINE_UNQUOTED(OMPI_ENABLE_MEM_DEBUG, $WANT_MEM_DEBUG, [Whether we want the memory profiling or not]) # @@ -51,7 +51,7 @@ if test "$WANT_MEM_PROFILE" = "0" -a -z "$enable_mem_zero" -a -d .svn; then echo "--> developer override: enable mem profiling by default" fi #################### Early development override #################### -AC_DEFINE_UNQUOTED(LAM_ENABLE_MEM_PROFILE, $WANT_MEM_PROFILE, +AC_DEFINE_UNQUOTED(OMPI_ENABLE_MEM_PROFILE, $WANT_MEM_PROFILE, [Whether we want the memory profiling or not]) # @@ -101,7 +101,7 @@ if test "$WANT_DEBUG" = "0"; then CFLAGS="-DNDEBUG $CFLAGS" CXXFLAGS="-DNDEBUG $CFLAGS" fi -AC_DEFINE_UNQUOTED(LAM_ENABLE_DEBUG, $WANT_DEBUG, +AC_DEFINE_UNQUOTED(OMPI_ENABLE_DEBUG, $WANT_DEBUG, [Whether we want developer-level debugging code or not]) @@ -115,10 +115,10 @@ AC_ARG_ENABLE(f77, [enable f77 MPI bindings (default: enabled)])) if test "$enable_f77" != "no"; then AC_MSG_RESULT([yes]) - LAM_WANT_F77_BINDINGS=1 + OMPI_WANT_F77_BINDINGS=1 else AC_MSG_RESULT([no]) - LAM_WANT_F77_BINDINGS=0 + OMPI_WANT_F77_BINDINGS=0 fi @@ -132,10 +132,10 @@ AC_ARG_ENABLE(f90, [enable f90 MPI bindings (default: enabled)])) if test "$enable_f90" != "no"; then AC_MSG_RESULT([yes]) - LAM_WANT_F90_BINDINGS=1 + OMPI_WANT_F90_BINDINGS=1 else AC_MSG_RESULT([no]) - LAM_WANT_F90_BINDINGS=0 + OMPI_WANT_F90_BINDINGS=0 fi @@ -180,7 +180,7 @@ AC_MSG_CHECKING([if want run-time MPI parameter checking]) AC_ARG_ENABLE(mpi-param-check, AC_HELP_STRING([--with-mpi-param-check], [behavior of MPI function parameter checking. Valid values are: always, never, runtime (default: runtime)])) -mpi_param_check=lam_mpi_param_check +mpi_param_check=ompi_mpi_param_check if test "$with_mpi_param_check" = "no" -o \ "$with_mpi_param_check" = "never"; then mpi_param_check=0 @@ -203,10 +203,10 @@ AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check, # -# Do we want to install all of LAM's header files? +# Do we want to install all of OMPI's header files? # -AC_MSG_CHECKING([if want to install LAM header files]) +AC_MSG_CHECKING([if want to install OMPI header files]) AC_ARG_WITH(devel-headers, AC_HELP_STRING([--with-devel-headers], [normal MPI users/applications do not need this (mpi.h and mpif.h are ALWAYS installed). Developer headers are only necessary for MCA module authors (default: disabled).])) @@ -223,7 +223,7 @@ AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1) # ...? # amorphous, seem-to-be-good-idea options -# --with-lam=maintainer_options +# --with-ompi=maintainer_options # --with-mca-* # ...? @@ -232,7 +232,7 @@ AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1) # AC_MSG_CHECKING(if want deprecated executable names) AC_ARG_ENABLE(deprecated-executable-names, - AC_HELP_STRING([--enable-deprecated-executable-names], [make sym links to deprecated LAM executables (e.g., hcc, hcp, hf77, wipe) (default: disabled)])) + AC_HELP_STRING([--enable-deprecated-executable-names], [make sym links to deprecated OMPI executables (e.g., hcc, hcp, hf77, wipe) (default: disabled)])) if test "$enable_deprecated_executable_names" = "yes"; then AC_MSG_RESULT([yes]) WANT_DEN=1 diff --git a/config/lam_functions.m4 b/config/lam_functions.m4 index adc40f3a1e..344185f187 100644 --- a/config/lam_functions.m4 +++ b/config/lam_functions.m4 @@ -3,13 +3,13 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_CONFIGURE_SETUP],[ +AC_DEFUN([OMPI_CONFIGURE_SETUP],[ # Some helper script functions. Unfortunately, we cannot use $1 kinds # of arugments here because of the m4 substitution. So we have to set # special variable names before invoking the function. :-\ -lam_show_title() { +ompi_show_title() { cat <&5 @@ -141,19 +141,19 @@ dnl ####################################################################### dnl ####################################################################### dnl ####################################################################### -AC_DEFUN([LAM_LOG_COMMAND],[ +AC_DEFUN([OMPI_LOG_COMMAND],[ # 1 is the command # 2 is actions to do if success # 3 is actions to do if fail echo "configure:__oline__: $1" >&5 $1 1>&5 2>&1 -lam_status=$? -LAM_LOG_MSG([\$? = $lam_status], 1) -if test "$lam_status" = "0"; then - unset lam_status +ompi_status=$? +OMPI_LOG_MSG([\$? = $ompi_status], 1) +if test "$ompi_status" = "0"; then + unset ompi_status $2 else - unset lam_status + unset ompi_status $3 fi])dnl @@ -161,73 +161,73 @@ dnl ####################################################################### dnl ####################################################################### dnl ####################################################################### -AC_DEFUN([LAM_UNIQ],[ +AC_DEFUN([OMPI_UNIQ],[ # 1 is the variable name to be uniq-ized -lam_name=$1 +ompi_name=$1 # Go through each item in the variable and only keep the unique ones -lam_count=0 +ompi_count=0 for val in ${$1}; do - lam_done=0 - lam_i=1 - lam_found=0 + ompi_done=0 + ompi_i=1 + ompi_found=0 # Loop over every token we've seen so far - lam_done="`expr $lam_i \> $lam_count`" - while test "$lam_found" = "0" -a "$lam_done" = "0"; do + ompi_done="`expr $ompi_i \> $ompi_count`" + while test "$ompi_found" = "0" -a "$ompi_done" = "0"; do # Have we seen this token already? Prefix the comparison with # "x" so that "-Lfoo" values won't be cause an error. - lam_eval="expr x$val = x\$lam_array_$lam_i" - lam_found=`eval $lam_eval` + ompi_eval="expr x$val = x\$ompi_array_$ompi_i" + ompi_found=`eval $ompi_eval` # Check the ending condition - lam_done="`expr $lam_i \>= $lam_count`" + ompi_done="`expr $ompi_i \>= $ompi_count`" # Increment the counter - lam_i="`expr $lam_i + 1`" + ompi_i="`expr $ompi_i + 1`" done # If we didn't find the token, add it to the "array" - if test "$lam_found" = "0"; then - lam_eval="lam_array_$lam_i=$val" - eval $lam_eval - lam_count="`expr $lam_count + 1`" + if test "$ompi_found" = "0"; then + ompi_eval="ompi_array_$ompi_i=$val" + eval $ompi_eval + ompi_count="`expr $ompi_count + 1`" else - lam_i="`expr $lam_i - 1`" + ompi_i="`expr $ompi_i - 1`" fi done # Take all the items in the "array" and assemble them back into a # single variable -lam_i=1 -lam_done="`expr $lam_i \> $lam_count`" -lam_newval= -while test "$lam_done" = "0"; do - lam_eval="lam_newval=\"$lam_newval \$lam_array_$lam_i\"" - eval $lam_eval +ompi_i=1 +ompi_done="`expr $ompi_i \> $ompi_count`" +ompi_newval= +while test "$ompi_done" = "0"; do + ompi_eval="ompi_newval=\"$ompi_newval \$ompi_array_$ompi_i\"" + eval $ompi_eval - lam_eval="unset lam_array_$lam_i" - eval $lam_eval + ompi_eval="unset ompi_array_$ompi_i" + eval $ompi_eval - lam_done="`expr $lam_i \>= $lam_count`" - lam_i="`expr $lam_i + 1`" + ompi_done="`expr $ompi_i \>= $ompi_count`" + ompi_i="`expr $ompi_i + 1`" done # Done; do the assignment -lam_newval="`echo $lam_newval`" -lam_eval="$lam_name=\"$lam_newval\"" -eval $lam_eval +ompi_newval="`echo $ompi_newval`" +ompi_eval="$ompi_name=\"$ompi_newval\"" +eval $ompi_eval # Clean up -unset lam_name lam_i lam_done lam_newval lam_eval lam_count])dnl +unset ompi_name ompi_i ompi_done ompi_newval ompi_eval ompi_count])dnl diff --git a/config/lam_get_libtool_linker_flags.m4 b/config/lam_get_libtool_linker_flags.m4 index 56a93de173..544cbe9b4b 100644 --- a/config/lam_get_libtool_linker_flags.m4 +++ b/config/lam_get_libtool_linker_flags.m4 @@ -3,7 +3,7 @@ dnl dnl $HEADER denl -AC_DEFUN([LAM_CHECK_LINKER_FLAGS],[ +AC_DEFUN([OMPI_CHECK_LINKER_FLAGS],[ # # libtool has been created by this point # Try to see if it will add any additional flags for dependant libraries @@ -32,14 +32,14 @@ cat > foo.c <&5 2>&5 if test -n "[$]1"; then output="`eval $cmd 2>/dev/null`" fi status="$?" - LAM_LOG_MSG([\$? = $status], [yes]) + OMPI_LOG_MSG([\$? = $status], [yes]) if test "$status" != "0"; then AC_MSG_RESULT([libtool error!]) AC_MSG_ERROR([Cannot continue]) @@ -51,16 +51,16 @@ lam_check_linker_flags_work() { # cmd="$libtool --mode=compile $CC $CFLAGS foo.c -c -o foo.o" -lam_check_linker_flags_work +ompi_check_linker_flags_work cmd="$libtool --mode=link $CC $CFLAGS foo.lo $LDFLAGS $LIBS -o libfoo.la" -lam_check_linker_flags_work +ompi_check_linker_flags_work # # Now fake linking to it and capture the output from libtool # cmd="$libtool --dry-run --mode=link $CC bar.lo libfoo.la -o bar $extra_flags" -lam_check_linker_flags_work yes +ompi_check_linker_flags_work yes eval "set $output" extra_ldflags= diff --git a/config/lam_get_version.m4 b/config/lam_get_version.m4 index c88286e651..330b678a5e 100644 --- a/config/lam_get_version.m4 +++ b/config/lam_get_version.m4 @@ -3,14 +3,14 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_GET_VERSION],[ +AC_DEFUN([OMPI_GET_VERSION],[ gv_glv_dir="$1" gv_ver_file="$2" gv_prefix="$3" -# Find the get_lam_version program +# Find the get_ompi_version program -gv_prog="sh $gv_glv_dir/lam_get_version.sh $gv_ver_file" +gv_prog="sh $gv_glv_dir/ompi_get_version.sh $gv_ver_file" dnl quote eval to suppress macro expansion with non-GNU m4 diff --git a/config/lam_get_version.sh b/config/lam_get_version.sh index e2e27dd7d4..497e719053 100755 --- a/config/lam_get_version.sh +++ b/config/lam_get_version.sh @@ -4,7 +4,7 @@ # # Since we do this in multiple places, it's worth putting in a # separate shell script. Very primitive script to get the version -# number of LAM into a coherent variable. Can query for any of the +# number of OMPI into a coherent variable. Can query for any of the # individual parts of the version number, too. # @@ -14,33 +14,33 @@ option="$2" if test "$srcfile" = ""; then option="--help" else - LAM_MAJOR_VERSION="`cat $srcfile | grep major | cut -d= -f2`" - LAM_MINOR_VERSION="`cat $srcfile | grep minor | cut -d= -f2`" - LAM_RELEASE_VERSION="`cat $srcfile | grep release | cut -d= -f2`" - LAM_ALPHA_VERSION="`cat $srcfile | grep alpha | cut -d= -f2`" - LAM_BETA_VERSION="`cat $srcfile | grep beta | cut -d= -f2`" - LAM_SVN_VERSION="`cat $srcfile | grep svn | cut -d= -f2`" - if test "$LAM_RELEASE_VERSION" != "0" -a "$LAM_RELEASE_VERSION" != ""; then - LAM_VERSION="$LAM_MAJOR_VERSION.$LAM_MINOR_VERSION.$LAM_RELEASE_VERSION" + OMPI_MAJOR_VERSION="`cat $srcfile | grep major | cut -d= -f2`" + OMPI_MINOR_VERSION="`cat $srcfile | grep minor | cut -d= -f2`" + OMPI_RELEASE_VERSION="`cat $srcfile | grep release | cut -d= -f2`" + OMPI_ALPHA_VERSION="`cat $srcfile | grep alpha | cut -d= -f2`" + OMPI_BETA_VERSION="`cat $srcfile | grep beta | cut -d= -f2`" + OMPI_SVN_VERSION="`cat $srcfile | grep svn | cut -d= -f2`" + if test "$OMPI_RELEASE_VERSION" != "0" -a "$OMPI_RELEASE_VERSION" != ""; then + OMPI_VERSION="$OMPI_MAJOR_VERSION.$OMPI_MINOR_VERSION.$OMPI_RELEASE_VERSION" else - LAM_VERSION="$LAM_MAJOR_VERSION.$LAM_MINOR_VERSION" + OMPI_VERSION="$OMPI_MAJOR_VERSION.$OMPI_MINOR_VERSION" fi - if test "`expr $LAM_ALPHA_VERSION \> 0`" = "1"; then - LAM_VERSION="${LAM_VERSION}a$LAM_ALPHA_VERSION" - elif test "`expr $LAM_BETA_VERSION \> 0`" = "1"; then - LAM_VERSION="${LAM_VERSION}b$LAM_BETA_VERSION" + if test "`expr $OMPI_ALPHA_VERSION \> 0`" = "1"; then + OMPI_VERSION="${OMPI_VERSION}a$OMPI_ALPHA_VERSION" + elif test "`expr $OMPI_BETA_VERSION \> 0`" = "1"; then + OMPI_VERSION="${OMPI_VERSION}b$OMPI_BETA_VERSION" fi - if test "$LAM_SVN_VERSION" = "1"; then - LAM_VERSION="${LAM_VERSION}svn" - elif test "`expr $LAM_SVN_VERSION \> 0`" = "1"; then + if test "$OMPI_SVN_VERSION" = "1"; then + OMPI_VERSION="${OMPI_VERSION}svn" + elif test "`expr $OMPI_SVN_VERSION \> 0`" = "1"; then if test -d .svn; then ver="r`svn info . | grep Revision | cut -d\ -f 2`" else ver="svn`date '+%m%d%Y'`" fi - LAM_VERSION="${LAM_VERSION}$ver" + OMPI_VERSION="${OMPI_VERSION}$ver" fi if test "$option" = ""; then @@ -50,28 +50,28 @@ fi case "$option" in --full|-v|--version) - echo $LAM_VERSION + echo $OMPI_VERSION ;; --major) - echo $LAM_MAJOR_VERSION + echo $OMPI_MAJOR_VERSION ;; --minor) - echo $LAM_MINOR_VERSION + echo $OMPI_MINOR_VERSION ;; --release) - echo $LAM_RELEASE_VERSION + echo $OMPI_RELEASE_VERSION ;; --alpha) - echo $LAM_ALPHA_VERSION + echo $OMPI_ALPHA_VERSION ;; --beta) - echo $LAM_BETA_VERSION + echo $OMPI_BETA_VERSION ;; --svn) - echo $LAM_SVN_VERSION + echo $OMPI_SVN_VERSION ;; --all) - echo ${LAM_VERSION}:${LAM_MAJOR_VERSION}:${LAM_MINOR_VERSION}:${LAM_RELEASE_VERSION}:${LAM_ALPHA_VERSION}:${LAM_BETA_VERSION}:${LAM_SVN_VERSION} + echo ${OMPI_VERSION}:${OMPI_MAJOR_VERSION}:${OMPI_MINOR_VERSION}:${OMPI_RELEASE_VERSION}:${OMPI_ALPHA_VERSION}:${OMPI_BETA_VERSION}:${OMPI_SVN_VERSION} ;; -h|--help) cat <cr, - # crlam->cr). + # crompi->cr). # JMS Fix this case "$type" in crmpi) generic_type="cr" ;; - crlam) + crompi) generic_type="cr" ;; *) @@ -120,8 +120,8 @@ for type in $found_types; do for module in $found_modules; do m=`basename "$module"` - if test -d $srcdir/$module -a ! -f $srcdir/$module/.lam_ignore; then - lam_show_subtitle "MCA module $type:$m (no configure script)" + if test -d $srcdir/$module -a ! -f $srcdir/$module/.ompi_ignore; then + ompi_show_subtitle "MCA module $type:$m (no configure script)" # Remove any possible sym link in the mca-dynamic tree @@ -157,8 +157,8 @@ for type in $found_types; do HAPPY=0 m="`basename $module`" if test -d $module -a -x $module/configure -a \ - ! -f $module/.lam_ignore; then - lam_show_subtitle "MCA module $type:$m (need to configure)" + ! -f $module/.ompi_ignore; then + ompi_show_subtitle "MCA module $type:$m (need to configure)" # We found one! @@ -170,8 +170,8 @@ for type in $found_types; do # Configure the module subdirectory - LAM_CONFIG_SUBDIR([src/mca/$type/$m], - [$lam_subdir_args], + OMPI_CONFIG_SUBDIR([src/mca/$type/$m], + [$ompi_subdir_args], [HAPPY=1], [HAPPY=0]) fi @@ -226,9 +226,9 @@ unset foo type m modules structs outfile outdir total_dir file \ # Grumble. It seems that AC_SUBST and AC_DEFINE don't let you # substitue on a variable name that contains a variable (e.g., -# LAM_MCA_$type_SUBDIRS). So we have to do this manually. :-( +# OMPI_MCA_$type_SUBDIRS). So we have to do this manually. :-( -# LAM types +# OMPI types AC_SUBST(MCA_oob_ALL_SUBDIRS) AC_SUBST(MCA_oob_STATIC_SUBDIRS) @@ -329,7 +329,7 @@ if test "$HAPPY" = "1"; then compile_mode="dynamic" echo $m >> $outfile.dynamic ls -l "src/mca/dynamic/$type/$m" - $LN_S "$LAM_TOP_BUILDDIR/src/mca/$type/$m" \ + $LN_S "$OMPI_TOP_BUILDDIR/src/mca/$type/$m" \ "src/mca/dynamic/$type/$m" ls -l "src/mca/dynamic/$type/$m" else @@ -362,7 +362,7 @@ if test "$HAPPY" = "1"; then # Now check for the rest of the tags - for scope in LIBLAM LIBMPI WRAPPER; do + for scope in LIBOMPI LIBMPI WRAPPER; do for flags in CFLAGS CXXFLAGS FFLAGS LDFLAGS LIBS; do var="${scope}_EXTRA_${flags}" line="`grep $var= $infile | cut -d= -f2-`" diff --git a/config/lam_setup_cc.m4 b/config/lam_setup_cc.m4 index efd33d6cc7..539dcd6db2 100644 --- a/config/lam_setup_cc.m4 +++ b/config/lam_setup_cc.m4 @@ -3,12 +3,12 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_SETUP_CC],[ +AC_DEFUN([OMPI_SETUP_CC],[ # Modularize this setup so that sub-configure.in scripts can use this # same setup code. -lam_show_subtitle "C compiler and preprocessor" +ompi_show_subtitle "C compiler and preprocessor" # $%@#!@#% AIX!! This has to be called before anything invokes the C # compiler. @@ -19,25 +19,25 @@ dnl AC_AIX # Check for the compiler # -lam_cflags_save="$CFLAGS" +ompi_cflags_save="$CFLAGS" AC_PROG_CC BASECC="`basename $CC`" -CFLAGS="$lam_cflags_save" -AC_DEFINE_UNQUOTED(LAM_CC, "$CC", [LAM underlying C compiler]) +CFLAGS="$ompi_cflags_save" +AC_DEFINE_UNQUOTED(OMPI_CC, "$CC", [OMPI underlying C compiler]) -# When building LAM, we need this everywhere +# When building OMPI, we need this everywhere -CPPFLAGS="$CPPFLAGS -DLAM_BUILDING=1" +CPPFLAGS="$CPPFLAGS -DOMPI_BUILDING=1" # Do we want debugging? if test "$WANT_DEBUG" = "1"; then CFLAGS="$CFLAGS -g" - LAM_UNIQ(CFLAGS) + OMPI_UNIQ(CFLAGS) AC_MSG_WARN([-g has been added to CFLAGS (--enable-debug)]) fi -LAM_CFLAGS_BEFORE_PICKY="$CFLAGS" +OMPI_CFLAGS_BEFORE_PICKY="$CFLAGS" if test "$GCC" = "yes" -a "$WANT_PICKY_COMPILER" = 1; then add="-Wall -Wundef -Wno-long-long" add="$add -Wmissing-prototypes -Wstrict-prototypes" @@ -52,7 +52,7 @@ if test "$GCC" = "yes" -a "$WANT_PICKY_COMPILER" = 1; then add="$add -Werror-implicit-function-declaration " CFLAGS="$CFLAGS $add" - LAM_UNIQ(CFLAGS) + OMPI_UNIQ(CFLAGS) AC_MSG_WARN([$add has been added to CFLAGS (developer copy)]) unset add fi @@ -64,7 +64,7 @@ if test "$GCC" = "yes"; then add= AC_TRY_COMPILE([], [], add=" -finline-functions") CFLAGS="$CFLAGS_orig$add" - LAM_UNIQ(CFLAGS) + OMPI_UNIQ(CFLAGS) AC_MSG_WARN([$add has been added to CFLAGS]) unset add fi @@ -82,10 +82,10 @@ else OPTFLAGS="-O" fi -LAM_CHECK_OPTFLAGS("$LAM_CFLAGS_BEFORE_PICKY") -LAM_CFLAGS_BEFORE_PICKY="$co_result" +OMPI_CHECK_OPTFLAGS("$OMPI_CFLAGS_BEFORE_PICKY") +OMPI_CFLAGS_BEFORE_PICKY="$co_result" AC_MSG_CHECKING([for C optimization flags]) -LAM_CHECK_OPTFLAGS("$CFLAGS") +OMPI_CHECK_OPTFLAGS("$CFLAGS") AC_MSG_RESULT([$co_result]) CFLAGS="$co_result"]) diff --git a/config/lam_setup_cxx.m4 b/config/lam_setup_cxx.m4 index a1448587cf..1422d989c5 100644 --- a/config/lam_setup_cxx.m4 +++ b/config/lam_setup_cxx.m4 @@ -3,29 +3,29 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([LAM_SETUP_CXX],[ +AC_DEFUN([OMPI_SETUP_CXX],[ # Modularize this setup so that sub-configure.in scripts can use this # same setup code. -lam_show_subtitle "C++ compiler and preprocessor" +ompi_show_subtitle "C++ compiler and preprocessor" -lam_cxxflags_save="$CXXFLAGS" +ompi_cxxflags_save="$CXXFLAGS" AC_PROG_CXX AC_PROG_CXXCPP BASECXX="`basename $CXX`" -CXXFLAGS="$lam_cxxflags_save" -AC_DEFINE_UNQUOTED(LAM_CXX, "$CXX", [LAM underlying C++ compiler]) +CXXFLAGS="$ompi_cxxflags_save" +AC_DEFINE_UNQUOTED(OMPI_CXX, "$CXX", [OMPI underlying C++ compiler]) # Do we want debugging? if test "$WANT_DEBUG" = "1"; then CXXFLAGS="$CXXFLAGS -g" - LAM_UNIQ(CXXFLAGS) + OMPI_UNIQ(CXXFLAGS) AC_MSG_WARN([-g has been added to CXXFLAGS (--enable-debug)]) fi -LAM_CXXFLAGS_BEFORE_PICKY="$CXXFLAGS" +OMPI_CXXFLAGS_BEFORE_PICKY="$CXXFLAGS" if test "$GCC" = "yes" -a "$WANT_PICKY_COMPILER" = 1; then add="-g -Wall -Wundef -Wno-long-long" add="$add -Wmissing-prototypes -Wstrict-prototypes" @@ -39,7 +39,7 @@ if test "$GCC" = "yes" -a "$WANT_PICKY_COMPILER" = 1; then AC_LANG_POP(C++) CXXFLAGS="$CXXFLAGS $add" - LAM_UNIQ(CXXFLAGS) + OMPI_UNIQ(CXXFLAGS) AC_MSG_WARN([$add has been added to CXXFLAGS (developer copy)]) unset add fi @@ -51,7 +51,7 @@ if test "$GCC" = "yes"; then add= AC_TRY_COMPILE([], [], add=" -finline-functions") CXXFLAGS="$CXXFLAGS_orig$add" - LAM_UNIQ(CXXFLAGS) + OMPI_UNIQ(CXXFLAGS) AC_MSG_WARN([$add has been added to CXXFLAGS]) unset add fi @@ -74,30 +74,30 @@ AC_MSG_CHECKING([if want C++ exception handling]) AC_MSG_RESULT([$ENABLE_CXX_EXCEPTIONS]) if test "$ENABLE_CXX_EXCEPTIONS" = "yes"; then # config/cxx_have_exceptions.m4 - LAM_CXX_HAVE_EXCEPTIONS + OMPI_CXX_HAVE_EXCEPTIONS # config/cxx_find_exception_flags.m4 - LAM_CXX_FIND_EXCEPTION_FLAGS - if test "$LAM_CXX_EXCEPTIONS" = "1"; then + OMPI_CXX_FIND_EXCEPTION_FLAGS + if test "$OMPI_CXX_EXCEPTIONS" = "1"; then HAVE_CXX_EXCEPTIONS=1 - CFLAGS="$CFLAGS $LAM_CXX_EXCEPTIONS_CFLAGS" - FFLAGS="$FFLAGS $LAM_CXX_EXCEPTIONS_FFLAGS" - CXXFLAGS="$CXXFLAGS $LAM_CXX_EXCEPTIONS_CXXFLAGS" - LDFLAGS="$LDFLAGS $LAM_CXX_EXCEPTIONS_LDFLAGS" + CFLAGS="$CFLAGS $OMPI_CXX_EXCEPTIONS_CFLAGS" + FFLAGS="$FFLAGS $OMPI_CXX_EXCEPTIONS_FFLAGS" + CXXFLAGS="$CXXFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS" + LDFLAGS="$LDFLAGS $OMPI_CXX_EXCEPTIONS_LDFLAGS" - WRAPPER_EXTRA_CFLAGS="$LAM_CXX_EXCEPTIONS_CFLAGS" - WRAPPER_EXTRA_FFLAGS="$LAM_CXX_EXCEPTIONS_FFLAGS" - WRAPPER_EXTRA_CXXFLAGS="$LAM_CXX_EXCEPTIONS_CXXFLAGS" + WRAPPER_EXTRA_CFLAGS="$OMPI_CXX_EXCEPTIONS_CFLAGS" + WRAPPER_EXTRA_FFLAGS="$OMPI_CXX_EXCEPTIONS_FFLAGS" + WRAPPER_EXTRA_CXXFLAGS="$OMPI_CXX_EXCEPTIONS_CXXFLAGS" fi fi -AC_DEFINE_UNQUOTED(LAM_HAVE_CXX_EXCEPTION_SUPPORT, $HAVE_CXX_EXCEPTIONS, +AC_DEFINE_UNQUOTED(OMPI_HAVE_CXX_EXCEPTION_SUPPORT, $HAVE_CXX_EXCEPTIONS, [Whether or not we have compiled with C++ exceptions support]) # Find some more characteristics of the C++ compiler # config/cxx_find_template_repository.m4 -LAM_CXX_FIND_TEMPLATE_REPOSITORY +OMPI_CXX_FIND_TEMPLATE_REPOSITORY # config/cxx_find_template_parameters.m4 -LAM_CXX_FIND_TEMPLATE_PARAMETERS +OMPI_CXX_FIND_TEMPLATE_PARAMETERS # If we are on HP-UX, ensure that we're using aCC case "$host" in @@ -111,15 +111,15 @@ case "$host" in ;; esac -# Same rationale for g++ as with gcc in LAM_SETUP_CC. +# Same rationale for g++ as with gcc in OMPI_SETUP_CC. if test "$GXX" = yes; then OPTFLAGS="-O3" else OPTFLAGS="-O" fi -# config/lam_check_optflags.m4 -LAM_CHECK_OPTFLAGS("$CXXFLAGS") +# config/ompi_check_optflags.m4 +OMPI_CHECK_OPTFLAGS("$CXXFLAGS") AC_MSG_CHECKING([for C++ optimization flags]) AC_MSG_RESULT([$co_result]) CXXFLAGS="$co_result" diff --git a/config/lam_setup_f77.m4 b/config/lam_setup_f77.m4 index 0c4d26f7f1..e8e8766378 100644 --- a/config/lam_setup_f77.m4 +++ b/config/lam_setup_f77.m4 @@ -5,57 +5,57 @@ dnl dnl sets: dnl F77 : full pathname to compiler dnl BASEF77 : compiler name (no path) -dnl LAM_WANT_F77_BINDINGS : (actually set by lam_configure_options, may be +dnl OMPI_WANT_F77_BINDINGS : (actually set by ompi_configure_options, may be dnl redefined here) dnl FC : Same as F77. Side effect of AC_PROG_FC. Should dnl not be used dnl defines: -dnl LAM_F77 : same as F77 -dnl LAM_WANT_F77_BINDINGS : +dnl OMPI_F77 : same as F77 +dnl OMPI_WANT_F77_BINDINGS : dnl am_conditional: -dnl LAM_WANT_F77_BINDINGS : +dnl OMPI_WANT_F77_BINDINGS : -AC_DEFUN([LAM_SETUP_F77],[ +AC_DEFUN([OMPI_SETUP_F77],[ # Modularize this setup so that sub-configure.in scripts can use this # same setup code. -lam_show_subtitle "Fortran 77 compiler" +ompi_show_subtitle "Fortran 77 compiler" # # Check for the compiler # # Note that we don't actually *use* the fortran compiler to build -# anything in LAM; it's only used here in configure to find out +# anything in OMPI; it's only used here in configure to find out # symbol conventions, type sizes, etc. We also pass it down to # the wrapper compiler mpif77. # # Always run this test, even if fortran isn't wanted so that F77 has # value for the Fint tests # -lam_fflags_save="$FFLAGS" +ompi_fflags_save="$FFLAGS" AC_PROG_F77 -FFLAGS="$lam_fflags_save" +FFLAGS="$ompi_fflags_save" if test -z "$F77"; then AC_MSG_WARN([*** Fortran 77 bindings disabled (could not find compiler)]) - LAM_WANT_F77_BINDINGS=0 - LAM_F77="none" + OMPI_WANT_F77_BINDINGS=0 + OMPI_F77="none" BASEF77="none" else - if test "$LAM_WANT_F77_BINDINGS" = "0" ; then + if test "$OMPI_WANT_F77_BINDINGS" = "0" ; then AC_MSG_WARN([*** Fortran 77 bindings disabled by user]) - LAM_WANT_F77_BINDINGS=0 - LAM_F77="$F77" - BASEF77="`basename $LAM_F77`" + OMPI_WANT_F77_BINDINGS=0 + OMPI_F77="$F77" + BASEF77="`basename $OMPI_F77`" else - LAM_WANT_F77_BINDINGS=1 - LAM_F77="$F77" - BASEF77="`basename $LAM_F77`" + OMPI_WANT_F77_BINDINGS=1 + OMPI_F77="$F77" + BASEF77="`basename $OMPI_F77`" fi fi -AC_DEFINE_UNQUOTED(LAM_WANT_F77_BINDINGS, $LAM_WANT_F77_BINDINGS, +AC_DEFINE_UNQUOTED(OMPI_WANT_F77_BINDINGS, $OMPI_WANT_F77_BINDINGS, [Whether we want the MPI f77 bindings or not]) -AC_DEFINE_UNQUOTED(LAM_F77, "$LAM_F77", [LAM underlying F77 compiler]) -AM_CONDITIONAL(LAM_WANT_F77_BINDINGS, test "$LAM_WANT_F77_BINDINGS" = "1") +AC_DEFINE_UNQUOTED(OMPI_F77, "$OMPI_F77", [OMPI underlying F77 compiler]) +AM_CONDITIONAL(OMPI_WANT_F77_BINDINGS, test "$OMPI_WANT_F77_BINDINGS" = "1") ]) diff --git a/config/lam_setup_f90.m4 b/config/lam_setup_f90.m4 index b321ad179f..4e0342321f 100644 --- a/config/lam_setup_f90.m4 +++ b/config/lam_setup_f90.m4 @@ -2,37 +2,37 @@ dnl -*- shell-script -*- dnl dnl $HEADER$ dnl -dnl LAM_SETUP_F90 +dnl OMPI_SETUP_F90 dnl dnl sets: dnl F90 : full pathname to compiler dnl BASEF90 : compiler name (no path) -dnl LAM_WANT_F90_BINDINGS : (actually set by lam_configure_options, may be +dnl OMPI_WANT_F90_BINDINGS : (actually set by ompi_configure_options, may be dnl redefined here) dnl FC : Same as F90. Side effect of AC_PROG_FC. Should dnl not be used dnl defines: -dnl LAM_F90 : same as F90 -dnl LAM_WANT_F90_BINDINGS : +dnl OMPI_F90 : same as F90 +dnl OMPI_WANT_F90_BINDINGS : dnl am_conditional: -dnl LAM_WANT_F90_BINDINGS : +dnl OMPI_WANT_F90_BINDINGS : -AC_DEFUN([LAM_SETUP_F90],[ +AC_DEFUN([OMPI_SETUP_F90],[ # Modularize this setup so that sub-configure.in scripts can use this # same setup code. -lam_show_subtitle "Fortran 90/95 compiler" +ompi_show_subtitle "Fortran 90/95 compiler" -if test "$LAM_WANT_F77_BINDINGS" = "0" ; then +if test "$OMPI_WANT_F77_BINDINGS" = "0" ; then AC_MSG_WARN([*** Fortran 90/95 bindings disabled (Fortran 77 was disabled)]) - LAM_WANT_F90_BINDINGS=0 - LAM_F90="none" + OMPI_WANT_F90_BINDINGS=0 + OMPI_F90="none" BASEF90="none" -elif test "$LAM_WANT_F90_BINDINGS" = "0" ; then +elif test "$OMPI_WANT_F90_BINDINGS" = "0" ; then AC_MSG_WARN([*** Fortran 90/95 bindings disabled by user]) - LAM_WANT_F90_BINDINGS=0 - LAM_F90="none" + OMPI_WANT_F90_BINDINGS=0 + OMPI_F90="none" BASEF90="none" else @@ -40,28 +40,28 @@ else # Check for the compiler # # Note that we don't actually *use* the fortran compiler to build - # anything in LAM; it's only used here in configure to find out + # anything in OMPI; it's only used here in configure to find out # symbol conventions, type sizes, etc. We also pass it down to # the wrapper compiler mpif90. # - lam_fcflags_save="$FCFLAGS" + ompi_fcflags_save="$FCFLAGS" AC_PROG_FC - FCFLAGS="$lam_fcflags_save" + FCFLAGS="$ompi_fcflags_save" if test -z "$FC"; then AC_MSG_WARN([*** Fortran 90/95 bindings disabled (could not find compiler)]) - LAM_WANT_F90_BINDINGS=0 - LAM_F90="none" + OMPI_WANT_F90_BINDINGS=0 + OMPI_F90="none" BASEF90="none" elif test "$FC" = "$F77"; then AC_MSG_WARN([*** Found same compiler for Fortran 77 and 90/95.]) AC_MSG_WARN([*** Assuming no Fortran 90/95 compiler; disabling]) AC_MSG_WARN([*** Fortran 90/95 MPI bindings.]) - LAM_WANT_F90_BINDINGS=0 - LAM_F90="none" + OMPI_WANT_F90_BINDINGS=0 + OMPI_F90="none" BASEF90="none" else - LAM_F90="$FC" + OMPI_F90="$FC" BASEF90="`basename $FC`" AC_LANG_PUSH(Fortran) @@ -70,29 +70,29 @@ else AC_FC_SRCEXT(f95) AC_LANG_POP(Fortran) - AC_MSG_CHECKING([whether $LAM_F77 and $LAM_F90 compilers are compatible]) - LAM_INTL_F90_F77_INTERACTION(fortran_goodness=1, fortran_goodness=0) + AC_MSG_CHECKING([whether $OMPI_F77 and $OMPI_F90 compilers are compatible]) + OMPI_INTL_F90_F77_INTERACTION(fortran_goodness=1, fortran_goodness=0) if test "$fortran_goodness" = "0" ; then AC_MSG_RESULT([no]) AC_MSG_WARN([*** Fortran 77 and Fortran 90 compilers are not link compatible]) AC_MSG_WARN([*** Disabling Fortran 90/95 bindings]) - LAM_WANT_F90_BINDINGS=0 + OMPI_WANT_F90_BINDINGS=0 else AC_MSG_RESULT([yes]) - LAM_WANT_F90_BINDINGS=1 + OMPI_WANT_F90_BINDINGS=1 fi fi fi -AC_DEFINE_UNQUOTED(LAM_WANT_F90_BINDINGS, $LAM_WANT_F90_BINDINGS, +AC_DEFINE_UNQUOTED(OMPI_WANT_F90_BINDINGS, $OMPI_WANT_F90_BINDINGS, [Whether we want the MPI f90 bindings or not]) -AC_DEFINE_UNQUOTED(LAM_F90, "$LAM_F90", [LAM underlying F90 compiler]) -AM_CONDITIONAL(LAM_WANT_F90_BINDINGS, test "$LAM_WANT_F90_BINDINGS" = "1") +AC_DEFINE_UNQUOTED(OMPI_F90, "$OMPI_F90", [OMPI underlying F90 compiler]) +AM_CONDITIONAL(OMPI_WANT_F90_BINDINGS, test "$OMPI_WANT_F90_BINDINGS" = "1") unset fortran_goodness ]) -AC_DEFUN([LAM_INTL_F90_F77_INTERACTION], [ +AC_DEFUN([OMPI_INTL_F90_F77_INTERACTION], [ # make sure that we can combine F90 and F77 code AC_LANG_PUSH(Fortran) # Fortran module @@ -107,12 +107,12 @@ cat > conftestf90.f <cr, -# crlam->cr). +# crompi->cr). case "@MCA_TYPE@" in crmpi) generic_type="cr" ;; -crlam) +crompi) generic_type="cr" ;; *) @@ -198,7 +198,7 @@ fi # @MCA_TYPE@ @MCA_MODULE_NAME@ module specific setup ################################## -if test "$LAM_WANT_DIST" = "no"; then +if test "$OMPI_WANT_DIST" = "no"; then @CONFIGURE_STUB_MACRO@ else @CONFIGURE_DIST_STUB_MACRO@ @@ -212,7 +212,7 @@ fi # purely aesthetic. # -CPPFLAGS='-I$(top_lam_srcdir)/src/include'" $CPPFLAGS" +CPPFLAGS='-I$(top_ompi_srcdir)/src/include'" $CPPFLAGS" # # Delayed the substitution of these until now because they may have @@ -226,10 +226,10 @@ AC_SUBST(CPPFLAGS) # libtool magic ############################################################################ -lam_show_subtitle "GNU libtool setup" +ompi_show_subtitle "GNU libtool setup" AM_PROG_LIBTOOL -AM_CONDITIONAL(LAM_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE, +AM_CONDITIONAL(OMPI_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE, test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1") @@ -237,7 +237,7 @@ AM_CONDITIONAL(LAM_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE, # Party on ############################################################################ -lam_show_subtitle "Final output" +ompi_show_subtitle "Final output" AM_CONFIG_HEADER([@PARAM_CONFIG_HEADER_FILE@]) AC_CONFIG_FILES([@PARAM_CONFIG_FILES@]) diff --git a/config/mca_make_configure.pl b/config/mca_make_configure.pl index 2c93eb9cb5..7edf0dd580 100755 --- a/config/mca_make_configure.pl +++ b/config/mca_make_configure.pl @@ -13,13 +13,13 @@ use File::Basename; # Local variables ############################################################################ -my $lam_topdir; +my $ompi_topdir; my $module_topdir; my %config_values; my %config_params; my $initial_cwd = cwd(); -my $announce_str = "LAM/MPI MCA module configure generator"; +my $announce_str = "OMPI/MPI MCA module configure generator"; my %config_param_names = (PIFILE => "PARAM_INIT_FILE", PCFGAUXDIR => "PARAM_CONFIG_AUX_DIR", PC => "PARAM_WANT_C", @@ -36,45 +36,45 @@ my %config_param_names = (PIFILE => "PARAM_INIT_FILE", ############################################################################ Getopt::Long::Configure("bundling", "require_order"); -my $ok = Getopt::Long::GetOptions("lamdir|l=s" => \$lam_topdir, +my $ok = Getopt::Long::GetOptions("ompidir|l=s" => \$ompi_topdir, "moduledir|m=s" => \$module_topdir); if (!$ok) { - print "Usage: $0 [--lamdir=DIR] [--moduledir=DIR]\n"; + print "Usage: $0 [--ompidir=DIR] [--moduledir=DIR]\n"; exit(1); } ############################################################################ -# Try to figure out the lam and module topdirs +# Try to figure out the ompi and module topdirs ############################################################################ print "$announce_str starting\n"; -if (!$lam_topdir) { - $lam_topdir = dirname($0); +if (!$ompi_topdir) { + $ompi_topdir = dirname($0); } -chdir($lam_topdir); -$lam_topdir = cwd(); +chdir($ompi_topdir); +$ompi_topdir = cwd(); chdir($initial_cwd); -if (!$lam_topdir || ! -f "$lam_topdir/autogen.sh") { - croak("Unable to find LAM base directory (try using --lamdir)"); +if (!$ompi_topdir || ! -f "$ompi_topdir/autogen.sh") { + croak("Unable to find OMPI base directory (try using --ompidir)"); } if (!$module_topdir) { $module_topdir = $initial_cwd; - if ($module_topdir eq $lam_topdir) { + if ($module_topdir eq $ompi_topdir) { croak("Unable to determine which module to operate on"); } } chdir($module_topdir); $module_topdir = cwd(); chdir($initial_cwd); -if (!$lam_topdir || ! -d $module_topdir) { +if (!$ompi_topdir || ! -d $module_topdir) { croak("Unable to find module directory (try using --moduledir)"); } # Print them out -print "--> Found LAM top dir: $lam_topdir\n"; +print "--> Found OMPI top dir: $ompi_topdir\n"; print "--> Found module top dir: $module_topdir\n"; # If we have a configure.params file in the module topdir, we're good to @@ -107,11 +107,11 @@ if (-f "$module_topdir/configure.ac") { $config_values{"MCA_TYPE"} = dirname($module_topdir); $config_values{"MCA_TYPE"} = basename($config_values{"MCA_TYPE"}); -# PROCESSED_MCA_TYPE: For "special" MCA types, like "crlam" and +# PROCESSED_MCA_TYPE: For "special" MCA types, like "crompi" and # "crmpi". $config_values{"PROCESSED_MCA_TYPE"} = $config_values{"MCA_TYPE"}; -if ($config_values{"PROCESSED_MCA_TYPE"} eq "crlam" || +if ($config_values{"PROCESSED_MCA_TYPE"} eq "crompi" || $config_values{"PROCESSED_MCA_TYPE"} eq "crmpi") { $config_values{"PROCESSED_MCA_TYPE"} = "cr"; } @@ -167,7 +167,7 @@ if (-f "$module_topdir/configure.stub") { sinclude(configure.stub)\n"; $config_values{CONFIGURE_STUB_MACRO} = - "lam_show_subtitle \"MCA " . $config_values{"MCA_TYPE"} . " " . + "ompi_show_subtitle \"MCA " . $config_values{"MCA_TYPE"} . " " . $config_values{"MCA_MODULE_NAME"} . "-specific setup\" MCA_CONFIGURE_STUB"; @@ -182,7 +182,7 @@ MCA_CONFIGURE_STUB"; close(STUB); if ($found == 1) { $config_values{CONFIGURE_DIST_STUB_MACRO} = - "lam_show_subtitle \"MCA " . $config_values{"MCA_TYPE"} . " " . + "ompi_show_subtitle \"MCA " . $config_values{"MCA_TYPE"} . " " . $config_values{"MCA_MODULE_NAME"} . "-specific setup (dist specific!)\" MCA_CONFIGURE_DIST_STUB"; @@ -320,12 +320,12 @@ sub make_template { $search = "\@C_COMPILER_SETUP\@"; $replace = $config_params{$config_param_names{"PC"}} ? - "LAM_SETUP_CC" : ""; + "OMPI_SETUP_CC" : ""; $template =~ s/$search/$replace/; $search = "\@CXX_COMPILER_SETUP\@"; $replace = $config_params{$config_param_names{"PCXX"}} ? - "LAM_SETUP_CXX" : ""; + "OMPI_SETUP_CXX" : ""; $template =~ s/$search/$replace/; print "--> Writing output file: $dest\n"; @@ -339,9 +339,9 @@ sub make_template { # Read and fill in the templates -make_template("$lam_topdir/config/mca_configure.ac", +make_template("$ompi_topdir/config/mca_configure.ac", "$module_topdir/configure.ac", 0644); -make_template("$lam_topdir/config/mca_acinclude.m4", +make_template("$ompi_topdir/config/mca_acinclude.m4", "$module_topdir/acinclude.m4", 0644); ############################################################################ diff --git a/configure.ac b/configure.ac index 6ffead6259..aae8832193 100644 --- a/configure.ac +++ b/configure.ac @@ -14,40 +14,40 @@ AC_INIT(./src/mpi/c/init.c) AC_PREREQ(2.58) AC_CONFIG_AUX_DIR(./config) -# Get the version of LAM that we are installing +# Get the version of OMPI that we are installing -LAM_GET_VERSION($srcdir/config, $srcdir/VERSION, LAM) +OMPI_GET_VERSION($srcdir/config, $srcdir/VERSION, OMPI) -AC_DEFINE_UNQUOTED(LAM_MAJOR_VERSION, $LAM_MAJOR_VERSION, - [Major LAM version]) -AC_DEFINE_UNQUOTED(LAM_MINOR_VERSION, $LAM_MINOR_VERSION, - [Minor LAM version]) -AC_DEFINE_UNQUOTED(LAM_RELEASE_VERSION, $LAM_RELEASE_VERSION, - [Release LAM version]) -AC_DEFINE_UNQUOTED(LAM_ALPHA_VERSION, $LAM_ALPHA_VERSION, - [Alpha LAM version]) -AC_DEFINE_UNQUOTED(LAM_BETA_VERSION, $LAM_BETA_VERSION, - [Beta LAM version]) -AC_DEFINE_UNQUOTED(LAM_SVN_VERSION, $LAM_SVN_VERSION, - [CVS LAM version]) -AC_DEFINE_UNQUOTED(LAM_VERSION, "$LAM_VERSION", - [Overall LAM version number]) +AC_DEFINE_UNQUOTED(OMPI_MAJOR_VERSION, $OMPI_MAJOR_VERSION, + [Major OMPI version]) +AC_DEFINE_UNQUOTED(OMPI_MINOR_VERSION, $OMPI_MINOR_VERSION, + [Minor OMPI version]) +AC_DEFINE_UNQUOTED(OMPI_RELEASE_VERSION, $OMPI_RELEASE_VERSION, + [Release OMPI version]) +AC_DEFINE_UNQUOTED(OMPI_ALPHA_VERSION, $OMPI_ALPHA_VERSION, + [Alpha OMPI version]) +AC_DEFINE_UNQUOTED(OMPI_BETA_VERSION, $OMPI_BETA_VERSION, + [Beta OMPI version]) +AC_DEFINE_UNQUOTED(OMPI_SVN_VERSION, $OMPI_SVN_VERSION, + [CVS OMPI version]) +AC_DEFINE_UNQUOTED(OMPI_VERSION, "$OMPI_VERSION", + [Overall OMPI version number]) -AC_SUBST(LAM_MAJOR_VERSION) -AC_SUBST(LAM_MINOR_VERSION) -AC_SUBST(LAM_RELEASE_VERSION) -AC_SUBST(LAM_ALPHA_VERSION) -AC_SUBST(LAM_BETA_VERSION) -AC_SUBST(LAM_CVS_VERSION) -AC_SUBST(LAM_VERSION) +AC_SUBST(OMPI_MAJOR_VERSION) +AC_SUBST(OMPI_MINOR_VERSION) +AC_SUBST(OMPI_RELEASE_VERSION) +AC_SUBST(OMPI_ALPHA_VERSION) +AC_SUBST(OMPI_BETA_VERSION) +AC_SUBST(OMPI_CVS_VERSION) +AC_SUBST(OMPI_VERSION) # # Start it up # -LAM_CONFIGURE_SETUP -lam_show_title "Configuring LAM version $LAM_VERSION" -lam_show_subtitle "Initialization, setup" +OMPI_CONFIGURE_SETUP +ompi_show_title "Configuring OMPI version $OMPI_VERSION" +ompi_show_subtitle "Initialization, setup" # # Init automake @@ -55,22 +55,22 @@ lam_show_subtitle "Initialization, setup" # VERSION macors # -AM_INIT_AUTOMAKE(lam, $LAM_VERSION, 'no') +AM_INIT_AUTOMAKE(ompi, $OMPI_VERSION, 'no') -LAM_TOP_BUILDDIR="`pwd`" -AC_SUBST(LAM_TOP_BUILDDIR) +OMPI_TOP_BUILDDIR="`pwd`" +AC_SUBST(OMPI_TOP_BUILDDIR) cd "$srcdir" -LAM_TOP_SRCDIR="`pwd`" -AC_SUBST(LAM_TOP_SRCDIR) -cd "$LAM_TOP_BUILDDIR" +OMPI_TOP_SRCDIR="`pwd`" +AC_SUBST(OMPI_TOP_SRCDIR) +cd "$OMPI_TOP_BUILDDIR" -AC_MSG_NOTICE([builddir: $LAM_TOP_BUILDDIR]) -AC_MSG_NOTICE([srcdir: $LAM_TOP_SRCDIR]) -if test "$LAM_TOP_BUILDDIR" != "$LAM_TOP_SRCDIR"; then +AC_MSG_NOTICE([builddir: $OMPI_TOP_BUILDDIR]) +AC_MSG_NOTICE([srcdir: $OMPI_TOP_SRCDIR]) +if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then AC_MSG_NOTICE([Detected VPATH build]) fi -# Setup the top of the include/lam_config.h file +# Setup the top of the include/ompi_config.h file AH_TOP([/* -*- c -*- * @@ -79,28 +79,28 @@ AH_TOP([/* -*- c -*- * Function: - OS, CPU and compiler dependent configuration */ -#ifndef LAM_CONFIG_H -#define LAM_CONFIG_H +#ifndef OMPI_CONFIG_H +#define OMPI_CONFIG_H ]) AH_BOTTOM([ -#include "lam_config_bottom.h" -#endif /* LAM_CONFIG_H */ +#include "ompi_config_bottom.h" +#endif /* OMPI_CONFIG_H */ ]) # Other basic setup stuff (shared with modules) -LAM_BASIC_SETUP +OMPI_BASIC_SETUP -top_lam_srcdir="$LAM_TOP_SRCDIR" -AC_SUBST(top_lam_srcdir) -top_lam_builddir="$LAM_TOP_BUILDDIR" -AC_SUBST(top_lam_builddir) +top_ompi_srcdir="$OMPI_TOP_SRCDIR" +AC_SUBST(top_ompi_srcdir) +top_ompi_builddir="$OMPI_TOP_BUILDDIR" +AC_SUBST(top_ompi_builddir) ############################################################################ # Configuration options ############################################################################ -LAM_CONFIGURE_OPTIONS +OMPI_CONFIGURE_OPTIONS ############################################################################ # Libtool: part one @@ -116,8 +116,8 @@ LAM_CONFIGURE_OPTIONS # the user requested something or if the default was set here. # -lam_enable_shared="$enable_shared" -lam_enable_static="$enable_static" +ompi_enable_shared="$enable_shared" +ompi_enable_static="$enable_static" AM_DISABLE_SHARED AM_ENABLE_STATIC @@ -125,13 +125,13 @@ AM_ENABLE_STATIC ############################################################################ # Check for compilers and preprocessors ############################################################################ -lam_show_title "Compiler and preprocessor tests" +ompi_show_title "Compiler and preprocessor tests" ################################## # C compiler characteristics ################################## -LAM_SETUP_CC +OMPI_SETUP_CC # # Check for some types @@ -170,20 +170,20 @@ AC_CHECK_SIZEOF(void *) # Check for type alignments # -LAM_C_GET_ALIGNMENT(char, LAM_ALIGNMENT_CHAR) -LAM_C_GET_ALIGNMENT(short, LAM_ALIGNMENT_SHORT) -LAM_C_GET_ALIGNMENT(wchar_t, LAM_ALIGNMENT_WCHAR) -LAM_C_GET_ALIGNMENT(int, LAM_ALIGNMENT_INT) -LAM_C_GET_ALIGNMENT(long, LAM_ALIGNMENT_LONG) +OMPI_C_GET_ALIGNMENT(char, OMPI_ALIGNMENT_CHAR) +OMPI_C_GET_ALIGNMENT(short, OMPI_ALIGNMENT_SHORT) +OMPI_C_GET_ALIGNMENT(wchar_t, OMPI_ALIGNMENT_WCHAR) +OMPI_C_GET_ALIGNMENT(int, OMPI_ALIGNMENT_INT) +OMPI_C_GET_ALIGNMENT(long, OMPI_ALIGNMENT_LONG) if test $ac_cv_type_long_long = yes; then - LAM_C_GET_ALIGNMENT(long long, LAM_ALIGNMENT_LONG_LONG) + OMPI_C_GET_ALIGNMENT(long long, OMPI_ALIGNMENT_LONG_LONG) fi -LAM_C_GET_ALIGNMENT(float, LAM_ALIGNMENT_FLOAT) -LAM_C_GET_ALIGNMENT(double, LAM_ALIGNMENT_DOUBLE) +OMPI_C_GET_ALIGNMENT(float, OMPI_ALIGNMENT_FLOAT) +OMPI_C_GET_ALIGNMENT(double, OMPI_ALIGNMENT_DOUBLE) if test $ac_cv_type_long_double = yes; then - LAM_C_GET_ALIGNMENT(long double, LAM_ALIGNMENT_LONG_DOUBLE) + OMPI_C_GET_ALIGNMENT(long double, OMPI_ALIGNMENT_LONG_DOUBLE) fi -LAM_C_GET_ALIGNMENT(void *, LAM_ALIGNMENT_VOID_P) +OMPI_C_GET_ALIGNMENT(void *, OMPI_ALIGNMENT_VOID_P) # # Check for other compiler characteristics @@ -191,7 +191,7 @@ LAM_C_GET_ALIGNMENT(void *, LAM_ALIGNMENT_VOID_P) AC_C_INLINE AC_C_RESTRICT -LAM_C_WEAK_SYMBOLS +OMPI_C_WEAK_SYMBOLS # If we want the profiling layer: # - If the C compiler has weak symbols, use those. @@ -199,16 +199,16 @@ LAM_C_WEAK_SYMBOLS # separate directory. if test "$WANT_WEAK_SYMBOLS" = "0"; then - LAM_C_HAVE_WEAK_SYMBOLS=0 + OMPI_C_HAVE_WEAK_SYMBOLS=0 fi if test "$WANT_MPI_PROFILING" = "1"; then - if test "$LAM_C_HAVE_WEAK_SYMBOLS" = "1"; then - LAM_PROFILING_COMPILE_SEPARATELY=0 + if test "$OMPI_C_HAVE_WEAK_SYMBOLS" = "1"; then + OMPI_PROFILING_COMPILE_SEPARATELY=0 else - LAM_PROFILING_COMPILE_SEPARATELY=1 + OMPI_PROFILING_COMPILE_SEPARATELY=1 fi else - LAM_PROFILING_COMPILE_SEPARATELY=0 + OMPI_PROFILING_COMPILE_SEPARATELY=0 fi # # There are 2 layers to the MPI Language binidings @@ -225,15 +225,15 @@ fi # each of these layers need to be built or NOT # AM_CONDITIONAL(WANT_MPI_BINDINGS_LAYER, - test "$WANT_MPI_PROFILING" = 0 -o "$LAM_PROFILING_COMPILE_SEPARATELY" = 1) + test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1) AM_CONDITIONAL(WANT_PMPI_BINDINGS_LAYER, test "$WANT_MPI_PROFILING" = 1) AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY, - test "$LAM_PROFILING_COMPILE_SEPARATELY" = 1) -AC_DEFINE_UNQUOTED(LAM_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING, + test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1) +AC_DEFINE_UNQUOTED(OMPI_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING, [Whether we want MPI profiling or not]) -AC_DEFINE_UNQUOTED(LAM_HAVE_WEAK_SYMBOLS, $LAM_C_HAVE_WEAK_SYMBOLS, +AC_DEFINE_UNQUOTED(OMPI_HAVE_WEAK_SYMBOLS, $OMPI_C_HAVE_WEAK_SYMBOLS, [Wehther we have weak symbols or not]) @@ -241,7 +241,7 @@ AC_DEFINE_UNQUOTED(LAM_HAVE_WEAK_SYMBOLS, $LAM_C_HAVE_WEAK_SYMBOLS, # C++ compiler characteristics ################################## -LAM_SETUP_CXX +OMPI_SETUP_CXX # check for type sizes @@ -251,7 +251,7 @@ AC_CHECK_SIZEOF(bool) # check for type alignments -LAM_C_GET_ALIGNMENT(bool, LAM_ALIGNMENT_CXX_BOOL) +OMPI_C_GET_ALIGNMENT(bool, OMPI_ALIGNMENT_CXX_BOOL) AC_LANG_RESTORE @@ -259,70 +259,70 @@ AC_LANG_RESTORE # Fortran ################################## -LAM_SIZEOF_FORTRAN_INT=0 -LAM_SIZEOF_FORTRAN_REAL=0 -LAM_SIZEOF_FORTRAN_DBLPREC=0 -LAM_SIZEOF_FORTRAN_COMPLEX=0 -LAM_SIZEOF_FORTRAN_DBLCOMPLEX=0 +OMPI_SIZEOF_FORTRAN_INT=0 +OMPI_SIZEOF_FORTRAN_REAL=0 +OMPI_SIZEOF_FORTRAN_DBLPREC=0 +OMPI_SIZEOF_FORTRAN_COMPLEX=0 +OMPI_SIZEOF_FORTRAN_DBLCOMPLEX=0 -LAM_ALIGNMENT_FORTRAN_INT=0 -LAM_ALIGNMENT_FORTRAN_REAL=0 -LAM_ALIGNMENT_FORTRAN_DBLPREC=0 -LAM_ALIGNMENT_FORTRAN_COMPLEX=0 -LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX=0 +OMPI_ALIGNMENT_FORTRAN_INT=0 +OMPI_ALIGNMENT_FORTRAN_REAL=0 +OMPI_ALIGNMENT_FORTRAN_DBLPREC=0 +OMPI_ALIGNMENT_FORTRAN_COMPLEX=0 +OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX=0 -LAM_SETUP_F77 -if test "$LAM_F77" != "none" ; then - LAM_F77_FIND_EXT_SYMBOL_CONVENTION($LAM_F77) +OMPI_SETUP_F77 +if test "$OMPI_F77" != "none" ; then + OMPI_F77_FIND_EXT_SYMBOL_CONVENTION($OMPI_F77) # checking the sizeof fortran interger. This is needed to define # MPI_Fint. This is needed for C bindings and hence there is no # bearing of --enable-fortran flag on this test. - LAM_F77_GET_SIZEOF(INTEGER, LAM_SIZEOF_FORTRAN_INT) + OMPI_F77_GET_SIZEOF(INTEGER, OMPI_SIZEOF_FORTRAN_INT) fi # If we want fortran support, then get the sizes and alignments of all # the rest of the fortran types -if test "$LAM_WANT_F77_BINDINGS" = "1" ; then +if test "$OMPI_WANT_F77_BINDINGS" = "1" ; then # INTEGER is already done, per above - LAM_F77_GET_SIZEOF(REAL, LAM_SIZEOF_FORTRAN_REAL) - LAM_F77_GET_SIZEOF(DOUBLE PRECISION, LAM_SIZEOF_FORTRAN_DBLPREC) - LAM_F77_GET_SIZEOF(COMPLEX, LAM_SIZEOF_FORTRAN_COMPLEX) - LAM_F77_GET_SIZEOF(DOUBLE COMPLEX, LAM_SIZEOF_FORTRAN_DBLCOMPLEX) + OMPI_F77_GET_SIZEOF(REAL, OMPI_SIZEOF_FORTRAN_REAL) + OMPI_F77_GET_SIZEOF(DOUBLE PRECISION, OMPI_SIZEOF_FORTRAN_DBLPREC) + OMPI_F77_GET_SIZEOF(COMPLEX, OMPI_SIZEOF_FORTRAN_COMPLEX) + OMPI_F77_GET_SIZEOF(DOUBLE COMPLEX, OMPI_SIZEOF_FORTRAN_DBLCOMPLEX) - LAM_F77_GET_ALIGNMENT(INTEGER, LAM_ALIGNMENT_FORTRAN_INT) - LAM_F77_GET_ALIGNMENT(REAL, LAM_ALIGNMENT_FORTRAN_REAL) - LAM_F77_GET_ALIGNMENT(DOUBLE PRECISION, LAM_ALIGNMENT_FORTRAN_DBLPREC) - LAM_F77_GET_ALIGNMENT(COMPLEX, LAM_ALIGNMENT_FORTRAN_COMPLEX) - LAM_F77_GET_ALIGNMENT(DOUBLE COMPLEX, LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX) + OMPI_F77_GET_ALIGNMENT(INTEGER, OMPI_ALIGNMENT_FORTRAN_INT) + OMPI_F77_GET_ALIGNMENT(REAL, OMPI_ALIGNMENT_FORTRAN_REAL) + OMPI_F77_GET_ALIGNMENT(DOUBLE PRECISION, OMPI_ALIGNMENT_FORTRAN_DBLPREC) + OMPI_F77_GET_ALIGNMENT(COMPLEX, OMPI_ALIGNMENT_FORTRAN_COMPLEX) + OMPI_F77_GET_ALIGNMENT(DOUBLE COMPLEX, OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX) fi -AC_DEFINE_UNQUOTED(LAM_SIZEOF_FORTRAN_INT, $LAM_SIZEOF_FORTRAN_INT, +AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_INT, $OMPI_SIZEOF_FORTRAN_INT, [Size of fortran integer]) -AC_DEFINE_UNQUOTED(LAM_SIZEOF_FORTRAN_REAL, $LAM_SIZEOF_FORTRAN_REAL, +AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_REAL, $OMPI_SIZEOF_FORTRAN_REAL, [Size of fortran real]) -AC_DEFINE_UNQUOTED(LAM_SIZEOF_FORTRAN_DBLPREC, $LAM_SIZEOF_FORTRAN_DBLPREC, +AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_DBLPREC, $OMPI_SIZEOF_FORTRAN_DBLPREC, [Size of fortran double precision]) -AC_DEFINE_UNQUOTED(LAM_SIZEOF_FORTRAN_COMPLEX, $LAM_SIZEOF_FORTRAN_COMPLEX, +AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_COMPLEX, $OMPI_SIZEOF_FORTRAN_COMPLEX, [Size of fortran complex]) -AC_DEFINE_UNQUOTED(LAM_SIZEOF_FORTRAN_DBLCOMPLEX, - $LAM_SIZEOF_FORTRAN_DBLCOMPLEX, +AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_DBLCOMPLEX, + $OMPI_SIZEOF_FORTRAN_DBLCOMPLEX, [Size of fortran double complex]) -AC_DEFINE_UNQUOTED(LAM_ALIGNMENT_FORTRAN_INT, $LAM_ALIGNMENT_FORTRAN_INT, +AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_INT, $OMPI_ALIGNMENT_FORTRAN_INT, [Size of fortran integer]) -AC_DEFINE_UNQUOTED(LAM_ALIGNMENT_FORTRAN_REAL, $LAM_ALIGNMENT_FORTRAN_REAL, +AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_REAL, $OMPI_ALIGNMENT_FORTRAN_REAL, [Size of fortran real]) -AC_DEFINE_UNQUOTED(LAM_ALIGNMENT_FORTRAN_DBLPREC, - $LAM_ALIGNMENT_FORTRAN_DBLPREC, +AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_DBLPREC, + $OMPI_ALIGNMENT_FORTRAN_DBLPREC, [Size of fortran double precision]) -AC_DEFINE_UNQUOTED(LAM_ALIGNMENT_FORTRAN_COMPLEX, - $LAM_ALIGNMENT_FORTRAN_COMPLEX, +AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_COMPLEX, + $OMPI_ALIGNMENT_FORTRAN_COMPLEX, [Size of fortran complex]) -AC_DEFINE_UNQUOTED(LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX, - $LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX, +AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX, + $OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX, [Size of fortran double complex]) # @@ -345,23 +345,23 @@ AC_DEFINE_UNQUOTED(LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX, # each of these layers need to be built or NOT # AM_CONDITIONAL(WANT_MPI_F77_BINDINGS_LAYER, - test "$WANT_MPI_PROFILING" = 0 -o "$LAM_PROFILING_COMPILE_SEPARATELY" = 1 -a "$LAM_WANT_F77_BINDINGS" = 1) + test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1 -a "$OMPI_WANT_F77_BINDINGS" = 1) AM_CONDITIONAL(WANT_PMPI_F77_BINDINGS_LAYER, - test "$LAM_WANT_F77_BINDINGS" = 1 -a "$WANT_MPI_PROFILING" = 1) + test "$OMPI_WANT_F77_BINDINGS" = 1 -a "$WANT_MPI_PROFILING" = 1) # # Fortran 90 setup # -LAM_SETUP_F90 +OMPI_SETUP_F90 ################################## # Header files ################################## -lam_show_title "Header file tests" +ompi_show_title "Header file tests" # snprintf declaration # gethostname declaration @@ -379,7 +379,7 @@ AC_CHECK_HEADERS([stdbool.h alloca.h]) # Libraries ################################## -lam_show_title "Library and Function tests" +ompi_show_title "Library and Function tests" # -lsocket # -lnsl @@ -398,14 +398,14 @@ lam_show_title "Library and Function tests" # Make sure we can copy va_lists (need check declared, not linkable) # -AC_CHECK_DECL(va_copy, LAM_HAVE_VA_COPY=1, LAM_HAVE_VA_COPY=0, +AC_CHECK_DECL(va_copy, OMPI_HAVE_VA_COPY=1, OMPI_HAVE_VA_COPY=0, [#include ]) -AC_DEFINE_UNQUOTED(LAM_HAVE_VA_COPY, $LAM_HAVE_VA_COPY, +AC_DEFINE_UNQUOTED(OMPI_HAVE_VA_COPY, $OMPI_HAVE_VA_COPY, [Whether we have va_copy or not]) -AC_CHECK_DECL(__va_copy, LAM_HAVE_UNDERSCORE_VA_COPY=1, - LAM_HAVE_UNDERSCORE_VA_COPY=0, [#include ]) -AC_DEFINE_UNQUOTED(LAM_HAVE_UNDERSCORE_VA_COPY, $LAM_HAVE_UNDERSCORE_VA_COPY, +AC_CHECK_DECL(__va_copy, OMPI_HAVE_UNDERSCORE_VA_COPY=1, + OMPI_HAVE_UNDERSCORE_VA_COPY=0, [#include ]) +AC_DEFINE_UNQUOTED(OMPI_HAVE_UNDERSCORE_VA_COPY, $OMPI_HAVE_UNDERSCORE_VA_COPY, [Whether we have __va_copy or not]) @@ -413,7 +413,7 @@ AC_DEFINE_UNQUOTED(LAM_HAVE_UNDERSCORE_VA_COPY, $LAM_HAVE_UNDERSCORE_VA_COPY, # System-specific tests ################################## -lam_show_title "System-specific tests" +ompi_show_title "System-specific tests" # # Determine what MPI_Fint shout be defined as. If the size of # fortran integer is 4 then it is defined to either @@ -427,16 +427,16 @@ lam_show_title "System-specific tests" # This test should be carried out ONLY if there is a f77 compiler # available. Else we should default to MPI_Fint being an int. # -if test "$LAM_F77" != "none"; then +if test "$OMPI_F77" != "none"; then MPI_FINT_TYPE="not found" AC_MSG_CHECKING([checking for type of MPI_Fint]) - if test "$LAM_SIZEOF_FORTRAN_INT" = 4 ; then + if test "$OMPI_SIZEOF_FORTRAN_INT" = 4 ; then if test "$ac_cv_type_int32_t" = "yes"; then MPI_FINT_TYPE=int32_t elif test "$ac_cv_sizeof_int" = 4 ; then MPI_FINT_TYPE=int fi - elif test "$LAM_SIZEOF_FORTRAN_INT" = 8 ; then + elif test "$OMPI_SIZEOF_FORTRAN_INT" = 8 ; then if test "$ac_cv_type_int64_t" = "yes"; then MPI_FINT_TYPE=int64_t elif test "$ac_cv_type_long_long" = "yes" -a "$ac_cv_sizeof_long_long" = 8; then @@ -507,7 +507,7 @@ AC_DEFINE_UNQUOTED(MPI_Offset, $MPI_OFFSET_TYPE, [Type of MPI_Offset]) # Check out what thread support we have # -LAM_CONFIG_THREADS +OMPI_CONFIG_THREADS CFLAGS="$CFLAGS $THREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $THREAD_CXXFLAGS" CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS" @@ -532,7 +532,7 @@ AC_PROG_LN_S # File system case sensitivity # -LAM_CASE_SENSITIVE_FS_SETUP +OMPI_CASE_SENSITIVE_FS_SETUP # AIX: FIONBIO in sys/ioctl.h # glibc: memcpy @@ -542,29 +542,29 @@ LAM_CASE_SENSITIVE_FS_SETUP # MCA ################################## -lam_show_title "MPI Component Architecture (MCA) setup" +ompi_show_title "MPI Component Architecture (MCA) setup" AC_MSG_CHECKING([for subdir args]) -LAM_CONFIG_SUBDIR_ARGS([lam_subdir_args]) -AC_MSG_RESULT([$lam_subdir_args]) +OMPI_CONFIG_SUBDIR_ARGS([ompi_subdir_args]) +AC_MSG_RESULT([$ompi_subdir_args]) -LAM_MCA +OMPI_MCA ############################################################################ -# Final top-level LAM configuration +# Final top-level OMPI configuration ############################################################################ -lam_show_title "Final top-level LAM configuration" +ompi_show_title "Final top-level OMPI configuration" ############################################################################ # Libevent setup ############################################################################ -lam_show_subtitle "Libevent 3rd party event handler" +ompi_show_subtitle "Libevent 3rd party event handler" CFLAGS_save="$CFLAGS" -CFLAGS="$LAM_CFLAGS_BEFORE_PICKY" -LAM_SETUP_LIBEVENT +CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY" +OMPI_SETUP_LIBEVENT CFLAGS="$CFLAGS_save" @@ -573,7 +573,7 @@ CFLAGS="$CFLAGS_save" # (after C compiler setup) ############################################################################ -lam_show_subtitle "Libtool configuration" +ompi_show_subtitle "Libtool configuration" # Use convenience libltdl for the moment, because we need to force the # use of the newest libltdl (i.e., the one that ships with libtool @@ -590,7 +590,7 @@ AM_PROG_LIBTOOL # passing precious variables down to the sub-configure). # # Note that we also did some magic scripty-foo in autogen.sh to rename -# the output libtool library "liblamltdl", so add -llamltdl here. +# the output libtool library "libompi_ltdl", so add -lompi_ltdl here. # This is because so many systems have older versions of libltdl # installed very early in ld.so's search path; if we installed our own # libltdl in some non-standard path (e.g., $HOME/local or even @@ -598,28 +598,28 @@ AM_PROG_LIBTOOL # it's older -- or just not matching the version that we need, Bad # Things happen. [sigh] # -# Finally, make liblamltdl follow the same shared/static convention -# that was user for the main LAM libraries. So manually examine +# Finally, make libompi_ltdl follow the same shared/static convention +# that was user for the main OMPI libraries. So manually examine # $enable_shared and $enable_static and pass down the corresponding # flags. -lam_show_subtitle "GNU libltdl setup" +ompi_show_subtitle "GNU libltdl setup" -lam_subdir_args="$lam_subdir_args --enable-ltdl-convenience --disable-ltdl-install" +ompi_subdir_args="$ompi_subdir_args --enable-ltdl-convenience --disable-ltdl-install" if test "$enable_shared" = "yes"; then - lam_subdir_args="$lam_subdir_args --enable-shared" + ompi_subdir_args="$ompi_subdir_args --enable-shared" else - lam_subdir_args="$lam_subdir_args --disable-shared" + ompi_subdir_args="$ompi_subdir_args --disable-shared" fi if test "$enable_static" = "yes"; then - lam_subdir_args="$lam_subdir_args --enable-static" + ompi_subdir_args="$ompi_subdir_args --enable-static" else - lam_subdir_args="$lam_subdir_args --disable-static" + ompi_subdir_args="$ompi_subdir_args --disable-static" fi CFLAGS_save="$CFLAGS" -CFLAGS="$LAM_CFLAGS_BEFORE_PICKY" -LAM_CONFIG_SUBDIR(src/libltdl, [$lam_subdir_args], [HAPPY=1], [HAPPY=0]) +CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY" +OMPI_CONFIG_SUBDIR(src/libltdl, [$ompi_subdir_args], [HAPPY=1], [HAPPY=0]) if test "$HAPPY" = "1"; then LIBLTDL_SUBDIR=libltdl LIBLTDL_LTLIB=libltdl/libltdlc.la @@ -629,7 +629,7 @@ if test "$HAPPY" = "1"; then # it. :-( flags="`egrep ^LIBADD_DL src/libltdl/Makefile | cut -d= -f2-`" - LAM_CHECK_LINKER_FLAGS([src/libltdl/libtool], [-export-dynamic $flags]) + OMPI_CHECK_LINKER_FLAGS([src/libltdl/libtool], [-export-dynamic $flags]) WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $extra_ldflags" LDFLAGS="-export-dynamic $LDFLAGS" else @@ -641,7 +641,7 @@ CFLAGS="$CFLAGS_save" AC_SUBST(LIBLTDL_SUBDIR) AC_SUBST(LIBLTDL_LTLIB) AM_CONDITIONAL(WANT_LIBLTDL, test "$WANT_LIBLTDL" = "1") -AC_DEFINE_UNQUOTED(LAM_WANT_LIBLTDL, $WANT_LIBLTDL, +AC_DEFINE_UNQUOTED(OMPI_WANT_LIBLTDL, $WANT_LIBLTDL, [Whether to include support for libltdl or not]) @@ -649,7 +649,7 @@ AC_DEFINE_UNQUOTED(LAM_WANT_LIBLTDL, $WANT_LIBLTDL, # final wrapper compiler config ############################################################################ -lam_show_subtitle "Wrapper compiler flags" +ompi_show_subtitle "Wrapper compiler flags" # # This is needed for VPATH builds, so that it will -I the appropriate @@ -668,7 +668,7 @@ CXXCPPFLAGS='-I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/src' # WRAPPER_EXTRA_CFLAGS # AC_MSG_CHECKING([for mpicc CFLAGS]) -LAM_UNIQ(WRAPPER_EXTRA_CFLAGS) +OMPI_UNIQ(WRAPPER_EXTRA_CFLAGS) AC_SUBST(WRAPPER_EXTRA_CFLAGS) AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS, "$WRAPPER_EXTRA_CFLAGS", [Additional CFLAGS to pass through the wrapper compilers]) @@ -678,7 +678,7 @@ AC_MSG_RESULT([$WRAPPER_EXTRA_CFLAGS]) # WRAPPER_EXTRA_CXXFLAGS # AC_MSG_CHECKING([for mpiCC CXXFLAGS]) -LAM_UNIQ(WRAPPER_EXTRA_CXXFLAGS) +OMPI_UNIQ(WRAPPER_EXTRA_CXXFLAGS) AC_SUBST(WRAPPER_EXTRA_CXXFLAGS) AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS, "$WRAPPER_EXTRA_CXXFLAGS", [Additional CXXFLAGS to pass through the wrapper compilers]) @@ -688,7 +688,7 @@ AC_MSG_RESULT([$WRAPPER_EXTRA_CXXFLAGS]) # WRAPPER_EXTRA_FFLAGS # AC_MSG_CHECKING([for mpif77/mpif90 FFLAGS]) -LAM_UNIQ(WRAPPER_EXTRA_FFLAGS) +OMPI_UNIQ(WRAPPER_EXTRA_FFLAGS) AC_SUBST(WRAPPER_EXTRA_FFLAGS) AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS, "$WRAPPER_EXTRA_FFLAGS", [Additional FFLAGS to pass through the wrapper compilers]) @@ -698,7 +698,7 @@ AC_MSG_RESULT([$WRAPPER_EXTRA_FFLAGS]) # WRAPPER_EXTRA_FCFLAGS # AC_MSG_CHECKING([for mpif77/mpif90 FCFLAGS]) -LAM_UNIQ(WRAPPER_EXTRA_FCFLAGS) +OMPI_UNIQ(WRAPPER_EXTRA_FCFLAGS) AC_SUBST(WRAPPER_EXTRA_FCFLAGS) AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FCFLAGS, "$WRAPPER_EXTRA_FCFLAGS", [Additional FCFLAGS to pass through the wrapper compilers]) @@ -708,7 +708,7 @@ AC_MSG_RESULT([$WRAPPER_EXTRA_FCFLAGS]) # WRAPPER_EXTRA_LDFLAGS # AC_MSG_CHECKING([for wrapper compiler LDFLAGS]) -LAM_UNIQ(WRAPPER_EXTRA_LDFLAGS) +OMPI_UNIQ(WRAPPER_EXTRA_LDFLAGS) AC_SUBST(WRAPPER_EXTRA_LDFLAGS) AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LDFLAGS, "$WRAPPER_EXTRA_LDFLAGS", [Additional LDFLAGS to pass through the wrapper compilers]) @@ -740,9 +740,9 @@ AC_SUBST(FCFLAGS) # Party on ############################################################################ -lam_show_subtitle "Final output" +ompi_show_subtitle "Final output" -AM_CONFIG_HEADER([include/lam_config.h]) +AM_CONFIG_HEADER([include/ompi_config.h]) AC_CONFIG_FILES([ Makefile @@ -755,7 +755,7 @@ AC_CONFIG_FILES([ src/include/Makefile src/ctnetwork/Makefile - src/lfc/Makefile + src/class/Makefile src/mem/Makefile src/os/Makefile src/os/cygwin/Makefile @@ -824,7 +824,7 @@ AC_CONFIG_FILES([ src/mpi/f90/Makefile src/tools/Makefile - src/tools/laminfo/Makefile + src/tools/ompi_info/Makefile src/tools/mpirun/Makefile src/tools/wrappers/Makefile @@ -833,7 +833,7 @@ AC_CONFIG_FILES([ test/Makefile test/support/Makefile - test/lfc/Makefile + test/class/Makefile test/threads/Makefile test/util/Makefile test/rte/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index 43b4bb6f9e..0af21110ba 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -6,20 +6,20 @@ include $(top_srcdir)/config/Makefile.options include_HEADERS = \ - lam_config.h \ - lam_config_bottom.h \ + ompi_config.h \ + ompi_config_bottom.h \ mpi.h \ mpif.h -# Add a hook to run *after* the file lam_config.h has been installed +# Add a hook to run *after* the file ompi_config.h has been installed # out to the target location. It changes the pesky PACKAGE_* macros # that autoconf automatically generates (and there is no way of -# turning off) into LAM_MPI_PACKAGE_* in order to make safe to +# turning off) into OMPI_MPI_PACKAGE_* in order to make safe to # include with other files. install-data-hook: - sed -e 's/define PACKAGE/define LAM_MPI_PACKAGE/' \ - $(DESTDIR)$(includedir)/lam_config.h \ - > $(DESTDIR)$(includedir)/lam_config.h.install - mv $(DESTDIR)$(includedir)/lam_config.h.install \ - $(DESTDIR)$(includedir)/lam_config.h + sed -e 's/define PACKAGE/define OMPI_MPI_PACKAGE/' \ + $(DESTDIR)$(includedir)/ompi_config.h \ + > $(DESTDIR)$(includedir)/ompi_config.h.install + mv $(DESTDIR)$(includedir)/ompi_config.h.install \ + $(DESTDIR)$(includedir)/ompi_config.h diff --git a/include/lam_config_bottom.h b/include/lam_config_bottom.h index 397d667863..996d545239 100644 --- a/include/lam_config_bottom.h +++ b/include/lam_config_bottom.h @@ -1,12 +1,12 @@ /* * $HEADER$ * - * This file is included at the bottom of lam_config.h, and is + * This file is included at the bottom of ompi_config.h, and is * therefore a) after all the #define's that were output from - * configure, and b) included in most/all files in LAM/MPI. + * configure, and b) included in most/all files in OMPI/MPI. * - * Since this file is *only* ever included by lam_config.h, and - * lam_config.h already has #ifndef/#endif protection, there is no + * Since this file is *only* ever included by ompi_config.h, and + * ompi_config.h already has #ifndef/#endif protection, there is no * need to #ifndef/#endif protection here. */ @@ -27,20 +27,20 @@ typedef enum { false, true } bool; */ #include #if defined(PATH_MAX) -#define LAM_PATH_MAX (PATH_MAX + 1) +#define OMPI_PATH_MAX (PATH_MAX + 1) #elif defined(_POSIX_PATH_MAX) -#define LAM_PATH_MAX (_POSIX_PATH_MAX + 1) +#define OMPI_PATH_MAX (_POSIX_PATH_MAX + 1) #else -#define LAM_PATH_MAX 256 +#define OMPI_PATH_MAX 256 #endif /* * Do we have thread support? */ -#define LAM_HAVE_THREADS (LAM_HAVE_SOLARIS_THREADS || LAM_HAVE_POSIX_THREADS) +#define OMPI_HAVE_THREADS (OMPI_HAVE_SOLARIS_THREADS || OMPI_HAVE_POSIX_THREADS) /* parameter indicating if to check MPI arguments */ -extern bool lam_mpi_param_check; +extern bool ompi_mpi_param_check; /* * Do we have ? @@ -48,30 +48,30 @@ extern bool lam_mpi_param_check; #if HAVE_STDINT_H #include #else -#include "lam_stdint.h" +#include "ompi_stdint.h" #endif /* * Do we want memory debugging? */ -#if LAM_ENABLE_MEM_DEBUG && defined(LAM_BUILDING) && LAM_BUILDING +#if OMPI_ENABLE_MEM_DEBUG && defined(OMPI_BUILDING) && OMPI_BUILDING /* It is safe to include mem/malloc.h here because a) it will only - happen when we are building LAM and therefore have a full LAM + happen when we are building OMPI and therefore have a full OMPI source tree [including headers] available, and b) we guaranteed to *not* to include anything else via mem/malloc.h, so we won't have Cascading Includes Of Death. */ #include "mem/malloc.h" -#define malloc(size) lam_malloc((size), __FILE__, __LINE__) -#define realloc(ptr, size) lam_realloc((ptr), (size), __FILE__, __LINE__) -#define free(ptr) lam_free((ptr), __FILE__, __LINE__) +#define malloc(size) ompi_malloc((size), __FILE__, __LINE__) +#define realloc(ptr, size) ompi_realloc((ptr), (size), __FILE__, __LINE__) +#define free(ptr) ompi_free((ptr), __FILE__, __LINE__) #endif /* * Do we want to override debugging controls? */ -#if defined(LAM_ENABLE_DEBUG_OVERRIDE) && LAM_ENABLE_DEBUG_OVERRIDE -#undef LAM_ENABLE_DEBUG -#define LAM_ENABLE_DEBUG 1 +#if defined(OMPI_ENABLE_DEBUG_OVERRIDE) && OMPI_ENABLE_DEBUG_OVERRIDE +#undef OMPI_ENABLE_DEBUG +#define OMPI_ENABLE_DEBUG 1 #endif diff --git a/include/lam_stdint.h b/include/lam_stdint.h index 521f0767eb..a58c1873e6 100644 --- a/include/lam_stdint.h +++ b/include/lam_stdint.h @@ -6,10 +6,10 @@ * gathered by configure. */ -#ifndef LAM_STDINT_H -#define LAM_STDINT_H 1 +#ifndef OMPI_STDINT_H +#define OMPI_STDINT_H 1 -#include "lam_config.h" +#include "ompi_config.h" #ifdef HAVE_STDINT_H @@ -170,5 +170,5 @@ typedef unsigned long long uintptr_t; #endif /* HAVE_STDINT_H */ -#endif /* LAM_STDINT_H */ +#endif /* OMPI_STDINT_H */ diff --git a/include/mpi.h b/include/mpi.h index 4dc256dc1d..abd9582365 100644 --- a/include/mpi.h +++ b/include/mpi.h @@ -2,15 +2,15 @@ * $HEADER$ */ -#ifndef LAM_MPI_H -#define LAM_MPI_H +#ifndef OMPI_MPI_H +#define OMPI_MPI_H -#include "lam_config.h" +#include "ompi_config.h" /* * Just in case you need it. :-) */ -#define LAM_MPI 1 +#define OMPI_MPI 1 /* * MPI version @@ -22,27 +22,27 @@ * Typedefs */ typedef long MPI_Aint; -typedef struct lam_communicator_t *MPI_Comm; -typedef struct lam_datatype_t *MPI_Datatype; -typedef struct lam_errhandler_t *MPI_Errhandler; -typedef struct lam_file_t *MPI_File; -typedef struct lam_group_t *MPI_Group; -typedef struct lam_info_t *MPI_Info; -typedef struct lam_op_t *MPI_Op; -typedef struct lam_request_t *MPI_Request; -typedef struct lam_status_public_t MPI_Status; -typedef struct lam_win_t *MPI_Win; +typedef struct ompi_communicator_t *MPI_Comm; +typedef struct ompi_datatype_t *MPI_Datatype; +typedef struct ompi_errhandler_t *MPI_Errhandler; +typedef struct ompi_file_t *MPI_File; +typedef struct ompi_group_t *MPI_Group; +typedef struct ompi_info_t *MPI_Info; +typedef struct ompi_op_t *MPI_Op; +typedef struct ompi_request_t *MPI_Request; +typedef struct ompi_status_public_t MPI_Status; +typedef struct ompi_win_t *MPI_Win; /* * MPI_Status */ -struct lam_status_public_t { +struct ompi_status_public_t { int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; int _count; }; -typedef struct lam_status_public_t lam_status_public_t; +typedef struct ompi_status_public_t ompi_status_public_t; /* * User typedefs @@ -148,18 +148,18 @@ enum { IMPI_HOST_COLOR, /* - * Predefined attribute keyvals, but LAM-specific + * Predefined attribute keyvals, but OMPI-specific */ - LAM_UNIVERSE_NCPUS, - LAM_UNIVERSE_NNODES, + OMPI_UNIVERSE_NCPUS, + OMPI_UNIVERSE_NNODES, /* - * Predefined attribute keyvals, but LAM/MPI-specific + * Predefined attribute keyvals, but OMPI/MPI-specific */ - LAM_MPI_SSI_COLL, - LAM_MPI_SSI_COLL_CROSSOVER, - LAM_MPI_SSI_COLL_ASSOCIATIVE, - LAM_MPI_SSI_COLL_REDUCE_CROSSOVER + OMPI_MPI_SSI_COLL, + OMPI_MPI_SSI_COLL_CROSSOVER, + OMPI_MPI_SSI_COLL_ASSOCIATIVE, + OMPI_MPI_SSI_COLL_REDUCE_CROSSOVER }; /* @@ -181,7 +181,7 @@ enum { MPI_ERR_ARG, /* invalid argument */ MPI_ERR_UNKNOWN, /* unknown error */ MPI_ERR_TRUNCATE, /* message truncated on receive */ - MPI_ERR_OTHER, /* LAM error */ + MPI_ERR_OTHER, /* OMPI error */ MPI_ERR_INTERN, /* internal MPI error */ MPI_ERR_IN_STATUS, /* error code is in status */ MPI_ERR_PENDING, /* pending request */ @@ -254,12 +254,12 @@ enum { /* * NULL handles */ -#define MPI_GROUP_NULL (&lam_mpi_group_null) -#define MPI_COMM_NULL (&lam_mpi_comm_null) +#define MPI_GROUP_NULL (&ompi_mpi_group_null) +#define MPI_COMM_NULL (&ompi_mpi_comm_null) #define MPI_DATATYPE_NULL ((MPI_Datatype) 0) #define MPI_REQUEST_NULL ((MPI_Request) 0) -#define MPI_OP_NULL (&lam_mpi_op_null) -#define MPI_ERRHANDLER_NULL (&lam_mpi_errhandler_null) +#define MPI_OP_NULL (&ompi_mpi_op_null) +#define MPI_ERRHANDLER_NULL (&ompi_mpi_errhandler_null) #define MPI_INFO_NULL ((MPI_Info) 0) #define MPI_WIN_NULL ((MPI_Win) 0) #define MPI_FILE_NULL ((MPI_File) 0) @@ -279,50 +279,50 @@ enum { /* * External variables */ -extern struct lam_communicator_t lam_mpi_comm_world; -extern struct lam_communicator_t lam_mpi_comm_self; -extern struct lam_communicator_t lam_mpi_comm_null; +extern struct ompi_communicator_t ompi_mpi_comm_world; +extern struct ompi_communicator_t ompi_mpi_comm_self; +extern struct ompi_communicator_t ompi_mpi_comm_null; -extern struct lam_group_t lam_mpi_group_empty; -extern struct lam_group_t lam_mpi_group_null; +extern struct ompi_group_t ompi_mpi_group_empty; +extern struct ompi_group_t ompi_mpi_group_null; -extern struct lam_op_t lam_mpi_op_null; -extern struct lam_op_t lam_mpi_op_max, lam_mpi_op_min; -extern struct lam_op_t lam_mpi_op_sum, lam_mpi_op_prod; -extern struct lam_op_t lam_mpi_op_land, lam_mpi_op_band; -extern struct lam_op_t lam_mpi_op_lor, lam_mpi_op_bor; -extern struct lam_op_t lam_mpi_op_lxor, lam_mpi_op_bxor; -extern struct lam_op_t lam_mpi_op_maxloc, lam_mpi_op_minloc; -extern struct lam_op_t lam_mpi_op_replace; +extern struct ompi_op_t ompi_mpi_op_null; +extern struct ompi_op_t ompi_mpi_op_max, ompi_mpi_op_min; +extern struct ompi_op_t ompi_mpi_op_sum, ompi_mpi_op_prod; +extern struct ompi_op_t ompi_mpi_op_land, ompi_mpi_op_band; +extern struct ompi_op_t ompi_mpi_op_lor, ompi_mpi_op_bor; +extern struct ompi_op_t ompi_mpi_op_lxor, ompi_mpi_op_bxor; +extern struct ompi_op_t ompi_mpi_op_maxloc, ompi_mpi_op_minloc; +extern struct ompi_op_t ompi_mpi_op_replace; -extern struct lam_datatype_t *lam_mpi_char, *lam_mpi_byte; -extern struct lam_datatype_t *lam_mpi_int, *lam_mpi_logic; -extern struct lam_datatype_t *lam_mpi_short, *lam_mpi_long; -extern struct lam_datatype_t *lam_mpi_float, *lam_mpi_double; -extern struct lam_datatype_t *lam_mpi_long_double; -extern struct lam_datatype_t *lam_mpi_cplex, *lam_mpi_packed; -extern struct lam_datatype_t *lam_mpi_unsigned_char; -extern struct lam_datatype_t *lam_mpi_unsigned_short; -extern struct lam_datatype_t *lam_mpi_unsigned; -extern struct lam_datatype_t *lam_mpi_unsigned_long; -extern struct lam_datatype_t *lam_mpi_ub, *lam_mpi_lb; -extern struct lam_datatype_t *lam_mpi_float_int, *lam_mpi_double_int; -extern struct lam_datatype_t *lam_mpi_long_int, *lam_mpi_2int; -extern struct lam_datatype_t *lam_mpi_short_int, *lam_mpi_dblcplex; -extern struct lam_datatype_t *lam_mpi_integer, *lam_mpi_real; -extern struct lam_datatype_t *lam_mpi_dblprec, *lam_mpi_character; -extern struct lam_datatype_t *lam_mpi_2real, *lam_mpi_2dblprec; -extern struct lam_datatype_t *lam_mpi_2integer, *lam_mpi_longdbl_int; -extern struct lam_datatype_t *lam_mpi_wchar, *lam_mpi_long_long_int; -extern struct lam_datatype_t *lam_mpi_long_long, *lam_mpi_unsigned_long_long; -extern struct lam_datatype_t *lam_mpi_cxx_cplex, *lam_mpi_cxx_dblcplex; -extern struct lam_datatype_t *lam_mpi_cxx_ldblcplex; -extern struct lam_datatype_t *lam_mpi_cxx_bool; -extern struct lam_datatype_t *lam_mpi_2cplex, *lam_mpi_2dblcplex; +extern struct ompi_datatype_t *ompi_mpi_char, *ompi_mpi_byte; +extern struct ompi_datatype_t *ompi_mpi_int, *ompi_mpi_logic; +extern struct ompi_datatype_t *ompi_mpi_short, *ompi_mpi_long; +extern struct ompi_datatype_t *ompi_mpi_float, *ompi_mpi_double; +extern struct ompi_datatype_t *ompi_mpi_long_double; +extern struct ompi_datatype_t *ompi_mpi_cplex, *ompi_mpi_packed; +extern struct ompi_datatype_t *ompi_mpi_unsigned_char; +extern struct ompi_datatype_t *ompi_mpi_unsigned_short; +extern struct ompi_datatype_t *ompi_mpi_unsigned; +extern struct ompi_datatype_t *ompi_mpi_unsigned_long; +extern struct ompi_datatype_t *ompi_mpi_ub, *ompi_mpi_lb; +extern struct ompi_datatype_t *ompi_mpi_float_int, *ompi_mpi_double_int; +extern struct ompi_datatype_t *ompi_mpi_long_int, *ompi_mpi_2int; +extern struct ompi_datatype_t *ompi_mpi_short_int, *ompi_mpi_dblcplex; +extern struct ompi_datatype_t *ompi_mpi_integer, *ompi_mpi_real; +extern struct ompi_datatype_t *ompi_mpi_dblprec, *ompi_mpi_character; +extern struct ompi_datatype_t *ompi_mpi_2real, *ompi_mpi_2dblprec; +extern struct ompi_datatype_t *ompi_mpi_2integer, *ompi_mpi_longdbl_int; +extern struct ompi_datatype_t *ompi_mpi_wchar, *ompi_mpi_long_long_int; +extern struct ompi_datatype_t *ompi_mpi_long_long, *ompi_mpi_unsigned_long_long; +extern struct ompi_datatype_t *ompi_mpi_cxx_cplex, *ompi_mpi_cxx_dblcplex; +extern struct ompi_datatype_t *ompi_mpi_cxx_ldblcplex; +extern struct ompi_datatype_t *ompi_mpi_cxx_bool; +extern struct ompi_datatype_t *ompi_mpi_2cplex, *ompi_mpi_2dblcplex; -extern struct lam_errhandler_t lam_mpi_errhandler_null; -extern struct lam_errhandler_t lam_mpi_errors_are_fatal; -extern struct lam_errhandler_t lam_mpi_errors_return; +extern struct ompi_errhandler_t ompi_mpi_errhandler_null; +extern struct ompi_errhandler_t ompi_mpi_errors_are_fatal; +extern struct ompi_errhandler_t ompi_mpi_errors_return; extern MPI_Fint *MPI_F_STATUS_IGNORE; extern MPI_Fint *MPI_F_STATUSES_IGNORE; @@ -330,55 +330,55 @@ extern MPI_Fint *MPI_F_STATUSES_IGNORE; /* * MPI predefined handles */ -#define MPI_COMM_WORLD (&lam_mpi_comm_world) -#define MPI_COMM_SELF (&lam_mpi_comm_self) +#define MPI_COMM_WORLD (&ompi_mpi_comm_world) +#define MPI_COMM_SELF (&ompi_mpi_comm_self) -#define MPI_GROUP_EMPTY (&lam_mpi_group_empty) +#define MPI_GROUP_EMPTY (&ompi_mpi_group_empty) -#define MPI_MAX (&lam_mpi_op_max) -#define MPI_MIN (&lam_mpi_op_min) -#define MPI_SUM (&lam_mpi_op_sum) -#define MPI_PROD (&lam_mpi_op_prod) -#define MPI_LAND (&lam_mpi_op_land) -#define MPI_BAND (&lam_mpi_op_band) -#define MPI_LOR (&lam_mpi_op_lor) -#define MPI_BOR (&lam_mpi_op_bor) -#define MPI_LXOR (&lam_mpi_op_lxor) -#define MPI_BXOR (&lam_mpi_op_bxor) -#define MPI_MAXLOC (&lam_mpi_op_maxloc) -#define MPI_MINLOC (&lam_mpi_op_minloc) -#define MPI_REPLACE (&lam_mpi_op_replace) +#define MPI_MAX (&ompi_mpi_op_max) +#define MPI_MIN (&ompi_mpi_op_min) +#define MPI_SUM (&ompi_mpi_op_sum) +#define MPI_PROD (&ompi_mpi_op_prod) +#define MPI_LAND (&ompi_mpi_op_land) +#define MPI_BAND (&ompi_mpi_op_band) +#define MPI_LOR (&ompi_mpi_op_lor) +#define MPI_BOR (&ompi_mpi_op_bor) +#define MPI_LXOR (&ompi_mpi_op_lxor) +#define MPI_BXOR (&ompi_mpi_op_bxor) +#define MPI_MAXLOC (&ompi_mpi_op_maxloc) +#define MPI_MINLOC (&ompi_mpi_op_minloc) +#define MPI_REPLACE (&ompi_mpi_op_replace) -#define MPI_BYTE (lam_mpi_byte) -#define MPI_PACKED (lam_mpi_packed) -#define MPI_CHAR (lam_mpi_char) -#define MPI_SHORT (lam_mpi_short) -#define MPI_INT (lam_mpi_int) -#define MPI_LONG (lam_mpi_long) -#define MPI_FLOAT (lam_mpi_float) -#define MPI_DOUBLE (lam_mpi_double) -#define MPI_LONG_DOUBLE (lam_mpi_long_double) -#define MPI_UNSIGNED_CHAR (lam_mpi_unsigned_char) -#define MPI_UNSIGNED_SHORT (lam_mpi_unsigned_short) -#define MPI_UNSIGNED_LONG (lam_mpi_unsigned_long) -#define MPI_UNSIGNED (lam_mpi_unsigned) -#define MPI_FLOAT_INT (lam_mpi_float_int) -#define MPI_DOUBLE_INT (lam_mpi_double_int) -#define MPI_LONG_DOUBLE_INT (lam_mpi_longdbl_int) -#define MPI_LONG_INT (lam_mpi_long_int) -#define MPI_SHORT_INT (lam_mpi_short_int) -#define MPI_2INT (lam_mpi_2int) -#define MPI_UB (lam_mpi_ub) -#define MPI_LB (lam_mpi_lb) -#define MPI_WCHAR (lam_mpi_wchar) +#define MPI_BYTE (ompi_mpi_byte) +#define MPI_PACKED (ompi_mpi_packed) +#define MPI_CHAR (ompi_mpi_char) +#define MPI_SHORT (ompi_mpi_short) +#define MPI_INT (ompi_mpi_int) +#define MPI_LONG (ompi_mpi_long) +#define MPI_FLOAT (ompi_mpi_float) +#define MPI_DOUBLE (ompi_mpi_double) +#define MPI_LONG_DOUBLE (ompi_mpi_long_double) +#define MPI_UNSIGNED_CHAR (ompi_mpi_unsigned_char) +#define MPI_UNSIGNED_SHORT (ompi_mpi_unsigned_short) +#define MPI_UNSIGNED_LONG (ompi_mpi_unsigned_long) +#define MPI_UNSIGNED (ompi_mpi_unsigned) +#define MPI_FLOAT_INT (ompi_mpi_float_int) +#define MPI_DOUBLE_INT (ompi_mpi_double_int) +#define MPI_LONG_DOUBLE_INT (ompi_mpi_longdbl_int) +#define MPI_LONG_INT (ompi_mpi_long_int) +#define MPI_SHORT_INT (ompi_mpi_short_int) +#define MPI_2INT (ompi_mpi_2int) +#define MPI_UB (ompi_mpi_ub) +#define MPI_LB (ompi_mpi_lb) +#define MPI_WCHAR (ompi_mpi_wchar) #if HAVE_LONG_LONG -#define MPI_LONG_LONG_INT (lam_mpi_long_long_int) -#define MPI_LONG_LONG (lam_mpi_long_long) -#define MPI_UNSIGNED_LONG_LONG (lam_mpi_unsigned_long_long) +#define MPI_LONG_LONG_INT (ompi_mpi_long_long_int) +#define MPI_LONG_LONG (ompi_mpi_long_long) +#define MPI_UNSIGNED_LONG_LONG (ompi_mpi_unsigned_long_long) #endif /* HAVE_LONG_LONG */ -#define MPI_ERRORS_ARE_FATAL (&lam_mpi_errors_are_fatal) -#define MPI_ERRORS_RETURN (&lam_mpi_errors_return) +#define MPI_ERRORS_ARE_FATAL (&ompi_mpi_errors_are_fatal) +#define MPI_ERRORS_RETURN (&ompi_mpi_errors_return) #if defined(c_plusplus) || defined(__cplusplus) @@ -1413,4 +1413,4 @@ extern "C" { } #endif -#endif /* LAM_MPI_H */ +#endif /* OMPI_MPI_H */ diff --git a/include/mpif.h.in b/include/mpif.h.in index d3c4723119..be0a2022b4 100644 --- a/include/mpif.h.in +++ b/include/mpif.h.in @@ -12,22 +12,22 @@ ! tells the compiler where to find .h files (specifically, this one). For ! example: ! -! shell$ mpif77 foo.f -o foo -I$LAMHOME/include +! shell$ mpif77 foo.f -o foo -I$OMPI_HOME/include ! -! will probably do the trick (assuming that you have set LAMHOME +! will probably do the trick (assuming that you have set OMPI_HOME ! properly). ! -! That being said, LAM's "mpif77" wrapper compiler should +! That being said, OMPI's "mpif77" wrapper compiler should ! automatically include the -I option for you. The following command ! should be equivalent to the command listed above: ! ! shell$ mpif77 foo.f -o foo ! ! You should not copy this file to your local directory because it is -! possible that this file will be changed between versions of LAM/MPI. +! possible that this file will be changed between versions of OMPI/MPI. ! Indeed, this mpif.h is incompatible with the mpif.f of other ! implementations of MPI. Using this mpif.h with other implementations -! of MPI, or with other versions of LAM/MPI will result in undefined +! of MPI, or with other versions of OMPI/MPI will result in undefined ! behavior (to include incorrect results, segmentation faults, ! unexplainable "hanging" in your application, etc.). Always use the ! -I command line option instead (or let mpif77 do it for you). @@ -37,19 +37,19 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! -! LAM version +! OMPI version ! This file is generated from configure; do not edit it manually. ! - integer LAM_MAJOR_VERSION, LAM_MINOR_VERSION - integer LAM_RELEASE_VERSION - integer LAM_ALPHA_VERSION, LAM_BETA_VERSION - integer LAM_SVN_VERSION - parameter (LAM_MAJOR_VERSION=@LAM_MAJOR_VERSION@) - parameter (LAM_MINOR_VERSION=@LAM_MINOR_VERSION@) - parameter (LAM_RELEASE_VERSION=@LAM_RELEASE_VERSION@) - parameter (LAM_ALPHA_VERSION=@LAM_ALPHA_VERSION@) - parameter (LAM_BETA_VERSION=@LAM_BETA_VERSION@) - parameter (LAM_SVN_VERSION=@LAM_SVN_VERSION@) + integer OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION + integer OMPI_RELEASE_VERSION + integer OMPI_ALPHA_VERSION, OMPI_BETA_VERSION + integer OMPI_SVN_VERSION + parameter (OMPI_MAJOR_VERSION=@OMPI_MAJOR_VERSION@) + parameter (OMPI_MINOR_VERSION=@OMPI_MINOR_VERSION@) + parameter (OMPI_RELEASE_VERSION=@OMPI_RELEASE_VERSION@) + parameter (OMPI_ALPHA_VERSION=@OMPI_ALPHA_VERSION@) + parameter (OMPI_BETA_VERSION=@OMPI_BETA_VERSION@) + parameter (OMPI_SVN_VERSION=@OMPI_SVN_VERSION@) ! ! MPI version ! @@ -240,12 +240,12 @@ parameter (MPI_INTEGER1=12) parameter (MPI_INTEGER2=13) parameter (MPI_INTEGER4=14) - parameter (MPI_INTEGER8=@LAM_INDEXOF_FORTRAN_INTEGER8@) + parameter (MPI_INTEGER8=@OMPI_INDEXOF_FORTRAN_INTEGER8@) parameter (MPI_REAL=16) parameter (MPI_REAL2=17) parameter (MPI_REAL4=18) parameter (MPI_REAL8=19) - parameter (MPI_REAL16=@LAM_INDEXOF_FORTRAN_REAL16@) + parameter (MPI_REAL16=@OMPI_INDEXOF_FORTRAN_REAL16@) parameter (MPI_DOUBLE_PRECISION=21) parameter (MPI_COMPLEX=22) parameter (MPI_DOUBLE_COMPLEX=23) diff --git a/src/Makefile.am b/src/Makefile.am index fed33ae8a4..cf1b29cac6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,7 +17,7 @@ SUBDIRS = \ file \ group \ info \ - lfc \ + class \ mca \ mem \ mpi \ @@ -44,7 +44,7 @@ libmpi_la_LIBADD = \ event/libevent.la \ group/libgroup.la \ info/libinfo.la \ - lfc/liblfc.la \ + class/liblfc.la \ mca/libmca.la \ mem/libmem.la \ mpi/libmpi_bindings.la \ diff --git a/src/attribute/Makefile.am b/src/attribute/Makefile.am index 891eaf9b64..e2f8d31952 100644 --- a/src/attribute/Makefile.am +++ b/src/attribute/Makefile.am @@ -19,8 +19,8 @@ libattribute_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/attribute -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/attribute +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/attribute/attribute.c b/src/attribute/attribute.c index 8f7f29b463..4eb890d704 100644 --- a/src/attribute/attribute.c +++ b/src/attribute/attribute.c @@ -17,9 +17,9 @@ #define MPI_DATATYPE_NULL_COPY_FN MPI_TYPE_NULL_COPY_FN -#define CREATE_KEY() lam_bitmap_find_and_set_first_unset_bit(key_bitmap) +#define CREATE_KEY() ompi_bitmap_find_and_set_first_unset_bit(key_bitmap) -#define FREE_KEY(key) lam_bitmap_clear_bit(key_bitmap, (key)) +#define FREE_KEY(key) ompi_bitmap_clear_bit(key_bitmap, (key)) /* Not checking for NULL_DELETE_FN here, since according to the @@ -28,7 +28,7 @@ #define DELETE_ATTR_OBJECT(type, attribute) \ if ((err = (*((key_item->delete_attr_fn).attr_##type##_delete_fn)) \ - ((lam_##type##_t *)object, \ + ((ompi_##type##_t *)object, \ key, attribute, \ key_item->extra_state)) != MPI_SUCCESS) {\ return err;\ @@ -36,7 +36,7 @@ #define COPY_ATTR_OBJECT(type, old_object, hash_value) \ if ((err = (*((hash_value->copy_attr_fn).attr_##type##_copy_fn)) \ - ((lam_##type##_t *)old_object, key, hash_value->extra_state, \ + ((ompi_##type##_t *)old_object, key, hash_value->extra_state, \ old_attr, &new_attr, &flag)) != MPI_SUCCESS) { \ return err; \ } @@ -45,74 +45,74 @@ /* * Static */ -static void lam_attribute_construct(lam_attrkey_t *attribute); -static void lam_attribute_destruct(lam_attrkey_t *attribute); -static void lam_attrkey_item_construct(lam_attrkey_item_t *item); -static void lam_attrkey_item_destruct(lam_attrkey_item_t *item); +static void ompi_attribute_construct(ompi_attrkey_t *attribute); +static void ompi_attribute_destruct(ompi_attrkey_t *attribute); +static void ompi_attrkey_item_construct(ompi_attrkey_item_t *item); +static void ompi_attrkey_item_destruct(ompi_attrkey_item_t *item); /* - * lam_attrkey_t classes + * ompi_attrkey_t classes */ -OBJ_CLASS_INSTANCE(lam_attrkey_t, - lam_list_t, - lam_attribute_construct, - lam_attribute_destruct); +OBJ_CLASS_INSTANCE(ompi_attrkey_t, + ompi_list_t, + ompi_attribute_construct, + ompi_attribute_destruct); /* - * lam_attribute_entry_t classes + * ompi_attribute_entry_t classes */ -OBJ_CLASS_INSTANCE(lam_attrkey_item_t, - lam_object_t, - lam_attrkey_item_construct, - lam_attrkey_item_destruct); +OBJ_CLASS_INSTANCE(ompi_attrkey_item_t, + ompi_object_t, + ompi_attrkey_item_construct, + ompi_attrkey_item_destruct); /* * Static variables */ -static lam_attrkey_t *attr_hash; -static lam_bitmap_t *key_bitmap; +static ompi_attrkey_t *attr_hash; +static ompi_bitmap_t *key_bitmap; /* - * lam_attrkey_t interface functions + * ompi_attrkey_t interface functions */ static void -lam_attribute_construct(lam_attrkey_t *attribute) +ompi_attribute_construct(ompi_attrkey_t *attribute) { attribute->a_fhandle = -1; - OBJ_CONSTRUCT(&(attribute->super), lam_hash_table_t); + OBJ_CONSTRUCT(&(attribute->super), ompi_hash_table_t); } static void -lam_attribute_destruct(lam_attrkey_t *attribute) +ompi_attribute_destruct(ompi_attrkey_t *attribute) { OBJ_DESTRUCT(&(attribute->super)); } /* - * lam_attrkey_item_t interface functions + * ompi_attrkey_item_t interface functions */ static void -lam_attrkey_item_construct(lam_attrkey_item_t *item) +ompi_attrkey_item_construct(ompi_attrkey_item_t *item) { memset(&(item->attr_type), 0, - sizeof(lam_attrkey_item_t) - sizeof(lam_object_t)); + sizeof(ompi_attrkey_item_t) - sizeof(ompi_object_t)); } static void -lam_attrkey_item_destruct(lam_attrkey_item_t *item) +ompi_attrkey_item_destruct(ompi_attrkey_item_t *item) { /* Remove the key entry from the hash and free the key */ - lam_hash_table_remove_value_uint32(&(attr_hash->super), item->key); + ompi_hash_table_remove_value_uint32(&(attr_hash->super), item->key); FREE_KEY(item->key); } @@ -123,22 +123,22 @@ lam_attrkey_item_destruct(lam_attrkey_item_t *item) */ int -lam_attr_init() +ompi_attr_init() { - attr_hash = OBJ_NEW(lam_attrkey_t); + attr_hash = OBJ_NEW(ompi_attrkey_t); if (NULL == attr_hash) { fprintf(stderr, "Error while creating the main attribute list\n"); return MPI_ERR_SYSRESOURCE; } - key_bitmap = OBJ_NEW(lam_bitmap_t); - if (0 != lam_bitmap_init(key_bitmap, 10)) { + key_bitmap = OBJ_NEW(ompi_bitmap_t); + if (0 != ompi_bitmap_init(key_bitmap, 10)) { return MPI_ERR_SYSRESOURCE; } - if (lam_hash_table_init(&attr_hash->super, - ATTR_TABLE_SIZE) != LAM_SUCCESS) + if (ompi_hash_table_init(&attr_hash->super, + ATTR_TABLE_SIZE) != OMPI_SUCCESS) return MPI_ERR_SYSRESOURCE; - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -147,7 +147,7 @@ lam_attr_init() */ void -lam_attr_destroy() +ompi_attr_destroy() { OBJ_RELEASE(attr_hash); OBJ_RELEASE(key_bitmap); @@ -155,22 +155,22 @@ lam_attr_destroy() int -lam_attr_create_keyval(lam_attribute_type_t type, - lam_attribute_fn_ptr_union_t copy_attr_fn, - lam_attribute_fn_ptr_union_t delete_attr_fn, +ompi_attr_create_keyval(ompi_attribute_type_t type, + ompi_attribute_fn_ptr_union_t copy_attr_fn, + ompi_attribute_fn_ptr_union_t delete_attr_fn, int *key, void *extra_state, int predefined) { - lam_attrkey_item_t *attr; + ompi_attrkey_item_t *attr; int ret; - /* Protect against the user calling lam_attr_destroy and then + /* Protect against the user calling ompi_attr_destroy and then calling any of the functions which use it */ if (NULL == attr_hash) return MPI_ERR_INTERN; /* Allocate space for the list item */ - attr = OBJ_NEW(lam_attrkey_item_t); + attr = OBJ_NEW(ompi_attrkey_item_t); if (NULL == attr) { fprintf(stderr, "Error during new object creation for attribute \n"); return MPI_ERR_SYSRESOURCE; @@ -179,8 +179,8 @@ lam_attr_create_keyval(lam_attribute_type_t type, /* Create a new unique key and fill the hash */ *key = CREATE_KEY(); - ret = lam_hash_table_set_value_uint32(&attr_hash->super, *key, attr); - if (ret != LAM_SUCCESS) + ret = ompi_hash_table_set_value_uint32(&attr_hash->super, *key, attr); + if (ret != OMPI_SUCCESS) return ret; /* Fill in the list item */ @@ -190,7 +190,7 @@ lam_attr_create_keyval(lam_attribute_type_t type, attr->extra_state = extra_state; attr->attr_type = type; attr->key = *key; - attr->attr_flag = (1 == predefined) ? LAM_PREDEFINED : 0; + attr->attr_flag = (1 == predefined) ? OMPI_PREDEFINED : 0; /* Bump up the reference count, since we want the object to be destroyed only when free_keyval is called and not when all @@ -205,22 +205,22 @@ lam_attr_create_keyval(lam_attribute_type_t type, int -lam_attr_free_keyval(lam_attribute_type_t type, int *key, int predefined) +ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, int predefined) { - lam_attrkey_item_t *key_item; + ompi_attrkey_item_t *key_item; - /* Protect against the user calling lam_attr_destroy and then + /* Protect against the user calling ompi_attr_destroy and then calling any of the functions which use it */ if (NULL == attr_hash) return MPI_ERR_INTERN; /* Find the key-value pair */ - key_item = (lam_attrkey_item_t*) - lam_hash_table_get_value_uint32(&attr_hash->super, *key); + key_item = (ompi_attrkey_item_t*) + ompi_hash_table_get_value_uint32(&attr_hash->super, *key); if ((NULL == key_item) || (key_item->attr_type != type) || - ((!predefined) && (key_item->attr_flag & LAM_PREDEFINED))) + ((!predefined) && (key_item->attr_flag & OMPI_PREDEFINED))) return MPI_INVALID_ATTR_KEYVAL; /* Not releasing the object here, it will be done in MPI_*_attr_delete */ @@ -238,32 +238,32 @@ lam_attr_free_keyval(lam_attribute_type_t type, int *key, int predefined) int -lam_attr_delete(lam_attribute_type_t type, void *object, - lam_hash_table_t *keyhash, int key, +ompi_attr_delete(ompi_attribute_type_t type, void *object, + ompi_hash_table_t *keyhash, int key, int predefined) { - lam_attrkey_item_t *key_item; + ompi_attrkey_item_t *key_item; int ret, err; void *attr; - /* Protect against the user calling lam_attr_destroy and then + /* Protect against the user calling ompi_attr_destroy and then calling any of the functions which use it */ if (NULL == attr_hash) return MPI_ERR_INTERN; /* Check if the key is valid in the key-attribute hash */ - key_item = (lam_attrkey_item_t*) - lam_hash_table_get_value_uint32(&attr_hash->super, key); + key_item = (ompi_attrkey_item_t*) + ompi_hash_table_get_value_uint32(&attr_hash->super, key); if ((NULL == key_item) || (key_item->attr_type!= type) || - ((!predefined) && (key_item->attr_flag & LAM_PREDEFINED))) + ((!predefined) && (key_item->attr_flag & OMPI_PREDEFINED))) return MPI_INVALID_ATTR_KEYVAL; /* Check if the key is valid for the communicator/window/dtype. If yes, then delete the attribute and key entry from the CWD hash */ - attr = lam_hash_table_get_value_uint32(keyhash, key); + attr = ompi_hash_table_get_value_uint32(keyhash, key); switch(type) { @@ -281,13 +281,13 @@ lam_attr_delete(lam_attribute_type_t type, void *object, break; default: - fprintf(stderr, "lam_attribute: lam_attr_seet: Invalid type -- " + fprintf(stderr, "ompi_attribute: ompi_attr_seet: Invalid type -- " " Should be one of COMM/WIN/TYPE \n"); assert(0); } - ret = lam_hash_table_remove_value_uint32(keyhash, key); - if (ret != LAM_SUCCESS) { + ret = ompi_hash_table_remove_value_uint32(keyhash, key); + if (ret != OMPI_SUCCESS) { return ret; } @@ -301,34 +301,34 @@ lam_attr_delete(lam_attribute_type_t type, void *object, int -lam_attr_set(lam_attribute_type_t type, void *object, - lam_hash_table_t *keyhash, int key, void *attribute, +ompi_attr_set(ompi_attribute_type_t type, void *object, + ompi_hash_table_t *keyhash, int key, void *attribute, int predefined) { - lam_attrkey_item_t *key_item; + ompi_attrkey_item_t *key_item; int ret, err; void *oldattr; int had_old = 0; - /* Protect against the user calling lam_attr_destroy and then + /* Protect against the user calling ompi_attr_destroy and then calling any of the functions which use it */ if (NULL == attr_hash) return MPI_ERR_INTERN; - key_item = (lam_attrkey_item_t *) - lam_hash_table_get_value_uint32(&(attr_hash->super), key); + key_item = (ompi_attrkey_item_t *) + ompi_hash_table_get_value_uint32(&(attr_hash->super), key); /* If key not found */ if ((NULL == key_item) || (key_item->attr_type != type) || - ((!predefined) && (key_item->attr_flag & LAM_PREDEFINED))) { - fprintf(stderr, "lam_attribute: lam_attr_set: key not found \n"); + ((!predefined) && (key_item->attr_flag & OMPI_PREDEFINED))) { + fprintf(stderr, "ompi_attribute: ompi_attr_set: key not found \n"); return MPI_INVALID_ATTR_KEYVAL; } /* Now see if the key is present in the CWD object. If so, delete the old attribute in the key */ - oldattr = lam_hash_table_get_value_uint32(keyhash, key); + oldattr = ompi_hash_table_get_value_uint32(keyhash, key); if (oldattr != NULL) { @@ -347,15 +347,15 @@ lam_attr_set(lam_attribute_type_t type, void *object, break; default: - fprintf(stderr, "lam_attribute: lam_attr_set: Invalid type -- " + fprintf(stderr, "ompi_attribute: ompi_attr_set: Invalid type -- " " Should be one of COMM/WIN/TYPE \n"); assert(0); } had_old = 1; } - ret = lam_hash_table_set_value_uint32(keyhash, key, attribute); - if (ret != LAM_SUCCESS) { + ret = ompi_hash_table_set_value_uint32(keyhash, key, attribute); + if (ret != OMPI_SUCCESS) { return ret; } @@ -370,25 +370,25 @@ lam_attr_set(lam_attribute_type_t type, void *object, int -lam_attr_get(lam_hash_table_t *keyhash, int key, void *attribute, +ompi_attr_get(ompi_hash_table_t *keyhash, int key, void *attribute, int *flag) { void *attr; - lam_attrkey_item_t *key_item; + ompi_attrkey_item_t *key_item; /* According to MPI specs, the call is invalid if key is not present in the main hash at all. If no attribute is associated with the key, then the call is valid and returns FALSE in the flag argument */ - key_item = (lam_attrkey_item_t *) - lam_hash_table_get_value_uint32(&(attr_hash->super), key); + key_item = (ompi_attrkey_item_t *) + ompi_hash_table_get_value_uint32(&(attr_hash->super), key); if (NULL == key_item) { return MPI_KEYVAL_INVALID; } - attr = lam_hash_table_get_value_uint32(keyhash, key); + attr = ompi_hash_table_get_value_uint32(keyhash, key); if (NULL == attr) { *flag = 0; @@ -406,35 +406,35 @@ lam_attr_get(lam_hash_table_t *keyhash, int key, void *attribute, /* There is too much of code copy/paste in here, see if some other logic could work here */ int -lam_attr_copy_all(lam_attribute_type_t type, void *old_object, - void *new_object, lam_hash_table_t *oldkeyhash, - lam_hash_table_t *newkeyhash) +ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, + void *new_object, ompi_hash_table_t *oldkeyhash, + ompi_hash_table_t *newkeyhash) { int ret; int err; uint32_t key; int flag; void *node, *in_node, *old_attr, *new_attr; - lam_attrkey_item_t *hash_value; + ompi_attrkey_item_t *hash_value; - /* Protect against the user calling lam_attr_destroy and then + /* Protect against the user calling ompi_attr_destroy and then calling any of the functions which use it */ if (NULL == attr_hash) return MPI_ERR_INTERN; /* Get the first key-attr in the CWD hash */ - ret = lam_hash_table_get_first_key_uint32(oldkeyhash, &key, &old_attr, + ret = ompi_hash_table_get_first_key_uint32(oldkeyhash, &key, &old_attr, &node); /* While we still have some key-attr pair in the CWD hash */ - while (ret != LAM_ERROR) { + while (ret != OMPI_ERROR) { in_node = node; /* Get the attr_item in the main hash - so that we know what the copy_attr_fn is */ - hash_value = (lam_attrkey_item_t *) - lam_hash_table_get_value_uint32(&(attr_hash->super), key); + hash_value = (ompi_attrkey_item_t *) + ompi_hash_table_get_value_uint32(&(attr_hash->super), key); assert (hash_value != NULL); @@ -472,11 +472,11 @@ lam_attr_copy_all(lam_attribute_type_t type, void *old_object, assuming that new_attr should have actually been a double pointer in the copy fn, but since its a pointer in that MPI specs, we need to pass *new_attr here */ - lam_attr_set(type, new_object, newkeyhash, key, + ompi_attr_set(type, new_object, newkeyhash, key, new_attr, 1); - ret = lam_hash_table_get_next_key_uint32(oldkeyhash, &key, + ret = ompi_hash_table_get_next_key_uint32(oldkeyhash, &key, &old_attr, in_node, &node); } @@ -485,23 +485,23 @@ lam_attr_copy_all(lam_attribute_type_t type, void *old_object, int -lam_attr_delete_all(lam_attribute_type_t type, void *object, - lam_hash_table_t *keyhash) +ompi_attr_delete_all(ompi_attribute_type_t type, void *object, + ompi_hash_table_t *keyhash) { int ret; uint32_t key, oldkey; void *node, *in_node, *old_attr; - /* Protect against the user calling lam_attr_destroy and then + /* Protect against the user calling ompi_attr_destroy and then calling any of the functions which use it */ if (NULL == attr_hash) return MPI_ERR_INTERN; /* Get the first key in local CWD hash */ - ret = lam_hash_table_get_first_key_uint32(keyhash, + ret = ompi_hash_table_get_first_key_uint32(keyhash, &key, &old_attr, &node); - while (ret != LAM_ERROR) { + while (ret != OMPI_ERROR) { /* Save this node info for deletion, before we move onto the next node */ @@ -511,12 +511,12 @@ lam_attr_delete_all(lam_attribute_type_t type, void *object, /* Move to the next node */ - ret = lam_hash_table_get_next_key_uint32(keyhash, + ret = ompi_hash_table_get_next_key_uint32(keyhash, &key, &old_attr, in_node, &node); /* Now delete this attribute */ - lam_attr_delete(type, object, keyhash, oldkey, 1); + ompi_attr_delete(type, object, keyhash, oldkey, 1); } diff --git a/src/attribute/attribute.h b/src/attribute/attribute.h index e1b334f05d..b7566473a4 100644 --- a/src/attribute/attribute.h +++ b/src/attribute/attribute.h @@ -8,16 +8,16 @@ * win or datatype. */ -#ifndef LAM_ATTRIBUTE_H -#define LAM_ATTRIBUTE_H +#ifndef OMPI_ATTRIBUTE_H +#define OMPI_ATTRIBUTE_H #include #include "mpi.h" -#include "lam_config.h" -#include "lfc/lam_object.h" -#include "lfc/lam_bitmap.h" -#include "lfc/lam_hash_table.h" +#include "ompi_config.h" +#include "class/ompi_object.h" +#include "class/ompi_bitmap.h" +#include "class/ompi_hash_table.h" #include "communicator/communicator.h" #include "datatype/datatype.h" #include "win/win.h" @@ -29,15 +29,15 @@ just to make things compile now, should take other value in a different enum later */ -enum lam_consts{ - LAM_PREDEFINED = 1, +enum ompi_consts{ + OMPI_PREDEFINED = 1, MPI_ERROR, MPI_INVALID_ATTR_KEYVAL }; /* ******************************************************************* */ -enum lam_attribute_type_t{ +enum ompi_attribute_type_t{ COMM_ATTR = 1, /**< The attribute belongs to a comm object. Starts with 1 so that we can have it initialized to 0 using memset in the constructor */ @@ -45,13 +45,13 @@ enum lam_attribute_type_t{ TYPE_ATTR /**< The attribute belongs to datatype object */ }; -typedef enum lam_attribute_type_t lam_attribute_type_t; +typedef enum ompi_attribute_type_t ompi_attribute_type_t; /* Union to take care of proper casting of the function pointers passed from the front end functions depending on the type. This will avoid casting function pointers to void* */ -union lam_attribute_fn_ptr_union_t { +union ompi_attribute_fn_ptr_union_t { MPI_Comm_delete_attr_function *attr_communicator_delete_fn; MPI_Type_delete_attr_function *attr_datatype_delete_fn; MPI_Win_delete_attr_function *attr_win_delete_fn; @@ -61,35 +61,35 @@ union lam_attribute_fn_ptr_union_t { MPI_Win_copy_attr_function *attr_win_copy_fn; }; -typedef union lam_attribute_fn_ptr_union_t lam_attribute_fn_ptr_union_t; +typedef union ompi_attribute_fn_ptr_union_t ompi_attribute_fn_ptr_union_t; -struct lam_attrkey_t { - lam_hash_table_t super; /**< hash table pointer which will contain +struct ompi_attrkey_t { + ompi_hash_table_t super; /**< hash table pointer which will contain pair */ int a_fhandle; /** #include #include "mpi.h" @@ -35,51 +35,51 @@ static int rankkeycompare(const void *, const void *); * This is the function setting all elements of a communicator. * All other routines are just used to determine these elements. */ -lam_communicator_t * lam_comm_set ( int mode, - lam_communicator_t* oldcomm, - lam_communicator_t* bridgecomm, +ompi_communicator_t * ompi_comm_set ( int mode, + ompi_communicator_t* oldcomm, + ompi_communicator_t* bridgecomm, int local_size, - lam_proc_t **local_procs, + ompi_proc_t **local_procs, int remote_size, - lam_proc_t **remote_procs, - lam_hash_table_t *attr, - lam_errhandler_t *errh, + ompi_proc_t **remote_procs, + ompi_hash_table_t *attr, + ompi_errhandler_t *errh, mca_base_module_t *collmodule, mca_base_module_t *topomodule, int local_leader, int remote_leader ) { - lam_communicator_t *newcomm; - lam_proc_t *my_gpointer; + ompi_communicator_t *newcomm; + ompi_proc_t *my_gpointer; int my_grank; int rc; /* Allocate comm structure */ - newcomm = lam_comm_allocate ( local_size, remote_size ); + newcomm = ompi_comm_allocate ( local_size, remote_size ); /* Set local_group information */ memcpy ( newcomm->c_local_group->grp_proc_pointers, - local_procs, local_size * sizeof(lam_proc_t *)); - lam_group_increment_proc_count(newcomm->c_local_group); + local_procs, local_size * sizeof(ompi_proc_t *)); + ompi_group_increment_proc_count(newcomm->c_local_group); /* determine my rank */ my_grank = oldcomm->c_local_group->grp_my_rank; my_gpointer = oldcomm->c_local_group->grp_proc_pointers[my_grank]; - lam_set_group_rank(newcomm->c_local_group, my_gpointer); + ompi_set_group_rank(newcomm->c_local_group, my_gpointer); newcomm->c_my_rank = newcomm->c_local_group->grp_my_rank; /* Set remote group, if applicable */ if ( 0 < remote_size) { memcpy ( newcomm->c_remote_group->grp_proc_pointers, - remote_procs, remote_size * sizeof(lam_proc_t *)); - lam_group_increment_proc_count(newcomm->c_remote_group); - newcomm->c_flags |= LAM_COMM_INTER; + remote_procs, remote_size * sizeof(ompi_proc_t *)); + ompi_group_increment_proc_count(newcomm->c_remote_group); + newcomm->c_flags |= OMPI_COMM_INTER; } /* Determine context id. It is identical to f_2_c_handle */ #ifdef HAVE_COLLECTIVES - newcomm->c_contextid = lam_comm_nextcid ( oldcomm, + newcomm->c_contextid = ompi_comm_nextcid ( oldcomm, bridgecomm, local_leader, remote_leader, @@ -87,7 +87,7 @@ lam_communicator_t * lam_comm_set ( int mode, #else /* just for now */ newcomm->c_contextid = oldcomm->c_contextid + 10; - lam_pointer_array_set_item ( &lam_mpi_communicators, newcomm->c_contextid, + ompi_pointer_array_set_item ( &ompi_mpi_communicators, newcomm->c_contextid, newcomm ); #endif newcomm->c_f_to_c_index = newcomm->c_contextid; @@ -101,14 +101,14 @@ lam_communicator_t * lam_comm_set ( int mode, newcomm->c_contextid); /* Determine cube_dim */ - newcomm->c_cube_dim = lam_cube_dim(newcomm->c_local_group->grp_proc_count); + newcomm->c_cube_dim = ompi_cube_dim(newcomm->c_local_group->grp_proc_count); /* Set Topology, if required */ if ( NULL != topomodule ) { - if (LAM_COMM_IS_CART ( oldcomm ) ) - newcomm->c_flags |= LAM_COMM_CART; - if (LAM_COMM_IS_GRAPH ( oldcomm ) ) - newcomm->c_flags |= LAM_COMM_GRAPH; + if (OMPI_COMM_IS_CART ( oldcomm ) ) + newcomm->c_flags |= OMPI_COMM_CART; + if (OMPI_COMM_IS_GRAPH ( oldcomm ) ) + newcomm->c_flags |= OMPI_COMM_GRAPH; /* set the topo-module */ } @@ -119,29 +119,29 @@ lam_communicator_t * lam_comm_set ( int mode, } /* Initialize the PML stuff in the newcomm */ - if ( LAM_ERROR == mca_pml.pml_add_comm(newcomm) ) { + if ( OMPI_ERROR == mca_pml.pml_add_comm(newcomm) ) { goto err_exit; } /* Initialize the coll modules */ /* Let the collectives modules fight over who will do collective on this new comm. */ - if (LAM_ERROR == mca_coll_base_init_comm(newcomm)) { + if (OMPI_ERROR == mca_coll_base_init_comm(newcomm)) { goto err_exit; } /* ******* VPS: Remove this later -- need to be in coll module ****** */ /* VPS: Cache the reqs for bcast */ newcomm->bcast_lin_reqs = - malloc (mca_coll_base_bcast_collmaxlin * sizeof(lam_request_t*)); + malloc (mca_coll_base_bcast_collmaxlin * sizeof(ompi_request_t*)); if (NULL == newcomm->bcast_lin_reqs) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto err_exit; } newcomm->bcast_log_reqs = - malloc (mca_coll_base_bcast_collmaxdim * sizeof(lam_request_t*)); + malloc (mca_coll_base_bcast_collmaxdim * sizeof(ompi_request_t*)); if (NULL == newcomm->bcast_log_reqs) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto err_exit; } @@ -158,48 +158,48 @@ lam_communicator_t * lam_comm_set ( int mode, /**********************************************************************/ /**********************************************************************/ /* -** Counterpart to MPI_Comm_group. To be used within LAM functions. +** Counterpart to MPI_Comm_group. To be used within OMPI functions. */ -int lam_comm_group ( lam_communicator_t* comm, lam_group_t **group ) +int ompi_comm_group ( ompi_communicator_t* comm, ompi_group_t **group ) { /* increment proc reference counters */ OBJ_RETAIN(comm->c_local_group); *group = comm->c_local_group; - return LAM_SUCCESS; + return OMPI_SUCCESS; } /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ /* -** Counterpart to MPI_Comm_create. To be used within LAM. +** Counterpart to MPI_Comm_create. To be used within OMPI. */ -int lam_comm_create ( lam_communicator_t *comm, lam_group_t *group, - lam_communicator_t **newcomm ) +int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, + ompi_communicator_t **newcomm ) { - lam_communicator_t *newcomp; + ompi_communicator_t *newcomp; int rsize; int mode; int *allranks=NULL; - lam_proc_t **rprocs=NULL; - int rc = LAM_SUCCESS; + ompi_proc_t **rprocs=NULL; + int rc = OMPI_SUCCESS; - if ( LAM_COMM_IS_INTER(comm) ) { + if ( OMPI_COMM_IS_INTER(comm) ) { #ifdef HAVE_COMM_CREATE_FOR_INTERCOMMS int tsize, i, j; tsize = comm->c_remote_group->grp_proc_count; allranks = (int *) malloc ( tsize * sizeof(int)); if ( NULL == allranks ) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } rc = comm->c_coll.coll_allgather_inter ( &group->grp_my_rank, 1, MPI_INT, allranks, 1, MPI_INT, comm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -214,14 +214,14 @@ int lam_comm_create ( lam_communicator_t *comm, lam_group_t *group, MPI_COMM_NULL */ if ( 0 == rsize || 0 == group->grp_proc_count ) { *newcomm = MPI_COMM_NULL; - rc = LAM_SUCCESS; + rc = OMPI_SUCCESS; goto exit; } /* Set proc-pointers for remote group */ - rprocs = (lam_proc_t **) malloc ( sizeof(lam_proc_t *) * rsize); + rprocs = (ompi_proc_t **) malloc ( sizeof(ompi_proc_t *) * rsize); if ( NULL == rprocs ) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } for ( j = 0, i = 0; i < rsize; i++ ) { @@ -230,7 +230,7 @@ int lam_comm_create ( lam_communicator_t *comm, lam_group_t *group, j++; } } - mode = LAM_COMM_INTER_INTER; + mode = OMPI_COMM_INTER_INTER; #else return ( MPI_ERR_COMM ); #endif @@ -238,10 +238,10 @@ int lam_comm_create ( lam_communicator_t *comm, lam_group_t *group, else { rsize = 0; rprocs = NULL; - mode = LAM_COMM_INTRA_INTRA; + mode = OMPI_COMM_INTRA_INTRA; } - newcomp = lam_comm_set ( mode, /* mode */ + newcomp = ompi_comm_set ( mode, /* mode */ comm, /* old comm */ NULL, /* bridge comm */ group->grp_proc_count, /* local_size */ @@ -266,9 +266,9 @@ int lam_comm_create ( lam_communicator_t *comm, lam_group_t *group, However, we could not avoid the comm_nextcid step, since all processes of the original comm have to participate in that function call. Additionally, all errhandler stuff etc. - has to be set to make lam_comm_free happy */ + has to be set to make ompi_comm_free happy */ if ( MPI_PROC_NULL == newcomp->c_local_group->grp_my_rank ) { - lam_comm_free ( &newcomp ); + ompi_comm_free ( &newcomp ); } exit: @@ -288,10 +288,10 @@ int lam_comm_create ( lam_communicator_t *comm, lam_group_t *group, /**********************************************************************/ /**********************************************************************/ /* -** Counterpart to MPI_Comm_split. To be used within LAM (e.g. MPI_Cart_sub). +** Counterpart to MPI_Comm_split. To be used within OMPI (e.g. MPI_Cart_sub). */ -int lam_comm_split ( lam_communicator_t* comm, int color, int key, - lam_communicator_t **newcomm ) +int ompi_comm_split ( ompi_communicator_t* comm, int color, int key, + ompi_communicator_t **newcomm ) { int myinfo[2]; int size, my_size; @@ -303,9 +303,9 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, int i, loc; int *results=NULL, *sorted=NULL; int *rresults=NULL, *rsorted=NULL; - int rc=LAM_SUCCESS; - lam_proc_t **procs=NULL, **rprocs=NULL; - lam_communicator_t *newcomp; + int rc=OMPI_SUCCESS; + ompi_proc_t **procs=NULL, **rprocs=NULL; + ompi_communicator_t *newcomp; /* Step 1: determine all the information for the local group */ /* --------------------------------------------------------- */ @@ -314,15 +314,15 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, myinfo[0] = color; myinfo[1] = key; - size = lam_comm_size ( comm ); + size = ompi_comm_size ( comm ); results = (int*) malloc ( 2 * size * sizeof(int)); if ( NULL == results ) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } rc = comm->c_coll.coll_allgather_intra ( myinfo, 2, MPI_INT, results, 2, MPI_INT, comm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -333,7 +333,7 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, sorted = (int *) malloc ( sizeof( int ) * my_size * 2); if ( NULL == sorted) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } @@ -353,9 +353,9 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, } /* put group elements in a list */ - procs = (lam_proc_t **) malloc ( sizeof(lam_proc_t *) * my_size); + procs = (ompi_proc_t **) malloc ( sizeof(ompi_proc_t *) * my_size); if ( NULL == procs ) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } for (i = 0; i < my_size; i++) { @@ -364,19 +364,19 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, /* Step 2: determine all the information for the remote group */ /* --------------------------------------------------------- */ - if ( LAM_COMM_IS_INTER(comm) ) { + if ( OMPI_COMM_IS_INTER(comm) ) { #ifdef HAVE_COMM_SPLIT_FOR_INTERCOMMS rsize = comm->c_remote_group->grp_proc_count; rresults = (int *) malloc ( rsize * 2 * sizeof(int)); if ( NULL == rresults ) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } rc = comm->c_coll.coll_allgather_inter ( myinfo, 2, MPI_INT, rresults, 2, MPI_INT, comm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -386,7 +386,7 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, } rsorted = (int *) malloc ( sizeof( int ) * my_rsize * 2); if ( NULL == rsorted) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } @@ -406,16 +406,16 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, } /* put group elements in a list */ - rprocs = (lam_proc_t **) malloc ( sizeof(lam_proc_t *) * my_rsize); + rprocs = (ompi_proc_t **) malloc ( sizeof(ompi_proc_t *) * my_rsize); if ( NULL == procs ) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } for (i = 0; i < my_rsize; i++) { rprocs[i] = comm->c_remote_group->grp_proc_pointers[rsorted[i*2]]; } - mode = LAM_COMM_INTER_INTER; + mode = OMPI_COMM_INTER_INTER; #else /* creating an inter-communicator using MPI_Comm_create will be supported soon, but not in this version */ @@ -426,14 +426,14 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, else { my_rsize = 0; rprocs = NULL; - mode = LAM_COMM_INTRA_INTRA; + mode = OMPI_COMM_INTRA_INTRA; } /* Step 3: set up the communicator */ /* --------------------------------------------------------- */ /* Create the communicator finally */ - newcomp = lam_comm_set ( mode, /* mode */ + newcomp = ompi_comm_set ( mode, /* mode */ comm, /* old comm */ NULL, /* bridge comm */ my_size, /* local_size */ @@ -473,7 +473,7 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, /* Step 4: if we are not part of the comm, free the struct */ /* --------------------------------------------------------- */ if ( MPI_UNDEFINED == color ) { - lam_comm_free ( &newcomp ); + ompi_comm_free ( &newcomp ); } *newcomm = newcomp; @@ -485,48 +485,48 @@ int lam_comm_split ( lam_communicator_t* comm, int color, int key, /**********************************************************************/ /**********************************************************************/ /* -** Counterpart to MPI_Comm_free. To be used within LAM. +** Counterpart to MPI_Comm_free. To be used within OMPI. ** The freeing of all attached objects (groups, errhandlers ** etc. ) has moved to the destructor. */ -int lam_comm_free ( lam_communicator_t **comm ) +int ompi_comm_free ( ompi_communicator_t **comm ) { #if 0 /* Release attributes */ - lam_attr_delete_all ( COMM_ATTR, comm ); + ompi_attr_delete_all ( COMM_ATTR, comm ); #endif /* Release the communicator */ OBJ_RELEASE ( comm ); *comm = MPI_COMM_NULL; - return LAM_SUCCESS; + return OMPI_SUCCESS; } /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ -lam_proc_t **lam_comm_get_rprocs ( lam_communicator_t *local_comm, - lam_communicator_t *bridge_comm, +ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm, + ompi_communicator_t *bridge_comm, int local_leader, int remote_leader, int tag, int rsize) { int local_rank, local_size; - lam_proc_t **rprocs; - lam_job_handle_t job; + ompi_proc_t **rprocs; + ompi_job_handle_t job; uint32_t *rvpids=NULL, *vpids=NULL; int rc, i; - local_rank = lam_comm_rank ( local_comm ); + local_rank = ompi_comm_rank ( local_comm ); vpids = (uint32_t *) malloc ( local_size * sizeof(uint32_t)); rvpids = (uint32_t *) malloc ( rsize * sizeof(uint32_t)); - rprocs = (lam_proc_t **) malloc ( rsize * sizeof(lam_proc_t *)); + rprocs = (ompi_proc_t **) malloc ( rsize * sizeof(ompi_proc_t *)); if ( NULL == vpids || NULL == rvpids || NULL == rprocs ) { - rc = LAM_ERR_OUT_OF_RESOURCE; + rc = OMPI_ERR_OUT_OF_RESOURCE; goto err_exit; } @@ -568,7 +568,7 @@ lam_proc_t **lam_comm_get_rprocs ( lam_communicator_t *local_comm, } for ( i = 0; i < rsize; i++ ) { - rprocs[i] = lam_proc_find ( job, rvpids[i] ); + rprocs[i] = ompi_proc_find ( job, rvpids[i] ); } err_exit: @@ -585,15 +585,15 @@ return rprocs; /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ -int lam_comm_determine_first ( lam_communicator_t *intercomm, int high ) +int ompi_comm_determine_first ( ompi_communicator_t *intercomm, int high ) { int flag, rhigh; int local_rank, rc; - lam_proc_t *lvpid, *rvpid; + ompi_proc_t *lvpid, *rvpid; lvpid = intercomm->c_local_group->grp_proc_pointers[0]; rvpid = intercomm->c_remote_group->grp_proc_pointers[0]; - local_rank = lam_comm_rank ( intercomm ); + local_rank = ompi_comm_rank ( intercomm ); /* * determine maximal high value over the intercomm @@ -659,11 +659,11 @@ int lam_comm_determine_first ( lam_communicator_t *intercomm, int high ) /********************************************************************************/ /********************************************************************************/ /********************************************************************************/ -int lam_comm_dump ( lam_communicator_t *comm ) +int ompi_comm_dump ( ompi_communicator_t *comm ) { mca_pml_ptl_comm_t *pml_comm; mca_ptl_sequence_t *seq; - lam_list_t *list; + ompi_list_t *list; int i; printf("Dumping information for comm_cid %d\n", comm->c_contextid); @@ -675,15 +675,15 @@ int lam_comm_dump ( lam_communicator_t *comm ) printf(" Communicator is:"); /* Display flags */ - if ( LAM_COMM_IS_INTER(comm) ) + if ( OMPI_COMM_IS_INTER(comm) ) printf(" inter-comm,"); - if ( LAM_COMM_IS_CART(comm)) + if ( OMPI_COMM_IS_CART(comm)) printf(" topo-cart,"); - if ( LAM_COMM_IS_GRAPH(comm)) + if ( OMPI_COMM_IS_GRAPH(comm)) printf(" topo-graph"); printf("\n"); - if (LAM_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { printf(" Remote group size:%d\n", comm->c_remote_group->grp_proc_count); } @@ -692,14 +692,14 @@ int lam_comm_dump ( lam_communicator_t *comm ) pml_comm = (mca_pml_ptl_comm_t *)comm->c_pml_comm; seq = (mca_ptl_sequence_t *) pml_comm->c_frags_cant_match; for ( i = 0; i < comm->c_local_group->grp_proc_count; i++ ){ - list = (lam_list_t *)seq+i; + list = (ompi_list_t *)seq+i; printf("%d: head->list_next:%p head->list_prev:%p" " tail->list_next:%p tail->list_next:%p\n", i, - (char*)list->lam_list_head.lam_list_next, - (char*)list->lam_list_head.lam_list_prev, - (char*)list->lam_list_tail.lam_list_next, - (char*)list->lam_list_tail.lam_list_prev ); + (char*)list->ompi_list_head.ompi_list_next, + (char*)list->ompi_list_head.ompi_list_prev, + (char*)list->ompi_list_tail.ompi_list_next, + (char*)list->ompi_list_tail.ompi_list_prev ); fflush(stdout); } diff --git a/src/communicator/comm_cid.c b/src/communicator/comm_cid.c index d2128f47ba..1a9ca673e9 100644 --- a/src/communicator/comm_cid.c +++ b/src/communicator/comm_cid.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include #include "mpi.h" @@ -11,7 +11,7 @@ #include "op/op.h" #include "proc/proc.h" #include "include/constants.h" -#include "lfc/lam_pointer_array.h" +#include "class/ompi_pointer_array.h" #include "mca/pcm/pcm.h" #include "mca/pml/pml.h" #include "mca/coll/coll.h" @@ -30,28 +30,28 @@ */ typedef int ompi_comm_cid_allredfct (int *inbuf, int* outbuf, int count, - lam_op_t *op, lam_communicator_t *comm, - lam_communicator_t *bridgecomm, + ompi_op_t *op, ompi_communicator_t *comm, + ompi_communicator_t *bridgecomm, int lleader, int rleader ); static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, - lam_op_t *op, lam_communicator_t *intercomm, - lam_communicator_t *bridgecomm, + ompi_op_t *op, ompi_communicator_t *intercomm, + ompi_communicator_t *bridgecomm, int local_leader, int remote_leader ); static int ompi_comm_allreduce_emulate_inter ( int *inbuf, int* outbuf, int count, - lam_op_t *op, lam_communicator_t *intercomm, - lam_communicator_t *bridgecomm, + ompi_op_t *op, ompi_communicator_t *intercomm, + ompi_communicator_t *bridgecomm, int local_leader, int remote_leader ); static int ompi_comm_allreduce_intra ( int *inbuf, int* outbuf, int count, - lam_op_t *op, lam_communicator_t *intercomm, - lam_communicator_t *bridgecomm, + ompi_op_t *op, ompi_communicator_t *intercomm, + ompi_communicator_t *bridgecomm, int local_leader, int remote_ledaer ); -int lam_comm_nextcid ( lam_communicator_t* comm, - lam_communicator_t* bridgecomm, +int ompi_comm_nextcid ( ompi_communicator_t* comm, + ompi_communicator_t* bridgecomm, int local_leader, int remote_leader, int mode ) @@ -62,7 +62,7 @@ int lam_comm_nextcid ( lam_communicator_t* comm, int done=0; int response=0, glresponse=0; int flag; - int start=lam_mpi_communicators.lowest_free; + int start=ompi_mpi_communicators.lowest_free; int i; ompi_comm_cid_allredfct* allredfnct; @@ -73,14 +73,14 @@ int lam_comm_nextcid ( lam_communicator_t* comm, */ switch (mode) { - case LAM_COMM_INTRA_INTRA: + case OMPI_COMM_INTRA_INTRA: allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_intra; break; - case LAM_COMM_INTRA_INTER: + case OMPI_COMM_INTRA_INTER: allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_emulate_inter; break; - case LAM_COMM_INTER_INTER: - case LAM_COMM_INTER_INTRA: + case OMPI_COMM_INTER_INTER: + case OMPI_COMM_INTER_INTRA: allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_inter; break; default: @@ -94,7 +94,7 @@ int lam_comm_nextcid ( lam_communicator_t* comm, while ( !done ){ sleep ( 30 ); for (i=start; ic_coll.coll_allreduce_intra ( inbuf, outbuf, count, MPI_INT, op, @@ -153,26 +153,26 @@ static int ompi_comm_allreduce_intra ( int *inbuf, int *outbuf, int count, - remote_leader */ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, - lam_op_t *op, lam_communicator_t *intercomm, - lam_communicator_t *bridgecomm, + ompi_op_t *op, ompi_communicator_t *intercomm, + ompi_communicator_t *bridgecomm, int local_leader, int remote_leader ) { int local_rank; - lam_proc_t *lvpid, *rvpid; + ompi_proc_t *lvpid, *rvpid; int i; int *tmpbuf; int rc; - if ( &lam_mpi_op_sum != op && &lam_mpi_op_prod != op && - &lam_mpi_op_max != op && &lam_mpi_op_min != op ) { + if ( &ompi_mpi_op_sum != op && &ompi_mpi_op_prod != op && + &ompi_mpi_op_max != op && &ompi_mpi_op_min != op ) { return MPI_ERR_OP; } - if ( !LAM_COMM_IS_INTER (intercomm)) { + if ( !OMPI_COMM_IS_INTER (intercomm)) { return MPI_ERR_COMM; } - local_rank = lam_comm_rank ( intercomm ); + local_rank = ompi_comm_rank ( intercomm ); tmpbuf = (int *) malloc ( count * sizeof(int)); if ( NULL == tmpbuf ) { return MPI_ERR_INTERN; @@ -180,7 +180,7 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, rc = intercomm->c_coll.coll_allreduce_inter ( inbuf, tmpbuf, count, MPI_INT, op, intercomm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -194,35 +194,35 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, /* local leader exchange data */ rc = mca_pml.pml_irecv (outbuf, count, MPI_INT, 0, OMPI_COMM_CID_TAG, intercomm, &req ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } rc = mca_pml.pml_send (tmpbuf, count, MPI_INT, 0, OMPI_COMM_CID_TAG, MCA_PML_BASE_SEND_STANDARD, intercomm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } rc = mca_pml.pml_wait ( 1, &req, NULL, &status); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } - if ( &lam_mpi_op_max == op ) { + if ( &ompi_mpi_op_max == op ) { for ( i = 0 ; i < count; i++ ) { if (tmpbuf[i] > outbuf[i]) outbuf[i] = tmpbuf[i]; } } - else if ( &lam_mpi_op_min == op ) { + else if ( &ompi_mpi_op_min == op ) { for ( i = 0 ; i < count; i++ ) { if (tmpbuf[i] < outbuf[i]) outbuf[i] = tmpbuf[i]; } } - else if ( &lam_mpi_op_sum == op ) { + else if ( &ompi_mpi_op_sum == op ) { for ( i = 0 ; i < count; i++ ) { outbuf[i] += tmpbuf[i]; } } - else if ( &lam_mpi_op_prod == op ) { + else if ( &ompi_mpi_op_prod == op ) { for ( i = 0 ; i < count; i++ ) { outbuf[i] *= tmpbuf[i]; } @@ -234,14 +234,14 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, if ( 0 == local_rank ) { rc = intercomm->c_coll.coll_bcast_inter ( &outbuf, count, MPI_INT, MPI_ROOT, intercomm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } } else { rc = intercomm->c_coll.coll_bcast_inter ( &outbuf, count, MPI_INT, MPI_PROC_NULL, intercomm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } } @@ -250,7 +250,7 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, } else { rc = intercomm->c_coll.coll_bcast_inter ( &outbuf, count, MPI_INT, 0, intercomm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -273,8 +273,8 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count, all arguments are in use. */ static int ompi_comm_allreduce_emulate_inter (int *inbuf, int *outbuf, int count, - lam_op_t *op, lam_communicator_t *comm, - lam_communicator_t *bridgecomm, + ompi_op_t *op, ompi_communicator_t *comm, + ompi_communicator_t *bridgecomm, int local_leader, int remote_leader ) { int *tmpbuf=NULL; @@ -282,12 +282,12 @@ static int ompi_comm_allreduce_emulate_inter (int *inbuf, int *outbuf, int count int i; int rc; - if ( &lam_mpi_op_sum != op && &lam_mpi_op_prod != op && - &lam_mpi_op_max != op && &lam_mpi_op_min != op ) { + if ( &ompi_mpi_op_sum != op && &ompi_mpi_op_prod != op && + &ompi_mpi_op_max != op && &ompi_mpi_op_min != op ) { return MPI_ERR_OP; } - local_rank = lam_comm_rank ( comm ); + local_rank = ompi_comm_rank ( comm ); tmpbuf = (int *) malloc ( count * sizeof(int)); if ( NULL == tmpbuf ) { return MPI_ERR_INTERN; @@ -296,7 +296,7 @@ static int ompi_comm_allreduce_emulate_inter (int *inbuf, int *outbuf, int count /* Intercomm_create */ rc = comm->c_coll.coll_allreduce_intra ( inbuf, tmpbuf, count, MPI_INT, op, comm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -306,36 +306,36 @@ static int ompi_comm_allreduce_emulate_inter (int *inbuf, int *outbuf, int count rc = mca_pml.pml_irecv ( outbuf, count, MPI_INT, remote_leader, OMPI_COMM_CID_TAG, bridgecomm, &req ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } rc = mca_pml.pml_send (tmpbuf, count, MPI_INT, remote_leader, OMPI_COMM_CID_TAG, MCA_PML_BASE_SEND_STANDARD, bridgecomm ); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } rc = mca_pml.pml_wait ( 1, &req, NULL, &status); - if ( LAM_SUCCESS != rc ) { + if ( OMPI_SUCCESS != rc ) { goto exit; } - if ( &lam_mpi_op_max == op ) { + if ( &ompi_mpi_op_max == op ) { for ( i = 0 ; i < count; i++ ) { if (tmpbuf[i] > outbuf[i]) outbuf[i] = tmpbuf[i]; } } - else if ( &lam_mpi_op_min == op ) { + else if ( &ompi_mpi_op_min == op ) { for ( i = 0 ; i < count; i++ ) { if (tmpbuf[i] < outbuf[i]) outbuf[i] = tmpbuf[i]; } } - else if ( &lam_mpi_op_sum == op ) { + else if ( &ompi_mpi_op_sum == op ) { for ( i = 0 ; i < count; i++ ) { outbuf[i] += tmpbuf[i]; } } - else if ( &lam_mpi_op_prod == op ) { + else if ( &ompi_mpi_op_prod == op ) { for ( i = 0 ; i < count; i++ ) { outbuf[i] *= tmpbuf[i]; } diff --git a/src/communicator/communicator.h b/src/communicator/communicator.h index 16ffd77332..bf6cf283bd 100644 --- a/src/communicator/communicator.h +++ b/src/communicator/communicator.h @@ -2,10 +2,10 @@ * $HEADER$ */ -#ifndef LAM_COMMUNICATOR_H -#define LAM_COMMUNICATOR_H +#ifndef OMPI_COMMUNICATOR_H +#define OMPI_COMMUNICATOR_H -#include "lfc/lam_object.h" +#include "class/ompi_object.h" #include "errhandler/errhandler.h" #include "threads/mutex.h" #include "util/output.h" @@ -13,23 +13,23 @@ #include "group/group.h" #include "mca/coll/coll.h" #include "mca/topo/topo.h" -#include "lfc/lam_hash_table.h" +#include "class/ompi_hash_table.h" #include "attribute/attribute.h" #include "request/request.h" -extern lam_class_t lam_communicator_t_class; +extern ompi_class_t ompi_communicator_t_class; -#define LAM_COMM_INTER 0x00000001 -#define LAM_COMM_CART 0x00000002 -#define LAM_COMM_GRAPH 0x00000004 -#define LAM_COMM_NAMEISSET 0x00000008 -#define LAM_COMM_ISFREED 0x00000010 +#define OMPI_COMM_INTER 0x00000001 +#define OMPI_COMM_CART 0x00000002 +#define OMPI_COMM_GRAPH 0x00000004 +#define OMPI_COMM_NAMEISSET 0x00000008 +#define OMPI_COMM_ISFREED 0x00000010 /* some utility #defines */ -#define LAM_COMM_IS_INTER(comm) ((comm)->c_flags & LAM_COMM_INTER) -#define LAM_COMM_IS_INTRA(comm) (!((comm)->c_flags & LAM_COMM_INTER)) -#define LAM_COMM_IS_CART(comm) ((comm)->c_flags & LAM_COMM_CART) -#define LAM_COMM_IS_GRAPH(comm) ((comm)->c_flags & LAM_COMM_GRAPH) +#define OMPI_COMM_IS_INTER(comm) ((comm)->c_flags & OMPI_COMM_INTER) +#define OMPI_COMM_IS_INTRA(comm) (!((comm)->c_flags & OMPI_COMM_INTER)) +#define OMPI_COMM_IS_CART(comm) ((comm)->c_flags & OMPI_COMM_CART) +#define OMPI_COMM_IS_GRAPH(comm) ((comm)->c_flags & OMPI_COMM_GRAPH) /** * Modes reqquired for accquiring the new comm-id. @@ -38,26 +38,26 @@ extern lam_class_t lam_communicator_t_class; * whether the new communicator will be an inter/intra *comm */ -#define LAM_COMM_INTRA_INTRA 0x00000020 -#define LAM_COMM_INTRA_INTER 0x00000040 -#define LAM_COMM_INTER_INTRA 0x00000080 -#define LAM_COMM_INTER_INTER 0x00000100 +#define OMPI_COMM_INTRA_INTRA 0x00000020 +#define OMPI_COMM_INTRA_INTER 0x00000040 +#define OMPI_COMM_INTER_INTRA 0x00000080 +#define OMPI_COMM_INTER_INTER 0x00000100 -extern lam_pointer_array_t lam_mpi_communicators; +extern ompi_pointer_array_t ompi_mpi_communicators; -struct lam_communicator_t { - lam_object_t c_base; +struct ompi_communicator_t { + ompi_object_t c_base; char c_name[MPI_MAX_OBJECT_NAME]; uint32_t c_contextid; int c_my_rank; uint32_t c_flags; /* flags, e.g. intercomm, topology, etc. */ - lam_group_t *c_local_group; - lam_group_t *c_remote_group; + ompi_group_t *c_local_group; + ompi_group_t *c_remote_group; /* Attributes */ - lam_hash_table_t *c_keyhash; + ompi_hash_table_t *c_keyhash; int c_cube_dim; /**< inscribing cube dimension */ @@ -71,10 +71,10 @@ struct lam_communicator_t { int c_f_to_c_index; /* Error handling. This field does not have the "c_" prefix so - that the LAM_ERRHDL_* macros can find it, regardless of whether + that the OMPI_ERRHDL_* macros can find it, regardless of whether it's a comm, window, or file. */ - lam_errhandler_t *error_handler; + ompi_errhandler_t *error_handler; /* Hooks for PML to hang things */ struct mca_pml_comm_t* c_pml_comm; @@ -85,19 +85,19 @@ struct lam_communicator_t { struct mca_coll_comm_t* c_coll_comm; /* VPS: This will be moved in the coll module later on */ - lam_request_t **bcast_lin_reqs; - lam_request_t **bcast_log_reqs; + ompi_request_t **bcast_lin_reqs; + ompi_request_t **bcast_log_reqs; }; -typedef struct lam_communicator_t lam_communicator_t; +typedef struct ompi_communicator_t ompi_communicator_t; /** * is this a valid communicator */ -static inline int lam_comm_invalid(lam_communicator_t* comm) +static inline int ompi_comm_invalid(ompi_communicator_t* comm) { - if ( comm->c_flags & LAM_COMM_ISFREED ) + if ( comm->c_flags & OMPI_COMM_ISFREED ) return true; else return false; @@ -106,14 +106,14 @@ static inline int lam_comm_invalid(lam_communicator_t* comm) /** * rank w/in the communicator */ -static inline int lam_comm_rank(lam_communicator_t* comm) +static inline int ompi_comm_rank(ompi_communicator_t* comm) { return comm->c_my_rank; } /** * size of the communicator */ -static inline int lam_comm_size(lam_communicator_t* comm) +static inline int ompi_comm_size(ompi_communicator_t* comm) { return comm->c_local_group->grp_proc_count; } @@ -122,9 +122,9 @@ static inline int lam_comm_size(lam_communicator_t* comm) * size of the remote group for inter-communicators. * returns zero for an intra-communicator */ -static inline int lam_comm_remote_size(lam_communicator_t* comm) +static inline int ompi_comm_remote_size(ompi_communicator_t* comm) { - if ( comm->c_flags & LAM_COMM_INTER ) + if ( comm->c_flags & OMPI_COMM_INTER ) return comm->c_remote_group->grp_proc_count; else return 0; @@ -132,25 +132,25 @@ static inline int lam_comm_remote_size(lam_communicator_t* comm) /* return pointer to communicator associated with context id cid, * No error checking is done*/ -static inline lam_communicator_t *lam_comm_lookup(uint32_t cid) +static inline ompi_communicator_t *ompi_comm_lookup(uint32_t cid) { /* array of pointers to communicators, indexed by context ID */ - extern lam_pointer_array_t lam_mpi_communicators; - return (lam_communicator_t*)lam_pointer_array_get_item(&lam_mpi_communicators, cid); + extern ompi_pointer_array_t ompi_mpi_communicators; + return (ompi_communicator_t*)ompi_pointer_array_get_item(&ompi_mpi_communicators, cid); } -static inline lam_proc_t* lam_comm_peer_lookup(lam_communicator_t* comm, int peer_id) +static inline ompi_proc_t* ompi_comm_peer_lookup(ompi_communicator_t* comm, int peer_id) { -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(peer_id >= comm->c_remote_group->grp_proc_count) { - lam_output(0, "lam_comm_lookup_peer: invalid peer index (%d)", peer_id); - return (lam_proc_t *) NULL; + ompi_output(0, "ompi_comm_lookup_peer: invalid peer index (%d)", peer_id); + return (ompi_proc_t *) NULL; } #endif return comm->c_remote_group->grp_proc_pointers[peer_id]; } -static inline bool lam_comm_peer_invalid(lam_communicator_t* comm, int peer_id) +static inline bool ompi_comm_peer_invalid(ompi_communicator_t* comm, int peer_id) { if(peer_id < 0 || peer_id >= comm->c_remote_group->grp_proc_count) { return true; @@ -158,11 +158,11 @@ static inline bool lam_comm_peer_invalid(lam_communicator_t* comm, int peer_id) return false; } -static inline int lam_cube_dim(int nprocs) { +static inline int ompi_cube_dim(int nprocs) { int dim; size_t size; - if (1 > nprocs) return LAM_ERROR; + if (1 > nprocs) return OMPI_ERROR; for(dim = 0, size = 1; size < (size_t)nprocs; ++dim, size <<= 1); return dim; @@ -176,19 +176,19 @@ extern "C" { /** * Initialise MPI_COMM_WORLD and MPI_COMM_SELF */ - int lam_comm_init(void); - int lam_comm_link_function(void); + int ompi_comm_init(void); + int ompi_comm_link_function(void); /** * extract the local group from a communicator */ - int lam_comm_group ( lam_communicator_t *comm, lam_group_t **group ); + int ompi_comm_group ( ompi_communicator_t *comm, ompi_group_t **group ); /** * create a communicator based on a group */ - int lam_comm_create ( lam_communicator_t* comm, lam_group_t *group, - lam_communicator_t** newcomm ); + int ompi_comm_create ( ompi_communicator_t* comm, ompi_group_t *group, + ompi_communicator_t** newcomm ); /** * split a communicator based on color and key. Parameters @@ -200,13 +200,13 @@ extern "C" { * * @ */ - int lam_comm_split ( lam_communicator_t *comm, int color, int key, - lam_communicator_t** newcomm ); + int ompi_comm_split ( ompi_communicator_t *comm, int color, int key, + ompi_communicator_t** newcomm ); /** * free a communicator */ - int lam_comm_free ( lam_communicator_t **comm ); + int ompi_comm_free ( ompi_communicator_t **comm ); /** * allocate a new communicator structure @@ -218,7 +218,7 @@ extern "C" { * It furthermore sets the fortran index correctly, * and sets all other elements to zero. */ - lam_communicator_t* lam_comm_allocate ( int local_group_size, + ompi_communicator_t* ompi_comm_allocate ( int local_group_size, int remote_group_size ); /** @@ -226,13 +226,13 @@ extern "C" { * @param comm: original comm * @param bridgecomm: bridge comm for intercomm_create * @param mode: combination of input and output communicator - * LAM_COMM_INTRA_INTRA, LAM_COMM_INTRA_INTER, - * LAM_COMM_INTER_INTRA, LAM_COMM_INTER_INTER + * OMPI_COMM_INTRA_INTRA, OMPI_COMM_INTRA_INTER, + * OMPI_COMM_INTER_INTRA, OMPI_COMM_INTER_INTER * * This routine has to be thread safe in the final version. */ - int lam_comm_nextcid ( lam_communicator_t* comm, - lam_communicator_t* bridgecomm, + int ompi_comm_nextcid ( ompi_communicator_t* comm, + ompi_communicator_t* bridgecomm, int local_leader, int remote_leader, int mode); @@ -241,21 +241,21 @@ extern "C" { /** * shut down the communicator infrastructure. */ - int lam_comm_finalize (void); + int ompi_comm_finalize (void); /** * This is THE routine, where all the communicator stuff * is really set. */ - lam_communicator_t* lam_comm_set ( int mode, - lam_communicator_t* oldcomm, - lam_communicator_t* bridgecomm, + ompi_communicator_t* ompi_comm_set ( int mode, + ompi_communicator_t* oldcomm, + ompi_communicator_t* bridgecomm, int local_size, - lam_proc_t **local_procs, + ompi_proc_t **local_procs, int remote_size, - lam_proc_t **remote_procs, - lam_hash_table_t *attr, - lam_errhandler_t *errh, + ompi_proc_t **remote_procs, + ompi_hash_table_t *attr, + ompi_errhandler_t *errh, mca_base_module_t *collmodule, mca_base_module_t *topomodule, int local_leader, @@ -263,10 +263,10 @@ extern "C" { /** * This is a short-hand routine used in intercomm_create. * The routine makes sure, that all processes have afterwards - * a list of lam_proc_t pointers for the remote group. + * a list of ompi_proc_t pointers for the remote group. */ - lam_proc_t **lam_comm_get_rprocs ( lam_communicator_t *local_comm, - lam_communicator_t *bridge_comm, + ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm, + ompi_communicator_t *bridge_comm, int local_leader, int remote_leader, int tag, @@ -277,11 +277,11 @@ extern "C" { * remote group will be first in the new intra-comm. * Just used from within MPI_Intercomm_merge. */ - int lam_comm_determine_first ( lam_communicator_t *intercomm, + int ompi_comm_determine_first ( ompi_communicator_t *intercomm, int high ); #if defined(c_plusplus) || defined(__cplusplus) } #endif -#endif /* LAM_COMMUNICATOR_H */ +#endif /* OMPI_COMMUNICATOR_H */ diff --git a/src/communicator/lam_comm_init.c b/src/communicator/lam_comm_init.c index d046224f31..5f672f1dd3 100644 --- a/src/communicator/lam_comm_init.c +++ b/src/communicator/lam_comm_init.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include "mpi.h" @@ -20,143 +20,143 @@ ** on cid. ** */ -lam_pointer_array_t lam_mpi_communicators; +ompi_pointer_array_t ompi_mpi_communicators; -lam_communicator_t lam_mpi_comm_world; -lam_communicator_t lam_mpi_comm_self; -lam_communicator_t lam_mpi_comm_null; +ompi_communicator_t ompi_mpi_comm_world; +ompi_communicator_t ompi_mpi_comm_self; +ompi_communicator_t ompi_mpi_comm_null; -static void lam_comm_construct(lam_communicator_t* comm); -static void lam_comm_destruct(lam_communicator_t* comm); +static void ompi_comm_construct(ompi_communicator_t* comm); +static void ompi_comm_destruct(ompi_communicator_t* comm); -OBJ_CLASS_INSTANCE(lam_communicator_t, lam_object_t,lam_comm_construct, lam_comm_destruct ); +OBJ_CLASS_INSTANCE(ompi_communicator_t, ompi_object_t,ompi_comm_construct, ompi_comm_destruct ); /* * Initialize comm world/self/null. */ -int lam_comm_init(void) +int ompi_comm_init(void) { - lam_group_t *group; + ompi_group_t *group; size_t size; /* Setup communicator array */ - OBJ_CONSTRUCT(&lam_mpi_communicators, lam_pointer_array_t); + OBJ_CONSTRUCT(&ompi_mpi_communicators, ompi_pointer_array_t); /* Setup MPI_COMM_WORLD */ - OBJ_CONSTRUCT(&lam_mpi_comm_world, lam_communicator_t); - group = OBJ_NEW(lam_group_t); - group->grp_proc_pointers = lam_proc_world(&size); - group->grp_my_rank = lam_proc_local()->proc_vpid ; + OBJ_CONSTRUCT(&ompi_mpi_comm_world, ompi_communicator_t); + group = OBJ_NEW(ompi_group_t); + group->grp_proc_pointers = ompi_proc_world(&size); + group->grp_my_rank = ompi_proc_local()->proc_vpid ; group->grp_proc_count = size; group->grp_ok_to_free = false; OBJ_RETAIN(group); /* bump reference count for remote reference */ - lam_mpi_comm_world.c_contextid = 0; - lam_mpi_comm_world.c_f_to_c_index = 0; - lam_mpi_comm_world.c_my_rank = group->grp_my_rank; - lam_mpi_comm_world.c_local_group = group; - lam_mpi_comm_world.c_remote_group = group; - lam_mpi_comm_world.c_cube_dim = lam_cube_dim(size); - lam_mpi_comm_world.error_handler = &lam_mpi_errors_are_fatal; - OBJ_RETAIN( &lam_mpi_errors_are_fatal ); - mca_pml.pml_add_comm(&lam_mpi_comm_world); - lam_pointer_array_set_item (&lam_mpi_communicators, 0, &lam_mpi_comm_world); + ompi_mpi_comm_world.c_contextid = 0; + ompi_mpi_comm_world.c_f_to_c_index = 0; + ompi_mpi_comm_world.c_my_rank = group->grp_my_rank; + ompi_mpi_comm_world.c_local_group = group; + ompi_mpi_comm_world.c_remote_group = group; + ompi_mpi_comm_world.c_cube_dim = ompi_cube_dim(size); + ompi_mpi_comm_world.error_handler = &ompi_mpi_errors_are_fatal; + OBJ_RETAIN( &ompi_mpi_errors_are_fatal ); + mca_pml.pml_add_comm(&ompi_mpi_comm_world); + ompi_pointer_array_set_item (&ompi_mpi_communicators, 0, &ompi_mpi_comm_world); - strncpy (lam_mpi_comm_world.c_name, "MPI_COMM_WORLD", + strncpy (ompi_mpi_comm_world.c_name, "MPI_COMM_WORLD", strlen("MPI_COMM_WORLD")+1 ); - lam_mpi_comm_world.c_flags |= LAM_COMM_NAMEISSET; - lam_attr_hash_init(&lam_mpi_comm_world.c_keyhash); + ompi_mpi_comm_world.c_flags |= OMPI_COMM_NAMEISSET; + ompi_attr_hash_init(&ompi_mpi_comm_world.c_keyhash); /* VPS: Remove this later */ - lam_mpi_comm_world.bcast_lin_reqs = - malloc (mca_coll_base_bcast_collmaxlin * sizeof(lam_request_t*)); - if (NULL == lam_mpi_comm_world.bcast_lin_reqs) { - return LAM_ERR_OUT_OF_RESOURCE; + ompi_mpi_comm_world.bcast_lin_reqs = + malloc (mca_coll_base_bcast_collmaxlin * sizeof(ompi_request_t*)); + if (NULL == ompi_mpi_comm_world.bcast_lin_reqs) { + return OMPI_ERR_OUT_OF_RESOURCE; } - lam_mpi_comm_world.bcast_log_reqs = - malloc (mca_coll_base_bcast_collmaxdim * sizeof(lam_request_t*)); - if (NULL == lam_mpi_comm_world.bcast_log_reqs) { - return LAM_ERR_OUT_OF_RESOURCE; + ompi_mpi_comm_world.bcast_log_reqs = + malloc (mca_coll_base_bcast_collmaxdim * sizeof(ompi_request_t*)); + if (NULL == ompi_mpi_comm_world.bcast_log_reqs) { + return OMPI_ERR_OUT_OF_RESOURCE; } /* Setup MPI_COMM_SELF */ - OBJ_CONSTRUCT(&lam_mpi_comm_self, lam_communicator_t); - group = OBJ_NEW(lam_group_t); - group->grp_proc_pointers = lam_proc_self(&size); + OBJ_CONSTRUCT(&ompi_mpi_comm_self, ompi_communicator_t); + group = OBJ_NEW(ompi_group_t); + group->grp_proc_pointers = ompi_proc_self(&size); group->grp_my_rank = 0; group->grp_proc_count = size; group->grp_ok_to_free = false; OBJ_RETAIN(group); /* bump reference count for remote reference */ - lam_mpi_comm_self.c_contextid = 1; - lam_mpi_comm_self.c_f_to_c_index = 1; - lam_mpi_comm_self.c_my_rank = group->grp_my_rank; - lam_mpi_comm_self.c_local_group = group; - lam_mpi_comm_self.c_remote_group = group; - lam_mpi_comm_self.error_handler = &lam_mpi_errors_are_fatal; - OBJ_RETAIN( &lam_mpi_errors_are_fatal ); - mca_pml.pml_add_comm(&lam_mpi_comm_self); - lam_pointer_array_set_item (&lam_mpi_communicators, 1, &lam_mpi_comm_self); + ompi_mpi_comm_self.c_contextid = 1; + ompi_mpi_comm_self.c_f_to_c_index = 1; + ompi_mpi_comm_self.c_my_rank = group->grp_my_rank; + ompi_mpi_comm_self.c_local_group = group; + ompi_mpi_comm_self.c_remote_group = group; + ompi_mpi_comm_self.error_handler = &ompi_mpi_errors_are_fatal; + OBJ_RETAIN( &ompi_mpi_errors_are_fatal ); + mca_pml.pml_add_comm(&ompi_mpi_comm_self); + ompi_pointer_array_set_item (&ompi_mpi_communicators, 1, &ompi_mpi_comm_self); - strncpy(lam_mpi_comm_self.c_name,"MPI_COMM_SELF",strlen("MPI_COMM_SELF")+1); - lam_mpi_comm_self.c_flags |= LAM_COMM_NAMEISSET; - lam_attr_hash_init(&lam_mpi_comm_self.c_keyhash); + strncpy(ompi_mpi_comm_self.c_name,"MPI_COMM_SELF",strlen("MPI_COMM_SELF")+1); + ompi_mpi_comm_self.c_flags |= OMPI_COMM_NAMEISSET; + ompi_attr_hash_init(&ompi_mpi_comm_self.c_keyhash); /* VPS: Remove this later */ - lam_mpi_comm_self.bcast_lin_reqs = - malloc (mca_coll_base_bcast_collmaxlin * sizeof(lam_request_t*)); - if (NULL == lam_mpi_comm_self.bcast_lin_reqs) { - return LAM_ERR_OUT_OF_RESOURCE; + ompi_mpi_comm_self.bcast_lin_reqs = + malloc (mca_coll_base_bcast_collmaxlin * sizeof(ompi_request_t*)); + if (NULL == ompi_mpi_comm_self.bcast_lin_reqs) { + return OMPI_ERR_OUT_OF_RESOURCE; } - lam_mpi_comm_self.bcast_log_reqs = - malloc (mca_coll_base_bcast_collmaxdim * sizeof(lam_request_t*)); - if (NULL == lam_mpi_comm_self.bcast_log_reqs) { - return LAM_ERR_OUT_OF_RESOURCE; + ompi_mpi_comm_self.bcast_log_reqs = + malloc (mca_coll_base_bcast_collmaxdim * sizeof(ompi_request_t*)); + if (NULL == ompi_mpi_comm_self.bcast_log_reqs) { + return OMPI_ERR_OUT_OF_RESOURCE; } /* Setup MPI_COMM_NULL */ - OBJ_CONSTRUCT(&lam_mpi_comm_null, lam_communicator_t); - group = OBJ_NEW(lam_group_t); + OBJ_CONSTRUCT(&ompi_mpi_comm_null, ompi_communicator_t); + group = OBJ_NEW(ompi_group_t); group->grp_proc_pointers = NULL; group->grp_my_rank = MPI_PROC_NULL; group->grp_proc_count = 0; group->grp_ok_to_free = false; OBJ_RETAIN(group); /* bump reference count for remote reference */ - lam_mpi_comm_null.c_contextid = 2; - lam_mpi_comm_null.c_f_to_c_index = 2; - lam_mpi_comm_null.c_my_rank = MPI_PROC_NULL; - lam_mpi_comm_null.c_local_group = group; - lam_mpi_comm_null.c_remote_group = group; - lam_mpi_comm_null.error_handler = &lam_mpi_errors_are_fatal; - OBJ_RETAIN( &lam_mpi_errors_are_fatal ); - lam_pointer_array_set_item (&lam_mpi_communicators, 2, &lam_mpi_comm_null); + ompi_mpi_comm_null.c_contextid = 2; + ompi_mpi_comm_null.c_f_to_c_index = 2; + ompi_mpi_comm_null.c_my_rank = MPI_PROC_NULL; + ompi_mpi_comm_null.c_local_group = group; + ompi_mpi_comm_null.c_remote_group = group; + ompi_mpi_comm_null.error_handler = &ompi_mpi_errors_are_fatal; + OBJ_RETAIN( &ompi_mpi_errors_are_fatal ); + ompi_pointer_array_set_item (&ompi_mpi_communicators, 2, &ompi_mpi_comm_null); - strncpy(lam_mpi_comm_null.c_name,"MPI_COMM_NULL",strlen("MPI_COMM_NULL")+1); - lam_mpi_comm_null.c_flags |= LAM_COMM_NAMEISSET; + strncpy(ompi_mpi_comm_null.c_name,"MPI_COMM_NULL",strlen("MPI_COMM_NULL")+1); + ompi_mpi_comm_null.c_flags |= OMPI_COMM_NAMEISSET; /* VPS: Remove this later */ - lam_mpi_comm_null.bcast_lin_reqs = NULL; - lam_mpi_comm_null.bcast_log_reqs = NULL; + ompi_mpi_comm_null.bcast_lin_reqs = NULL; + ompi_mpi_comm_null.bcast_log_reqs = NULL; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -lam_communicator_t *lam_comm_allocate ( int local_size, int remote_size ) +ompi_communicator_t *ompi_comm_allocate ( int local_size, int remote_size ) { - lam_communicator_t *new_comm=NULL; + ompi_communicator_t *new_comm=NULL; /* create new communicator element */ - new_comm = OBJ_NEW(lam_communicator_t); - new_comm->c_local_group = lam_group_allocate ( local_size ); + new_comm = OBJ_NEW(ompi_communicator_t); + new_comm->c_local_group = ompi_group_allocate ( local_size ); if ( 0 < remote_size ) { - new_comm->c_remote_group = lam_group_allocate (remote_size); - new_comm->c_flags |= LAM_COMM_INTER; + new_comm->c_remote_group = ompi_group_allocate (remote_size); + new_comm->c_flags |= OMPI_COMM_INTER; } else { /* @@ -167,8 +167,8 @@ lam_communicator_t *lam_comm_allocate ( int local_size, int remote_size ) } /* fill in the inscribing hyper-cube dimensions */ - new_comm->c_cube_dim = lam_cube_dim(local_size); - if ( LAM_ERROR == new_comm->c_cube_dim ) { + new_comm->c_cube_dim = ompi_cube_dim(local_size); + if ( OMPI_ERROR == new_comm->c_cube_dim ) { OBJ_RELEASE(new_comm); new_comm = NULL; } @@ -176,24 +176,24 @@ lam_communicator_t *lam_comm_allocate ( int local_size, int remote_size ) return new_comm; } -int lam_comm_finalize(void) +int ompi_comm_finalize(void) { /* Destroy all predefined communicators */ - OBJ_DESTRUCT( &lam_mpi_comm_null ); - OBJ_DESTRUCT( &lam_mpi_comm_world ); - OBJ_DESTRUCT( &lam_mpi_comm_self ); + OBJ_DESTRUCT( &ompi_mpi_comm_null ); + OBJ_DESTRUCT( &ompi_mpi_comm_world ); + OBJ_DESTRUCT( &ompi_mpi_comm_self ); - OBJ_DESTRUCT (&lam_mpi_communicators); + OBJ_DESTRUCT (&ompi_mpi_communicators); - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* * For linking only. To be checked. */ -int lam_comm_link_function(void) +int ompi_comm_link_function(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } /********************************************************************************/ @@ -201,7 +201,7 @@ int lam_comm_link_function(void) /********************************************************************************/ /* static functions */ -static void lam_comm_construct(lam_communicator_t* comm) +static void ompi_comm_construct(ompi_communicator_t* comm) { comm->c_f_to_c_index = MPI_UNDEFINED; comm->c_name[0] = '\0'; @@ -219,17 +219,17 @@ static void lam_comm_construct(lam_communicator_t* comm) return; } -static void lam_comm_destruct(lam_communicator_t* comm) +static void ompi_comm_destruct(ompi_communicator_t* comm) { OBJ_RELEASE ( comm->c_local_group ); OBJ_RELEASE ( comm->c_remote_group ); OBJ_RELEASE ( comm->error_handler ); - /* reset the lam_comm_f_to_c_table entry */ - if ( NULL != lam_pointer_array_get_item ( &lam_mpi_communicators, + /* reset the ompi_comm_f_to_c_table entry */ + if ( NULL != ompi_pointer_array_get_item ( &ompi_mpi_communicators, comm->c_f_to_c_index )) { - lam_pointer_array_set_item ( &lam_mpi_communicators, + ompi_pointer_array_set_item ( &ompi_mpi_communicators, comm->c_f_to_c_index, NULL); } diff --git a/src/ctnetwork/Makefile.am b/src/ctnetwork/Makefile.am index 575f97bf32..3a1ebba9ac 100644 --- a/src/ctnetwork/Makefile.am +++ b/src/ctnetwork/Makefile.am @@ -33,8 +33,8 @@ bogus = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/ctnetwork -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/ctnetwork +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/ctnetwork/ctchannel.c b/src/ctnetwork/ctchannel.c index 54167628c9..79aa89d811 100644 --- a/src/ctnetwork/ctchannel.c +++ b/src/ctnetwork/ctchannel.c @@ -7,10 +7,10 @@ #include "ctnetwork/ctchannel.h" #define CHANNEL_CLS(chnl) \ - ((lam_ctchannel_class_t *)(((lam_object_t *) chnl)->obj_class)) + ((ompi_ctchannel_class_t *)(((ompi_object_t *) chnl)->obj_class)) -static void lam_cth_construct(lam_ctchannel_t *channel) +static void ompi_cth_construct(ompi_ctchannel_t *channel) { channel->cth_status = CT_CHNL_CLOSED; channel->cth_id = 0; @@ -18,17 +18,17 @@ static void lam_cth_construct(lam_ctchannel_t *channel) } -static void lam_cth_construct(lam_ctchannel_t *channel) +static void ompi_cth_construct(ompi_ctchannel_t *channel) { } -lam_ctchannel_class_t lam_ct_channel_t_class = { +ompi_ctchannel_class_t ompi_ct_channel_t_class = { { - "lam_ct_channel_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t) lam_cth_construct, - (lam_destruct_t) lam_object_destruct + "ompi_ct_channel_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t) ompi_cth_construct, + (ompi_destruct_t) ompi_object_destruct }, NULL, NULL, NULL, NULL, NULL, NULL }; @@ -43,7 +43,7 @@ lam_ctchannel_class_t lam_ct_channel_t_class = { /* return: error code args: (channel, data, data length, bytes sent) */ -uint32_t lam_cth_send(lam_ctchannel_t *channel, const uint8_t *data, +uint32_t ompi_cth_send(ompi_ctchannel_t *channel, const uint8_t *data, uint32_t data_len, uint32_t *bytes_sent) { return CHANNEL_CLS(channel)->cth_send(channel, data, data_len, @@ -51,7 +51,7 @@ uint32_t lam_cth_send(lam_ctchannel_t *channel, const uint8_t *data, } /* return: error code args: (channel, recv buffer, buffer length, bytes received) */ -uint32_t lam_cth_recv(lam_ctchannel_t *channel, const uint8_t *buffer, +uint32_t ompi_cth_recv(ompi_ctchannel_t *channel, const uint8_t *buffer, uint32_t buff_len, uint32_t *bytes_recvd) { return CHANNEL_CLS(channel)->cth_recv(channel, buffer, @@ -59,13 +59,13 @@ uint32_t lam_cth_recv(lam_ctchannel_t *channel, const uint8_t *buffer, } /* return: error code args: (channel, msg ptr) */ -uint32_t lam_cth_get_msg(lam_ctchannel_t *channel, lam_ctmsg_t **msg) +uint32_t ompi_cth_get_msg(ompi_ctchannel_t *channel, ompi_ctmsg_t **msg) { return CHANNEL_CLS(channel)->cth_get_msg(channel, msg); } /* return: error code args: (channel, recv buffer ptr, bytes received) */ -uint32_t lam_cth_get_packed_msg(lam_ctchannel_t *channel, +uint32_t ompi_cth_get_packed_msg(ompi_ctchannel_t *channel, const uint8_t **buffer, uint32_t *bytes_recvd) { @@ -74,14 +74,14 @@ uint32_t lam_cth_get_packed_msg(lam_ctchannel_t *channel, } /* return: error code args: (channel, msg) */ -uint32_t lam_cth_send_msg(lam_ctchannel_t *channel, lam_ctmsg_t *msg) +uint32_t ompi_cth_send_msg(ompi_ctchannel_t *channel, ompi_ctmsg_t *msg) { return CHANNEL_CLS(channel)->cth_send_msg(channel, msg); } /* return: error code args: (channel, msg ptr, msg len) */ -uint32_t lam_cth_send_packed_msg(lam_ctchannel_t *channel, +uint32_t ompi_cth_send_packed_msg(ompi_ctchannel_t *channel, const uint8_t *packed_msg, uint32_t msg_len) { @@ -101,7 +101,7 @@ uint32_t lam_cth_send_packed_msg(lam_ctchannel_t *channel, */ -static void lam_tcpch_construct(lam_tcp_chnl_t *channel) +static void ompi_tcpch_construct(ompi_tcp_chnl_t *channel) { channel->tcp_sockfd = 0; memset(&(channel->tcp_addr), 0, sizeof(channel->tcp_addr)); @@ -109,28 +109,28 @@ static void lam_tcpch_construct(lam_tcp_chnl_t *channel) } -static void lam_tcpch_destruct(lam_tcp_chnl_t *channel) +static void ompi_tcpch_destruct(ompi_tcp_chnl_t *channel) { } -lam_ctchannel_class_t lam_tcp_chnl_t_class = { +ompi_ctchannel_class_t ompi_tcp_chnl_t_class = { { - "lam_tcp_chnl_t", - OBJ_CLASS(lam_ctchannel_t), - (lam_construct_t) lam_tcpch_construct, - (lam_destruct_t) lam_tcpch_destruct + "ompi_tcp_chnl_t", + OBJ_CLASS(ompi_ctchannel_t), + (ompi_construct_t) ompi_tcpch_construct, + (ompi_destruct_t) ompi_tcpch_destruct }, - lam_tcpch_send, - lam_tcpch_recv, - lam_tcpch_get_msg, - lam_tcpch_get_packed_msg, - lam_tcpch_send_msg, - lam_tcpch_send_packed_msg + ompi_tcpch_send, + ompi_tcpch_recv, + ompi_tcpch_get_msg, + ompi_tcpch_get_packed_msg, + ompi_tcpch_send_msg, + ompi_tcpch_send_packed_msg }; -uint32_t lam_tcpch_send(lam_tcp_chnl_t *channel, const uint8_t *data, +uint32_t ompi_tcpch_send(ompi_tcp_chnl_t *channel, const uint8_t *data, uint32_t data_len, uint32_t *bytes_sent) { uint32_t ret = CT_CHNL_ERR_OK; @@ -139,7 +139,7 @@ uint32_t lam_tcpch_send(lam_tcp_chnl_t *channel, const uint8_t *data, } -uint32_t lam_tcpch_recv(lam_tcp_chnl_t *channel, const uint8_t *buffer, +uint32_t ompi_tcpch_recv(ompi_tcp_chnl_t *channel, const uint8_t *buffer, uint32_t buff_len, uint32_t *bytes_recvd) { uint32_t ret = CT_CHNL_ERR_OK; @@ -148,7 +148,7 @@ uint32_t lam_tcpch_recv(lam_tcp_chnl_t *channel, const uint8_t *buffer, } -uint32_t lam_tcpch_get_msg(lam_tcp_chnl_t *channel, lam_ctmsg_t **msg) +uint32_t ompi_tcpch_get_msg(ompi_tcp_chnl_t *channel, ompi_ctmsg_t **msg) { uint32_t ret = CT_CHNL_ERR_OK; @@ -156,7 +156,7 @@ uint32_t lam_tcpch_get_msg(lam_tcp_chnl_t *channel, lam_ctmsg_t **msg) } -uint32_t lam_tcpch_get_packed_msg(lam_tcp_chnl_t *channel, +uint32_t ompi_tcpch_get_packed_msg(ompi_tcp_chnl_t *channel, const uint8_t **buffer, uint32_t *bytes_recvd) { @@ -166,7 +166,7 @@ uint32_t lam_tcpch_get_packed_msg(lam_tcp_chnl_t *channel, } -uint32_t lam_tcpch_send_msg(lam_tcp_chnl_t *channel, lam_ctmsg_t *msg) +uint32_t ompi_tcpch_send_msg(ompi_tcp_chnl_t *channel, ompi_ctmsg_t *msg) { uint32_t ret = CT_CHNL_ERR_OK; @@ -174,7 +174,7 @@ uint32_t lam_tcpch_send_msg(lam_tcp_chnl_t *channel, lam_ctmsg_t *msg) } -uint32_t lam_tcpch_send_packed_msg(lam_tcp_chnl_t *channel, +uint32_t ompi_tcpch_send_packed_msg(ompi_tcp_chnl_t *channel, const uint8_t *packed_msg, uint32_t msg_len) { diff --git a/src/ctnetwork/ctchannel.h b/src/ctnetwork/ctchannel.h index 5b2c275355..6d7e2d9ee1 100644 --- a/src/ctnetwork/ctchannel.h +++ b/src/ctnetwork/ctchannel.h @@ -2,14 +2,14 @@ * $HEADER$ */ -#ifndef LAM_CT_CHANNEL_H -#define LAM_CT_CHANNEL_H +#ifndef OMPI_CT_CHANNEL_H +#define OMPI_CT_CHANNEL_H #include #include #include -#include "lfc/lam_object.h" +#include "class/ompi_object.h" #include "ctnetwork/ctmessage.h" @@ -26,7 +26,7 @@ typedef enum CT_CHNL_ERR_CONN_LOST, /* lost connection */ CT_CHNL_ERR_INVALID_MSG, /* unable to pack/unpack msg or msg is NULL */ CT_CHNL_ERR_TIMED_OUT /* channel operation timed out. */ -} lam_ctchnl_error_t; +} ompi_ctchnl_error_t; /* @@ -38,7 +38,7 @@ typedef enum CT_CHNL_CLOSED = 0, CT_CHNL_CONNECTED, CT_CHNL_FAILED -} lam_ctchnl_status_t; +} ompi_ctchnl_status_t; /* * @@ -47,66 +47,66 @@ typedef enum * communicate in the network. */ -#define CTCHANNEL(obj) (lam_ctchannel_t *)(obj) +#define CTCHANNEL(obj) (ompi_ctchannel_t *)(obj) -struct lam_ctchannel; +struct ompi_ctchannel; /* return: error code args: (channel, data, data length, bytes sent) */ -typedef uint32_t (*lam_cth_send_fn_t)(struct lam_ctchannel *, +typedef uint32_t (*ompi_cth_send_fn_t)(struct ompi_ctchannel *, const uint8_t *, uint32_t, uint32_t *); /* return: error code args: (channel, recv buffer, buffer length, bytes received) */ -typedef uint32_t (*lam_cth_recv_fn_t)(struct lam_ctchannel *, +typedef uint32_t (*ompi_cth_recv_fn_t)(struct ompi_ctchannel *, const uint8_t *, uint32_t, uint32_t *); /* return: error code args: (channel, msg ptr) */ -typedef uint32_t (*lam_cth_get_msg_fn_t)(struct lam_ctchannel *, - lam_ctmsg_t **); +typedef uint32_t (*ompi_cth_get_msg_fn_t)(struct ompi_ctchannel *, + ompi_ctmsg_t **); /* return: error code args: (channel, recv buffer ptr, bytes received) */ -typedef uint32_t (*lam_cth_get_packed_msg_fn_t)(struct lam_ctchannel *, +typedef uint32_t (*ompi_cth_get_packed_msg_fn_t)(struct ompi_ctchannel *, const uint8_t **, uint32_t *); /* return: error code args: (channel, msg) */ -typedef uint32_t (*lam_cth_send_msg_fn_t)(struct lam_ctchannel *, - lam_ctmsg_t *); +typedef uint32_t (*ompi_cth_send_msg_fn_t)(struct ompi_ctchannel *, + ompi_ctmsg_t *); /* return: error code args: (channel, msg ptr, msg len) */ -typedef uint32_t (*lam_cth_send_packed_msg_fn_t)(struct lam_ctchannel *, +typedef uint32_t (*ompi_cth_send_packed_msg_fn_t)(struct ompi_ctchannel *, const uint8_t *, uint32_t); -typedef struct lam_ctchannel_class +typedef struct ompi_ctchannel_class { - lam_class_t super; + ompi_class_t super; /* return: error code args: (channel, data, data length, bytes sent) */ - lam_cth_send_fn_t *send; + ompi_cth_send_fn_t *send; /* return: error code args: (channel, recv buffer, buffer length, bytes received) */ - lam_cth_recv_fn_t *recv; + ompi_cth_recv_fn_t *recv; /* return: error code args: (channel, msg ptr) */ - lam_cth_get_msg_fn_t *get_msg; + ompi_cth_get_msg_fn_t *get_msg; /* return: error code args: (channel, recv buffer ptr, bytes received) */ - lam_cth_get_packed_msg_fn_t *get_packed_msg; + ompi_cth_get_packed_msg_fn_t *get_packed_msg; /* return: error code args: (channel, msg) */ - lam_cth_send_msg_fn_t *send_msg; + ompi_cth_send_msg_fn_t *send_msg; /* return: error code args: (channel, msg ptr, msg len) */ - lam_cth_send_packed_msg_fn_t *send_packed_msg; -} lam_ctchannel_class_t; + ompi_cth_send_packed_msg_fn_t *send_packed_msg; +} ompi_ctchannel_class_t; -extern lam_ctchannel_class_t lam_ct_channel_t_class; +extern ompi_ctchannel_class_t ompi_ct_channel_t_class; -typedef struct lam_ctchannel +typedef struct ompi_ctchannel { - lam_object_t super; + ompi_object_t super; int cth_status; uint32_t cth_id; uint32_t cth_timeout_secs; -} lam_ctchannel_t; +} ompi_ctchannel_t; /* @@ -115,30 +115,30 @@ typedef struct lam_ctchannel * */ -int lam_cth_is_connected(lam_ctchannel_t *channel); -inline int lam_cth_is_connected(lam_ctchannel_t *channel) +int ompi_cth_is_connected(ompi_ctchannel_t *channel); +inline int ompi_cth_is_connected(ompi_ctchannel_t *channel) { return (CT_CHNL_CONNECTED == channel->cth_status); } -uint32_t lam_cth_get_id(lam_ctchannel_t *channel); -inline uint32_t lam_cth_get_id(lam_ctchannel_t *channel) +uint32_t ompi_cth_get_id(ompi_ctchannel_t *channel); +inline uint32_t ompi_cth_get_id(ompi_ctchannel_t *channel) { return channel->cth_id; } -void lam_cth_set_id(lam_ctchannel_t *channel, uint32_t cid); -inline void lam_cth_set_id(lam_ctchannel_t *channel, uint32_t cid) +void ompi_cth_set_id(ompi_ctchannel_t *channel, uint32_t cid); +inline void ompi_cth_set_id(ompi_ctchannel_t *channel, uint32_t cid) { channel->cth_id = cid; } -uint32_t lam_cth_get_timeout(lam_ctchannel_t *channel); -inline uint32_t lam_cth_get_timeout(lam_ctchannel_t *channel) +uint32_t ompi_cth_get_timeout(ompi_ctchannel_t *channel); +inline uint32_t ompi_cth_get_timeout(ompi_ctchannel_t *channel) { return channel->cth_timeout_secs; } -void lam_cth_set_timeout(lam_ctchannel_t *channel, uint32_t timeout); -inline void lam_cth_set_timeout(lam_ctchannel_t *channel, uint32_t timeout) +void ompi_cth_set_timeout(ompi_ctchannel_t *channel, uint32_t timeout); +inline void ompi_cth_set_timeout(ompi_ctchannel_t *channel, uint32_t timeout) { channel->cth_timeout_secs = timeout; } @@ -152,25 +152,25 @@ inline void lam_cth_set_timeout(lam_ctchannel_t *channel, uint32_t timeout) /* return: error code args: (channel, data, data length, bytes sent) */ -uint32_t lam_cth_send(lam_ctchannel_t *channel, const uint8_t *data, +uint32_t ompi_cth_send(ompi_ctchannel_t *channel, const uint8_t *data, uint32_t data_len, uint32_t *bytes_sent); /* return: error code args: (channel, recv buffer, buffer length, bytes received) */ -uint32_t lam_cth_recv(lam_ctchannel_t *channel, const uint8_t *buffer, +uint32_t ompi_cth_recv(ompi_ctchannel_t *channel, const uint8_t *buffer, uint32_t buff_len, uint32_t *bytes_recvd); /* return: error code args: (channel, msg ptr) */ -uint32_t lam_cth_get_msg(lam_ctchannel_t *channel, lam_ctmsg_t **msg); +uint32_t ompi_cth_get_msg(ompi_ctchannel_t *channel, ompi_ctmsg_t **msg); /* return: error code args: (channel, recv buffer ptr, bytes received) */ -uint32_t lam_cth_get_packed_msg(lam_ctchannel_t *channel, const uint8_t **buffer, +uint32_t ompi_cth_get_packed_msg(ompi_ctchannel_t *channel, const uint8_t **buffer, uint32_t *bytes_recvd); /* return: error code args: (channel, msg) */ -uint32_t lam_cth_send_msg(lam_ctchannel_t *channel, lam_ctmsg_t *msg); +uint32_t ompi_cth_send_msg(ompi_ctchannel_t *channel, ompi_ctmsg_t *msg); /* return: error code args: (channel, msg ptr, msg len) */ -uint32_t lam_cth_send_packed_msg(lam_ctchannel_t *channel, const uint8_t *packed_msg, +uint32_t ompi_cth_send_packed_msg(ompi_ctchannel_t *channel, const uint8_t *packed_msg, uint32_t msg_len); /* @@ -179,32 +179,32 @@ uint32_t lam_cth_send_packed_msg(lam_ctchannel_t *channel, const uint8_t *packed * */ -typedef struct lam_tcp_channel +typedef struct ompi_tcp_channel { - lam_ctchannel_t super; + ompi_ctchannel_t super; int tcp_sockfd; struct sockaddr_in tcp_addr; int tcp_blocking; -} lam_tcp_chnl_t; +} ompi_tcp_chnl_t; -extern lam_ctchannel_class_t lam_tcp_chnl_t_class; +extern ompi_ctchannel_class_t ompi_tcp_chnl_t_class; -uint32_t lam_tcpch_send(lam_tcp_chnl_t *channel, const uint8_t *data, +uint32_t ompi_tcpch_send(ompi_tcp_chnl_t *channel, const uint8_t *data, uint32_t data_len, uint32_t *bytes_sent); -uint32_t lam_tcpch_recv(lam_tcp_chnl_t *channel, const uint8_t *buffer, +uint32_t ompi_tcpch_recv(ompi_tcp_chnl_t *channel, const uint8_t *buffer, uint32_t buff_len, uint32_t *bytes_recvd); -uint32_t lam_tcpch_get_msg(lam_tcp_chnl_t *channel, lam_ctmsg_t **msg); +uint32_t ompi_tcpch_get_msg(ompi_tcp_chnl_t *channel, ompi_ctmsg_t **msg); -uint32_t lam_tcpch_get_packed_msg(lam_tcp_chnl_t *channel, const uint8_t **buffer, +uint32_t ompi_tcpch_get_packed_msg(ompi_tcp_chnl_t *channel, const uint8_t **buffer, uint32_t *bytes_recvd); -uint32_t lam_tcpch_send_msg(lam_tcp_chnl_t *channel, lam_ctmsg_t *msg); +uint32_t ompi_tcpch_send_msg(ompi_tcp_chnl_t *channel, ompi_ctmsg_t *msg); -uint32_t lam_tcpch_send_packed_msg(lam_tcp_chnl_t *channel, +uint32_t ompi_tcpch_send_packed_msg(ompi_tcp_chnl_t *channel, const uint8_t *packed_msg, uint32_t msg_len); -#endif /* LAM_CT_CHANNEL_H */ +#endif /* OMPI_CT_CHANNEL_H */ diff --git a/src/ctnetwork/ctclient.h b/src/ctnetwork/ctclient.h index 093ff6eaf5..7b842eda79 100644 --- a/src/ctnetwork/ctclient.h +++ b/src/ctnetwork/ctclient.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_CT_CLIENT_H -#define LAM_CT_CLIENT_H +#ifndef OMPI_CT_CLIENT_H +#define OMPI_CT_CLIENT_H -#endif /* LAM_CT_CLIENT_H */ +#endif /* OMPI_CT_CLIENT_H */ diff --git a/src/ctnetwork/ctcontroller.h b/src/ctnetwork/ctcontroller.h index a59d4c520d..ec56939a2e 100644 --- a/src/ctnetwork/ctcontroller.h +++ b/src/ctnetwork/ctcontroller.h @@ -2,42 +2,42 @@ * $HEADER$ */ -#ifndef LAM_CT_CONTROLLER_H -#define LAM_CT_CONTROLLER_H +#ifndef OMPI_CT_CONTROLLER_H +#define OMPI_CT_CONTROLLER_H -#include "lfc/lam_object.h" +#include "class/ompi_object.h" #include "ctnetwork/ctnode.h" -typedef void (*lam_ctmsg_recvd_fn)(struct lam_ctcontroller *, - lam_ctmsg_t *, +typedef void (*ompi_ctmsg_recvd_fn)(struct ompi_ctcontroller *, + ompi_ctmsg_t *, void *); -typedef void (*lam_ctnode_failed_fn)(struct lam_ctcontroller *, - lam_ctnode_t *, +typedef void (*ompi_ctnode_failed_fn)(struct ompi_ctcontroller *, + ompi_ctnode_t *, void *); -typedef struct lam_ctcontroller +typedef struct ompi_ctcontroller { - lam_object_t super; - lam_ctnode_t ctl_node; + ompi_object_t super; + ompi_ctnode_t ctl_node; void *ctl_user_info; - lam_ctmsg_recvd_fn ctl_msg_recvd_callback; - lam_ctnode_failed_fn ctl_node_failed_callback; -} lam_ctctrl_t; + ompi_ctmsg_recvd_fn ctl_msg_recvd_callback; + ompi_ctnode_failed_fn ctl_node_failed_callback; +} ompi_ctctrl_t; -void lam_ctl_construct(lam_ctctrl_t *ctrl); -void lam_ctl_destruct(lam_ctctrl_t *ctrl); +void ompi_ctl_construct(ompi_ctctrl_t *ctrl); +void ompi_ctl_destruct(ompi_ctctrl_t *ctrl); -inline void lam_ctl_set_recvd_callback(lam_ctctrl_t *ctrl, lam_ctmsg_recvd_fn callback) +inline void ompi_ctl_set_recvd_callback(ompi_ctctrl_t *ctrl, ompi_ctmsg_recvd_fn callback) { ctrl->ctl_msg_recvd_callback = callback; } -inline void lam_ctl_set_failed_callback(lam_ctctrl_t *ctrl, lam_ctnode_failed_fn callback) +inline void ompi_ctl_set_failed_callback(ompi_ctctrl_t *ctrl, ompi_ctnode_failed_fn callback) { ctrl->ctl_node_failed_callback = callback; } -#endif /* LAM_CT_CONTROLLER_H */ +#endif /* OMPI_CT_CONTROLLER_H */ diff --git a/src/ctnetwork/ctmessage.c b/src/ctnetwork/ctmessage.c index dd30e02143..23e400a6ab 100644 --- a/src/ctnetwork/ctmessage.c +++ b/src/ctnetwork/ctmessage.c @@ -5,29 +5,29 @@ #include "ctnetwork/ctmessage.h" -lam_class_t lam_ct_ctrl_t_class = { - "lam_ct_ctrl_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t) lam_ctc_construct, - (lam_destruct_t) lam_ctc_destruct +ompi_class_t ompi_ct_ctrl_t_class = { + "ompi_ct_ctrl_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t) ompi_ctc_construct, + (ompi_destruct_t) ompi_ctc_destruct }; -lam_class_t lam_ctmsg_t_class = { - "lam_ctmsg_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t) lam_ctm_construct, - (lam_destruct_t) lam_ctm_destruct +ompi_class_t ompi_ctmsg_t_class = { + "ompi_ctmsg_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t) ompi_ctm_construct, + (ompi_destruct_t) ompi_ctm_destruct }; -static const uint32_t ctrl_alloc_len = sizeof(lam_ct_ctrl_t) - - sizeof(lam_object_t) - sizeof(ctrl->ctc_info); +static const uint32_t ctrl_alloc_len = sizeof(ompi_ct_ctrl_t) - + sizeof(ompi_object_t) - sizeof(ctrl->ctc_info); -void lam_ctc_construct(lam_ct_ctrl_t *ctrl) +void ompi_ctc_construct(ompi_ct_ctrl_t *ctrl) { ctrl->ctc_is_user_msg = 0; - ctrl->ctc_routing_type = LAM_CT_PT2PT; + ctrl->ctc_routing_type = OMPI_CT_PT2PT; ctrl->ctc_sender = 0; ctrl->ctc_dest = 0; ctrl->ctc_forwarding = 0; @@ -38,14 +38,14 @@ void lam_ctc_construct(lam_ct_ctrl_t *ctrl) -void lam_ctc_destruct(lam_ct_ctrl_t *ctrl) +void ompi_ctc_destruct(ompi_ct_ctrl_t *ctrl) { - lam_free(ctrl->ctc_info); + ompi_free(ctrl->ctc_info); } -void lam_ctc_construct_with(lam_ct_ctrl_t *ctrl, int routing_type, +void ompi_ctc_construct_with(ompi_ct_ctrl_t *ctrl, int routing_type, uint32_t sender, uint32_t dest) { ctrl->ctc_routing_type = routing_type; @@ -54,12 +54,12 @@ void lam_ctc_construct_with(lam_ct_ctrl_t *ctrl, int routing_type, } -uint32_t lam_ctc_pack_size(lam_ct_ctrl_t *ctrl) +uint32_t ompi_ctc_pack_size(ompi_ct_ctrl_t *ctrl) { return ctrl_alloc_len + ctrl->ctc_info_len; } -uint8_t *lam_ctc_pack(lam_ct_ctrl_t *ctrl, uint32_t *len) +uint8_t *ompi_ctc_pack(ompi_ct_ctrl_t *ctrl, uint32_t *len) { /* ASSERT: packed control struct looks like @@ -69,20 +69,20 @@ uint8_t *lam_ctc_pack(lam_ct_ctrl_t *ctrl, uint32_t *len) */ uint8_t *buffer; - buffer = (uint8_t *) lam_malloc(ctrl_alloc_len + ctrl->ctc_info_len); + buffer = (uint8_t *) ompi_malloc(ctrl_alloc_len + ctrl->ctc_info_len); if (0 == buffer) { return 0; } - lam_ctc_pack_buffer(ctrl, buffer, len); + ompi_ctc_pack_buffer(ctrl, buffer, len); return buffer; } -lam_ct_ctrl_t *lam_ctc_unpack(uint8_t *buffer) +ompi_ct_ctrl_t *ompi_ctc_unpack(uint8_t *buffer) { - lam_ct_ctrl_t *ctrl; + ompi_ct_ctrl_t *ctrl; /* ASSERT: packed control struct looks like @@ -90,13 +90,13 @@ lam_ct_ctrl_t *lam_ctc_unpack(uint8_t *buffer) */ - ctrl = OBJ_NEW(lam_ct_ctrl_t); + ctrl = OBJ_NEW(ompi_ct_ctrl_t); if (0 == ctrl) { return 0; } memcpy(&(ctrl->ctc_is_user_msg), buffer, ctrl_alloc_len); - ctrl->ctc_info = (uint8_t *) lam_malloc(ctrl->ctc_info_len); + ctrl->ctc_info = (uint8_t *) ompi_malloc(ctrl->ctc_info_len); if (0 == ctrl->ctc_info) { OBJ_RELEASE(ctrl); return 0; @@ -108,7 +108,7 @@ lam_ct_ctrl_t *lam_ctc_unpack(uint8_t *buffer) -int lam_ctc_pack_buffer(lam_ct_ctrl_t *ctrl, uint8_t *buffer, +int ompi_ctc_pack_buffer(ompi_ct_ctrl_t *ctrl, uint8_t *buffer, uint32_t *len) { int ret = 0; @@ -122,7 +122,7 @@ int lam_ctc_pack_buffer(lam_ct_ctrl_t *ctrl, uint8_t *buffer, -int lam_ctc_unpack_buffer(lam_ct_ctrl_t *ctrl, uint8_t *buffer, +int ompi_ctc_unpack_buffer(ompi_ct_ctrl_t *ctrl, uint8_t *buffer, uint32_t *len) { int ret = 0; @@ -137,47 +137,47 @@ int lam_ctc_unpack_buffer(lam_ct_ctrl_t *ctrl, uint8_t *buffer, * control struct. */ -uint16_t lam_pk_ctc_is_user_msg(uint8_t *buffer) +uint16_t ompi_pk_ctc_is_user_msg(uint8_t *buffer) { return *((uint16_t *) buffer); } -uint16_t lam_pk_ctc_get_routing_type(uint8_t *buffer) +uint16_t ompi_pk_ctc_get_routing_type(uint8_t *buffer) { return *(uint16_t *) (buffer + sizeof(uint16_t)); } -uint32_t lam_pk_ctc_get_sender(uint8_t *buffer) +uint32_t ompi_pk_ctc_get_sender(uint8_t *buffer) { return *(uint32_t *) (buffer + 2 * sizeof(uint16_t)); } -uint32_t lam_pkctc_get_dest(uint8_t *buffer) +uint32_t ompi_pkctc_get_dest(uint8_t *buffer) { return *(uint32_t *) (buffer + 2 * sizeof(uint16_t) + sizeof(uint32_t)); } -uint32_t lam_pk_ctc_get_forwarding(uint8_t *buffer) +uint32_t ompi_pk_ctc_get_forwarding(uint8_t *buffer) { return *(uint32_t *) (buffer + 2 * sizeof(uint16_t) + 2 * sizeof(uint32_t)); } -void lam_pk_ctc_set_forwarding(uint8_t *buffer, uint32_t node) +void ompi_pk_ctc_set_forwarding(uint8_t *buffer, uint32_t node) { memcpy(buffer + 2 * sizeof(uint16_t) + 2 * sizeof(uint32_t), &node, sizeof(node)); } -uint8_t *lam_pk_ctc_get_info(uint8_t *buffer, uint32_t *len) +uint8_t *ompi_pk_ctc_get_info(uint8_t *buffer, uint32_t *len) { memcpy(len, buffer + ctrl_alloc_len - sizeof(uint32_t), sizeof(uint32_t)); return buffer + ctrl_alloc_len; } -void lam_pk_ctc_set_info(uint8_t *buffer, uint8_t *info) +void ompi_pk_ctc_set_info(uint8_t *buffer, uint8_t *info) { uint32_t len; @@ -194,36 +194,36 @@ void lam_pk_ctc_set_info(uint8_t *buffer, uint8_t *info) */ -void lam_ctm_construct(lam_ctmsg_t *msg) +void ompi_ctm_construct(ompi_ctmsg_t *msg) { - msg->ctm_ctrl = OBJ_NEW(lam_ct_ctrl_t); + msg->ctm_ctrl = OBJ_NEW(ompi_ct_ctrl_t); msg->ctm_len = 0; msg->ctm_data = 0; msg->ctm_should_free = 1; } -void lam_ctm_destruct(lam_ctmsg_t *msg) +void ompi_ctm_destruct(ompi_ctmsg_t *msg) { if (msg->ctm_should_free) { - lam_free(msg->ctm_data); + ompi_free(msg->ctm_data); } OBJECT_RELEASE(msg->ctm_ctrl); } -lam_ctmsg_t *lam_ctm_create_with(int is_user_msg, int routing_type, +ompi_ctmsg_t *ompi_ctm_create_with(int is_user_msg, int routing_type, uint32_t sender, uint32_t dest, uint8_t *data, uint32_t data_len, int should_free) { - lam_ctmsg_t *msg; + ompi_ctmsg_t *msg; - msg = OBJ_NEW(lam_ctmsg_t); + msg = OBJ_NEW(ompi_ctmsg_t); if (0 == msg) { return 0; } - OBJ_CONSTRUCT(&msg->ctm_ctrl, lam_ct_ctrl_t); - lam_ctc_construct_with(&(msg->ctm_ctrl), sender, dest); + OBJ_CONSTRUCT(&msg->ctm_ctrl, ompi_ct_ctrl_t); + ompi_ctc_construct_with(&(msg->ctm_ctrl), sender, dest); msg->ctm_should_free = should_free; msg->ctm_data = data; msg->ctm_len = data_len; @@ -231,7 +231,7 @@ lam_ctmsg_t *lam_ctm_create_with(int is_user_msg, int routing_type, return msg; } -uint8_t *lam_ctm_pack(lam_ctmsg_t *msg) +uint8_t *ompi_ctm_pack(ompi_ctmsg_t *msg) { /* packed msg layout @@ -242,7 +242,7 @@ uint8_t *lam_ctm_pack(lam_ctmsg_t *msg) } -lam_ctmsg_t *lam_ctm_unpack(uint8_t *buffer) +ompi_ctmsg_t *ompi_ctm_unpack(uint8_t *buffer) { /* packed msg layout @@ -256,12 +256,12 @@ lam_ctmsg_t *lam_ctm_unpack(uint8_t *buffer) * msg struct. */ -uint8_t *lam_pk_ctm_get_control(uint8_t *buffer) +uint8_t *ompi_pk_ctm_get_control(uint8_t *buffer) { } -uint8_t *lam_pk_ctm_get_data(uint8_t *buffer, uint32_t *len) +uint8_t *ompi_pk_ctm_get_data(uint8_t *buffer, uint32_t *len) { } diff --git a/src/ctnetwork/ctmessage.h b/src/ctnetwork/ctmessage.h index 40f98a1ffe..1600fc749f 100644 --- a/src/ctnetwork/ctmessage.h +++ b/src/ctnetwork/ctmessage.h @@ -2,10 +2,10 @@ * $HEADER$ */ -#ifndef LAM_CT_MESSAGE_H -#define LAM_CT_MESSAGE_H +#ifndef OMPI_CT_MESSAGE_H +#define OMPI_CT_MESSAGE_H -#include "lfc/lam_object.h" +#include "class/ompi_object.h" /* @@ -14,8 +14,8 @@ * */ -extern lam_class_t lam_ct_ctrl_t_class; -extern lam_class_t lam_ctmsg_t_class; +extern ompi_class_t ompi_ct_ctrl_t_class; +extern ompi_class_t ompi_ctmsg_t_class; /* * @@ -34,10 +34,10 @@ extern lam_class_t lam_ctmsg_t_class; enum { - LAM_CT_BCAST = 1, - LAM_CT_ALLGATHER, - LAM_CT_SCATTER, - LAM_CT_PT2PT + OMPI_CT_BCAST = 1, + OMPI_CT_ALLGATHER, + OMPI_CT_SCATTER, + OMPI_CT_PT2PT }; /* @@ -48,9 +48,9 @@ enum * */ -typedef struct lam_ct_ctrl +typedef struct ompi_ct_ctrl { - lam_object_t super; + ompi_object_t super; uint16_t ctc_is_user_msg; /* 1 -> msg is for user app. */ uint16_t ctc_routing_type; /* broadcast, scatter, pt2pt, etc. */ uint32_t ctc_sender; /* node that initiated send. */ @@ -59,110 +59,110 @@ typedef struct lam_ct_ctrl uint32_t ctc_client_tag; /* tag if client sent msg. */ uint32_t ctc_info_len; uint8_t *ctc_info; -} lam_ct_ctrl_t; +} ompi_ct_ctrl_t; -void lam_ctc_construct(lam_ct_ctrl_t *ctrl); -void lam_ctc_destruct(lam_ct_ctrl_t *ctrl); +void ompi_ctc_construct(ompi_ct_ctrl_t *ctrl); +void ompi_ctc_destruct(ompi_ct_ctrl_t *ctrl); -void lam_ctc_construct_with(lam_ct_ctrl_t *ctrl, int routing_type, +void ompi_ctc_construct_with(ompi_ct_ctrl_t *ctrl, int routing_type, uint32_t sender, uint32_t dest); -uint32_t lam_ctc_pack_size(lam_ct_ctrl_t *ctrl); -uint8_t *lam_ctc_pack(lam_ct_ctrl_t *ctrl, uint32_t *len); -lam_ct_ctrl_t *lam_ctc_unpack(uint8_t *buffer); +uint32_t ompi_ctc_pack_size(ompi_ct_ctrl_t *ctrl); +uint8_t *ompi_ctc_pack(ompi_ct_ctrl_t *ctrl, uint32_t *len); +ompi_ct_ctrl_t *ompi_ctc_unpack(uint8_t *buffer); -int lam_ctc_pack_buffer(lam_ct_ctrl_t *ctrl, uint8_t *buffer, uint32_t *len); -int lam_ctc_unpack_buffer(lam_ct_ctrl_t *ctrl, uint8_t *buffer, uint32_t *len); +int ompi_ctc_pack_buffer(ompi_ct_ctrl_t *ctrl, uint8_t *buffer, uint32_t *len); +int ompi_ctc_unpack_buffer(ompi_ct_ctrl_t *ctrl, uint8_t *buffer, uint32_t *len); /* * Functions for accessing data in packed * control struct. */ -uint16_t lam_pk_ctc_is_user_msg(uint8_t *buffer); +uint16_t ompi_pk_ctc_is_user_msg(uint8_t *buffer); -uint16_t lam_pk_ctc_get_routing_type(uint8_t *buffer); +uint16_t ompi_pk_ctc_get_routing_type(uint8_t *buffer); -uint32_t lam_pk_ctc_get_sender(uint8_t *buffer); +uint32_t ompi_pk_ctc_get_sender(uint8_t *buffer); -uint32_t lam_pk_ctc_get_dest(uint8_t *buffer); +uint32_t ompi_pk_ctc_get_dest(uint8_t *buffer); -uint32_t lam_pk_ctc_get_forwarding(uint8_t *buffer); -void lam_pk_ctc_set_forwarding(uint8_t *buffer, uint32_t node); +uint32_t ompi_pk_ctc_get_forwarding(uint8_t *buffer); +void ompi_pk_ctc_set_forwarding(uint8_t *buffer, uint32_t node); -uint8_t *lam_pk_ctc_get_info(uint8_t *buffer, uint32_t *len); -void lam_pk_ctc_set_info(uint8_t *buffer, uint8_t *info); +uint8_t *ompi_pk_ctc_get_info(uint8_t *buffer, uint32_t *len); +void ompi_pk_ctc_set_info(uint8_t *buffer, uint8_t *info); /* * Accessor functions */ -bool lam_ctc_get_is_user_msg(lam_ct_ctrl_t *ctrl); -inline bool lam_ctc_get_is_user_msg(lam_ct_ctrl_t *ctrl) +bool ompi_ctc_get_is_user_msg(ompi_ct_ctrl_t *ctrl); +inline bool ompi_ctc_get_is_user_msg(ompi_ct_ctrl_t *ctrl) { return ctrl->ctc_is_user_msg; } -void lam_ctc_set_is_user_msg(lam_ct_ctrl_t *ctrl, bool yn); -inline void lam_ctc_set_is_user_msg(lam_ct_ctrl_t *ctrl, bool yn) +void ompi_ctc_set_is_user_msg(ompi_ct_ctrl_t *ctrl, bool yn); +inline void ompi_ctc_set_is_user_msg(ompi_ct_ctrl_t *ctrl, bool yn) { ctrl->ctc_is_user_msg = yn; } -uint16_t lam_ctc_get_routing_type(lam_ct_ctrl_t *ctrl); -inline uint16_t lam_ctc_get_routing_type(lam_ct_ctrl_t *ctrl) +uint16_t ompi_ctc_get_routing_type(ompi_ct_ctrl_t *ctrl); +inline uint16_t ompi_ctc_get_routing_type(ompi_ct_ctrl_t *ctrl) { return ctrl->ctc_routing_type; } -void lam_ctc_set_routing_type(lam_ct_ctrl_t *ctrl, int rtype); -inline void lam_ctc_set_routing_type(lam_ct_ctrl_t *ctrl, int rtype) +void ompi_ctc_set_routing_type(ompi_ct_ctrl_t *ctrl, int rtype); +inline void ompi_ctc_set_routing_type(ompi_ct_ctrl_t *ctrl, int rtype) { ctrl->ctc_routing_type = rtype; } -uint32_t lam_ctc_get_sender(lam_ct_ctrl_t *ctrl); -inline uint32_t lam_ctc_get_sender(lam_ct_ctrl_t *ctrl) +uint32_t ompi_ctc_get_sender(ompi_ct_ctrl_t *ctrl); +inline uint32_t ompi_ctc_get_sender(ompi_ct_ctrl_t *ctrl) { return ctrl->ctc_sender; } -void lam_ctc_set_sender(lam_ct_ctrl_t *ctrl, uint32_t sender); -inline void lam_ctc_set_sender(lam_ct_ctrl_t *ctrl, uint32_t sender) +void ompi_ctc_set_sender(ompi_ct_ctrl_t *ctrl, uint32_t sender); +inline void ompi_ctc_set_sender(ompi_ct_ctrl_t *ctrl, uint32_t sender) { ctrl->ctc_sender = sender; } -uint32_t lam_ctc_get_dest(lam_ct_ctrl_t *ctrl); -inline uint32_t lam_ctc_get_dest(lam_ct_ctrl_t *ctrl) +uint32_t ompi_ctc_get_dest(ompi_ct_ctrl_t *ctrl); +inline uint32_t ompi_ctc_get_dest(ompi_ct_ctrl_t *ctrl) { return ctrl->ctc_dest; } -void lam_ctc_set_dest(lam_ct_ctrl_t *ctrl, uint32_t dest); -inline void lam_ctc_set_dest(lam_ct_ctrl_t *ctrl, uint32_t dest) +void ompi_ctc_set_dest(ompi_ct_ctrl_t *ctrl, uint32_t dest); +inline void ompi_ctc_set_dest(ompi_ct_ctrl_t *ctrl, uint32_t dest) { ctrl->ctc_dest = dest; } -uint32_t lam_ctc_get_forwarding(lam_ct_ctrl_t *ctrl); -inline uint32_t lam_ctc_get_forwarding(lam_ct_ctrl_t *ctrl) +uint32_t ompi_ctc_get_forwarding(ompi_ct_ctrl_t *ctrl); +inline uint32_t ompi_ctc_get_forwarding(ompi_ct_ctrl_t *ctrl) { return ctrl->ctc_forwarding; } -void lam_ctc_set_forwarding(lam_ct_ctrl_t *ctrl, uint32_t node); -inline void lam_ctc_set_forwarding(lam_ct_ctrl_t *ctrl, uint32_t node) +void ompi_ctc_set_forwarding(ompi_ct_ctrl_t *ctrl, uint32_t node); +inline void ompi_ctc_set_forwarding(ompi_ct_ctrl_t *ctrl, uint32_t node) { ctrl->ctc_forwarding = node; } -uint8_t *lam_ctc_get_info(lam_ct_ctrl_t *ctrl, uint32_t *len); -inline uint8_t *lam_ctc_get_info(lam_ct_ctrl_t *ctrl, uint32_t *len) +uint8_t *ompi_ctc_get_info(ompi_ct_ctrl_t *ctrl, uint32_t *len); +inline uint8_t *ompi_ctc_get_info(ompi_ct_ctrl_t *ctrl, uint32_t *len) { *len = ctrl->ctc_info_len; return ctrl->ctc_info; } -void lam_ctc_set_info(lam_ct_ctrl_t *ctrl, uint32_t len, uint8_t *info); -inline void lam_ctc_set_info(lam_ct_ctrl_t *ctrl, uint32_t len, uint8_t *info) +void ompi_ctc_set_info(ompi_ct_ctrl_t *ctrl, uint32_t len, uint8_t *info); +inline void ompi_ctc_set_info(ompi_ct_ctrl_t *ctrl, uint32_t len, uint8_t *info) { ctrl->ctc_info_len = len; ctrl->ctc_info = info; @@ -177,35 +177,35 @@ inline void lam_ctc_set_info(lam_ct_ctrl_t *ctrl, uint32_t len, uint8_t *info) */ -typedef struct lam_ctmsg +typedef struct ompi_ctmsg { - lam_object_t super; - lam_ct_ctrl_t *ctm_ctrl; + ompi_object_t super; + ompi_ct_ctrl_t *ctm_ctrl; uint32_t ctm_len; uint8_t *ctm_data; int ctm_should_free; -} lam_ctmsg_t; +} ompi_ctmsg_t; -void lam_ctm_construct(lam_ctmsg_t *msg); -void lam_ctm_destruct(lam_ctmsg_t *msg); +void ompi_ctm_construct(ompi_ctmsg_t *msg); +void ompi_ctm_destruct(ompi_ctmsg_t *msg); -lam_ctmsg_t *lam_ctm_create_with(int is_user_msg, int routing_type, +ompi_ctmsg_t *ompi_ctm_create_with(int is_user_msg, int routing_type, uint32_t sender, uint32_t dest, uint8_t *data, uint32_t data_len, int should_free); -uint8_t *lam_ctm_pack(lam_ctmsg_t *msg); -lam_ctmsg_t *lam_ctm_unpack(uint8_t *buffer); +uint8_t *ompi_ctm_pack(ompi_ctmsg_t *msg); +ompi_ctmsg_t *ompi_ctm_unpack(uint8_t *buffer); /* * Functions for accessing data in packed * msg struct. */ -uint8_t *lam_pk_ctm_get_control(uint8_t *buffer); -uint8_t *lam_pk_ctm_get_data(uint8_t *buffer, uint32_t *len); +uint8_t *ompi_pk_ctm_get_control(uint8_t *buffer); +uint8_t *ompi_pk_ctm_get_data(uint8_t *buffer, uint32_t *len); /* * @@ -213,16 +213,16 @@ uint8_t *lam_pk_ctm_get_data(uint8_t *buffer, uint32_t *len); * */ -lam_ct_ctrl_t *lam_ctm_get_control(lam_ctmsg_t *msg); -inline lam_ct_ctrl_t *lam_ctm_get_control(lam_ctmsg_t *msg) +ompi_ct_ctrl_t *ompi_ctm_get_control(ompi_ctmsg_t *msg); +inline ompi_ct_ctrl_t *ompi_ctm_get_control(ompi_ctmsg_t *msg) { return msg->ctm_ctrl; } -void lam_ctm_set_control(lam_ctmsg_t *msg, lam_ct_ctrl_t *ctrl); -inline void lam_ctm_set_control(lam_ctmsg_t *msg, lam_ct_ctrl_t *ctrl) +void ompi_ctm_set_control(ompi_ctmsg_t *msg, ompi_ct_ctrl_t *ctrl); +inline void ompi_ctm_set_control(ompi_ctmsg_t *msg, ompi_ct_ctrl_t *ctrl) { msg->ctm_ctrl = ctrl; } -#endif /* LAM_CT_MESSAGE_H */ +#endif /* OMPI_CT_MESSAGE_H */ diff --git a/src/ctnetwork/ctnode.h b/src/ctnetwork/ctnode.h index a5a00acb26..d7af61d91e 100644 --- a/src/ctnetwork/ctnode.h +++ b/src/ctnetwork/ctnode.h @@ -2,11 +2,11 @@ * $HEADER$ */ -#ifndef LAM_CT_NODE_H -#define LAM_CT_NODE_H +#ifndef OMPI_CT_NODE_H +#define OMPI_CT_NODE_H -#include "lfc/lam_object.h" -#include "lfc/hash_table.h" +#include "class/ompi_object.h" +#include "class/hash_table.h" /* @@ -15,19 +15,19 @@ * */ -#define CTNODE(obj) (lam_ctnode_t *)(obj) +#define CTNODE(obj) (ompi_ctnode_t *)(obj) -struct lam_ctnode; +struct ompi_ctnode; -typedef uint32_t (*lam_ctl_label_for_link_fn_t)(struct lam_ctnode *, uint32_t); -typedef char *(*lam_ctl_isa_neighbor_fn_t)(struct lam_ctnode *, uint32_t); +typedef uint32_t (*ompi_ctl_label_for_link_fn_t)(struct ompi_ctnode *, uint32_t); +typedef char *(*ompi_ctl_isa_neighbor_fn_t)(struct ompi_ctnode *, uint32_t); -typedef struct lam_ctnode_class +typedef struct ompi_ctnode_class { - lam_class_t super; - lam_ctl_label_for_link_fn_t *ctl_label_for_link; - lam_ctl_isa_neighbor_fn_t *ctl_isa_neighbor; -} lam_ctnode_class_t; + ompi_class_t super; + ompi_ctl_label_for_link_fn_t *ctl_label_for_link; + ompi_ctl_isa_neighbor_fn_t *ctl_isa_neighbor; +} ompi_ctnode_class_t; @@ -39,7 +39,7 @@ typedef struct lam_ctnode_class */ -extern lam_ctnode_class_t hypercube_t_class; +extern ompi_ctnode_class_t hypercube_t_class; @@ -51,20 +51,20 @@ extern lam_ctnode_class_t hypercube_t_class; * */ -typedef struct lam_ctnode +typedef struct ompi_ctnode { - lam_object_t super; + ompi_object_t super; uint32_t ctn_label; uint32_t ctn_num_nodes; /* total # of nodes in network */ void *ctn_user_info; - lam_fast_hash_t ctn_neighbors; - lam_fast_hash_t ctn_scatter_cache; - lam_fast_hash_t ctn_bcast_cache; -} lam_ctnode_t; + ompi_fast_hash_t ctn_neighbors; + ompi_fast_hash_t ctn_scatter_cache; + ompi_fast_hash_t ctn_bcast_cache; +} ompi_ctnode_t; -void lam_ctn_construct(lam_ctnode_t *node); -void lam_ctn_destruct(lam_ctnode_t *node); +void ompi_ctn_construct(ompi_ctnode_t *node); +void ompi_ctn_destruct(ompi_ctnode_t *node); /* * @@ -72,13 +72,13 @@ void lam_ctn_destruct(lam_ctnode_t *node); * */ -void *lam_ctn_get_neighbor(lam_ctnode_t *node, uint32_t neighbor_label); +void *ompi_ctn_get_neighbor(ompi_ctnode_t *node, uint32_t neighbor_label); /* PRE: neighbor_label is the label of the node's neighbor POST: returns a pointer to the node's neighbor */ -void lam_ctn_set_neighbor(lam_ctnode_t *node, uint32_t label, void *neighbor); +void ompi_ctn_set_neighbor(ompi_ctnode_t *node, uint32_t label, void *neighbor); /* PRE: label represents the label for a valid neighbor. POST: Adds a link to a neighbor with specified label. @@ -91,11 +91,11 @@ void lam_ctn_set_neighbor(lam_ctnode_t *node, uint32_t label, void *neighbor); * */ -inline uint32_t lam_ctn_get_label(lam_ctnode_t *node) {return node->ctn_label;} -inline void lam_ctn_set_label(lam_ctnode_t *node, uint32_t label) +inline uint32_t ompi_ctn_get_label(ompi_ctnode_t *node) {return node->ctn_label;} +inline void ompi_ctn_set_label(ompi_ctnode_t *node, uint32_t label) {node->ctn_label = label;} -inline uint32_t lam_ctn_get_num_nodes(lam_ctnode_t *node) {return node->ctn_num_nodes;} +inline uint32_t ompi_ctn_get_num_nodes(ompi_ctnode_t *node) {return node->ctn_num_nodes;} /* @@ -105,7 +105,7 @@ inline uint32_t lam_ctn_get_num_nodes(lam_ctnode_t *node) {return node->ctn_num_ * */ -int lam_ctn_isa_neighbor(lam_ctnode_t *node, uint32_t label); +int ompi_ctn_isa_neighbor(ompi_ctnode_t *node, uint32_t label); /* POST: returns 1 if a node with specified label is a label for a neighbor node. This does not imply that the get_neighbor() function @@ -114,7 +114,7 @@ int lam_ctn_isa_neighbor(lam_ctnode_t *node, uint32_t label); */ -uint32_t lam_ctn_label_for_link(lam_ctnode_t *node, uint32_t link); +uint32_t ompi_ctn_label_for_link(ompi_ctnode_t *node, uint32_t link); /* PRE: The graph edges connecting node to its neighbors are oriented so that the links (edges) are numbered starting from 1. @@ -131,7 +131,7 @@ uint32_t lam_ctn_label_for_link(lam_ctnode_t *node, uint32_t link); */ -char *lam_ctn_initial_control_data(lam_ctnode_t *node, uint32_t *ctrl_size); +char *ompi_ctn_initial_control_data(ompi_ctnode_t *node, uint32_t *ctrl_size); /* POST: Returns pointer to byte array for control data for routing messages. The length of the control array is stored in @@ -146,12 +146,12 @@ char *lam_ctn_initial_control_data(lam_ctnode_t *node, uint32_t *ctrl_size); * */ -typedef struct lam_hcube +typedef struct ompi_hcube { - lam_ctnode_t super; + ompi_ctnode_t super; unsigned int hc_hsize; /* hc_hsize = log2(# nodes in network) */ -} lam_hcube_t; +} ompi_hcube_t; -extern lam_class_t hcube_t_class; +extern ompi_class_t hcube_t_class; -#endif /* LAM_CT_NODE_H */ +#endif /* OMPI_CT_NODE_H */ diff --git a/src/ctnetwork/ctpeer.h b/src/ctnetwork/ctpeer.h index 510ea925e5..8604904659 100644 --- a/src/ctnetwork/ctpeer.h +++ b/src/ctnetwork/ctpeer.h @@ -2,9 +2,9 @@ * $HEADER$ */ -#ifndef LAM_CT_PEER_H -#define LAM_CT_PEER_H +#ifndef OMPI_CT_PEER_H +#define OMPI_CT_PEER_H -#include "lfc/lam_object.h" +#include "class/ompi_object.h" -#endif /* LAM_CT_PEER_H */ +#endif /* OMPI_CT_PEER_H */ diff --git a/src/datatype/Makefile.am b/src/datatype/Makefile.am index ddd1c82807..72fd2971b8 100644 --- a/src/datatype/Makefile.am +++ b/src/datatype/Makefile.am @@ -20,8 +20,8 @@ libdatatype_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/datatype -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/datatype +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/datatype/datatype.h b/src/datatype/datatype.h index b40ef07cb1..8e4d5d21af 100644 --- a/src/datatype/datatype.h +++ b/src/datatype/datatype.h @@ -1,9 +1,9 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /** - * lam_datatype_t interface for LAM internal data type representation + * ompi_datatype_t interface for OMPI internal data type representation * - * lam_datatype_t is a class which represents contiguous or + * ompi_datatype_t is a class which represents contiguous or * non-contiguous data together with constituent type-related * information. */ @@ -11,15 +11,15 @@ #ifndef DATATYPE_H_HAS_BEEN_INCLUDED #define DATATYPE_H_HAS_BEEN_INCLUDED -#include "lam_config.h" +#include "ompi_config.h" #include #include #include #include #include "include/constants.h" #include "errhandler/errhandler.h" -#include "lfc/lam_object.h" -#include "lfc/lam_hash_table.h" +#include "class/ompi_object.h" +#include "class/ompi_hash_table.h" #include "mpi.h" /* if there are more basic datatypes than the number of bytes in the int type @@ -48,8 +48,8 @@ typedef struct __dt_struct_desc { /* the data description. */ -typedef struct lam_datatype_t { - lam_object_t super; /**< basic superclass */ +typedef struct ompi_datatype_t { + ompi_object_t super; /**< basic superclass */ u_int32_t size; /**< total size in bytes of the memory used by the data if * the data is put on a contiguous buffer */ long true_lb; @@ -63,7 +63,7 @@ typedef struct lam_datatype_t { u_int64_t bdt_used; /**< which basic datatypes are used in the data description */ /* Attribute fields */ - lam_hash_table_t *d_keyhash; + ompi_hash_table_t *d_keyhash; char name[MPI_MAX_OBJECT_NAME]; dt_type_desc_t desc; /**< the data description */ dt_type_desc_t opt_desc; /**< short description of the data used when conversion is useless @@ -73,61 +73,61 @@ typedef struct lam_datatype_t { /* basic elements count used to compute the size of the datatype for * remote nodes */ u_int32_t btypes[DT_MAX_PREDEFINED]; -} dt_desc_t, lam_datatype_t; +} dt_desc_t, ompi_datatype_t; -OBJ_CLASS_DECLARATION( lam_datatype_t ); +OBJ_CLASS_DECLARATION( ompi_datatype_t ); -int lam_ddt_init( void ); -int lam_ddt_finalize( void ); -dt_desc_t* lam_ddt_create( int expectedSize ); -int lam_ddt_commit( dt_desc_t** ); -int lam_ddt_destroy( dt_desc_t** ); -void lam_ddt_dump( dt_desc_t* pData ); -void lam_ddt_dump_complete( dt_desc_t* pData ); +int ompi_ddt_init( void ); +int ompi_ddt_finalize( void ); +dt_desc_t* ompi_ddt_create( int expectedSize ); +int ompi_ddt_commit( dt_desc_t** ); +int ompi_ddt_destroy( dt_desc_t** ); +void ompi_ddt_dump( dt_desc_t* pData ); +void ompi_ddt_dump_complete( dt_desc_t* pData ); /* data creation functions */ -int lam_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_contiguous( int count, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_vector( int count, int bLength, long stride, +int ompi_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType ); +int ompi_ddt_create_contiguous( int count, dt_desc_t* oldType, dt_desc_t** newType ); +int ompi_ddt_create_vector( int count, int bLength, long stride, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_hvector( int count, int bLength, long stride, +int ompi_ddt_create_hvector( int count, int bLength, long stride, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_indexed( int count, int* pBlockLength, int* pDisp, +int ompi_ddt_create_indexed( int count, int* pBlockLength, int* pDisp, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_hindexed( int count, int* pBlockLength, long* pDisp, +int ompi_ddt_create_hindexed( int count, int* pBlockLength, long* pDisp, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_indexed_block( int count, int bLength, int* pDisp, +int ompi_ddt_create_indexed_block( int count, int bLength, int* pDisp, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_struct( int count, int* pBlockLength, long* pDisp, +int ompi_ddt_create_struct( int count, int* pBlockLength, long* pDisp, dt_desc_t** pTypes, dt_desc_t** newType ); -int lam_ddt_create_resized( dt_desc_t* oldType, long lb, long extent, dt_desc_t** newType ); -int lam_ddt_create_subarray( int ndims, int* pSizes, int* pSubSizes, int* pStarts, +int ompi_ddt_create_resized( dt_desc_t* oldType, long lb, long extent, dt_desc_t** newType ); +int ompi_ddt_create_subarray( int ndims, int* pSizes, int* pSubSizes, int* pStarts, int order, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_create_darray( int size, int rank, int ndims, int* pGSizes, int *pDistrib, +int ompi_ddt_create_darray( int size, int rank, int ndims, int* pGSizes, int *pDistrib, int* pDArgs, int* pPSizes, int order, dt_desc_t* oldType, dt_desc_t** newType ); -int lam_ddt_add( dt_desc_t* pdtBase, dt_desc_t* pdtNew, unsigned int count, long disp, long extent ); +int ompi_ddt_add( dt_desc_t* pdtBase, dt_desc_t* pdtNew, unsigned int count, long disp, long extent ); -static inline int lam_ddt_type_lb( dt_desc_t* pData, long* disp ) +static inline int ompi_ddt_type_lb( dt_desc_t* pData, long* disp ) { *disp = pData->lb; return 0; } -static inline int lam_ddt_type_ub( dt_desc_t* pData, long* disp ) +static inline int ompi_ddt_type_ub( dt_desc_t* pData, long* disp ) { *disp = pData->ub; return 0; } -static inline int lam_ddt_type_size ( dt_desc_t* pData, int *size ) +static inline int ompi_ddt_type_size ( dt_desc_t* pData, int *size ) { *size = pData->size; return 0; } -static inline int lam_ddt_type_extent( dt_desc_t* pData, long* extent ) +static inline int ompi_ddt_type_extent( dt_desc_t* pData, long* extent ) { *extent = (pData->ub - pData->lb); return 0; } -static inline int lam_ddt_type_resize( dt_desc_t* pOld, long lb, long extent, dt_desc_t** pNew ) +static inline int ompi_ddt_type_resize( dt_desc_t* pOld, long lb, long extent, dt_desc_t** pNew ) { /* empty function */ return -1; } -static inline int lam_ddt_get_extent( dt_desc_t* pData, long* lb, long* extent) +static inline int ompi_ddt_get_extent( dt_desc_t* pData, long* lb, long* extent) { *lb = pData->lb; *extent = pData->ub - pData->lb; return 0; } -static inline int lam_ddt_get_true_extent( dt_desc_t* pData, long* true_lb, long* true_extent) +static inline int ompi_ddt_get_true_extent( dt_desc_t* pData, long* true_lb, long* true_extent) { *true_lb = pData->true_lb; *true_extent = (pData->true_ub - pData->true_lb); return 0; } -int lam_ddt_get_element_count( dt_desc_t* pData, int iSize ); -int lam_ddt_copy_content_same_ddt( dt_desc_t* pData, int count, char* pDestBuf, char* pSrcBuf ); +int ompi_ddt_get_element_count( dt_desc_t* pData, int iSize ); +int ompi_ddt_copy_content_same_ddt( dt_desc_t* pData, int count, char* pDestBuf, char* pSrcBuf ); -int lam_ddt_optimize_short( dt_desc_t* pData, int count, dt_type_desc_t* pTypeDesc ); +int ompi_ddt_optimize_short( dt_desc_t* pData, int count, dt_type_desc_t* pTypeDesc ); /* flags for the datatypes */ @@ -137,14 +137,14 @@ typedef int (*conversion_fct_t)( unsigned int count, unsigned int* used ); typedef struct __dt_stack dt_stack_t; -typedef struct lam_convertor_t lam_convertor_t; -typedef int (*convertor_advance_fct_t)( lam_convertor_t* pConvertor, +typedef struct ompi_convertor_t ompi_convertor_t; +typedef int (*convertor_advance_fct_t)( ompi_convertor_t* pConvertor, struct iovec* pInputv, unsigned int inputCount ); /* and now the convertor stuff */ -struct lam_convertor_t { - lam_object_t super; /**< basic superclass */ +struct ompi_convertor_t { + ompi_object_t super; /**< basic superclass */ dt_desc_t* pDesc; long remoteArch; dt_stack_t* pStack; @@ -161,42 +161,42 @@ struct lam_convertor_t { convertor_advance_fct_t fAdvance; conversion_fct_t* pFunctions; }; -OBJ_CLASS_DECLARATION( lam_convertor_t ); +OBJ_CLASS_DECLARATION( ompi_convertor_t ); /* some convertor flags */ -#define lam_convertor_progress( PCONV, IOVEC, COUNT ) \ +#define ompi_convertor_progress( PCONV, IOVEC, COUNT ) \ (PCONV)->fAdvance( (PCONV), (IOVEC), (COUNT) ); /* and finally the convertor functions */ -lam_convertor_t* lam_convertor_create( int remote_arch, int mode ); -lam_convertor_t* lam_convertor_get_copy( lam_convertor_t* pConvertor ); -int lam_convertor_copy( lam_convertor_t* pSrcConv, lam_convertor_t* pDestConv ); -int lam_convertor_init_for_send( lam_convertor_t* pConv, unsigned int flags, +ompi_convertor_t* ompi_convertor_create( int remote_arch, int mode ); +ompi_convertor_t* ompi_convertor_get_copy( ompi_convertor_t* pConvertor ); +int ompi_convertor_copy( ompi_convertor_t* pSrcConv, ompi_convertor_t* pDestConv ); +int ompi_convertor_init_for_send( ompi_convertor_t* pConv, unsigned int flags, dt_desc_t* pData, int count, void* pUserBuf, int local_starting_point ); -int lam_convertor_init_for_recv( lam_convertor_t* pConv, unsigned int flags, +int ompi_convertor_init_for_recv( ompi_convertor_t* pConv, unsigned int flags, dt_desc_t* pData, int count, void* pUserBuf, int remote_starting_point ); -int lam_convertor_need_buffers( lam_convertor_t* pConvertor ); -int lam_convertor_pack( lam_convertor_t* pConv, struct iovec* in, unsigned int in_size ); -int lam_convertor_unpack( lam_convertor_t* pConv, struct iovec* out, unsigned int out_size ); -int lam_convertor_get_packed_size( lam_convertor_t* pConv, int* pSize ); -int lam_convertor_get_unpacked_size( lam_convertor_t* pConv, int* pSize ); -int lam_create_stack_with_pos( lam_convertor_t* pConv, +int ompi_convertor_need_buffers( ompi_convertor_t* pConvertor ); +int ompi_convertor_pack( ompi_convertor_t* pConv, struct iovec* in, unsigned int in_size ); +int ompi_convertor_unpack( ompi_convertor_t* pConv, struct iovec* out, unsigned int out_size ); +int ompi_convertor_get_packed_size( ompi_convertor_t* pConv, int* pSize ); +int ompi_convertor_get_unpacked_size( ompi_convertor_t* pConv, int* pSize ); +int ompi_create_stack_with_pos( ompi_convertor_t* pConv, int local_starting_point, int* local_sizes ); /* temporary function prototypes. They should move in other place later. */ -int lam_ddt_get_args( dt_desc_t* pData, int which, +int ompi_ddt_get_args( dt_desc_t* pData, int which, int * ci, int * i, int * ca, MPI_Aint * a, int * cd, MPI_Datatype * d, int * type); -int lam_ddt_set_args( dt_desc_t* pData, +int ompi_ddt_set_args( dt_desc_t* pData, int ci, int ** i, int ca, MPI_Aint* a, int cd, MPI_Datatype* d,int type); /* VPS: Added */ -int lam_ddt_sndrcv(void *sbuf, int scount, MPI_Datatype sdtype, void *rbuf, +int ompi_ddt_sndrcv(void *sbuf, int scount, MPI_Datatype sdtype, void *rbuf, int rcount, MPI_Datatype rdtype, int tag, MPI_Comm comm); #endif /* DATATYPE_H_HAS_BEEN_INCLUDED */ diff --git a/src/datatype/datatype_internal.h b/src/datatype/datatype_internal.h index 55c20d6f5f..560c73607b 100644 --- a/src/datatype/datatype_internal.h +++ b/src/datatype/datatype_internal.h @@ -131,17 +131,17 @@ typedef struct __dt_endloop_desc { typedef struct { float r; float i; -} lam_complex_float_t; +} ompi_complex_float_t; typedef struct { double r; double i; -} lam_complex_double_t; +} ompi_complex_double_t; typedef struct { long double r; long double i; -} lam_complex_long_double_t; +} ompi_complex_long_double_t; extern dt_desc_t basicDatatypes[DT_MAX_PREDEFINED]; diff --git a/src/datatype/ddt_test.c b/src/datatype/ddt_test.c index ff9377cb5d..d83c82196d 100644 --- a/src/datatype/ddt_test.c +++ b/src/datatype/ddt_test.c @@ -19,9 +19,9 @@ int mpich_typeub( void ) int blens[2]; dt_desc_t *type1, *type2, *type3, *types[2]; - lam_ddt_create_vector( 2, 1, 4, &(basicDatatypes[DT_INT]), &type1 ); - lam_ddt_commit( &type1 ); - lam_ddt_get_extent( type1, &lb, &extent ); + ompi_ddt_create_vector( 2, 1, 4, &(basicDatatypes[DT_INT]), &type1 ); + ompi_ddt_commit( &type1 ); + ompi_ddt_get_extent( type1, &lb, &extent ); extent1 = 5 * sizeof(int); if (extent != extent1) { printf("EXTENT 1 %ld != %ld\n",extent,extent1); @@ -39,9 +39,9 @@ int mpich_typeub( void ) /* using MPI_UB and Type_struct, monkey with the extent, making it 16 */ - lam_ddt_create_struct( 2, blens, displ, types, &type2 ); - lam_ddt_commit( &type2 ); - lam_ddt_get_extent( type2, &lb, &extent ); + ompi_ddt_create_struct( 2, blens, displ, types, &type2 ); + ompi_ddt_commit( &type2 ); + ompi_ddt_get_extent( type2, &lb, &extent ); if (extent != extent2) { printf("EXTENT 2 %ld != %ld\n",extent,extent2); errs++; @@ -57,10 +57,10 @@ int mpich_typeub( void ) types[1]=&(basicDatatypes[DT_UB]); extent3 = extent2; - lam_ddt_create_struct( 2, blens, displ, types, &type3 ); - lam_ddt_commit( &type3 ); + ompi_ddt_create_struct( 2, blens, displ, types, &type3 ); + ompi_ddt_commit( &type3 ); - lam_ddt_get_extent( type3, &lb, &extent ); + ompi_ddt_get_extent( type3, &lb, &extent ); if (extent != extent3) { printf("EXTENT 3 %ld != %ld\n",extent,extent3); errs++; @@ -92,11 +92,11 @@ int mpich_typeub2( void ) types[1] = &(basicDatatypes[DT_INT]); types[2] = &(basicDatatypes[DT_UB]); - lam_ddt_create_struct(3,blocklen,disp, types,&dt1); - lam_ddt_commit(&dt1); + ompi_ddt_create_struct(3,blocklen,disp, types,&dt1); + ompi_ddt_commit(&dt1); - lam_ddt_type_lb(dt1, &lb); lam_ddt_type_ub(dt1, &ub); - lam_ddt_type_extent(dt1,&ex1); lam_ddt_type_size(dt1,&sz1); + ompi_ddt_type_lb(dt1, &lb); ompi_ddt_type_ub(dt1, &ub); + ompi_ddt_type_extent(dt1,&ex1); ompi_ddt_type_size(dt1,&sz1); /* Values should be lb = -3, ub = 6 extent 9; size depends on implementation */ if (lb != -3 || ub != 6 || ex1 != 9) { @@ -106,9 +106,9 @@ int mpich_typeub2( void ) else printf("Example 3.26 type1 correct\n" ); - lam_ddt_create_contiguous(2,dt1,&dt2); - lam_ddt_type_lb(dt2, &lb); lam_ddt_type_ub(dt2, &ub); - lam_ddt_type_extent(dt2,&ex2); lam_ddt_type_size(dt2,&sz2); + ompi_ddt_create_contiguous(2,dt1,&dt2); + ompi_ddt_type_lb(dt2, &lb); ompi_ddt_type_ub(dt2, &ub); + ompi_ddt_type_extent(dt2,&ex2); ompi_ddt_type_size(dt2,&sz2); /* Values should be lb = -3, ub = 15, extent = 18, size depends on implementation */ if (lb != -3 || ub != 15 || ex2 != 18) { printf("Example 3.26 type2 lb %d ub %d extent %d size %d\n", (int)-3, (int)15, (int)18, 8); @@ -118,9 +118,9 @@ int mpich_typeub2( void ) else printf("Example 3.26 type1 correct\n" ); OBJ_RELEASE( dt2 ); assert( dt2 == NULL ); - lam_ddt_create_contiguous(2,dt1,&dt2); - lam_ddt_type_lb(dt2, &lb); lam_ddt_type_ub(dt2, &ub); - lam_ddt_type_extent(dt2,&ex2); lam_ddt_type_size(dt2,&sz2); + ompi_ddt_create_contiguous(2,dt1,&dt2); + ompi_ddt_type_lb(dt2, &lb); ompi_ddt_type_ub(dt2, &ub); + ompi_ddt_type_extent(dt2,&ex2); ompi_ddt_type_size(dt2,&sz2); /* Values should be lb = -3, ub = 15, extent = 18, size depends on implementation */ if (lb != -3 || ub != 15 || ex2 != 18) { printf("Example 3.26 type2 lb %d ub %d extent %d size %d\n", (int)-3, (int)15, (int)18, 8); @@ -134,11 +134,11 @@ int mpich_typeub2( void ) blocklen[0]=1; blocklen[1]=1; disp[0]=0; disp[1]=ex1; - lam_ddt_create_struct(2, blocklen, disp, types, &dt3); - lam_ddt_commit(&dt3); + ompi_ddt_create_struct(2, blocklen, disp, types, &dt3); + ompi_ddt_commit(&dt3); - lam_ddt_type_lb(dt3, &lb); lam_ddt_type_ub(dt3, &ub); - lam_ddt_type_extent(dt3,&ex3); lam_ddt_type_size(dt3,&sz3); + ompi_ddt_type_lb(dt3, &lb); ompi_ddt_type_ub(dt3, &ub); + ompi_ddt_type_extent(dt3,&ex3); ompi_ddt_type_size(dt3,&sz3); /* Another way to express type2 */ if (lb != -3 || ub != 15 || ex3 != 18) { printf("type3 lb %d ub %d extent %d size %d\n", (int)-3, (int)15, (int)18, 8); @@ -172,8 +172,8 @@ int mpich_typeub3( void ) types[2] = &(basicDatatypes[DT_UB]); /* Generate samples for contiguous, hindexed, hvector, indexed, and vector (struct and contiguous tested in typeub2) */ - lam_ddt_create_struct(3,blocklen,disp, types,&dt1); - lam_ddt_commit(&dt1); + ompi_ddt_create_struct(3,blocklen,disp, types,&dt1); + ompi_ddt_commit(&dt1); /* This type is the same as in typeub2, and is tested there */ types[0]=dt1; types[1]=dt1; @@ -181,11 +181,11 @@ int mpich_typeub3( void ) disp[0]=-4; disp[1]=7; idisp[0]=-4; idisp[1]=7; - lam_ddt_create_hindexed( 2, blocklen, disp, dt1, &dt2 ); - lam_ddt_commit( &dt2 ); + ompi_ddt_create_hindexed( 2, blocklen, disp, dt1, &dt2 ); + ompi_ddt_commit( &dt2 ); - lam_ddt_type_lb( dt2, &lb ); lam_ddt_type_ub( dt2, &ub ); - lam_ddt_type_extent( dt2, &ex ); lam_ddt_type_size( dt2, &sz ); + ompi_ddt_type_lb( dt2, &lb ); ompi_ddt_type_ub( dt2, &ub ); + ompi_ddt_type_extent( dt2, &ex ); ompi_ddt_type_size( dt2, &sz ); if (lb != -7 || ub != 13 || ex != 20) { printf("hindexed lb %d ub %d extent %d size %d\n", (int)-7, (int)13, (int)20, sz); @@ -195,11 +195,11 @@ int mpich_typeub3( void ) else printf( "hindexed ok\n" ); - lam_ddt_create_indexed( 2, blocklen, idisp, dt1, &dt3 ); - lam_ddt_commit( &dt3 ); + ompi_ddt_create_indexed( 2, blocklen, idisp, dt1, &dt3 ); + ompi_ddt_commit( &dt3 ); - lam_ddt_type_lb( dt3, &lb ); lam_ddt_type_ub( dt3, &ub ); - lam_ddt_type_extent( dt3, &ex ); lam_ddt_type_size( dt3, &sz ); + ompi_ddt_type_lb( dt3, &lb ); ompi_ddt_type_ub( dt3, &ub ); + ompi_ddt_type_extent( dt3, &ex ); ompi_ddt_type_size( dt3, &sz ); if (lb != -39 || ub != 69 || ex != 108) { printf("indexed lb %d ub %d extent %d size %d\n", (int)-39, (int)69, (int)108, sz); @@ -209,11 +209,11 @@ int mpich_typeub3( void ) else printf( "indexed ok\n" ); - lam_ddt_create_hvector( 2, 1, 14, dt1, &dt4 ); - lam_ddt_commit( &dt4 ); + ompi_ddt_create_hvector( 2, 1, 14, dt1, &dt4 ); + ompi_ddt_commit( &dt4 ); - lam_ddt_type_lb( dt4, &lb ); lam_ddt_type_ub( dt4, &ub ); - lam_ddt_type_extent( dt4, &ex ); lam_ddt_type_size( dt4, &sz ); + ompi_ddt_type_lb( dt4, &lb ); ompi_ddt_type_ub( dt4, &ub ); + ompi_ddt_type_extent( dt4, &ex ); ompi_ddt_type_size( dt4, &sz ); if (lb != -3 || ub != 20 || ex != 23) { printf("hvector lb %d ub %d extent %d size %d\n", (int)-3, (int)20, (int)23, sz); @@ -223,11 +223,11 @@ int mpich_typeub3( void ) else printf( "hvector ok\n" ); - lam_ddt_create_vector( 2, 1, 14, dt1, &dt5 ); - lam_ddt_commit( &dt5 ); + ompi_ddt_create_vector( 2, 1, 14, dt1, &dt5 ); + ompi_ddt_commit( &dt5 ); - lam_ddt_type_lb( dt5, &lb ); lam_ddt_type_ub( dt5, &ub ); - lam_ddt_type_extent( dt5, &ex ); lam_ddt_type_size( dt5, &sz ); + ompi_ddt_type_lb( dt5, &lb ); ompi_ddt_type_ub( dt5, &ub ); + ompi_ddt_type_extent( dt5, &ex ); ompi_ddt_type_size( dt5, &sz ); if (lb != -3 || ub != 132 || ex != 135) { printf("vector lb %d ub %d extent %d size %d\n", (int)-3, (int)132, (int)135, sz); @@ -309,7 +309,7 @@ dt_desc_t* upper_matrix( unsigned int mat_size ) blocklen[i] = mat_size - i; } - lam_ddt_create_indexed( mat_size, blocklen, disp, &(basicDatatypes[DT_DOUBLE]), + ompi_ddt_create_indexed( mat_size, blocklen, disp, &(basicDatatypes[DT_DOUBLE]), &upper ); free( disp ); free( blocklen ); @@ -330,7 +330,7 @@ dt_desc_t* lower_matrix( unsigned int mat_size ) blocklen[i] = i; } - lam_ddt_create_indexed( mat_size, blocklen, disp, &(basicDatatypes[DT_DOUBLE]), + ompi_ddt_create_indexed( mat_size, blocklen, disp, &(basicDatatypes[DT_DOUBLE]), &upper ); free( disp ); free( blocklen ); @@ -343,7 +343,7 @@ int test_upper( unsigned int length ) { double *mat1, *mat2, *inbuf; dt_desc_t *pdt, *pdt1; - lam_convertor_t * pConv; + ompi_convertor_t * pConv; char *ptr; int i, j, split_chunk, total_length, rc; struct iovec a; @@ -369,12 +369,12 @@ int test_upper( unsigned int length ) inbuf++; } inbuf = (double*)ptr; - pConv = lam_convertor_create( 0, 0 ); - lam_convertor_init_for_recv( pConv, 0, pdt, 1, mat2, 0 ); + pConv = ompi_convertor_create( 0, 0 ); + ompi_convertor_init_for_recv( pConv, 0, pdt, 1, mat2, 0 ); /* test the automatic destruction pf the data */ - lam_ddt_destroy( &pdt ); assert( pdt == NULL ); - lam_ddt_destroy( &pdt1 ); assert( pdt1 == NULL ); + ompi_ddt_destroy( &pdt ); assert( pdt == NULL ); + ompi_ddt_destroy( &pdt1 ); assert( pdt1 == NULL ); GET_TIME( start ); split_chunk = (length + 1) * sizeof(double); @@ -383,7 +383,7 @@ int test_upper( unsigned int length ) if( i < split_chunk ) split_chunk = i; a.iov_base = ptr; a.iov_len = split_chunk; - lam_convertor_unpack( pConv, &a, 1 ); + ompi_convertor_unpack( pConv, &a, 1 ); ptr += split_chunk; i -= split_chunk; if( mat2[0] != inbuf[0] ) assert(0); @@ -412,9 +412,9 @@ dt_desc_t* test_matrix_borders( unsigned int size, unsigned int width ) disp[1] = (size - width) * sizeof(double); blocklen[1] = width; - lam_ddt_create_indexed( 2, blocklen, disp, &(basicDatatypes[DT_DOUBLE]), + ompi_ddt_create_indexed( 2, blocklen, disp, &(basicDatatypes[DT_DOUBLE]), &pdt_line ); - lam_ddt_create_contiguous( size, pdt_line, &pdt ); + ompi_ddt_create_contiguous( size, pdt_line, &pdt ); OBJ_RELEASE( pdt_line ); assert( pdt_line == NULL ); return pdt; } @@ -424,18 +424,18 @@ dt_desc_t* test_contiguous( void ) dt_desc_t *pdt, *pdt1, *pdt2; printf( "test contiguous (alignement)\n" ); - pdt1 = lam_ddt_create( -1 ); - lam_ddt_add( pdt1, &(basicDatatypes[DT_DOUBLE]), 1, 0, -1 ); - lam_ddt_dump( pdt1 ); - lam_ddt_add( pdt1, &(basicDatatypes[DT_CHAR]), 1, 8, -1 ); - lam_ddt_dump( pdt1 ); - lam_ddt_create_contiguous( 4, pdt1, &pdt2 ); + pdt1 = ompi_ddt_create( -1 ); + ompi_ddt_add( pdt1, &(basicDatatypes[DT_DOUBLE]), 1, 0, -1 ); + ompi_ddt_dump( pdt1 ); + ompi_ddt_add( pdt1, &(basicDatatypes[DT_CHAR]), 1, 8, -1 ); + ompi_ddt_dump( pdt1 ); + ompi_ddt_create_contiguous( 4, pdt1, &pdt2 ); OBJ_RELEASE( pdt1 ); assert( pdt1 == NULL ); - lam_ddt_dump( pdt2 ); - lam_ddt_create_contiguous( 2, pdt2, &pdt ); + ompi_ddt_dump( pdt2 ); + ompi_ddt_create_contiguous( 2, pdt2, &pdt ); OBJ_RELEASE( pdt2 ); assert( pdt2 == NULL ); - lam_ddt_dump( pdt ); - lam_ddt_dump_complete( pdt ); + ompi_ddt_dump( pdt ); + ompi_ddt_dump_complete( pdt ); return pdt; } @@ -449,16 +449,16 @@ dt_desc_t* test_struct( void ) dt_desc_t* pdt, *pdt1; printf( "test struct\n" ); - pdt1 = lam_ddt_create( -1 ); - lam_ddt_add( pdt1, &(basicDatatypes[DT_DOUBLE]), 1, 0, -1 ); - lam_ddt_add( pdt1, &(basicDatatypes[DT_CHAR]), 1, 8, -1 ); - lam_ddt_dump_complete( pdt1 ); + pdt1 = ompi_ddt_create( -1 ); + ompi_ddt_add( pdt1, &(basicDatatypes[DT_DOUBLE]), 1, 0, -1 ); + ompi_ddt_add( pdt1, &(basicDatatypes[DT_CHAR]), 1, 8, -1 ); + ompi_ddt_dump_complete( pdt1 ); types[1] = pdt1; - lam_ddt_create_struct( 3, lengths, disp, types, &pdt ); + ompi_ddt_create_struct( 3, lengths, disp, types, &pdt ); OBJ_RELEASE( pdt1 ); assert( pdt1 == NULL ); - lam_ddt_dump_complete( pdt ); + ompi_ddt_dump_complete( pdt ); return pdt; } @@ -488,12 +488,12 @@ dt_desc_t* create_strange_dt( void ) dispi[0] = (int)((char*)&(v[0].i1) - (char*)&(v[0])); /* 0 */ dispi[1] = (int)(((char*)(&(v[0].i2)) - (char*)&(v[0])) / sizeof(int)); /* 2 */ - lam_ddt_create_indexed_block( 2, 1, dispi, &(basicDatatypes[DT_INT]), &pdtTemp ); + ompi_ddt_create_indexed_block( 2, 1, dispi, &(basicDatatypes[DT_INT]), &pdtTemp ); #ifdef USE_RESIZED /* optional */ displ[0] = 0; displ[1] = (char*)&(v[1]) - (char*)&(v[0]); - lam_ddt_create_resized( pdtTemp, displ[0], displ[1], &pdt1 ); + ompi_ddt_create_resized( pdtTemp, displ[0], displ[1], &pdt1 ); OBJ_RELEASE( pdtTemp ); assert( pdtTemp == NULL ); #else pdt1 = pdtTemp; @@ -504,24 +504,24 @@ dt_desc_t* create_strange_dt( void ) displ[0] = 0; displ[1] = (long)((char*)&(t[0].v[0]) - (char*)&(t[0])); displ[2] = (long)((char*)&(t[0].last) - (char*)&(t[0])); - lam_ddt_create_struct( 3, pBlock, displ, types, &pdtTemp ); + ompi_ddt_create_struct( 3, pBlock, displ, types, &pdtTemp ); #ifdef USE_RESIZED /* optional */ displ[1] = (char*)&(t[1]) - (char*)&(t[0]); - lam_ddt_create_resized( pdtTemp, displ[0], displ[1], &pdt2 ); + ompi_ddt_create_resized( pdtTemp, displ[0], displ[1], &pdt2 ); OBJ_RELEASE( pdtTemp ); assert( pdtTemp == NULL ); #else pdt2 = pdtTemp; #endif /* USE_RESIZED */ - lam_ddt_create_contiguous( SSTRANGE_CNT, pdt2, &pdt ); + ompi_ddt_create_contiguous( SSTRANGE_CNT, pdt2, &pdt ); OBJ_RELEASE( pdt1 ); assert( pdt1 == NULL ); OBJ_RELEASE( pdt2 ); assert( pdt2 == NULL ); - lam_ddt_dump( pdt ); + ompi_ddt_dump( pdt ); { dt_type_desc_t pElemDesc = { 0, 0, NULL }; - lam_ddt_optimize_short( pdt, 1, &pElemDesc ); + ompi_ddt_optimize_short( pdt, 1, &pElemDesc ); if( pElemDesc.desc != NULL ) free( pElemDesc.desc ); } return pdt; @@ -531,14 +531,14 @@ int local_copy_ddt_count( dt_desc_t* pdt, int count ) { long extent; void *pdst, *psrc; - lam_ddt_type_extent( pdt, &extent ); + ompi_ddt_type_extent( pdt, &extent ); pdst = malloc( extent * count ); psrc = malloc( extent * count ); pdt = create_strange_dt(); - lam_ddt_copy_content_same_ddt( pdt, count, pdst, psrc ); + ompi_ddt_copy_content_same_ddt( pdt, count, pdst, psrc ); free( pdst ); free( psrc ); @@ -551,7 +551,7 @@ int main( int argc, char* argv[] ) dt_desc_t *pdt, *pdt1, *pdt2, *pdt3; int rc, length = 500; - lam_ddt_init(); + ompi_ddt_init(); pdt = create_strange_dt(); OBJ_RELEASE( pdt ); assert( pdt == NULL ); @@ -571,7 +571,7 @@ int main( int argc, char* argv[] ) printf( "decode [NOT PASSED]\n" ); pdt = test_matrix_borders( length, 100 ); - lam_ddt_dump( pdt ); + ompi_ddt_dump( pdt ); OBJ_RELEASE( pdt ); assert( pdt == NULL ); printf( ">>--------------------------------------------<<\n" ); @@ -582,31 +582,31 @@ int main( int argc, char* argv[] ) OBJ_RELEASE( pdt ); assert( pdt == NULL ); printf( ">>--------------------------------------------<<\n" ); - pdt1 = lam_ddt_create( -1 ); - pdt2 = lam_ddt_create( -1 ); - pdt3 = lam_ddt_create( -1 ); - lam_ddt_add( pdt3, &(basicDatatypes[DT_INT]), 10, 0, -1 ); - lam_ddt_add( pdt3, &(basicDatatypes[DT_FLOAT]), 5, 10 * sizeof(int), -1 ); + pdt1 = ompi_ddt_create( -1 ); + pdt2 = ompi_ddt_create( -1 ); + pdt3 = ompi_ddt_create( -1 ); + ompi_ddt_add( pdt3, &(basicDatatypes[DT_INT]), 10, 0, -1 ); + ompi_ddt_add( pdt3, &(basicDatatypes[DT_FLOAT]), 5, 10 * sizeof(int), -1 ); - lam_ddt_add( pdt2, &(basicDatatypes[DT_INT]), 1, 0, -1 ); - lam_ddt_add( pdt2, pdt3, 3, sizeof(int) * 1, -1 ); + ompi_ddt_add( pdt2, &(basicDatatypes[DT_INT]), 1, 0, -1 ); + ompi_ddt_add( pdt2, pdt3, 3, sizeof(int) * 1, -1 ); - lam_ddt_add( pdt1, &(basicDatatypes[DT_LONG_LONG]), 5, 0, -1 ); - lam_ddt_add( pdt1, &(basicDatatypes[DT_LONG_DOUBLE]), 2, sizeof(long long) * 5, -1 ); + ompi_ddt_add( pdt1, &(basicDatatypes[DT_LONG_LONG]), 5, 0, -1 ); + ompi_ddt_add( pdt1, &(basicDatatypes[DT_LONG_DOUBLE]), 2, sizeof(long long) * 5, -1 ); printf( ">>--------------------------------------------<<\n" ); - lam_ddt_dump( pdt1 ); + ompi_ddt_dump( pdt1 ); printf( ">>--------------------------------------------<<\n" ); - lam_ddt_dump( pdt2 ); + ompi_ddt_dump( pdt2 ); printf( ">>--------------------------------------------<<\n" ); - lam_ddt_dump( pdt3 ); + ompi_ddt_dump( pdt3 ); OBJ_RELEASE( pdt1 ); assert( pdt1 == NULL ); OBJ_RELEASE( pdt2 ); assert( pdt2 == NULL ); OBJ_RELEASE( pdt3 ); assert( pdt3 == NULL ); /* clean-ups all data allocations */ - lam_ddt_finalize(); + ompi_ddt_finalize(); return 0; } diff --git a/src/datatype/dt_add.c b/src/datatype/dt_add.c index 4ec31f1a02..6e512ced73 100644 --- a/src/datatype/dt_add.c +++ b/src/datatype/dt_add.c @@ -14,7 +14,7 @@ * the second is the internal representation using extents * the last is the representation used for send operations */ -int lam_ddt_add( dt_desc_t* pdtBase, dt_desc_t* pdtAdd, unsigned int count, long disp, long extent ) +int ompi_ddt_add( dt_desc_t* pdtBase, dt_desc_t* pdtAdd, unsigned int count, long disp, long extent ) { int newLength, place_needed = 0, i; short localFlags; diff --git a/src/datatype/dt_args.c b/src/datatype/dt_args.c index bcad1b776f..8c0daacd56 100644 --- a/src/datatype/dt_args.c +++ b/src/datatype/dt_args.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -11,17 +11,17 @@ typedef struct __dt_args { int* i; MPI_Aint* a; MPI_Datatype* d; -} lam_ddt_args_t; +} ompi_ddt_args_t; #define ALLOC_ARGS(PDATA, IC, AC, DC) \ do { \ - int length = sizeof(lam_ddt_args_t) + (IC) * sizeof(int) + (AC) * sizeof(MPI_Aint) + (DC) * sizeof(MPI_Datatype); \ + int length = sizeof(ompi_ddt_args_t) + (IC) * sizeof(int) + (AC) * sizeof(MPI_Aint) + (DC) * sizeof(MPI_Datatype); \ char* buf = (char*)malloc( length ); \ - lam_ddt_args_t* pArgs = (lam_ddt_args_t*)buf; \ + ompi_ddt_args_t* pArgs = (ompi_ddt_args_t*)buf; \ pArgs->ci = (IC); \ pArgs->ca = (AC); \ pArgs->cd = (DC); \ - buf += sizeof(lam_ddt_args_t); \ + buf += sizeof(ompi_ddt_args_t); \ if( pArgs->ci == 0 ) pArgs->i = NULL; \ else { \ pArgs->i = (int*)buf; \ @@ -40,18 +40,18 @@ do { \ #define FREE_ARGS(PDATA) \ if( (PDATA)->args != NULL ) free( (PDATA)->args ); -int lam_ddt_set_args( lam_datatype_t* pData, +int ompi_ddt_set_args( ompi_datatype_t* pData, int ci, int ** i, int ca, MPI_Aint* a, int cd, MPI_Datatype* d,int type) { int pos; - lam_ddt_args_t* pArgs; + ompi_ddt_args_t* pArgs; FREE_ARGS( pData ); ALLOC_ARGS( pData, ci, ca, cd ); - pArgs = (lam_ddt_args_t*)pData->args; + pArgs = (ompi_ddt_args_t*)pData->args; pArgs->create_type = type; switch(type){ @@ -157,12 +157,12 @@ int lam_ddt_set_args( lam_datatype_t* pData, return MPI_SUCCESS; } -int lam_ddt_get_args( lam_datatype_t* pData, int which, +int ompi_ddt_get_args( ompi_datatype_t* pData, int which, int * ci, int * i, int * ca, MPI_Aint * a, int * cd, MPI_Datatype * d, int * type) { - lam_ddt_args_t* pArgs = pData->args; + ompi_ddt_args_t* pArgs = pData->args; if( (pData->flags & DT_FLAG_BASIC) == DT_FLAG_BASIC ) { switch(which){ diff --git a/src/datatype/dt_create.c b/src/datatype/dt_create.c index 42c6b05240..e2e32876f7 100644 --- a/src/datatype/dt_create.c +++ b/src/datatype/dt_create.c @@ -42,11 +42,11 @@ static void __destroy_ddt_struct( dt_desc_t* pData ) pData->args = NULL; } -OBJ_CLASS_INSTANCE(lam_datatype_t, lam_object_t, __get_free_dt_struct, __destroy_ddt_struct ); +OBJ_CLASS_INSTANCE(ompi_datatype_t, ompi_object_t, __get_free_dt_struct, __destroy_ddt_struct ); -dt_desc_t* lam_ddt_create( int expectedSize ) +dt_desc_t* ompi_ddt_create( int expectedSize ) { - dt_desc_t* pdt = (dt_desc_t*)OBJ_NEW(lam_datatype_t); + dt_desc_t* pdt = (dt_desc_t*)OBJ_NEW(ompi_datatype_t); if( expectedSize == -1 ) expectedSize = DT_INCREASE_STACK; pdt->desc.length = expectedSize + 1; /* one for the fake elem at the end */ @@ -56,9 +56,9 @@ dt_desc_t* lam_ddt_create( int expectedSize ) return pdt; } -int lam_ddt_create_resized( dt_desc_t* oldType, long lb, long extent, dt_desc_t** newType ) +int ompi_ddt_create_resized( dt_desc_t* oldType, long lb, long extent, dt_desc_t** newType ) { - lam_ddt_duplicate( oldType, newType ); + ompi_ddt_duplicate( oldType, newType ); (*newType)->lb = lb; (*newType)->ub = lb + extent; return 0; diff --git a/src/datatype/dt_create_array.c b/src/datatype/dt_create_array.c index cbaa39cf4c..aad5188fc2 100644 --- a/src/datatype/dt_create_array.c +++ b/src/datatype/dt_create_array.c @@ -2,13 +2,13 @@ #include "datatype.h" -int lam_ddt_create_subarray( int ndims, int* pSizes, int* pSubSizes, int* pStarts, +int ompi_ddt_create_subarray( int ndims, int* pSizes, int* pSubSizes, int* pStarts, int order, dt_desc_t* oldType, dt_desc_t** newType ) { return -1; } -int lam_ddt_create_darray( int size, int rank, int ndims, int* pGSizes, int *pDistrib, +int ompi_ddt_create_darray( int size, int rank, int ndims, int* pGSizes, int *pDistrib, int* pDArgs, int* pPSizes, int order, dt_desc_t* oldType, dt_desc_t** newType ) { diff --git a/src/datatype/dt_create_dup.c b/src/datatype/dt_create_dup.c index 701b43c0f1..abd781b085 100644 --- a/src/datatype/dt_create_dup.c +++ b/src/datatype/dt_create_dup.c @@ -3,7 +3,7 @@ #include "datatype.h" #include "datatype_internal.h" -int lam_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType ) +int ompi_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType ) { dt_desc_t* pdt; void* temp; @@ -11,7 +11,7 @@ int lam_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType ) if( oldType->flags & DT_FLAG_COMMITED ) desc_size++; - pdt = lam_ddt_create( desc_size ); + pdt = ompi_ddt_create( desc_size ); temp = pdt->desc.desc; /* temporary copy of the desc pointer */ memcpy( pdt, oldType, sizeof(dt_desc_t) ); pdt->desc.desc = temp; @@ -23,10 +23,10 @@ int lam_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType ) return 0; } -int lam_ddt_create_contiguous( int count, dt_desc_t* oldType, dt_desc_t** newType ) +int ompi_ddt_create_contiguous( int count, dt_desc_t* oldType, dt_desc_t** newType ) { - dt_desc_t* pdt = lam_ddt_create( oldType->desc.used + 2 ); - lam_ddt_add( pdt, oldType, count, 0, (oldType->ub - oldType->lb) ); + dt_desc_t* pdt = ompi_ddt_create( oldType->desc.used + 2 ); + ompi_ddt_add( pdt, oldType, count, 0, (oldType->ub - oldType->lb) ); *newType = pdt; return 0; } diff --git a/src/datatype/dt_create_indexed.c b/src/datatype/dt_create_indexed.c index 6153c4ad07..d87cafde41 100644 --- a/src/datatype/dt_create_indexed.c +++ b/src/datatype/dt_create_indexed.c @@ -3,14 +3,14 @@ #include "datatype.h" /* We try to merge together data that are contiguous */ -int lam_ddt_create_indexed( int count, int* pBlockLength, int* pDisp, +int ompi_ddt_create_indexed( int count, int* pBlockLength, int* pDisp, dt_desc_t* oldType, dt_desc_t** newType ) { dt_desc_t* pdt; int i, dLength, endat, disp; long extent = oldType->ub - oldType->lb; - pdt = lam_ddt_create( count * (2 + oldType->desc.used) ); + pdt = ompi_ddt_create( count * (2 + oldType->desc.used) ); disp = pDisp[0]; dLength = pBlockLength[0]; endat = disp + dLength; @@ -20,19 +20,19 @@ int lam_ddt_create_indexed( int count, int* pBlockLength, int* pDisp, dLength += pBlockLength[i]; endat += pBlockLength[i]; } else { - lam_ddt_add( pdt, oldType, dLength, disp * extent, extent ); + ompi_ddt_add( pdt, oldType, dLength, disp * extent, extent ); disp = pDisp[i]; dLength = pBlockLength[i]; endat = disp + pBlockLength[i]; } } - lam_ddt_add( pdt, oldType, dLength, disp * extent, extent ); + ompi_ddt_add( pdt, oldType, dLength, disp * extent, extent ); *newType = pdt; return 0; } -int lam_ddt_create_hindexed( int count, int* pBlockLength, long* pDisp, +int ompi_ddt_create_hindexed( int count, int* pBlockLength, long* pDisp, dt_desc_t* oldType, dt_desc_t** newType ) { dt_desc_t* pdt; @@ -40,7 +40,7 @@ int lam_ddt_create_hindexed( int count, int* pBlockLength, long* pDisp, long extent = oldType->ub - oldType->lb; long disp, endat; - pdt = lam_ddt_create( count * (2 + oldType->desc.used) ); + pdt = ompi_ddt_create( count * (2 + oldType->desc.used) ); disp = pDisp[0]; dLength = pBlockLength[0]; endat = disp + dLength * extent; @@ -50,26 +50,26 @@ int lam_ddt_create_hindexed( int count, int* pBlockLength, long* pDisp, dLength += pBlockLength[i]; endat += pBlockLength[i] * extent; } else { - lam_ddt_add( pdt, oldType, dLength, disp, extent ); + ompi_ddt_add( pdt, oldType, dLength, disp, extent ); disp = pDisp[i]; dLength = pBlockLength[i]; endat = disp + pBlockLength[i] * extent; } } - lam_ddt_add( pdt, oldType, dLength, disp, extent ); + ompi_ddt_add( pdt, oldType, dLength, disp, extent ); *newType = pdt; return 0; } -int lam_ddt_create_indexed_block( int count, int bLength, int* pDisp, +int ompi_ddt_create_indexed_block( int count, int bLength, int* pDisp, dt_desc_t* oldType, dt_desc_t** newType ) { dt_desc_t* pdt; int i, dLength, endat, disp; long extent = oldType->ub - oldType->lb; - pdt = lam_ddt_create( count * (2 + oldType->desc.used) ); + pdt = ompi_ddt_create( count * (2 + oldType->desc.used) ); disp = pDisp[0]; dLength = bLength; endat = disp + dLength; @@ -79,13 +79,13 @@ int lam_ddt_create_indexed_block( int count, int bLength, int* pDisp, dLength += bLength; endat += bLength; } else { - lam_ddt_add( pdt, oldType, dLength, disp * extent, extent ); + ompi_ddt_add( pdt, oldType, dLength, disp * extent, extent ); disp = pDisp[i]; dLength = bLength; endat = disp + bLength; } } - lam_ddt_add( pdt, oldType, dLength, disp * extent, extent ); + ompi_ddt_add( pdt, oldType, dLength, disp * extent, extent ); *newType = pdt; return 0; diff --git a/src/datatype/dt_create_struct.c b/src/datatype/dt_create_struct.c index deb4ef06fc..6713179175 100644 --- a/src/datatype/dt_create_struct.c +++ b/src/datatype/dt_create_struct.c @@ -2,7 +2,7 @@ #include "datatype.h" -int lam_ddt_create_struct( int count, int* pBlockLength, long* pDisp, +int ompi_ddt_create_struct( int count, int* pBlockLength, long* pDisp, dt_desc_t** pTypes, dt_desc_t** newType ) { int i; @@ -42,7 +42,7 @@ int lam_ddt_create_struct( int count, int* pBlockLength, long* pDisp, lastDisp = pDisp[0]; endto = pDisp[0] + lastExtent * lastBlock; - pdt = lam_ddt_create( disp ); + pdt = ompi_ddt_create( disp ); /* Do again the same loop but now add the elements */ for( i = 1; i < count; i++ ) { @@ -50,7 +50,7 @@ int lam_ddt_create_struct( int count, int* pBlockLength, long* pDisp, lastBlock += pBlockLength[i]; endto = lastDisp + lastBlock * lastExtent; } else { - lam_ddt_add( pdt, lastType, lastBlock, lastDisp, lastExtent ); + ompi_ddt_add( pdt, lastType, lastBlock, lastDisp, lastExtent ); lastType = pTypes[i]; lastExtent = lastType->ub - lastType->lb; lastBlock = pBlockLength[i]; @@ -58,7 +58,7 @@ int lam_ddt_create_struct( int count, int* pBlockLength, long* pDisp, endto = lastDisp + lastExtent * lastBlock; } } - lam_ddt_add( pdt, lastType, lastBlock, lastDisp, lastExtent ); + ompi_ddt_add( pdt, lastType, lastBlock, lastDisp, lastExtent ); *newType = pdt; return 0; diff --git a/src/datatype/dt_create_vector.c b/src/datatype/dt_create_vector.c index e09231e023..55b0c8d2ac 100644 --- a/src/datatype/dt_create_vector.c +++ b/src/datatype/dt_create_vector.c @@ -8,7 +8,7 @@ * */ -int lam_ddt_create_vector( int count, int bLength, long stride, +int ompi_ddt_create_vector( int count, int bLength, long stride, dt_desc_t* oldType, dt_desc_t** newType ) { long extent = oldType->ub - oldType->lb; @@ -16,30 +16,30 @@ int lam_ddt_create_vector( int count, int bLength, long stride, if( bLength == stride ) { /* the elements are contiguous */ - pData = lam_ddt_create( oldType->desc.used + 2 ); - lam_ddt_add( pData, oldType, count * bLength, 0, extent ); + pData = ompi_ddt_create( oldType->desc.used + 2 ); + ompi_ddt_add( pData, oldType, count * bLength, 0, extent ); } else { if( count > 1 ) { if( bLength == 1 ) { - pData = lam_ddt_create( oldType->desc.used + 2 ); - lam_ddt_add( pData, oldType, count - 1, 0, stride * extent ); + pData = ompi_ddt_create( oldType->desc.used + 2 ); + ompi_ddt_add( pData, oldType, count - 1, 0, stride * extent ); } else { - pTempData = lam_ddt_create( oldType->desc.used + 2 ); - pData = lam_ddt_create( oldType->desc.used + 2 + 2 ); - lam_ddt_add( pTempData, oldType, bLength, 0, extent ); - lam_ddt_add( pData, pTempData, count - 1, 0, stride * extent ); + pTempData = ompi_ddt_create( oldType->desc.used + 2 ); + pData = ompi_ddt_create( oldType->desc.used + 2 + 2 ); + ompi_ddt_add( pTempData, oldType, bLength, 0, extent ); + ompi_ddt_add( pData, pTempData, count - 1, 0, stride * extent ); OBJ_RELEASE( pTempData ); } } else { - pData = lam_ddt_create( oldType->desc.used + 2 ); + pData = ompi_ddt_create( oldType->desc.used + 2 ); } - lam_ddt_add( pData, oldType, bLength, (count - 1) * extent * stride, extent ); + ompi_ddt_add( pData, oldType, bLength, (count - 1) * extent * stride, extent ); } *newType = pData; return 0; } -int lam_ddt_create_hvector( int count, int bLength, long stride, +int ompi_ddt_create_hvector( int count, int bLength, long stride, dt_desc_t* oldType, dt_desc_t** newType ) { long extent = oldType->ub - oldType->lb; @@ -47,19 +47,19 @@ int lam_ddt_create_hvector( int count, int bLength, long stride, if( (extent * bLength) == stride ) { /* contiguous */ - pData = lam_ddt_create( oldType->desc.used + 2 ); - lam_ddt_add( pData, oldType, count * bLength, 0, extent ); + pData = ompi_ddt_create( oldType->desc.used + 2 ); + ompi_ddt_add( pData, oldType, count * bLength, 0, extent ); } else { if( count > 1 ) { - pTempData = lam_ddt_create( oldType->desc.used + 2 ); - pData = lam_ddt_create( oldType->desc.used + 2 + 2 ); - lam_ddt_add( pTempData, oldType, bLength, 0, extent ); - lam_ddt_add( pData, pTempData, count - 1, 0, stride ); + pTempData = ompi_ddt_create( oldType->desc.used + 2 ); + pData = ompi_ddt_create( oldType->desc.used + 2 + 2 ); + ompi_ddt_add( pTempData, oldType, bLength, 0, extent ); + ompi_ddt_add( pData, pTempData, count - 1, 0, stride ); OBJ_RELEASE( pTempData ); } else { - pData = lam_ddt_create( oldType->desc.used + 2 ); + pData = ompi_ddt_create( oldType->desc.used + 2 ); } - lam_ddt_add( pData, oldType, bLength, (count - 1) * stride, extent ); + ompi_ddt_add( pData, oldType, bLength, (count - 1) * stride, extent ); } *newType = pData; return 0; diff --git a/src/datatype/dt_destroy.c b/src/datatype/dt_destroy.c index 845200e0c3..ac0e3cb57f 100644 --- a/src/datatype/dt_destroy.c +++ b/src/datatype/dt_destroy.c @@ -3,12 +3,12 @@ #include "datatype.h" #include "datatype_internal.h" -int lam_ddt_destroy( dt_desc_t** dt ) +int ompi_ddt_destroy( dt_desc_t** dt ) { dt_desc_t* pData = *dt; if( pData->flags & DT_FLAG_FOREVER ) - return LAM_ERROR; + return OMPI_ERROR; OBJ_RELEASE( pData ); *dt = NULL; diff --git a/src/datatype/dt_module.c b/src/datatype/dt_module.c index 162ed9738a..e5f3f3b3b3 100644 --- a/src/datatype/dt_module.c +++ b/src/datatype/dt_module.c @@ -5,7 +5,7 @@ /* other fields starting after bdt_used (index of DT_LOOP should be ONE) */ #define EMPTY_DATA(NAME) NULL, "MPI_" # NAME, {0, 0, NULL}, {0, 0, NULL}, NULL, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -#define BASEOBJ_DATA { OBJ_CLASS(lam_datatype_t), 1 } +#define BASEOBJ_DATA { OBJ_CLASS(ompi_datatype_t), 1 } #define INIT_BASIC_DATA( TYPE, ALIGN, NAME ) \ { BASEOBJ_DATA, sizeof(TYPE), 0, sizeof(TYPE), ALIGN, \ 0, sizeof(TYPE), DT_FLAG_BASIC | DT_FLAG_DATA, DT_##NAME, 1, \ @@ -15,42 +15,42 @@ 0, 0, DT_FLAG_BASIC, DT_##NAME, 1, \ (((long long)1)<<(DT_##NAME)), EMPTY_DATA(NAME) } -lam_datatype_t basicDatatypes[DT_MAX_PREDEFINED] = { +ompi_datatype_t basicDatatypes[DT_MAX_PREDEFINED] = { INIT_BASIC_TYPE( DT_LOOP, LOOP ), INIT_BASIC_TYPE( DT_END_LOOP, END_LOOP ), INIT_BASIC_TYPE( DT_LB, LB ), INIT_BASIC_TYPE( DT_UB, UB ), - INIT_BASIC_DATA( char, LAM_ALIGNMENT_CHAR, CHAR ), - INIT_BASIC_DATA( char, LAM_ALIGNMENT_CHAR, CHARACTER ), - INIT_BASIC_DATA( unsigned char, LAM_ALIGNMENT_CHAR, UNSIGNED_CHAR ), - INIT_BASIC_DATA( unsigned char, LAM_ALIGNMENT_CHAR, BYTE ), - INIT_BASIC_DATA( short, LAM_ALIGNMENT_SHORT, SHORT ), - INIT_BASIC_DATA( unsigned short, LAM_ALIGNMENT_SHORT, UNSIGNED_SHORT ), - INIT_BASIC_DATA( int, LAM_ALIGNMENT_INT, INT ), - INIT_BASIC_DATA( unsigned int, LAM_ALIGNMENT_INT, UNSIGNED_INT ), - INIT_BASIC_DATA( long, LAM_ALIGNMENT_LONG, LONG ), - INIT_BASIC_DATA( unsigned long, LAM_ALIGNMENT_LONG, UNSIGNED_LONG ), + INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, CHAR ), + INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, CHARACTER ), + INIT_BASIC_DATA( unsigned char, OMPI_ALIGNMENT_CHAR, UNSIGNED_CHAR ), + INIT_BASIC_DATA( unsigned char, OMPI_ALIGNMENT_CHAR, BYTE ), + INIT_BASIC_DATA( short, OMPI_ALIGNMENT_SHORT, SHORT ), + INIT_BASIC_DATA( unsigned short, OMPI_ALIGNMENT_SHORT, UNSIGNED_SHORT ), + INIT_BASIC_DATA( int, OMPI_ALIGNMENT_INT, INT ), + INIT_BASIC_DATA( unsigned int, OMPI_ALIGNMENT_INT, UNSIGNED_INT ), + INIT_BASIC_DATA( long, OMPI_ALIGNMENT_LONG, LONG ), + INIT_BASIC_DATA( unsigned long, OMPI_ALIGNMENT_LONG, UNSIGNED_LONG ), #if HAVE_LONG_LONG - INIT_BASIC_DATA( long long, LAM_ALIGNMENT_LONG_LONG, LONG_LONG ), - INIT_BASIC_DATA( long long, LAM_ALIGNMENT_LONG_LONG, LONG_LONG_INT ), - INIT_BASIC_DATA( unsigned long long, LAM_ALIGNMENT_LONG_LONG, UNSIGNED_LONG_LONG ), + INIT_BASIC_DATA( long long, OMPI_ALIGNMENT_LONG_LONG, LONG_LONG ), + INIT_BASIC_DATA( long long, OMPI_ALIGNMENT_LONG_LONG, LONG_LONG_INT ), + INIT_BASIC_DATA( unsigned long long, OMPI_ALIGNMENT_LONG_LONG, UNSIGNED_LONG_LONG ), #else INIT_BASIC_DATA( void*, 0, UNAVAILABLE ), INIT_BASIC_DATA( void*, 0, UNAVAILABLE ), INIT_BASIC_DATA( void*, 0, UNAVAILABLE ), #endif /* HAVE_LONG_LONG */ - INIT_BASIC_DATA( float, LAM_ALIGNMENT_FLOAT, FLOAT ), - INIT_BASIC_DATA( double, LAM_ALIGNMENT_DOUBLE, DOUBLE ), - INIT_BASIC_DATA( long double, LAM_ALIGNMENT_LONG_DOUBLE, LONG_DOUBLE ), - INIT_BASIC_DATA( lam_complex_float_t, LAM_ALIGNMENT_FLOAT, COMPLEX_FLOAT ), - INIT_BASIC_DATA( lam_complex_double_t, LAM_ALIGNMENT_DOUBLE, COMPLEX_DOUBLE ), + INIT_BASIC_DATA( float, OMPI_ALIGNMENT_FLOAT, FLOAT ), + INIT_BASIC_DATA( double, OMPI_ALIGNMENT_DOUBLE, DOUBLE ), + INIT_BASIC_DATA( long double, OMPI_ALIGNMENT_LONG_DOUBLE, LONG_DOUBLE ), + INIT_BASIC_DATA( ompi_complex_float_t, OMPI_ALIGNMENT_FLOAT, COMPLEX_FLOAT ), + INIT_BASIC_DATA( ompi_complex_double_t, OMPI_ALIGNMENT_DOUBLE, COMPLEX_DOUBLE ), #if HAVE_LONG_DOUBLE - INIT_BASIC_DATA( lam_complex_long_double_t, LAM_ALIGNMENT_LONG_DOUBLE, COMPLEX_LONG_DOUBLE ), + INIT_BASIC_DATA( ompi_complex_long_double_t, OMPI_ALIGNMENT_LONG_DOUBLE, COMPLEX_LONG_DOUBLE ), #else INIT_BASIC_DATA( void*, 0, UNAVAILABLE ), #endif /* HAVE_LONG_DOUBLE */ - INIT_BASIC_DATA( char, LAM_ALIGNMENT_CHAR, PACKED ), - INIT_BASIC_DATA( int, LAM_ALIGNMENT_INT, LOGIC ), + INIT_BASIC_DATA( char, OMPI_ALIGNMENT_CHAR, PACKED ), + INIT_BASIC_DATA( int, OMPI_ALIGNMENT_INT, LOGIC ), INIT_BASIC_TYPE( DT_FLOAT_INT, FLOAT_INT ), INIT_BASIC_TYPE( DT_DOUBLE_INT, DOUBLE_INT ), #if HAVE_LONG_DOUBLE @@ -78,54 +78,54 @@ lam_datatype_t basicDatatypes[DT_MAX_PREDEFINED] = { INIT_BASIC_TYPE( DT_UNAVAILABLE, UNAVAILABLE ) }; -lam_datatype_t* lam_mpi_char = basicDatatypes + DT_CHAR; -lam_datatype_t* lam_mpi_byte = basicDatatypes + DT_BYTE; -lam_datatype_t* lam_mpi_int = basicDatatypes + DT_INT; -lam_datatype_t* lam_mpi_logic = basicDatatypes + DT_LOGIC; -lam_datatype_t* lam_mpi_short = basicDatatypes + DT_SHORT; -lam_datatype_t* lam_mpi_long = basicDatatypes + DT_LONG; -lam_datatype_t* lam_mpi_float = basicDatatypes + DT_FLOAT; -lam_datatype_t* lam_mpi_double = basicDatatypes + DT_DOUBLE; -lam_datatype_t* lam_mpi_long_double = basicDatatypes + DT_LONG_DOUBLE; -lam_datatype_t* lam_mpi_cplex = basicDatatypes + DT_COMPLEX_FLOAT; -lam_datatype_t* lam_mpi_packed = basicDatatypes + DT_PACKED; -lam_datatype_t* lam_mpi_unsigned_char = basicDatatypes + DT_UNSIGNED_CHAR; -lam_datatype_t* lam_mpi_unsigned_short = basicDatatypes + DT_UNSIGNED_SHORT; -lam_datatype_t* lam_mpi_unsigned = basicDatatypes + DT_UNSIGNED_INT; -lam_datatype_t* lam_mpi_unsigned_long = basicDatatypes + DT_UNSIGNED_LONG; -lam_datatype_t* lam_mpi_ub = basicDatatypes + DT_UB; -lam_datatype_t* lam_mpi_lb = basicDatatypes + DT_LB; -lam_datatype_t* lam_mpi_float_int = basicDatatypes + DT_FLOAT_INT; -lam_datatype_t* lam_mpi_double_int = basicDatatypes + DT_DOUBLE_INT; -lam_datatype_t* lam_mpi_long_int = basicDatatypes + DT_LONG_INT; -lam_datatype_t* lam_mpi_2int = basicDatatypes + DT_2INT; -lam_datatype_t* lam_mpi_short_int = basicDatatypes + DT_SHORT_INT; -lam_datatype_t* lam_mpi_dblcplex = basicDatatypes + DT_COMPLEX_FLOAT; -lam_datatype_t* lam_mpi_integer = basicDatatypes + DT_INTEGER; -lam_datatype_t* lam_mpi_real = basicDatatypes + DT_REAL; -lam_datatype_t* lam_mpi_dblprec = basicDatatypes + DT_DBLPREC; -lam_datatype_t* lam_mpi_character = basicDatatypes + DT_CHARACTER; -lam_datatype_t* lam_mpi_2real = basicDatatypes + DT_2REAL; -lam_datatype_t* lam_mpi_2dblprec = basicDatatypes + DT_2DBLPREC; -lam_datatype_t* lam_mpi_2integer = basicDatatypes + DT_2INTEGER; -lam_datatype_t* lam_mpi_longdbl_int = basicDatatypes + DT_LONGDBL_INT; -lam_datatype_t* lam_mpi_wchar = basicDatatypes + DT_WCHAR; -lam_datatype_t* lam_mpi_long_long_int = basicDatatypes + DT_LONG_LONG_INT; -lam_datatype_t* lam_mpi_long_long = basicDatatypes + DT_LONG_LONG; -lam_datatype_t* lam_mpi_unsigned_long_long = basicDatatypes + DT_UNSIGNED_LONG_LONG; -lam_datatype_t* lam_mpi_cxx_cplex = basicDatatypes + DT_COMPLEX_FLOAT; -lam_datatype_t* lam_mpi_cxx_dblcplex = basicDatatypes + DT_COMPLEX_DOUBLE; -lam_datatype_t* lam_mpi_cxx_ldblcplex = basicDatatypes + DT_COMPLEX_LONG_DOUBLE; -lam_datatype_t* lam_mpi_cxx_bool; -lam_datatype_t* lam_mpi_2cplex = basicDatatypes + DT_2COMPLEX; -lam_datatype_t* lam_mpi_2dblcplex = basicDatatypes + DT_2DOUBLE_COMPLEX; +ompi_datatype_t* ompi_mpi_char = basicDatatypes + DT_CHAR; +ompi_datatype_t* ompi_mpi_byte = basicDatatypes + DT_BYTE; +ompi_datatype_t* ompi_mpi_int = basicDatatypes + DT_INT; +ompi_datatype_t* ompi_mpi_logic = basicDatatypes + DT_LOGIC; +ompi_datatype_t* ompi_mpi_short = basicDatatypes + DT_SHORT; +ompi_datatype_t* ompi_mpi_long = basicDatatypes + DT_LONG; +ompi_datatype_t* ompi_mpi_float = basicDatatypes + DT_FLOAT; +ompi_datatype_t* ompi_mpi_double = basicDatatypes + DT_DOUBLE; +ompi_datatype_t* ompi_mpi_long_double = basicDatatypes + DT_LONG_DOUBLE; +ompi_datatype_t* ompi_mpi_cplex = basicDatatypes + DT_COMPLEX_FLOAT; +ompi_datatype_t* ompi_mpi_packed = basicDatatypes + DT_PACKED; +ompi_datatype_t* ompi_mpi_unsigned_char = basicDatatypes + DT_UNSIGNED_CHAR; +ompi_datatype_t* ompi_mpi_unsigned_short = basicDatatypes + DT_UNSIGNED_SHORT; +ompi_datatype_t* ompi_mpi_unsigned = basicDatatypes + DT_UNSIGNED_INT; +ompi_datatype_t* ompi_mpi_unsigned_long = basicDatatypes + DT_UNSIGNED_LONG; +ompi_datatype_t* ompi_mpi_ub = basicDatatypes + DT_UB; +ompi_datatype_t* ompi_mpi_lb = basicDatatypes + DT_LB; +ompi_datatype_t* ompi_mpi_float_int = basicDatatypes + DT_FLOAT_INT; +ompi_datatype_t* ompi_mpi_double_int = basicDatatypes + DT_DOUBLE_INT; +ompi_datatype_t* ompi_mpi_long_int = basicDatatypes + DT_LONG_INT; +ompi_datatype_t* ompi_mpi_2int = basicDatatypes + DT_2INT; +ompi_datatype_t* ompi_mpi_short_int = basicDatatypes + DT_SHORT_INT; +ompi_datatype_t* ompi_mpi_dblcplex = basicDatatypes + DT_COMPLEX_FLOAT; +ompi_datatype_t* ompi_mpi_integer = basicDatatypes + DT_INTEGER; +ompi_datatype_t* ompi_mpi_real = basicDatatypes + DT_REAL; +ompi_datatype_t* ompi_mpi_dblprec = basicDatatypes + DT_DBLPREC; +ompi_datatype_t* ompi_mpi_character = basicDatatypes + DT_CHARACTER; +ompi_datatype_t* ompi_mpi_2real = basicDatatypes + DT_2REAL; +ompi_datatype_t* ompi_mpi_2dblprec = basicDatatypes + DT_2DBLPREC; +ompi_datatype_t* ompi_mpi_2integer = basicDatatypes + DT_2INTEGER; +ompi_datatype_t* ompi_mpi_longdbl_int = basicDatatypes + DT_LONGDBL_INT; +ompi_datatype_t* ompi_mpi_wchar = basicDatatypes + DT_WCHAR; +ompi_datatype_t* ompi_mpi_long_long_int = basicDatatypes + DT_LONG_LONG_INT; +ompi_datatype_t* ompi_mpi_long_long = basicDatatypes + DT_LONG_LONG; +ompi_datatype_t* ompi_mpi_unsigned_long_long = basicDatatypes + DT_UNSIGNED_LONG_LONG; +ompi_datatype_t* ompi_mpi_cxx_cplex = basicDatatypes + DT_COMPLEX_FLOAT; +ompi_datatype_t* ompi_mpi_cxx_dblcplex = basicDatatypes + DT_COMPLEX_DOUBLE; +ompi_datatype_t* ompi_mpi_cxx_ldblcplex = basicDatatypes + DT_COMPLEX_LONG_DOUBLE; +ompi_datatype_t* ompi_mpi_cxx_bool; +ompi_datatype_t* ompi_mpi_2cplex = basicDatatypes + DT_2COMPLEX; +ompi_datatype_t* ompi_mpi_2dblcplex = basicDatatypes + DT_2DOUBLE_COMPLEX; int local_sizes[DT_MAX_PREDEFINED]; /* VPS: fake convertor for time being / to provide pack/unpack functions */ -lam_convertor_t* lam_convertor; +ompi_convertor_t* ompi_convertor; -static lam_convertor_t* pDumpConv = NULL; +static ompi_convertor_t* pDumpConv = NULL; #define COPY_DATA_DESC( PDST, PSRC ) \ do { \ @@ -152,7 +152,7 @@ static lam_convertor_t* pDumpConv = NULL; #define DECLARE_MPI2_COMPOSED_STRUCT_DDT( PDATA, MPIDDT, MPIDDTNAME, type1, type2, MPIType1, MPIType2 ) \ do { \ struct { type1 v1; type2 v2; } s[2]; \ - lam_datatype_t *types[2], *ptype; \ + ompi_datatype_t *types[2], *ptype; \ int bLength[2] = {1, 1}; \ long base, displ[2]; \ \ @@ -164,14 +164,14 @@ static lam_convertor_t* pDumpConv = NULL; displ[1] = (long)(&(s[0].v2)); \ displ[1] -= base; \ \ - lam_ddt_create_struct( 2, bLength, displ, types, &ptype ); \ + ompi_ddt_create_struct( 2, bLength, displ, types, &ptype ); \ displ[0] = (long)(&(s[1])); \ displ[0] -= base; \ if( displ[0] != sizeof(s[0]) ) \ ptype->ub = displ[0]; /* force a new extent for the datatype */ \ ptype->flags |= DT_FLAG_FOREVER; \ ptype->id = MPIDDT; \ - lam_ddt_commit( &ptype ); \ + ompi_ddt_commit( &ptype ); \ COPY_DATA_DESC( PDATA, ptype ); \ ptype->desc.desc = NULL; \ ptype->opt_desc.desc = NULL; \ @@ -181,11 +181,11 @@ static lam_convertor_t* pDumpConv = NULL; #define DECLARE_MPI2_COMPOSED_BLOCK_DDT( PDATA, MPIDDT, MPIDDTNAME, MPIType ) \ do { \ - lam_datatype_t *ptype; \ - lam_ddt_create_contiguous( 2, &(basicDatatypes[MPIType]), &ptype ); \ + ompi_datatype_t *ptype; \ + ompi_ddt_create_contiguous( 2, &(basicDatatypes[MPIType]), &ptype ); \ ptype->flags |= DT_FLAG_FOREVER; \ ptype->id = MPIDDT; \ - lam_ddt_commit( &ptype ); \ + ompi_ddt_commit( &ptype ); \ COPY_DATA_DESC( PDATA, ptype ); \ ptype->desc.desc = NULL; \ ptype->opt_desc.desc = NULL; \ @@ -193,7 +193,7 @@ static lam_convertor_t* pDumpConv = NULL; strncpy( PDATA->name, MPIDDTNAME, MPI_MAX_OBJECT_NAME ); \ } while(0) -int lam_ddt_init( void ) +int ompi_ddt_init( void ) { int i; @@ -210,37 +210,37 @@ int lam_ddt_init( void ) } /* the 2 complex datatypes (float and double) */ - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_cplex, DT_COMPLEX_FLOAT, "MPI_COMPLEX", float, float, DT_FLOAT, DT_FLOAT ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_dblcplex, DT_COMPLEX_DOUBLE, "MPI_DOUBLE_COMPLEX", double, double, DT_DOUBLE, DT_DOUBLE ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_cplex, DT_COMPLEX_FLOAT, "MPI_COMPLEX", float, float, DT_FLOAT, DT_FLOAT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_dblcplex, DT_COMPLEX_DOUBLE, "MPI_DOUBLE_COMPLEX", double, double, DT_DOUBLE, DT_DOUBLE ); /* C++ complex types */ - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_cxx_cplex, DT_COMPLEX_FLOAT, "MPI_CXX_COMPLEX", float, float, DT_FLOAT, DT_FLOAT ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_cxx_dblcplex, DT_COMPLEX_DOUBLE, "MPI_CXX_DOUBLE_COMPLEX", double, double, DT_DOUBLE, DT_DOUBLE ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_cxx_ldblcplex, DT_COMPLEX_LONG_DOUBLE, "MPI_CXX_LONG_DOUBLE_COMPLEX", long double, long double, DT_LONG_DOUBLE, DT_LONG_DOUBLE ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_cxx_cplex, DT_COMPLEX_FLOAT, "MPI_CXX_COMPLEX", float, float, DT_FLOAT, DT_FLOAT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_cxx_dblcplex, DT_COMPLEX_DOUBLE, "MPI_CXX_DOUBLE_COMPLEX", double, double, DT_DOUBLE, DT_DOUBLE ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_cxx_ldblcplex, DT_COMPLEX_LONG_DOUBLE, "MPI_CXX_LONG_DOUBLE_COMPLEX", long double, long double, DT_LONG_DOUBLE, DT_LONG_DOUBLE ); /* Now the predefined MPI2 datatypes (they should last forever!) */ - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_float_int, DT_FLOAT_INT, "MPI_FLOAT_INT", float, int, DT_FLOAT, DT_INT ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_double_int, DT_DOUBLE_INT, "MPI_DOUBLE_INT", double, int, DT_DOUBLE, DT_INT ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_long_int, DT_LONG_INT, "MPI_LONG_INT", long, int, DT_LONG, DT_INT ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_short_int, DT_SHORT_INT, "MPI_SHORT_INT", short, int, DT_SHORT, DT_INT ); - DECLARE_MPI2_COMPOSED_STRUCT_DDT( lam_mpi_longdbl_int, DT_LONG_DOUBLE_INT, "MPI_LONG_DOUBLE_INT", long double, int, DT_LONG_DOUBLE, DT_INT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_float_int, DT_FLOAT_INT, "MPI_FLOAT_INT", float, int, DT_FLOAT, DT_INT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_double_int, DT_DOUBLE_INT, "MPI_DOUBLE_INT", double, int, DT_DOUBLE, DT_INT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_long_int, DT_LONG_INT, "MPI_LONG_INT", long, int, DT_LONG, DT_INT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_short_int, DT_SHORT_INT, "MPI_SHORT_INT", short, int, DT_SHORT, DT_INT ); + DECLARE_MPI2_COMPOSED_STRUCT_DDT( ompi_mpi_longdbl_int, DT_LONG_DOUBLE_INT, "MPI_LONG_DOUBLE_INT", long double, int, DT_LONG_DOUBLE, DT_INT ); - DECLARE_MPI2_COMPOSED_BLOCK_DDT( lam_mpi_2int, DT_2INT, "MPI_2INT", DT_INT ); - DECLARE_MPI2_COMPOSED_BLOCK_DDT( lam_mpi_2integer, DT_2INTEGER, "MPI_2INTEGER", DT_INT ); - DECLARE_MPI2_COMPOSED_BLOCK_DDT( lam_mpi_2real, DT_2REAL, "MPI_2REAL", DT_FLOAT ); - DECLARE_MPI2_COMPOSED_BLOCK_DDT( lam_mpi_2dblprec, DT_2DBLPREC, "MPI_2DOUBLE_PRECISION", DT_DOUBLE ); - DECLARE_MPI2_COMPOSED_BLOCK_DDT( lam_mpi_2cplex, DT_2COMPLEX, "MPI_2COMPLEX", DT_COMPLEX_FLOAT ); - DECLARE_MPI2_COMPOSED_BLOCK_DDT( lam_mpi_2dblcplex, DT_2DOUBLE_COMPLEX, "MPI_2DOUBLE_COMPLEX", DT_COMPLEX_DOUBLE ); + DECLARE_MPI2_COMPOSED_BLOCK_DDT( ompi_mpi_2int, DT_2INT, "MPI_2INT", DT_INT ); + DECLARE_MPI2_COMPOSED_BLOCK_DDT( ompi_mpi_2integer, DT_2INTEGER, "MPI_2INTEGER", DT_INT ); + DECLARE_MPI2_COMPOSED_BLOCK_DDT( ompi_mpi_2real, DT_2REAL, "MPI_2REAL", DT_FLOAT ); + DECLARE_MPI2_COMPOSED_BLOCK_DDT( ompi_mpi_2dblprec, DT_2DBLPREC, "MPI_2DOUBLE_PRECISION", DT_DOUBLE ); + DECLARE_MPI2_COMPOSED_BLOCK_DDT( ompi_mpi_2cplex, DT_2COMPLEX, "MPI_2COMPLEX", DT_COMPLEX_FLOAT ); + DECLARE_MPI2_COMPOSED_BLOCK_DDT( ompi_mpi_2dblcplex, DT_2DOUBLE_COMPLEX, "MPI_2DOUBLE_COMPLEX", DT_COMPLEX_DOUBLE ); for( i = 0; i < DT_MAX_PREDEFINED; i++ ) local_sizes[i] = basicDatatypes[i].size; /* VPS: Create a fake convertor. No error checking here now, since this will be removed sometime */ - lam_convertor = lam_convertor_create(0,0); + ompi_convertor = ompi_convertor_create(0,0); return 0; } -int lam_ddt_finalize( void ) +int ompi_ddt_finalize( void ) { int i; @@ -312,7 +312,7 @@ static void __dt_contain_basic_datatypes( dt_desc_t* pData ) } } -void lam_ddt_dump( dt_desc_t* data ) +void ompi_ddt_dump( dt_desc_t* data ) { dt_desc_t* pData = (dt_desc_t*)data; @@ -371,8 +371,8 @@ DUMP_TYPE( long, long ) DUMP_TYPE( double, double ) DUMP_TYPE( long_long, long long ) DUMP_TYPE( long_double, long double ) -DUMP_TYPE( complex_float, lam_complex_float_t ) -DUMP_TYPE( complex_double, lam_complex_double_t ) +DUMP_TYPE( complex_float, ompi_complex_float_t ) +DUMP_TYPE( complex_double, ompi_complex_double_t ) static conversion_fct_t dump_functions[DT_MAX_PREDEFINED] = { (conversion_fct_t)NULL, /* DT_LOOP */ @@ -392,7 +392,7 @@ static conversion_fct_t dump_functions[DT_MAX_PREDEFINED] = { (conversion_fct_t)dump_complex_double, /* DT_COMPLEX_DOUBLE */ }; -void lam_ddt_dump_complete( dt_desc_t* data ) +void ompi_ddt_dump_complete( dt_desc_t* data ) { dt_desc_t* pData = (dt_desc_t*)data; struct iovec fake = { (void*)0, 0 }; @@ -416,13 +416,13 @@ void lam_ddt_dump_complete( dt_desc_t* data ) printf( ")\n contain " ); __dt_contain_basic_datatypes( pData ); printf( "\n{\n" ); if( pDumpConv == NULL ) { - pDumpConv = lam_convertor_create( 0, 0 ); + pDumpConv = ompi_convertor_create( 0, 0 ); } - lam_convertor_init_for_recv( pDumpConv, 0, pData, 1, NULL, 0 ); + ompi_convertor_init_for_recv( pDumpConv, 0, pData, 1, NULL, 0 ); pDumpConv->pFunctions = dump_functions; fake.iov_len = pData->size; - lam_convertor_unpack( pDumpConv, &fake, 1 ); + ompi_convertor_unpack( pDumpConv, &fake, 1 ); /* As this convertor wii be here forever (at least until the end of the * application, we should release the ddt pointer and free the stack. */ diff --git a/src/datatype/dt_optimize.c b/src/datatype/dt_optimize.c index b8a18cf400..ac0cd8dc42 100644 --- a/src/datatype/dt_optimize.c +++ b/src/datatype/dt_optimize.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -#include "lam_config.h" +#include "ompi_config.h" #include "datatype.h" #include "datatype_internal.h" @@ -40,7 +40,7 @@ static inline long GET_LOOP_DISP( dt_elem_desc_t* _pElem ) return _pElem->disp; } -int lam_ddt_optimize_short( dt_desc_t* pData, int count, dt_type_desc_t* pTypeDesc ) +int ompi_ddt_optimize_short( dt_desc_t* pData, int count, dt_type_desc_t* pTypeDesc ) { dt_elem_desc_t* pElemDesc; long lastDisp = 0; @@ -163,7 +163,7 @@ int lam_ddt_optimize_short( dt_desc_t* pData, int count, dt_type_desc_t* pTypeDe __sofar += (LENGTH); \ } -static int lam_ddt_unroll( dt_desc_t* pData, int count ) +static int ompi_ddt_unroll( dt_desc_t* pData, int count ) { dt_stack_t* pStack; /* pointer to the position on the stack */ int pos_desc; /* actual position in the description of the derived datatype */ @@ -277,7 +277,7 @@ static int lam_ddt_unroll( dt_desc_t* pData, int count ) return 0; } -int lam_ddt_commit( dt_desc_t** data ) +int ompi_ddt_commit( dt_desc_t** data ) { dt_desc_t* pData = (dt_desc_t*)*data; dt_elem_desc_t* pLast = &(pData->desc.desc[pData->desc.used]); @@ -296,7 +296,7 @@ int lam_ddt_commit( dt_desc_t** data ) /* If the data is contiguous is useless to generate an optimized version. */ if( pData->size != (pData->true_ub - pData->true_lb) ) { - (void)lam_ddt_optimize_short( pData, 1, &(pData->opt_desc) ); + (void)ompi_ddt_optimize_short( pData, 1, &(pData->opt_desc) ); /* let's add a fake element at the end just to avoid useless comparaisons * in pack/unpack functions. */ diff --git a/src/datatype/dt_pack.c b/src/datatype/dt_pack.c index 612e88a176..427a613c6f 100644 --- a/src/datatype/dt_pack.c +++ b/src/datatype/dt_pack.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -#include "lam_config.h" +#include "ompi_config.h" #include "datatype.h" #include "datatype_internal.h" @@ -10,7 +10,7 @@ #endif #include -static int lam_convertor_pack_general( lam_convertor_t* pConvertor, +static int ompi_convertor_pack_general( ompi_convertor_t* pConvertor, struct iovec* out, unsigned int outCount ) { dt_stack_t* pStack; /* pointer to the position on the stack */ @@ -135,7 +135,7 @@ static int lam_convertor_pack_general( lam_convertor_t* pConvertor, /* We suppose here that we work with an already optimized version of the data */ -static int lam_convertor_pack_homogeneous( lam_convertor_t* pConv, +static int ompi_convertor_pack_homogeneous( ompi_convertor_t* pConv, struct iovec* iov, unsigned int out_size ) { dt_stack_t* pStack; /* pointer to the position on the stack */ @@ -271,10 +271,10 @@ static int lam_convertor_pack_homogeneous( lam_convertor_t* pConv, return 0; } -static int lam_convertor_pack_homogeneous_contig( lam_convertor_t* pConv, +static int ompi_convertor_pack_homogeneous_contig( ompi_convertor_t* pConv, struct iovec* out, unsigned int out_size ) { - lam_datatype_t* pData = pConv->pDesc; + ompi_datatype_t* pData = pConv->pDesc; char* pSrc = pConv->pBaseBuf + pData->true_lb + pConv->bConverted; size_t length = pData->size * pConv->count; long extent; @@ -308,7 +308,7 @@ static int lam_convertor_pack_homogeneous_contig( lam_convertor_t* pConv, * 1 if everything went fine and the data was completly converted * -1 something wrong occurs. */ -int lam_convertor_pack( lam_convertor_t* pConv, struct iovec* out, unsigned int out_size ) +int ompi_convertor_pack( ompi_convertor_t* pConv, struct iovec* out, unsigned int out_size ) { dt_desc_t* pData = pConv->pDesc; @@ -324,11 +324,11 @@ int lam_convertor_pack( lam_convertor_t* pConv, struct iovec* out, unsigned int pConv->freebuf = out[0].iov_base; } } - return lam_convertor_progress( pConv, out, out_size ); + return ompi_convertor_progress( pConv, out, out_size ); } extern int local_sizes[DT_MAX_PREDEFINED]; -int lam_convertor_init_for_send( lam_convertor_t* pConv, unsigned int flags, +int ompi_convertor_init_for_send( ompi_convertor_t* pConv, unsigned int flags, dt_desc_t* dt, int count, void* pUserBuf, int local_starting_point ) { @@ -352,23 +352,23 @@ int lam_convertor_init_for_send( lam_convertor_t* pConv, unsigned int flags, pConv->bConverted = 0; if( dt->flags & DT_FLAG_CONTIGUOUS ) { pConv->flags |= DT_FLAG_CONTIGUOUS; - pConv->fAdvance = lam_convertor_pack_homogeneous_contig; + pConv->fAdvance = ompi_convertor_pack_homogeneous_contig; } else { /* TODO handle the sender convert case */ - pConv->fAdvance = lam_convertor_pack_general; - pConv->fAdvance = lam_convertor_pack_homogeneous; + pConv->fAdvance = ompi_convertor_pack_general; + pConv->fAdvance = ompi_convertor_pack_homogeneous; } if( pConv->freebuf != NULL ) { free( pConv->freebuf ); pConv->freebuf = NULL; } - lam_create_stack_with_pos( pConv, local_starting_point, local_sizes ); + ompi_create_stack_with_pos( pConv, local_starting_point, local_sizes ); return 0; } -lam_convertor_t* lam_convertor_create( int remote_arch, int mode ) +ompi_convertor_t* ompi_convertor_create( int remote_arch, int mode ) { - lam_convertor_t* pConv = OBJ_NEW(lam_convertor_t); + ompi_convertor_t* pConv = OBJ_NEW(ompi_convertor_t); pConv->pDesc = NULL; pConv->pStack = NULL; @@ -378,7 +378,7 @@ lam_convertor_t* lam_convertor_create( int remote_arch, int mode ) return pConv; } -static int lam_convertor_destroy( lam_convertor_t* pConv ) +static int ompi_convertor_destroy( ompi_convertor_t* pConv ) { if( pConv == NULL ) return 0; if( pConv->pStack != NULL ) free( pConv->pStack ); @@ -387,11 +387,11 @@ static int lam_convertor_destroy( lam_convertor_t* pConv ) return 0; } -OBJ_CLASS_INSTANCE(lam_convertor_t, lam_object_t, NULL, lam_convertor_destroy ); +OBJ_CLASS_INSTANCE(ompi_convertor_t, ompi_object_t, NULL, ompi_convertor_destroy ); -inline int lam_convertor_copy( lam_convertor_t* pSrcConv, lam_convertor_t* pDestConv ) +inline int ompi_convertor_copy( ompi_convertor_t* pSrcConv, ompi_convertor_t* pDestConv ) { - MEMCPY( pDestConv, pSrcConv, sizeof(lam_convertor_t) ); + MEMCPY( pDestConv, pSrcConv, sizeof(ompi_convertor_t) ); pDestConv->pStack = NULL; pDestConv->pDesc = NULL; pDestConv->count = 0; @@ -399,27 +399,27 @@ inline int lam_convertor_copy( lam_convertor_t* pSrcConv, lam_convertor_t* pDest pDestConv->bConverted = 0; pDestConv->fAdvance = NULL; pDestConv->freebuf = NULL; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -lam_convertor_t* lam_convertor_get_copy( lam_convertor_t* pConvertor ) +ompi_convertor_t* ompi_convertor_get_copy( ompi_convertor_t* pConvertor ) { - lam_convertor_t* pDestConv = OBJ_NEW(lam_convertor_t); - (void)lam_convertor_copy( pConvertor, pDestConv ); + ompi_convertor_t* pDestConv = OBJ_NEW(ompi_convertor_t); + (void)ompi_convertor_copy( pConvertor, pDestConv ); return pDestConv; } /* Actually we suppose that we can only do receiver side conversion */ -int lam_convertor_get_packed_size( lam_convertor_t* pConv, int* pSize ) +int ompi_convertor_get_packed_size( ompi_convertor_t* pConv, int* pSize ) { - if( lam_ddt_type_size( pConv->pDesc, pSize ) != 0 ) + if( ompi_ddt_type_size( pConv->pDesc, pSize ) != 0 ) return -1; /* actually *pSize contain the size of one instance of the data */ *pSize = (*pSize) * pConv->count; return 0; } -int lam_convertor_get_unpacked_size( lam_convertor_t* pConv, int* pSize ) +int ompi_convertor_get_unpacked_size( ompi_convertor_t* pConv, int* pSize ) { int i; dt_desc_t* pData = pConv->pDesc; diff --git a/src/datatype/dt_sndrcv.c b/src/datatype/dt_sndrcv.c index 645354c532..c41685c698 100644 --- a/src/datatype/dt_sndrcv.c +++ b/src/datatype/dt_sndrcv.c @@ -9,7 +9,7 @@ #include "datatype/datatype.h" /* - * lam_dtsndrcv + * ompi_dtsndrcv * * Function: - copy MPI message from buffer into another * - send/recv done if cannot optimize @@ -24,7 +24,7 @@ * Returns: - MPI_SUCCESS or error code */ int -lam_ddt_sndrcv(void *sbuf, int scount, MPI_Datatype sdtype, void *rbuf, +ompi_ddt_sndrcv(void *sbuf, int scount, MPI_Datatype sdtype, void *rbuf, int rcount, MPI_Datatype rdtype, int tag, MPI_Comm comm) { int err; /* error code */ @@ -38,7 +38,7 @@ lam_ddt_sndrcv(void *sbuf, int scount, MPI_Datatype sdtype, void *rbuf, */ if (sdtype == rdtype) { if (scount <= rcount) { - lam_ddt_copy_content_same_ddt(rdtype, scount, (char *) rbuf, + ompi_ddt_copy_content_same_ddt(rdtype, scount, (char *) rbuf, (char *) sbuf); err = MPI_SUCCESS; } diff --git a/src/datatype/dt_unpack.c b/src/datatype/dt_unpack.c index 5a63eab2ee..798e3e4be4 100644 --- a/src/datatype/dt_unpack.c +++ b/src/datatype/dt_unpack.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -#include "lam_config.h" +#include "ompi_config.h" #include "datatype.h" #include "datatype_internal.h" @@ -39,7 +39,7 @@ void dump_stack( dt_stack_t* pStack, int stack_pos, dt_elem_desc_t* pDesc, char* * 1 if everything went fine and the data was completly converted * -1 something wrong occurs. */ -static int lam_convertor_unpack_general( lam_convertor_t* pConvertor, +static int ompi_convertor_unpack_general( ompi_convertor_t* pConvertor, struct iovec* pInputv, unsigned int inputCount ) { dt_stack_t* pStack; /* pointer to the position on the stack */ @@ -160,7 +160,7 @@ static int lam_convertor_unpack_general( lam_convertor_t* pConvertor, return 0; } -static int lam_convertor_unpack_homogeneous( lam_convertor_t* pConv, +static int ompi_convertor_unpack_homogeneous( ompi_convertor_t* pConv, struct iovec* iov, unsigned int out_size ) { dt_stack_t* pStack; /* pointer to the position on the stack */ @@ -270,7 +270,7 @@ static int lam_convertor_unpack_homogeneous( lam_convertor_t* pConv, return 0; } -static int lam_convertor_unpack_homogeneous_contig( lam_convertor_t* pConv, +static int ompi_convertor_unpack_homogeneous_contig( ompi_convertor_t* pConv, struct iovec* iov, unsigned int out_size ) { dt_desc_t *pData = pConv->pDesc; @@ -302,7 +302,7 @@ static int lam_convertor_unpack_homogeneous_contig( lam_convertor_t* pConv, return (pConv->bConverted == (pData->size * pConv->count)); } -int lam_convertor_unpack( lam_convertor_t* pConvertor, +int ompi_convertor_unpack( ompi_convertor_t* pConvertor, struct iovec* pInputv, unsigned int inputCount ) { @@ -332,7 +332,7 @@ int lam_convertor_unpack( lam_convertor_t* pConvertor, if( (pInput >= pOutput) && (pInput < (pOutput + pConvertor->count * (pData->ub - pData->lb))) ) { return 1; } - return lam_convertor_progress( pConvertor, pInputv, inputCount ); + return ompi_convertor_progress( pConvertor, pInputv, inputCount ); } /* Return value: @@ -385,8 +385,8 @@ COPY_TYPE( long, long ) /*COPY_TYPE( double, double );*/ COPY_TYPE( long_long, long long ) COPY_TYPE( long_double, long double ) -COPY_TYPE( complex_float, lam_complex_float_t ) -COPY_TYPE( complex_double, lam_complex_double_t ) +COPY_TYPE( complex_float, ompi_complex_float_t ) +COPY_TYPE( complex_double, ompi_complex_double_t ) static int copy_double( unsigned int count, char* from, unsigned int from_len, long from_extent, @@ -444,14 +444,14 @@ conversion_fct_t copy_functions[DT_MAX_PREDEFINED] = { /* Should we supply buffers to the convertor or can we use directly * the user buffer ? */ -int lam_convertor_need_buffers( lam_convertor_t* pConvertor ) +int ompi_convertor_need_buffers( ompi_convertor_t* pConvertor ) { if( pConvertor->flags & DT_FLAG_CONTIGUOUS ) return 0; return 1; } extern int local_sizes[DT_MAX_PREDEFINED]; -int lam_convertor_init_for_recv( lam_convertor_t* pConv, unsigned int flags, +int ompi_convertor_init_for_recv( ompi_convertor_t* pConv, unsigned int flags, dt_desc_t* pData, int count, void* pUserBuf, int starting_point ) { @@ -476,11 +476,11 @@ int lam_convertor_init_for_recv( lam_convertor_t* pConv, unsigned int flags, /* TODO: work only on homogeneous architectures */ if( pData->flags & DT_FLAG_CONTIGUOUS ) { pConv->flags |= DT_FLAG_CONTIGUOUS; - pConv->fAdvance = lam_convertor_unpack_homogeneous_contig; + pConv->fAdvance = ompi_convertor_unpack_homogeneous_contig; } else { - pConv->fAdvance = lam_convertor_unpack_homogeneous; + pConv->fAdvance = ompi_convertor_unpack_homogeneous; } - lam_create_stack_with_pos( pConv, starting_point, local_sizes ); + ompi_create_stack_with_pos( pConv, starting_point, local_sizes ); return 0; } @@ -493,7 +493,7 @@ int lam_convertor_init_for_recv( lam_convertor_t* pConv, unsigned int flags, * positive = number of basic elements inside * negative = some error occurs */ -int lam_ddt_get_element_count( dt_desc_t* pData, int iSize ) +int ompi_ddt_get_element_count( dt_desc_t* pData, int iSize ) { dt_stack_t* pStack; /* pointer to the position on the stack */ int pos_desc; /* actual position in the description of the derived datatype */ @@ -557,7 +557,7 @@ int lam_ddt_get_element_count( dt_desc_t* pData, int iSize ) return nbElems; } -int lam_ddt_copy_content_same_ddt( dt_desc_t* pData, int count, +int ompi_ddt_copy_content_same_ddt( dt_desc_t* pData, int count, char* pDestBuf, char* pSrcBuf ) { dt_stack_t* pStack; /* pointer to the position on the stack */ diff --git a/src/datatype/fake_stack.c b/src/datatype/fake_stack.c index 92e735aaa3..0acdb8b132 100644 --- a/src/datatype/fake_stack.c +++ b/src/datatype/fake_stack.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -#include "lam_config.h" +#include "ompi_config.h" #include "datatype.h" #include "datatype_internal.h" @@ -16,19 +16,19 @@ static inline long GET_LOOP_DISP( dt_elem_desc_t* _pElem ) return _pElem->disp; } -int lam_create_stack_with_pos( lam_convertor_t* pConvertor, +int ompi_create_stack_with_pos( ompi_convertor_t* pConvertor, int starting_point, int* sizes ); -int lam_create_stack_with_pos_general( lam_convertor_t* pConvertor, +int ompi_create_stack_with_pos_general( ompi_convertor_t* pConvertor, int starting_point, int* sizes ); -int lam_create_stack_with_pos_general( lam_convertor_t* pConvertor, +int ompi_create_stack_with_pos_general( ompi_convertor_t* pConvertor, int starting_point, int* sizes ) { dt_stack_t* pStack; /* pointer to the position on the stack */ int pos_desc; /* actual position in the description of the derived datatype */ int type, lastLength = 0; long totalDisp; - lam_datatype_t* pData = pConvertor->pDesc; + ompi_datatype_t* pData = pConvertor->pDesc; int* remoteLength; int loop_length; int resting_place = starting_point; @@ -141,14 +141,14 @@ int lam_create_stack_with_pos_general( lam_convertor_t* pConvertor, * because we can split a basic data in the middle if we * have a optimized representation. */ -int lam_create_stack_with_pos( lam_convertor_t* pConvertor, +int ompi_create_stack_with_pos( ompi_convertor_t* pConvertor, int starting_point, int* sizes ) { dt_stack_t* pStack; /* pointer to the position on the stack */ int pos_desc; /* actual position in the description of the derived datatype */ int type, lastLength = 0; long totalDisp; - lam_datatype_t* pData = pConvertor->pDesc; + ompi_datatype_t* pData = pConvertor->pDesc; int* remoteLength; int loop_length; int resting_place = starting_point; diff --git a/src/errhandler/Makefile.am b/src/errhandler/Makefile.am index 5fa8851b21..afc192a250 100644 --- a/src/errhandler/Makefile.am +++ b/src/errhandler/Makefile.am @@ -22,8 +22,8 @@ liberrhandler_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/errhandler -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/errhandler +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/errhandler/errhandler.c b/src/errhandler/errhandler.c index 392636eeee..e1b3e13404 100644 --- a/src/errhandler/errhandler.c +++ b/src/errhandler/errhandler.c @@ -2,46 +2,46 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "communicator/communicator.h" #include "win/win.h" #include "file/file.h" #include "errhandler/errhandler.h" #include "errhandler/errhandler_predefined.h" -#include "lfc/lam_pointer_array.h" +#include "class/ompi_pointer_array.h" /* * Table for Fortran <-> C errhandler handle conversion */ -lam_pointer_array_t *lam_errhandler_f_to_c_table; +ompi_pointer_array_t *ompi_errhandler_f_to_c_table; /* * Class information */ -static void lam_errhandler_construct(lam_errhandler_t *eh); -static void lam_errhandler_destruct(lam_errhandler_t *eh); +static void ompi_errhandler_construct(ompi_errhandler_t *eh); +static void ompi_errhandler_destruct(ompi_errhandler_t *eh); /* * Class instance */ -OBJ_CLASS_INSTANCE(lam_errhandler_t, lam_object_t, lam_errhandler_construct, - lam_errhandler_destruct); +OBJ_CLASS_INSTANCE(ompi_errhandler_t, ompi_object_t, ompi_errhandler_construct, + ompi_errhandler_destruct); /* * MPI_ERRHANDLER_NULL */ -lam_errhandler_t lam_mpi_errhandler_null = { +ompi_errhandler_t ompi_mpi_errhandler_null = { { NULL, 0 }, "MPI_ERRHANDLER_NULL", true, false, - LAM_ERRHANDLER_TYPE_COMM, + OMPI_ERRHANDLER_TYPE_COMM, { NULL } }; @@ -49,14 +49,14 @@ lam_errhandler_t lam_mpi_errhandler_null = { /* * MPI_ERRORS_ARE_FATAL */ -lam_errhandler_t lam_mpi_errors_are_fatal = { +ompi_errhandler_t ompi_mpi_errors_are_fatal = { { NULL, 0 }, "MPI_ERRORS_ARE_FATAL", true, false, - LAM_ERRHANDLER_TYPE_COMM, - { lam_mpi_errors_are_fatal_handler }, + OMPI_ERRHANDLER_TYPE_COMM, + { ompi_mpi_errors_are_fatal_handler }, -1 }; @@ -64,76 +64,76 @@ lam_errhandler_t lam_mpi_errors_are_fatal = { /* * MPI_ERRORS_RETURN */ -lam_errhandler_t lam_mpi_errors_return = { +ompi_errhandler_t ompi_mpi_errors_return = { { NULL, 0 }, "MPI_ERRORS_ARE_RETURN", true, false, - LAM_ERRHANDLER_TYPE_COMM, - { lam_mpi_errors_return_handler }, + OMPI_ERRHANDLER_TYPE_COMM, + { ompi_mpi_errors_return_handler }, -1 }; /* - * Initialize LAM errhandler infrastructure + * Initialize OMPI errhandler infrastructure */ -int lam_errhandler_init(void) +int ompi_errhandler_init(void) { int ret_val; - /* initialize lam_errhandler_f_to_c_table */ + /* initialize ompi_errhandler_f_to_c_table */ - lam_errhandler_f_to_c_table = OBJ_NEW(lam_pointer_array_t); - if (NULL == lam_errhandler_f_to_c_table){ - return LAM_ERROR; + ompi_errhandler_f_to_c_table = OBJ_NEW(ompi_pointer_array_t); + if (NULL == ompi_errhandler_f_to_c_table){ + return OMPI_ERROR; } /* Initialize the predefined error handlers */ - OBJ_CONSTRUCT( &lam_mpi_errhandler_null, lam_errhandler_t ); - if( lam_mpi_errhandler_null.eh_f_to_c_index != LAM_ERRHANDLER_NULL_FORTRAN ) - return LAM_ERROR; + OBJ_CONSTRUCT( &ompi_mpi_errhandler_null, ompi_errhandler_t ); + if( ompi_mpi_errhandler_null.eh_f_to_c_index != OMPI_ERRHANDLER_NULL_FORTRAN ) + return OMPI_ERROR; - OBJ_CONSTRUCT( &lam_mpi_errors_are_fatal, lam_errhandler_t ); - if( lam_mpi_errors_are_fatal.eh_f_to_c_index != LAM_ERRORS_ARE_FATAL_FORTRAN ) - return LAM_ERROR; + OBJ_CONSTRUCT( &ompi_mpi_errors_are_fatal, ompi_errhandler_t ); + if( ompi_mpi_errors_are_fatal.eh_f_to_c_index != OMPI_ERRORS_ARE_FATAL_FORTRAN ) + return OMPI_ERROR; - OBJ_CONSTRUCT( &lam_mpi_errors_return, lam_errhandler_t ); - if( lam_mpi_errors_return.eh_f_to_c_index != LAM_ERRORS_RETURN_FORTRAN ) - return LAM_ERROR; + OBJ_CONSTRUCT( &ompi_mpi_errors_return, ompi_errhandler_t ); + if( ompi_mpi_errors_return.eh_f_to_c_index != OMPI_ERRORS_RETURN_FORTRAN ) + return OMPI_ERROR; /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* * Clean up the errorhandler resources */ -int lam_errhandler_finalize(void) +int ompi_errhandler_finalize(void) { /* Remove errhandler F2C table */ - OBJ_RELEASE(lam_errhandler_f_to_c_table); + OBJ_RELEASE(ompi_errhandler_f_to_c_table); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } -lam_errhandler_t *lam_errhandler_create(lam_errhandler_type_t object_type, - lam_errhandler_fortran_handler_fn_t *func) +ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, + ompi_errhandler_fortran_handler_fn_t *func) { - lam_errhandler_t *new_errhandler; + ompi_errhandler_t *new_errhandler; /* Create a new object and ensure that it's valid */ - new_errhandler = OBJ_NEW(lam_errhandler_t); + new_errhandler = OBJ_NEW(ompi_errhandler_t); if (NULL == new_errhandler) { - if (LAM_ERROR == new_errhandler->eh_f_to_c_index) { + if (OMPI_ERROR == new_errhandler->eh_f_to_c_index) { OBJ_RELEASE(new_errhandler); new_errhandler = NULL; } else { @@ -155,7 +155,7 @@ lam_errhandler_t *lam_errhandler_create(lam_errhandler_type_t object_type, /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -168,13 +168,13 @@ lam_errhandler_t *lam_errhandler_create(lam_errhandler_type_t object_type, /** * Errhandler constructor */ -static void lam_errhandler_construct(lam_errhandler_t *new_errhandler) +static void ompi_errhandler_construct(ompi_errhandler_t *new_errhandler) { int ret_val; /* assign entry in fortran <-> c translation array */ - ret_val = lam_pointer_array_add(lam_errhandler_f_to_c_table, + ret_val = ompi_pointer_array_add(ompi_errhandler_f_to_c_table, new_errhandler); new_errhandler->eh_f_to_c_index = ret_val; } @@ -183,14 +183,14 @@ static void lam_errhandler_construct(lam_errhandler_t *new_errhandler) /** * Errhandler destructor */ -static void lam_errhandler_destruct(lam_errhandler_t *errhandler) +static void ompi_errhandler_destruct(ompi_errhandler_t *errhandler) { - /* reset the lam_errhandler_f_to_c_table entry - make sure that the + /* reset the ompi_errhandler_f_to_c_table entry - make sure that the entry is in the table */ - if (NULL!= lam_pointer_array_get_item(lam_errhandler_f_to_c_table, + if (NULL!= ompi_pointer_array_get_item(ompi_errhandler_f_to_c_table, errhandler->eh_f_to_c_index)) { - lam_pointer_array_set_item(lam_errhandler_f_to_c_table, + ompi_pointer_array_set_item(ompi_errhandler_f_to_c_table, errhandler->eh_f_to_c_index, NULL); } } diff --git a/src/errhandler/errhandler.h b/src/errhandler/errhandler.h index eae34a8b19..425ab59fd0 100644 --- a/src/errhandler/errhandler.h +++ b/src/errhandler/errhandler.h @@ -3,51 +3,51 @@ */ /** @file **/ -#ifndef LAM_ERRHANDLER_H -#define LAM_ERRHANDLER_H +#ifndef OMPI_ERRHANDLER_H +#define OMPI_ERRHANDLER_H -#include "lam_config.h" +#include "ompi_config.h" #include "mpi.h" -#include "lfc/lam_object.h" -#include "lfc/lam_pointer_array.h" +#include "class/ompi_object.h" +#include "class/ompi_pointer_array.h" /* * These must correspond to the fortran handle indices */ -#define LAM_ERRHANDLER_NULL_FORTRAN 0 -#define LAM_ERRORS_ARE_FATAL_FORTRAN 1 -#define LAM_ERRORS_RETURN_FORTRAN 2 +#define OMPI_ERRHANDLER_NULL_FORTRAN 0 +#define OMPI_ERRORS_ARE_FATAL_FORTRAN 1 +#define OMPI_ERRORS_RETURN_FORTRAN 2 /** * Typedef for all fortran errhandler functions */ -typedef void (lam_errhandler_fortran_handler_fn_t)(int *, int *, ...); +typedef void (ompi_errhandler_fortran_handler_fn_t)(int *, int *, ...); /** * Enum used to describe what kind MPI object an error handler is used for */ -enum lam_errhandler_type_t { - LAM_ERRHANDLER_TYPE_COMM, - LAM_ERRHANDLER_TYPE_WIN, - LAM_ERRHANDLER_TYPE_FILE +enum ompi_errhandler_type_t { + OMPI_ERRHANDLER_TYPE_COMM, + OMPI_ERRHANDLER_TYPE_WIN, + OMPI_ERRHANDLER_TYPE_FILE }; -typedef enum lam_errhandler_type_t lam_errhandler_type_t; +typedef enum ompi_errhandler_type_t ompi_errhandler_type_t; /** * Back-end type for MPI_Errorhandler. */ -struct lam_errhandler_t { - lam_object_t super; +struct ompi_errhandler_t { + ompi_object_t super; char eh_name[MPI_MAX_OBJECT_NAME]; /* Type of MPI object that this handler is for */ - lam_errhandler_type_t eh_mpi_object_type; + ompi_errhandler_type_t eh_mpi_object_type; /* Flags about the error handler */ @@ -61,35 +61,35 @@ struct lam_errhandler_t { MPI_File_errhandler_fn *c_file_fn; MPI_Win_errhandler_fn *c_win_fn; - lam_errhandler_fortran_handler_fn_t *fort_fn; + ompi_errhandler_fortran_handler_fn_t *fort_fn; } eh_func; /* index in Fortran <-> C translation array */ int eh_f_to_c_index; }; -typedef struct lam_errhandler_t lam_errhandler_t; +typedef struct ompi_errhandler_t ompi_errhandler_t; /** * Global variable for MPI_ERRHANDLER_NULL */ -extern lam_errhandler_t lam_mpi_errhandler_null; +extern ompi_errhandler_t ompi_mpi_errhandler_null; /** * Global variable for MPI_ERRORS_ARE_FATAL */ -extern lam_errhandler_t lam_mpi_errors_are_fatal; +extern ompi_errhandler_t ompi_mpi_errors_are_fatal; /** * Global variable for MPI_ERRORS_RETURN */ -extern lam_errhandler_t lam_mpi_errors_return; +extern ompi_errhandler_t ompi_mpi_errors_return; /** * Table for Fortran <-> C errhandler handle conversion */ -extern lam_pointer_array_t *lam_errhandler_f_to_c_table; +extern ompi_pointer_array_t *ompi_errhandler_f_to_c_table; /** @@ -104,11 +104,11 @@ extern lam_pointer_array_t *lam_errhandler_f_to_c_table; * * This macro is used when you want to directly invoke the error * handler. It is exactly equivalent to calling - * lam_errhandler_invoke() directly, but is provided to have a - * parallel invocation to LAM_ERRHANDLER_CHECK() and LAM_ERRHANDLER_RETURN(). + * ompi_errhandler_invoke() directly, but is provided to have a + * parallel invocation to OMPI_ERRHANDLER_CHECK() and OMPI_ERRHANDLER_RETURN(). */ -#define LAM_ERRHANDLER_INVOKE(mpi_object, err_code, message) \ - lam_errhandler_invoke((mpi_object) != NULL ? (mpi_object)->error_handler : NULL, (mpi_object), \ +#define OMPI_ERRHANDLER_INVOKE(mpi_object, err_code, message) \ + ompi_errhandler_invoke((mpi_object) != NULL ? (mpi_object)->error_handler : NULL, (mpi_object), \ (err_code), (message)); /** @@ -122,11 +122,11 @@ extern lam_pointer_array_t *lam_errhandler_f_to_c_table; * MPI function that is invoking the error. * * This macro will invoke the error handler if the return code is not - * LAM_SUCCESS. + * OMPI_SUCCESS. */ -#define LAM_ERRHANDLER_CHECK(rc, mpi_object, err_code, message) \ - if (rc != LAM_SUCCESS) { \ - lam_errhandler_invoke((mpi_object) != NULL ? (mpi_object)->error_handler : NULL, (mpi_object), \ +#define OMPI_ERRHANDLER_CHECK(rc, mpi_object, err_code, message) \ + if (rc != OMPI_SUCCESS) { \ + ompi_errhandler_invoke((mpi_object) != NULL ? (mpi_object)->error_handler : NULL, (mpi_object), \ (err_code), (message)); \ return (err_code); \ } @@ -143,12 +143,12 @@ extern lam_pointer_array_t *lam_errhandler_f_to_c_table; * MPI function that is invoking the error. * * This macro will invoke the error handler if the return code is not - * LAM_SUCCESS. If the return code is LAM_SUCCESS, then return + * OMPI_SUCCESS. If the return code is OMPI_SUCCESS, then return * MPI_SUCCESS. */ -#define LAM_ERRHANDLER_RETURN(rc, mpi_object, err_code, message) \ - if (rc != LAM_SUCCESS) { \ - lam_errhandler_invoke((mpi_object != NULL) ? (mpi_object)->error_handler : NULL, (mpi_object), \ +#define OMPI_ERRHANDLER_RETURN(rc, mpi_object, err_code, message) \ + if (rc != OMPI_SUCCESS) { \ + ompi_errhandler_invoke((mpi_object != NULL) ? (mpi_object)->error_handler : NULL, (mpi_object), \ (err_code), (message)); \ return (err_code); \ } else { \ @@ -163,31 +163,31 @@ extern "C" { /** * Initialize the error handler interface. * - * @returns LAM_SUCCESS Upon success - * @returns LAM_ERROR Otherwise + * @returns OMPI_SUCCESS Upon success + * @returns OMPI_ERROR Otherwise * - * Invoked from lam_mpi_init(); sets up the error handler interface, + * Invoked from ompi_mpi_init(); sets up the error handler interface, * creates the predefined MPI errorhandlers, and creates the * corresopnding F2C translation table. */ - int lam_errhandler_init(void); + int ompi_errhandler_init(void); /** * Finalize the error handler interface. * - * @returns LAM_SUCCESS Always + * @returns OMPI_SUCCESS Always * - * Invokes from lam_mpi_finalize(); tears down the error handler + * Invokes from ompi_mpi_finalize(); tears down the error handler * interface, and destroys the F2C translation table. */ - int lam_errhandler_finalize(void); + int ompi_errhandler_finalize(void); /** * \internal * * This function should not be invoked directly; it should only be - * invoked by LAM_ERRHANDLER_INVOKE(), LAM_ERRHANDLER_CHECK(), or - * LAM_ERRHANDLER_RETURN(). + * invoked by OMPI_ERRHANDLER_INVOKE(), OMPI_ERRHANDLER_CHECK(), or + * OMPI_ERRHANDLER_RETURN(). * * @param errhandler The MPI_Errhandler to invoke * @param mpi_object The MPI object to invoke the errhandler on (a @@ -206,22 +206,22 @@ extern "C" { * If this function returns, it returns the err_code. Note that it * may not return (e.g., for MPI_ERRORS_ARE_FATAL). */ - int lam_errhandler_invoke(lam_errhandler_t *errhandler, void *mpi_object, + int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, int err_code, char *message); /** - * Create a lam_errhandler_t + * Create a ompi_errhandler_t * * @param object_type Enum of the type of MPI object * @param func Function pointer of the error handler * - * @returns errhandler Pointer to the lam_errorhandler_t that will be + * @returns errhandler Pointer to the ompi_errorhandler_t that will be * created and returned * * This function is called as the back-end of all the * MPI_*_CREATE_ERRHANDLER functions. It creates a new - * lam_errhandler_t object, initializes it to the correct object + * ompi_errhandler_t object, initializes it to the correct object * type, and sets the callback function on it. * * The type of the function pointer is (arbitrarily) the fortran @@ -236,8 +236,8 @@ extern "C" { * wrappers for MPI_*_CREATE_ERRHANDLER are expected to reset this * flag to true manually. */ - lam_errhandler_t *lam_errhandler_create(lam_errhandler_type_t object_type, - lam_errhandler_fortran_handler_fn_t *func); + ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, + ompi_errhandler_fortran_handler_fn_t *func); #if defined(c_plusplus) || defined(__cplusplus) } #endif @@ -255,9 +255,9 @@ extern "C" { * this function is provided to hide the internal structure field * names. */ -static inline bool lam_errhandler_is_intrinsic(lam_errhandler_t *errhandler) +static inline bool ompi_errhandler_is_intrinsic(ompi_errhandler_t *errhandler) { return errhandler->eh_is_intrinsic; } -#endif /* LAM_ERRHANDLER_H */ +#endif /* OMPI_ERRHANDLER_H */ diff --git a/src/errhandler/errhandler_invoke.c b/src/errhandler/errhandler_invoke.c index 72c3c2aa7a..0f83a963b1 100644 --- a/src/errhandler/errhandler_invoke.c +++ b/src/errhandler/errhandler_invoke.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "communicator/communicator.h" #include "win/win.h" @@ -10,20 +10,20 @@ #include "errhandler/errhandler.h" -int lam_errhandler_invoke(lam_errhandler_t *errhandler, void *mpi_object, +int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, int err_code, char *message) { int fortran_handle; - lam_communicator_t *comm; - lam_win_t *win; - lam_file_t *file; + ompi_communicator_t *comm; + ompi_win_t *win; + ompi_file_t *file; /* Figure out what kind of errhandler it is, figure out if it's fortran or C, and then invoke it */ switch (errhandler->eh_mpi_object_type) { - case LAM_ERRHANDLER_TYPE_COMM: - comm = (lam_communicator_t *) mpi_object; + case OMPI_ERRHANDLER_TYPE_COMM: + comm = (ompi_communicator_t *) mpi_object; if (errhandler->eh_fortran_function) { fortran_handle = comm->c_f_to_c_index; errhandler->eh_func.fort_fn(&fortran_handle, &err_code); @@ -32,8 +32,8 @@ int lam_errhandler_invoke(lam_errhandler_t *errhandler, void *mpi_object, } break; - case LAM_ERRHANDLER_TYPE_WIN: - win = (lam_win_t *) mpi_object; + case OMPI_ERRHANDLER_TYPE_WIN: + win = (ompi_win_t *) mpi_object; if (errhandler->eh_fortran_function) { fortran_handle = win->w_f_to_c_index; errhandler->eh_func.fort_fn(&fortran_handle, &err_code); @@ -42,8 +42,8 @@ int lam_errhandler_invoke(lam_errhandler_t *errhandler, void *mpi_object, } break; - case LAM_ERRHANDLER_TYPE_FILE: - file = (lam_file_t *) mpi_object; + case OMPI_ERRHANDLER_TYPE_FILE: + file = (ompi_file_t *) mpi_object; if (errhandler->eh_fortran_function) { fortran_handle = file->f_f_to_c_index; errhandler->eh_func.fort_fn(&fortran_handle, &err_code); diff --git a/src/errhandler/errhandler_predefined.c b/src/errhandler/errhandler_predefined.c index 4f9824f4d8..db22506acb 100644 --- a/src/errhandler/errhandler_predefined.c +++ b/src/errhandler/errhandler_predefined.c @@ -14,7 +14,7 @@ #include "errhandler/errhandler_predefined.h" -void lam_mpi_errors_are_fatal_handler(lam_communicator_t **comm, +void ompi_mpi_errors_are_fatal_handler(ompi_communicator_t **comm, int *error_code, ...) { va_list arglist; @@ -23,11 +23,11 @@ void lam_mpi_errors_are_fatal_handler(lam_communicator_t **comm, #else va_start(arglist); #endif - lam_output(0, "*** An error occurred in %s", va_arg(arglist, char *)); - lam_output(0, "*** on communicator %s", (*comm)->c_name); - lam_output(0, "*** error code: %d\n", *error_code); + ompi_output(0, "*** An error occurred in %s", va_arg(arglist, char *)); + ompi_output(0, "*** on communicator %s", (*comm)->c_name); + ompi_output(0, "*** error code: %d\n", *error_code); /* JMS: Should print the error string as well */ - lam_output(0, "*** MPI_ERRORS_ARE_FATAL"); + ompi_output(0, "*** MPI_ERRORS_ARE_FATAL"); va_end(arglist); /* Should we do something more intelligent here? */ @@ -36,7 +36,7 @@ void lam_mpi_errors_are_fatal_handler(lam_communicator_t **comm, } -void lam_mpi_errors_return_handler(lam_communicator_t **comm, +void ompi_mpi_errors_return_handler(ompi_communicator_t **comm, int *error_code, ...) { /* Don't need anything more -- just need this function to exist */ diff --git a/src/errhandler/errhandler_predefined.h b/src/errhandler/errhandler_predefined.h index 65b06b00d2..d2fcbf9193 100644 --- a/src/errhandler/errhandler_predefined.h +++ b/src/errhandler/errhandler_predefined.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_ERRHANDLER_PREDEFINED_H -#define LAM_ERRHANDLER_PREDEFINED_H +#ifndef OMPI_ERRHANDLER_PREDEFINED_H +#define OMPI_ERRHANDLER_PREDEFINED_H #include "errhandler/errhandler.h" #include "communicator/communicator.h" @@ -12,15 +12,15 @@ /** * Handler function for MPI_ERRORS_ARE_FATAL */ -void lam_mpi_errors_are_fatal_handler(lam_communicator_t **comm, +void ompi_mpi_errors_are_fatal_handler(ompi_communicator_t **comm, int *error_code, ...); /** * Handler function for MPI_ERRORS_RETURN */ -void lam_mpi_errors_return_handler(lam_communicator_t **comm, +void ompi_mpi_errors_return_handler(ompi_communicator_t **comm, int *error_code, ...); -#endif /* LAM_ERRHANDLER_PREDEFINED_H */ +#endif /* OMPI_ERRHANDLER_PREDEFINED_H */ diff --git a/src/event/Makefile.am b/src/event/Makefile.am index bb651d52e5..d3ff0d075b 100644 --- a/src/event/Makefile.am +++ b/src/event/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/config/Makefile.options -# LAM Get the dirs where lam_config.h and lam_config_bottom.h live. +# OMPI Get the dirs where ompi_config.h and ompi_config_bottom.h live. # Also specify where we can find this package's config.h because some -# of the header files in this directory get included elsewhere in LAM. +# of the header files in this directory get included elsewhere in OMPI. # #@%@#$... AM_CPPFLAGS = \ -I$(top_srcdir)/src/event/compat \ @@ -10,14 +10,14 @@ AM_CPPFLAGS = \ -I$(top_builddir)/../include \ -I$(top_builddir)/.. -# LAM: No need to build the sample or test +# OMPI: No need to build the sample or test #SUBDIRS = . sample test SUBDIRS = compat EXTRA_DIST = err.c event.h evsignal.h event.3 kqueue.c \ epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c -# LAM: This causes problems +# OMPI: This causes problems junk = \ sample/Makefile.am sample/Makefile.in sample/event-test.c \ sample/signal-test.c sample/time-test.c \ @@ -33,13 +33,13 @@ junk = \ WIN32-Prj/signal_test/signal_test.dsp WIN32-Prj/time_test \ WIN32-Prj/time_test/time_test.dsp -# LAM: Changed to noinst and libevent.la +# OMPI: Changed to noinst and libevent.la noinst_LTLIBRARIES = libevent.la -# LAM: Automake sillyness so that we can have variable sources -objects = $(LAM_LIBEVENT_SOURCES:.c=.lo) +# OMPI: Automake sillyness so that we can have variable sources +objects = $(OMPI_LIBEVENT_SOURCES:.c=.lo) -# LAM: Changed to libevent_la_* +# OMPI: Changed to libevent_la_* libevent_la_SOURCES = event.c event.h libevent_la_LIBADD = $(objects) libevent_la_DEPENDENCIES = $(objects) diff --git a/src/event/epoll.c b/src/event/epoll.c index bc013839b8..bc8ebb4760 100644 --- a/src/event/epoll.c +++ b/src/event/epoll.c @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -55,16 +55,16 @@ #include "evsignal.h" #include "threads/mutex.h" -extern struct lam_event_list lam_eventqueue; -extern volatile sig_atomic_t lam_evsignal_caught; -extern lam_mutex_t lam_event_lock; +extern struct ompi_event_list ompi_eventqueue; +extern volatile sig_atomic_t ompi_evsignal_caught; +extern ompi_mutex_t ompi_event_lock; /* due to limitations in the epoll interface, we need to keep track of * all file descriptors outself. */ struct evepoll { - struct lam_event *evread; - struct lam_event *evwrite; + struct ompi_event *evread; + struct ompi_event *evwrite; }; struct epollop { @@ -77,12 +77,12 @@ struct epollop { } epollop; static void *epoll_init (void); -static int epoll_add (void *, struct lam_event *); -static int epoll_del (void *, struct lam_event *); +static int epoll_add (void *, struct ompi_event *); +static int epoll_del (void *, struct ompi_event *); static int epoll_recalc (void *, int); static int epoll_dispatch (void *, struct timeval *); -struct lam_eventop lam_epollops = { +struct ompi_eventop ompi_epollops = { "epoll", epoll_init, epoll_add, @@ -131,7 +131,7 @@ epoll_init(void) } epollop.nfds = nfiles; - lam_evsignal_init(&epollop.evsigmask); + ompi_evsignal_init(&epollop.evsigmask); return (&epollop); } @@ -159,7 +159,7 @@ epoll_recalc(void *arg, int max) epollop->nfds = nfds; } - return (lam_evsignal_recalc(&epollop->evsigmask)); + return (ompi_evsignal_recalc(&epollop->evsigmask)); } int @@ -170,19 +170,19 @@ epoll_dispatch(void *arg, struct timeval *tv) struct evepoll *evep; int i, res, timeout; - if (lam_evsignal_deliver(&epollop->evsigmask) == -1) + if (ompi_evsignal_deliver(&epollop->evsigmask) == -1) return (-1); timeout = tv->tv_sec * 1000 + tv->tv_usec / 1000; - if(lam_using_threads()) { - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_unlock(&ompi_event_lock); res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout); - lam_mutex_lock(&lam_event_lock); + ompi_mutex_lock(&ompi_event_lock); } else { res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout); } - if (lam_evsignal_recalc(&epollop->evsigmask) == -1) + if (ompi_evsignal_recalc(&epollop->evsigmask) == -1) return (-1); if (res == -1) { @@ -191,17 +191,17 @@ epoll_dispatch(void *arg, struct timeval *tv) return (-1); } - lam_evsignal_process(); + ompi_evsignal_process(); return (0); - } else if (lam_evsignal_caught) - lam_evsignal_process(); + } else if (ompi_evsignal_caught) + ompi_evsignal_process(); LOG_DBG((LOG_MISC, 80, "%s: epoll_wait reports %d", __func__, res)); for (i = 0; i < res; i++) { int which = 0; int what = events[i].events; - struct lam_event *evread = NULL, *evwrite = NULL; + struct ompi_event *evread = NULL, *evwrite = NULL; evep = (struct evepoll *)events[i].data.ptr; @@ -212,27 +212,27 @@ epoll_dispatch(void *arg, struct timeval *tv) if (what & EPOLLIN) { evread = evep->evread; - which |= LAM_EV_READ; + which |= OMPI_EV_READ; } if (what & EPOLLOUT) { evwrite = evep->evwrite; - which |= LAM_EV_WRITE; + which |= OMPI_EV_WRITE; } if (!which) continue; - if (evread != NULL && !(evread->ev_events & LAM_EV_PERSIST)) - lam_event_del_i(evread); + if (evread != NULL && !(evread->ev_events & OMPI_EV_PERSIST)) + ompi_event_del_i(evread); if (evwrite != NULL && evwrite != evread && - !(evwrite->ev_events & LAM_EV_PERSIST)) - lam_event_del_i(evwrite); + !(evwrite->ev_events & OMPI_EV_PERSIST)) + ompi_event_del_i(evwrite); if (evread != NULL) - lam_event_active_i(evread, LAM_EV_READ, 1); + ompi_event_active_i(evread, OMPI_EV_READ, 1); if (evwrite != NULL) - lam_event_active_i(evwrite, LAM_EV_WRITE, 1); + ompi_event_active_i(evwrite, OMPI_EV_WRITE, 1); } return (0); @@ -240,15 +240,15 @@ epoll_dispatch(void *arg, struct timeval *tv) static int -epoll_add(void *arg, struct lam_event *ev) +epoll_add(void *arg, struct ompi_event *ev) { struct epollop *epollop = arg; struct epoll_event epev; struct evepoll *evep; int fd, op, events; - if (ev->ev_events & LAM_EV_SIGNAL) - return (lam_evsignal_add(&epollop->evsigmask, ev)); + if (ev->ev_events & OMPI_EV_SIGNAL) + return (ompi_evsignal_add(&epollop->evsigmask, ev)); fd = ev->ev_fd; if (fd >= epollop->nfds) { @@ -268,9 +268,9 @@ epoll_add(void *arg, struct lam_event *ev) op = EPOLL_CTL_MOD; } - if (ev->ev_events & LAM_EV_READ) + if (ev->ev_events & OMPI_EV_READ) events |= EPOLLIN; - if (ev->ev_events & LAM_EV_WRITE) + if (ev->ev_events & OMPI_EV_WRITE) events |= EPOLLOUT; epev.data.ptr = evep; @@ -279,16 +279,16 @@ epoll_add(void *arg, struct lam_event *ev) return (-1); /* Update events responsible */ - if (ev->ev_events & LAM_EV_READ) + if (ev->ev_events & OMPI_EV_READ) evep->evread = ev; - if (ev->ev_events & LAM_EV_WRITE) + if (ev->ev_events & OMPI_EV_WRITE) evep->evwrite = ev; return (0); } static int -epoll_del(void *arg, struct lam_event *ev) +epoll_del(void *arg, struct ompi_event *ev) { struct epollop *epollop = arg; struct epoll_event epev; @@ -296,8 +296,8 @@ epoll_del(void *arg, struct lam_event *ev) int fd, events, op; int needwritedelete = 1, needreaddelete = 1; - if (ev->ev_events & LAM_EV_SIGNAL) - return (lam_evsignal_del(&epollop->evsigmask, ev)); + if (ev->ev_events & OMPI_EV_SIGNAL) + return (ompi_evsignal_del(&epollop->evsigmask, ev)); fd = ev->ev_fd; if (fd >= epollop->nfds) @@ -307,9 +307,9 @@ epoll_del(void *arg, struct lam_event *ev) op = EPOLL_CTL_DEL; events = 0; - if (ev->ev_events & LAM_EV_READ) + if (ev->ev_events & OMPI_EV_READ) events |= EPOLLIN; - if (ev->ev_events & LAM_EV_WRITE) + if (ev->ev_events & OMPI_EV_WRITE) events |= EPOLLOUT; if ((events & (EPOLLIN|EPOLLOUT)) != (EPOLLIN|EPOLLOUT)) { diff --git a/src/event/event.c b/src/event/event.c index 509a13dfc0..2c941efecd 100644 --- a/src/event/event.c +++ b/src/event/event.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "lam_config.h" +#include "ompi_config.h" #ifdef WIN32 #define WIN32_LEAN_AND_MEAN @@ -62,84 +62,84 @@ #include "event.h" #include "include/types.h" #include "include/constants.h" -#include "lfc/lam_object.h" +#include "class/ompi_object.h" #include "threads/mutex.h" #include "threads/thread.h" #include "util/output.h" #if HAVE_SELECT -extern const struct lam_eventop lam_selectops; +extern const struct ompi_eventop ompi_selectops; #endif #if HAVE_POLL -extern const struct lam_eventop lam_pollops; +extern const struct ompi_eventop ompi_pollops; #endif #if HAVE_RTSIG -extern const struct lam_eventop lam_rtsigops; +extern const struct ompi_eventop ompi_rtsigops; #endif #if HAVE_EPOLL -extern const struct lam_eventop lam_epollops; +extern const struct ompi_eventop ompi_epollops; #endif #if HAVE_WORKING_KQUEUE -extern const struct lam_eventop lam_kqops; +extern const struct ompi_eventop ompi_kqops; #endif #if WIN32 -extern const struct lam_eventop lam_win32ops; +extern const struct ompi_eventop ompi_win32ops; #endif /* In order of preference */ -static const struct lam_eventop *lam_eventops[] = { +static const struct ompi_eventop *ompi_eventops[] = { #if HAVE_WORKING_KQUEUE - &lam_kqops, + &ompi_kqops, #endif #if HAVE_EPOLL - &lam_epollops, + &ompi_epollops, #endif #if HAVE_RTSIG - &lam_rtsigops, + &ompi_rtsigops, #endif #if HAVE_POLL - &lam_pollops, + &ompi_pollops, #endif #if HAVE_SELECT - &lam_selectops, + &ompi_selectops, #endif #if WIN32 - &lam_win32ops, + &ompi_win32ops, #endif NULL }; -const struct lam_eventop *lam_evsel; -void *lam_evbase; +const struct ompi_eventop *ompi_evsel; +void *ompi_evbase; /* Handle signals */ -int (*lam_event_sigcb)(void); /* Signal callback when gotsig is set */ -int lam_event_gotsig; /* Set in signal handler */ +int (*ompi_event_sigcb)(void); /* Signal callback when gotsig is set */ +int ompi_event_gotsig; /* Set in signal handler */ /* Prototypes */ -static void lam_event_process_active(void); -static void lam_timeout_correct(struct timeval *off); -static void lam_timeout_insert(struct lam_event *); -static void lam_event_queue_insert(struct lam_event *, int); -static void lam_event_queue_remove(struct lam_event *, int); -static void lam_timeout_process(void); -int lam_event_haveevents(void); +static void ompi_event_process_active(void); +static void ompi_timeout_correct(struct timeval *off); +static void ompi_timeout_insert(struct ompi_event *); +static void ompi_event_queue_insert(struct ompi_event *, int); +static void ompi_event_queue_remove(struct ompi_event *, int); +static void ompi_timeout_process(void); +int ompi_event_haveevents(void); -static RB_HEAD(lam_event_tree, lam_event) lam_timetree; -static struct lam_event_list lam_activequeue; -struct lam_event_list lam_signalqueue; -struct lam_event_list lam_eventqueue; -static struct timeval lam_event_tv; -lam_mutex_t lam_event_lock; -#if LAM_HAVE_THREADS -lam_thread_t lam_event_thread; -lam_event_t lam_event_pipe_event; -int lam_event_pipe[2]; -int lam_event_pipe_signalled; +static RB_HEAD(ompi_event_tree, ompi_event) ompi_timetree; +static struct ompi_event_list ompi_activequeue; +struct ompi_event_list ompi_signalqueue; +struct ompi_event_list ompi_eventqueue; +static struct timeval ompi_event_tv; +ompi_mutex_t ompi_event_lock; +#if OMPI_HAVE_THREADS +ompi_thread_t ompi_event_thread; +ompi_event_t ompi_event_pipe_event; +int ompi_event_pipe[2]; +int ompi_event_pipe_signalled; #endif static int -compare(struct lam_event *a, struct lam_event *b) +compare(struct ompi_event *a, struct ompi_event *b) { if (timercmp(&a->ev_timeout, &b->ev_timeout, <)) return (-1); @@ -148,17 +148,17 @@ compare(struct lam_event *a, struct lam_event *b) return (0); } -static RB_PROTOTYPE(lam_event_tree, lam_event, ev_timeout_node, compare) +static RB_PROTOTYPE(ompi_event_tree, ompi_event, ev_timeout_node, compare) -static RB_GENERATE(lam_event_tree, lam_event, ev_timeout_node, compare) +static RB_GENERATE(ompi_event_tree, ompi_event, ev_timeout_node, compare) -static int lam_timeout_next(struct timeval *tv) +static int ompi_timeout_next(struct timeval *tv) { - struct timeval dflt = LAM_TIMEOUT_DEFAULT; + struct timeval dflt = OMPI_TIMEOUT_DEFAULT; struct timeval now; - struct lam_event *ev; + struct ompi_event *ev; - if ((ev = RB_MIN(lam_event_tree, &lam_timetree)) == NULL) { + if ((ev = RB_MIN(ompi_event_tree, &ompi_timetree)) == NULL) { *tv = dflt; return(0); } @@ -176,76 +176,76 @@ static int lam_timeout_next(struct timeval *tv) } /* run loop for dispatch thread */ -static void* lam_event_run(lam_object_t* arg) +static void* ompi_event_run(ompi_object_t* arg) { - lam_event_loop(0); + ompi_event_loop(0); return NULL; } -#if LAM_HAVE_THREADS -static void lam_event_pipe_handler(int sd, short flags, void* user) +#if OMPI_HAVE_THREADS +static void ompi_event_pipe_handler(int sd, short flags, void* user) { unsigned char byte; if(read(sd, &byte, 1) != 1) { - lam_output(0, "lam_event_pipe: read failed with: errno=%d\n", errno); - lam_event_del(&lam_event_pipe_event); + ompi_output(0, "ompi_event_pipe: read failed with: errno=%d\n", errno); + ompi_event_del(&ompi_event_pipe_event); } } #endif int -lam_event_init(void) +ompi_event_init(void) { static int inited = false; int i; -#if LAM_HAVE_THREADS +#if OMPI_HAVE_THREADS int rc; #endif if(inited) - return LAM_SUCCESS; + return OMPI_SUCCESS; - lam_event_sigcb = NULL; - lam_event_gotsig = 0; - gettimeofday(&lam_event_tv, NULL); + ompi_event_sigcb = NULL; + ompi_event_gotsig = 0; + gettimeofday(&ompi_event_tv, NULL); - OBJ_CONSTRUCT(&lam_event_lock, lam_mutex_t); - RB_INIT(&lam_timetree); - TAILQ_INIT(&lam_eventqueue); - TAILQ_INIT(&lam_activequeue); - TAILQ_INIT(&lam_signalqueue); + OBJ_CONSTRUCT(&ompi_event_lock, ompi_mutex_t); + RB_INIT(&ompi_timetree); + TAILQ_INIT(&ompi_eventqueue); + TAILQ_INIT(&ompi_activequeue); + TAILQ_INIT(&ompi_signalqueue); - lam_evbase = NULL; - for (i = 0; lam_eventops[i] && !lam_evbase; i++) { - lam_evsel = lam_eventops[i]; - lam_evbase = lam_evsel->init(); + ompi_evbase = NULL; + for (i = 0; ompi_eventops[i] && !ompi_evbase; i++) { + ompi_evsel = ompi_eventops[i]; + ompi_evbase = ompi_evsel->init(); } - if (lam_evbase == NULL) + if (ompi_evbase == NULL) errx(1, "%s: no event mechanism available", __func__); -#if LAM_HAVE_THREADS - if(pipe(lam_event_pipe) != 0) { - lam_output(0, "lam_event_init: pipe() failed with errno=%d\n", errno); - return LAM_ERROR; +#if OMPI_HAVE_THREADS + if(pipe(ompi_event_pipe) != 0) { + ompi_output(0, "ompi_event_init: pipe() failed with errno=%d\n", errno); + return OMPI_ERROR; } - lam_event_pipe_signalled = 1; - lam_event_set( - &lam_event_pipe_event, - lam_event_pipe[0], - LAM_EV_READ|LAM_EV_PERSIST, - lam_event_pipe_handler, + ompi_event_pipe_signalled = 1; + ompi_event_set( + &ompi_event_pipe_event, + ompi_event_pipe[0], + OMPI_EV_READ|OMPI_EV_PERSIST, + ompi_event_pipe_handler, 0); - lam_event_add_i(&lam_event_pipe_event, 0); - lam_event_pipe_signalled = 0; + ompi_event_add_i(&ompi_event_pipe_event, 0); + ompi_event_pipe_signalled = 0; /* spin up a thread to dispatch events */ - OBJ_CONSTRUCT(&lam_event_thread, lam_thread_t); - lam_event_thread.t_run = lam_event_run; - if((rc = lam_thread_start(&lam_event_thread)) != LAM_SUCCESS) + OBJ_CONSTRUCT(&ompi_event_thread, ompi_thread_t); + ompi_event_thread.t_run = ompi_event_run; + if((rc = ompi_thread_start(&ompi_event_thread)) != OMPI_SUCCESS) return rc; #endif @@ -254,25 +254,25 @@ lam_event_init(void) log_debug_cmd(LOG_MISC, 80); #endif inited = true; - return LAM_SUCCESS; + return OMPI_SUCCESS; } int -lam_event_haveevents(void) +ompi_event_haveevents(void) { - return (RB_ROOT(&lam_timetree) || TAILQ_FIRST(&lam_eventqueue) || - TAILQ_FIRST(&lam_signalqueue) || TAILQ_FIRST(&lam_activequeue)); + return (RB_ROOT(&ompi_timetree) || TAILQ_FIRST(&ompi_eventqueue) || + TAILQ_FIRST(&ompi_signalqueue) || TAILQ_FIRST(&ompi_activequeue)); } static void -lam_event_process_active(void) +ompi_event_process_active(void) { - struct lam_event *ev; + struct ompi_event *ev; short ncalls; - for (ev = TAILQ_FIRST(&lam_activequeue); ev; - ev = TAILQ_FIRST(&lam_activequeue)) { - lam_event_queue_remove(ev, LAM_EVLIST_ACTIVE); + for (ev = TAILQ_FIRST(&ompi_activequeue); ev; + ev = TAILQ_FIRST(&ompi_activequeue)) { + ompi_event_queue_remove(ev, OMPI_EVLIST_ACTIVE); /* Allows deletes to work */ ncalls = ev->ev_ncalls; @@ -280,10 +280,10 @@ lam_event_process_active(void) while (ncalls) { ncalls--; ev->ev_ncalls = ncalls; - if(lam_using_threads()) { - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_unlock(&ompi_event_lock); (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg); - lam_mutex_lock(&lam_event_lock); + ompi_mutex_lock(&ompi_event_lock); } else { (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg); } @@ -292,121 +292,121 @@ lam_event_process_active(void) } int -lam_event_dispatch(void) +ompi_event_dispatch(void) { - return (lam_event_loop(0)); + return (ompi_event_loop(0)); } int -lam_event_loop(int flags) +ompi_event_loop(int flags) { struct timeval tv; int res, done; - if(lam_using_threads()) { - THREAD_LOCK(&lam_event_lock); + if(ompi_using_threads()) { + THREAD_LOCK(&ompi_event_lock); } /* Calculate the initial events that we are waiting for */ - if (lam_evsel->recalc && lam_evsel->recalc(lam_evbase, 0) == -1) { - lam_output(0, "lam_event_loop: lam_evsel->recalc() failed."); - THREAD_UNLOCK(&lam_event_lock); + if (ompi_evsel->recalc && ompi_evsel->recalc(ompi_evbase, 0) == -1) { + ompi_output(0, "ompi_event_loop: ompi_evsel->recalc() failed."); + THREAD_UNLOCK(&ompi_event_lock); return (-1); } done = 0; while (!done) { - while (lam_event_gotsig) { - lam_event_gotsig = 0; - if (lam_event_sigcb) { - res = (*lam_event_sigcb)(); + while (ompi_event_gotsig) { + ompi_event_gotsig = 0; + if (ompi_event_sigcb) { + res = (*ompi_event_sigcb)(); if (res == -1) { - lam_output(0, "lam_event_loop: lam_event_sigcb() failed."); + ompi_output(0, "ompi_event_loop: ompi_event_sigcb() failed."); errno = EINTR; - THREAD_UNLOCK(&lam_event_lock); + THREAD_UNLOCK(&ompi_event_lock); return (-1); } } } - if (!(flags & LAM_EVLOOP_NONBLOCK)) { - static struct timeval dflt = LAM_TIMEOUT_DEFAULT; + if (!(flags & OMPI_EVLOOP_NONBLOCK)) { + static struct timeval dflt = OMPI_TIMEOUT_DEFAULT; tv = dflt; } else timerclear(&tv); -#if LAM_HAVE_THREADS - lam_event_pipe_signalled = 0; +#if OMPI_HAVE_THREADS + ompi_event_pipe_signalled = 0; #endif - res = lam_evsel->dispatch(lam_evbase, &tv); -#if LAM_HAVE_THREADS - lam_event_pipe_signalled = 1; + res = ompi_evsel->dispatch(ompi_evbase, &tv); +#if OMPI_HAVE_THREADS + ompi_event_pipe_signalled = 1; #endif if (res == -1) { - lam_output(0, "lam_event_loop: lam_evesel->dispatch() failed."); - THREAD_UNLOCK(&lam_event_lock); + ompi_output(0, "ompi_event_loop: ompi_evesel->dispatch() failed."); + THREAD_UNLOCK(&ompi_event_lock); return (-1); } - if(NULL != RB_MIN(lam_event_tree, &lam_timetree)) { + if(NULL != RB_MIN(ompi_event_tree, &ompi_timetree)) { /* Check if time is running backwards */ gettimeofday(&tv, NULL); - if (timercmp(&tv, &lam_event_tv, <)) { + if (timercmp(&tv, &ompi_event_tv, <)) { struct timeval off; LOG_DBG((LOG_MISC, 10, "%s: time is running backwards, corrected", __func__)); - timersub(&lam_event_tv, &tv, &off); - lam_timeout_correct(&off); + timersub(&ompi_event_tv, &tv, &off); + ompi_timeout_correct(&off); } - lam_event_tv = tv; - lam_timeout_process(); + ompi_event_tv = tv; + ompi_timeout_process(); } - if (TAILQ_FIRST(&lam_activequeue)) { - lam_event_process_active(); - if (flags & LAM_EVLOOP_ONCE) + if (TAILQ_FIRST(&ompi_activequeue)) { + ompi_event_process_active(); + if (flags & OMPI_EVLOOP_ONCE) done = 1; - } else if (flags & (LAM_EVLOOP_NONBLOCK|LAM_EVLOOP_ONCE)) + } else if (flags & (OMPI_EVLOOP_NONBLOCK|OMPI_EVLOOP_ONCE)) done = 1; - if (lam_evsel->recalc && lam_evsel->recalc(lam_evbase, 0) == -1) { - lam_output(0, "lam_event_loop: lam_evesel->recalc() failed."); - THREAD_UNLOCK(&lam_event_lock); + if (ompi_evsel->recalc && ompi_evsel->recalc(ompi_evbase, 0) == -1) { + ompi_output(0, "ompi_event_loop: ompi_evesel->recalc() failed."); + THREAD_UNLOCK(&ompi_event_lock); return (-1); } } - THREAD_UNLOCK(&lam_event_lock); + THREAD_UNLOCK(&ompi_event_lock); return (0); } int -lam_event_add_i(struct lam_event *ev, struct timeval *tv) +ompi_event_add_i(struct ompi_event *ev, struct timeval *tv) { int rc = 0; LOG_DBG((LOG_MISC, 55, "event_add: event: %p, %s%s%scall %p", ev, - ev->ev_events & LAM_EV_READ ? "LAM_EV_READ " : " ", - ev->ev_events & LAM_EV_WRITE ? "LAM_EV_WRITE " : " ", - tv ? "LAM_EV_TIMEOUT " : " ", + ev->ev_events & OMPI_EV_READ ? "OMPI_EV_READ " : " ", + ev->ev_events & OMPI_EV_WRITE ? "OMPI_EV_WRITE " : " ", + tv ? "OMPI_EV_TIMEOUT " : " ", ev->ev_callback)); - assert(!(ev->ev_flags & ~LAM_EVLIST_ALL)); + assert(!(ev->ev_flags & ~OMPI_EVLIST_ALL)); if (tv != NULL) { struct timeval now; - if (ev->ev_flags & LAM_EVLIST_TIMEOUT) - lam_event_queue_remove(ev, LAM_EVLIST_TIMEOUT); + if (ev->ev_flags & OMPI_EVLIST_TIMEOUT) + ompi_event_queue_remove(ev, OMPI_EVLIST_TIMEOUT); /* Check if it is active due to a timeout. Rescheduling * this timeout before the callback can be executed * removes it from the active list. */ - if ((ev->ev_flags & LAM_EVLIST_ACTIVE) && - (ev->ev_res & LAM_EV_TIMEOUT)) { + if ((ev->ev_flags & OMPI_EVLIST_ACTIVE) && + (ev->ev_res & OMPI_EV_TIMEOUT)) { /* See if we are just active executing this * event in a loop */ @@ -415,7 +415,7 @@ lam_event_add_i(struct lam_event *ev, struct timeval *tv) *ev->ev_pncalls = 0; } - lam_event_queue_remove(ev, LAM_EVLIST_ACTIVE); + ompi_event_queue_remove(ev, OMPI_EVLIST_ACTIVE); } gettimeofday(&now, NULL); @@ -425,37 +425,37 @@ lam_event_add_i(struct lam_event *ev, struct timeval *tv) "event_add: timeout in %d seconds, call %p", tv->tv_sec, ev->ev_callback)); - lam_event_queue_insert(ev, LAM_EVLIST_TIMEOUT); + ompi_event_queue_insert(ev, OMPI_EVLIST_TIMEOUT); } - if ((ev->ev_events & (LAM_EV_READ|LAM_EV_WRITE)) && - !(ev->ev_flags & (LAM_EVLIST_INSERTED|LAM_EVLIST_ACTIVE))) { - lam_event_queue_insert(ev, LAM_EVLIST_INSERTED); - rc = (lam_evsel->add(lam_evbase, ev)); - } else if ((ev->ev_events & LAM_EV_SIGNAL) && - !(ev->ev_flags & LAM_EVLIST_SIGNAL)) { - lam_event_queue_insert(ev, LAM_EVLIST_SIGNAL); - rc = (lam_evsel->add(lam_evbase, ev)); + if ((ev->ev_events & (OMPI_EV_READ|OMPI_EV_WRITE)) && + !(ev->ev_flags & (OMPI_EVLIST_INSERTED|OMPI_EVLIST_ACTIVE))) { + ompi_event_queue_insert(ev, OMPI_EVLIST_INSERTED); + rc = (ompi_evsel->add(ompi_evbase, ev)); + } else if ((ev->ev_events & OMPI_EV_SIGNAL) && + !(ev->ev_flags & OMPI_EVLIST_SIGNAL)) { + ompi_event_queue_insert(ev, OMPI_EVLIST_SIGNAL); + rc = (ompi_evsel->add(ompi_evbase, ev)); } -#if LAM_HAVE_THREADS - if(lam_event_pipe_signalled == 0) { +#if OMPI_HAVE_THREADS + if(ompi_event_pipe_signalled == 0) { unsigned char byte = 0; - if(write(lam_event_pipe[1], &byte, 1) != 1) - lam_output(0, "lam_event_add: write() to lam_event_pipe[1] failed with errno=%d\n", errno); - lam_event_pipe_signalled++; + if(write(ompi_event_pipe[1], &byte, 1) != 1) + ompi_output(0, "ompi_event_add: write() to ompi_event_pipe[1] failed with errno=%d\n", errno); + ompi_event_pipe_signalled++; } #endif return rc; } -int lam_event_del_i(struct lam_event *ev) +int ompi_event_del_i(struct ompi_event *ev) { LOG_DBG((LOG_MISC, 80, "event_del: %p, callback %p", ev, ev->ev_callback)); - assert(!(ev->ev_flags & ~LAM_EVLIST_ALL)); + assert(!(ev->ev_flags & ~OMPI_EVLIST_ALL)); /* See if we are just active executing this event in a loop */ if (ev->ev_ncalls && ev->ev_pncalls) { @@ -463,26 +463,26 @@ int lam_event_del_i(struct lam_event *ev) *ev->ev_pncalls = 0; } - if (ev->ev_flags & LAM_EVLIST_TIMEOUT) - lam_event_queue_remove(ev, LAM_EVLIST_TIMEOUT); + if (ev->ev_flags & OMPI_EVLIST_TIMEOUT) + ompi_event_queue_remove(ev, OMPI_EVLIST_TIMEOUT); - if (ev->ev_flags & LAM_EVLIST_ACTIVE) - lam_event_queue_remove(ev, LAM_EVLIST_ACTIVE); + if (ev->ev_flags & OMPI_EVLIST_ACTIVE) + ompi_event_queue_remove(ev, OMPI_EVLIST_ACTIVE); - if (ev->ev_flags & LAM_EVLIST_INSERTED) { - lam_event_queue_remove(ev, LAM_EVLIST_INSERTED); - return (lam_evsel->del(lam_evbase, ev)); - } else if (ev->ev_flags & LAM_EVLIST_SIGNAL) { - lam_event_queue_remove(ev, LAM_EVLIST_SIGNAL); - return (lam_evsel->del(lam_evbase, ev)); + if (ev->ev_flags & OMPI_EVLIST_INSERTED) { + ompi_event_queue_remove(ev, OMPI_EVLIST_INSERTED); + return (ompi_evsel->del(ompi_evbase, ev)); + } else if (ev->ev_flags & OMPI_EVLIST_SIGNAL) { + ompi_event_queue_remove(ev, OMPI_EVLIST_SIGNAL); + return (ompi_evsel->del(ompi_evbase, ev)); } -#if LAM_HAVE_THREADS - if(lam_event_pipe_signalled == 0) { +#if OMPI_HAVE_THREADS + if(ompi_event_pipe_signalled == 0) { unsigned char byte = 0; - if(write(lam_event_pipe[1], &byte, 1) != 1) - lam_output(0, "lam_event_add: write() to lam_event_pipe[1] failed with errno=%d\n", errno); - lam_event_pipe_signalled++; + if(write(ompi_event_pipe[1], &byte, 1) != 1) + ompi_output(0, "ompi_event_add: write() to ompi_event_pipe[1] failed with errno=%d\n", errno); + ompi_event_pipe_signalled++; } #endif return (0); @@ -490,48 +490,48 @@ int lam_event_del_i(struct lam_event *ev) static void -lam_timeout_correct(struct timeval *off) +ompi_timeout_correct(struct timeval *off) { - struct lam_event *ev; + struct ompi_event *ev; /* We can modify the key element of the node without destroying * the key, beause we apply it to all in the right order. */ - RB_FOREACH(ev, lam_event_tree, &lam_timetree) + RB_FOREACH(ev, ompi_event_tree, &ompi_timetree) timersub(&ev->ev_timeout, off, &ev->ev_timeout); } static void -lam_timeout_process(void) +ompi_timeout_process(void) { struct timeval now; - struct lam_event *ev, *next; + struct ompi_event *ev, *next; gettimeofday(&now, NULL); - for (ev = RB_MIN(lam_event_tree, &lam_timetree); ev; ev = next) { + for (ev = RB_MIN(ompi_event_tree, &ompi_timetree); ev; ev = next) { if (timercmp(&ev->ev_timeout, &now, >)) break; - next = RB_NEXT(lam_event_tree, &lam_timetree, ev); + next = RB_NEXT(ompi_event_tree, &ompi_timetree, ev); - lam_event_queue_remove(ev, LAM_EVLIST_TIMEOUT); + ompi_event_queue_remove(ev, OMPI_EVLIST_TIMEOUT); /* delete this event from the I/O queues */ - lam_event_del_i(ev); + ompi_event_del_i(ev); LOG_DBG((LOG_MISC, 60, "timeout_process: call %p", ev->ev_callback)); - lam_event_active_i(ev, LAM_EV_TIMEOUT, 1); + ompi_event_active_i(ev, OMPI_EV_TIMEOUT, 1); } } static void -lam_timeout_insert(struct lam_event *ev) +ompi_timeout_insert(struct ompi_event *ev) { - struct lam_event *tmp; + struct ompi_event *tmp; - tmp = RB_FIND(lam_event_tree, &lam_timetree, ev); + tmp = RB_FIND(ompi_event_tree, &ompi_timetree, ev); if (tmp != NULL) { struct timeval tv; @@ -541,18 +541,18 @@ lam_timeout_insert(struct lam_event *ev) tv = ev->ev_timeout; do { timeradd(&tv, &add, &tv); - tmp = RB_NEXT(lam_event_tree, &lam_timetree, tmp); + tmp = RB_NEXT(ompi_event_tree, &ompi_timetree, tmp); } while (tmp != NULL && timercmp(&tmp->ev_timeout, &tv, ==)); ev->ev_timeout = tv; } - tmp = RB_INSERT(lam_event_tree, &lam_timetree, ev); + tmp = RB_INSERT(ompi_event_tree, &ompi_timetree, ev); assert(tmp == NULL); } static void -lam_event_queue_remove(struct lam_event *ev, int queue) +ompi_event_queue_remove(struct ompi_event *ev, int queue) { if (!(ev->ev_flags & queue)) errx(1, "%s: %p(fd %d) not on queue %x", __func__, @@ -560,17 +560,17 @@ lam_event_queue_remove(struct lam_event *ev, int queue) ev->ev_flags &= ~queue; switch (queue) { - case LAM_EVLIST_ACTIVE: - TAILQ_REMOVE(&lam_activequeue, ev, ev_active_next); + case OMPI_EVLIST_ACTIVE: + TAILQ_REMOVE(&ompi_activequeue, ev, ev_active_next); break; - case LAM_EVLIST_SIGNAL: - TAILQ_REMOVE(&lam_signalqueue, ev, ev_signal_next); + case OMPI_EVLIST_SIGNAL: + TAILQ_REMOVE(&ompi_signalqueue, ev, ev_signal_next); break; - case LAM_EVLIST_TIMEOUT: - RB_REMOVE(lam_event_tree, &lam_timetree, ev); + case OMPI_EVLIST_TIMEOUT: + RB_REMOVE(ompi_event_tree, &ompi_timetree, ev); break; - case LAM_EVLIST_INSERTED: - TAILQ_REMOVE(&lam_eventqueue, ev, ev_next); + case OMPI_EVLIST_INSERTED: + TAILQ_REMOVE(&ompi_eventqueue, ev, ev_next); break; default: errx(1, "%s: unknown queue %x", __func__, queue); @@ -578,7 +578,7 @@ lam_event_queue_remove(struct lam_event *ev, int queue) } static void -lam_event_queue_insert(struct lam_event *ev, int queue) +ompi_event_queue_insert(struct ompi_event *ev, int queue) { if (ev->ev_flags & queue) errx(1, "%s: %p(fd %d) already on queue %x", __func__, @@ -586,27 +586,27 @@ lam_event_queue_insert(struct lam_event *ev, int queue) ev->ev_flags |= queue; switch (queue) { - case LAM_EVLIST_ACTIVE: - TAILQ_INSERT_TAIL(&lam_activequeue, ev, ev_active_next); + case OMPI_EVLIST_ACTIVE: + TAILQ_INSERT_TAIL(&ompi_activequeue, ev, ev_active_next); break; - case LAM_EVLIST_SIGNAL: - TAILQ_INSERT_TAIL(&lam_signalqueue, ev, ev_signal_next); + case OMPI_EVLIST_SIGNAL: + TAILQ_INSERT_TAIL(&ompi_signalqueue, ev, ev_signal_next); break; - case LAM_EVLIST_TIMEOUT: - lam_timeout_insert(ev); + case OMPI_EVLIST_TIMEOUT: + ompi_timeout_insert(ev); break; - case LAM_EVLIST_INSERTED: - TAILQ_INSERT_TAIL(&lam_eventqueue, ev, ev_next); + case OMPI_EVLIST_INSERTED: + TAILQ_INSERT_TAIL(&ompi_eventqueue, ev, ev_next); break; default: errx(1, "%s: unknown queue %x", __func__, queue); } } -void lam_event_active_i(struct lam_event * ev, int res, short ncalls) +void ompi_event_active_i(struct ompi_event * ev, int res, short ncalls) { /* We get different kinds of events, add them together */ - if (ev->ev_flags & LAM_EVLIST_ACTIVE) { + if (ev->ev_flags & OMPI_EVLIST_ACTIVE) { ev->ev_res |= res; return; } @@ -614,7 +614,7 @@ void lam_event_active_i(struct lam_event * ev, int res, short ncalls) ev->ev_res = res; ev->ev_ncalls = ncalls; ev->ev_pncalls = NULL; - lam_event_queue_insert(ev, LAM_EVLIST_ACTIVE); + ompi_event_queue_insert(ev, OMPI_EVLIST_ACTIVE); } diff --git a/src/event/event.h b/src/event/event.h index ff91772a22..308457c8cf 100644 --- a/src/event/event.h +++ b/src/event/event.h @@ -34,10 +34,10 @@ extern "C" { #endif #ifdef HAVE_CONFIG_H - /* LAM: Conform to LAM's header file scheme -- specify the full + /* OMPI: Conform to OMPI's header file scheme -- specify the full include path from "src/". Also, config.h is a terrible unqualified name for a header file. :-) */ -#include "lam_config.h" +#include "ompi_config.h" #endif #include "threads/mutex.h" @@ -49,23 +49,23 @@ extern "C" { #include #endif -#define LAM_EVLIST_TIMEOUT 0x01 -#define LAM_EVLIST_INSERTED 0x02 -#define LAM_EVLIST_SIGNAL 0x04 -#define LAM_EVLIST_ACTIVE 0x08 -#define LAM_EVLIST_INIT 0x80 +#define OMPI_EVLIST_TIMEOUT 0x01 +#define OMPI_EVLIST_INSERTED 0x02 +#define OMPI_EVLIST_SIGNAL 0x04 +#define OMPI_EVLIST_ACTIVE 0x08 +#define OMPI_EVLIST_INIT 0x80 /* EVLIST_X_ Private space: 0x1000-0xf000 */ -#define LAM_EVLIST_ALL (0xf000 | 0x8f) +#define OMPI_EVLIST_ALL (0xf000 | 0x8f) -#define LAM_EV_TIMEOUT 0x01 -#define LAM_EV_READ 0x02 -#define LAM_EV_WRITE 0x04 -#define LAM_EV_SIGNAL 0x08 -#define LAM_EV_PERSIST 0x10 /* Persistant event */ +#define OMPI_EV_TIMEOUT 0x01 +#define OMPI_EV_READ 0x02 +#define OMPI_EV_WRITE 0x04 +#define OMPI_EV_SIGNAL 0x08 +#define OMPI_EV_PERSIST 0x10 /* Persistant event */ -#ifndef LAM_EVENT_USE_SIGNALS -#define LAM_EVENT_USE_SIGNALS 0 +#ifndef OMPI_EVENT_USE_SIGNALS +#define OMPI_EVENT_USE_SIGNALS 0 #endif /* Fix so that ppl dont have to run with */ @@ -88,11 +88,11 @@ struct { \ } #endif /* !RB_ENTRY */ -struct lam_event { - TAILQ_ENTRY (lam_event) ev_next; - TAILQ_ENTRY (lam_event) ev_active_next; - TAILQ_ENTRY (lam_event) ev_signal_next; - RB_ENTRY (lam_event) ev_timeout_node; +struct ompi_event { + TAILQ_ENTRY (ompi_event) ev_next; + TAILQ_ENTRY (ompi_event) ev_active_next; + TAILQ_ENTRY (ompi_event) ev_signal_next; + RB_ENTRY (ompi_event) ev_timeout_node; #ifdef WIN32 HANDLE ev_fd; @@ -112,67 +112,67 @@ struct lam_event { int ev_res; /* result passed to event callback */ int ev_flags; }; -typedef struct lam_event lam_event_t; +typedef struct ompi_event ompi_event_t; -#define LAM_EVENT_SIGNAL(ev) (int)ev->ev_fd -#define LAM_EVENT_FD(ev) (int)ev->ev_fd +#define OMPI_EVENT_SIGNAL(ev) (int)ev->ev_fd +#define OMPI_EVENT_FD(ev) (int)ev->ev_fd #ifdef _EVENT_DEFINED_TQENTRY #undef TAILQ_ENTRY #undef _EVENT_DEFINED_TQENTRY #else -TAILQ_HEAD (lam_event_list, lam_event); +TAILQ_HEAD (ompi_event_list, ompi_event); #endif /* _EVENT_DEFINED_TQENTRY */ #ifdef _EVENT_DEFINED_RBENTRY #undef RB_ENTRY #undef _EVENT_DEFINED_RBENTRY #endif /* _EVENT_DEFINED_RBENTRY */ -struct lam_eventop { +struct ompi_eventop { char *name; void *(*init)(void); - int (*add)(void *, struct lam_event *); - int (*del)(void *, struct lam_event *); + int (*add)(void *, struct ompi_event *); + int (*del)(void *, struct ompi_event *); int (*recalc)(void *, int); int (*dispatch)(void *, struct timeval *); }; -#define LAM_TIMEOUT_DEFAULT {10, 0} -#define LAM_EVLOOP_ONCE 0x01 -#define LAM_EVLOOP_NONBLOCK 0x02 +#define OMPI_TIMEOUT_DEFAULT {10, 0} +#define OMPI_EVLOOP_ONCE 0x01 +#define OMPI_EVLOOP_NONBLOCK 0x02 -int lam_event_init(void); -int lam_event_dispatch(void); -int lam_event_loop(int); +int ompi_event_init(void); +int ompi_event_dispatch(void); +int ompi_event_loop(int); -#define lam_evtimer_add(ev, tv) lam_event_add(ev, tv) -#define lam_evtimer_set(ev, cb, arg) lam_event_set(ev, -1, 0, cb, arg) -#define lam_evtimer_del(ev) lam_event_del(ev) -#define lam_evtimer_pending(ev, tv) lam_event_pending(ev, LAM_EV_TIMEOUT, tv) -#define lam_evtimer_initialized(ev) (ev)->ev_flags & LAM_EVLIST_INIT) +#define ompi_evtimer_add(ev, tv) ompi_event_add(ev, tv) +#define ompi_evtimer_set(ev, cb, arg) ompi_event_set(ev, -1, 0, cb, arg) +#define ompi_evtimer_del(ev) ompi_event_del(ev) +#define ompi_evtimer_pending(ev, tv) ompi_event_pending(ev, OMPI_EV_TIMEOUT, tv) +#define ompi_evtimer_initialized(ev) (ev)->ev_flags & OMPI_EVLIST_INIT) -#define lam_timeout_add(ev, tv) lam_event_add(ev, tv) -#define lam_timeout_set(ev, cb, arg) lam_event_set(ev, -1, 0, cb, arg) -#define lam_timeout_del(ev) lam_event_del(ev) -#define lam_timeout_pending(ev, tv) lam_event_pending(ev, LAM_EV_TIMEOUT, tv) -#define lam_timeout_initialized(ev) ((ev)->ev_flags & LAM_EVLIST_INIT) +#define ompi_timeout_add(ev, tv) ompi_event_add(ev, tv) +#define ompi_timeout_set(ev, cb, arg) ompi_event_set(ev, -1, 0, cb, arg) +#define ompi_timeout_del(ev) ompi_event_del(ev) +#define ompi_timeout_pending(ev, tv) ompi_event_pending(ev, OMPI_EV_TIMEOUT, tv) +#define ompi_timeout_initialized(ev) ((ev)->ev_flags & OMPI_EVLIST_INIT) -#define lam_signal_add(ev, tv) lam_event_add(ev, tv) -#define lam_signal_set(ev, x, cb, arg) \ - lam_event_set(ev, x, LAM_EV_SIGNAL|LAM_EV_PERSIST, cb, arg) -#define lam_signal_del(ev) lam_event_del(ev) -#define lam_signal_pending(ev, tv) lam_event_pending(ev, LAM_EV_SIGNAL, tv) -#define lam_signal_initialized(ev) ((ev)->ev_flags & LAM_EVLIST_INIT) +#define ompi_signal_add(ev, tv) ompi_event_add(ev, tv) +#define ompi_signal_set(ev, x, cb, arg) \ + ompi_event_set(ev, x, OMPI_EV_SIGNAL|OMPI_EV_PERSIST, cb, arg) +#define ompi_signal_del(ev) ompi_event_del(ev) +#define ompi_signal_pending(ev, tv) ompi_event_pending(ev, OMPI_EV_SIGNAL, tv) +#define ompi_signal_initialized(ev) ((ev)->ev_flags & OMPI_EVLIST_INIT) /* for internal use only */ -int lam_event_add_i(struct lam_event *, struct timeval *); -int lam_event_del_i(struct lam_event *); -void lam_event_active_i(struct lam_event*, int, short); +int ompi_event_add_i(struct ompi_event *, struct timeval *); +int ompi_event_del_i(struct ompi_event *); +void ompi_event_active_i(struct ompi_event*, int, short); /* public functions */ static inline void -lam_event_set(struct lam_event *ev, int fd, short events, +ompi_event_set(struct ompi_event *ev, int fd, short events, void (*callback)(int, short, void *), void *arg) { ev->ev_callback = callback; @@ -184,70 +184,70 @@ lam_event_set(struct lam_event *ev, int fd, short events, ev->ev_fd = fd; #endif ev->ev_events = events; - ev->ev_flags = LAM_EVLIST_INIT; + ev->ev_flags = OMPI_EVLIST_INIT; ev->ev_ncalls = 0; ev->ev_pncalls = NULL; } static inline int -lam_event_add(struct lam_event *ev, struct timeval *tv) +ompi_event_add(struct ompi_event *ev, struct timeval *tv) { - extern lam_mutex_t lam_event_lock; + extern ompi_mutex_t ompi_event_lock; int rc; - if(lam_using_threads()) { - lam_mutex_lock(&lam_event_lock); - rc = lam_event_add_i(ev, tv); - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_lock(&ompi_event_lock); + rc = ompi_event_add_i(ev, tv); + ompi_mutex_unlock(&ompi_event_lock); } else { - rc = lam_event_add_i(ev, tv); + rc = ompi_event_add_i(ev, tv); } return rc; } static inline int -lam_event_del(struct lam_event *ev) +ompi_event_del(struct ompi_event *ev) { - extern lam_mutex_t lam_event_lock; + extern ompi_mutex_t ompi_event_lock; int rc; - if(lam_using_threads()) { - lam_mutex_lock(&lam_event_lock); - rc = lam_event_del_i(ev); - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_lock(&ompi_event_lock); + rc = ompi_event_del_i(ev); + ompi_mutex_unlock(&ompi_event_lock); } else { - rc = lam_event_del_i(ev); + rc = ompi_event_del_i(ev); } return rc; } static inline void -lam_event_active(struct lam_event* ev, int res, short ncalls) +ompi_event_active(struct ompi_event* ev, int res, short ncalls) { - extern lam_mutex_t lam_event_lock; - if(lam_using_threads()) { - lam_mutex_lock(&lam_event_lock); - lam_event_active_i(ev, res, ncalls); - lam_mutex_unlock(&lam_event_lock); + extern ompi_mutex_t ompi_event_lock; + if(ompi_using_threads()) { + ompi_mutex_lock(&ompi_event_lock); + ompi_event_active_i(ev, res, ncalls); + ompi_mutex_unlock(&ompi_event_lock); } else { - lam_event_active_i(ev, res, ncalls); + ompi_event_active_i(ev, res, ncalls); } } static inline int -lam_event_pending(struct lam_event *ev, short event, struct timeval *tv) +ompi_event_pending(struct ompi_event *ev, short event, struct timeval *tv) { int flags = 0; - if (ev->ev_flags & LAM_EVLIST_INSERTED) - flags |= (ev->ev_events & (LAM_EV_READ|LAM_EV_WRITE)); - if (ev->ev_flags & LAM_EVLIST_ACTIVE) + if (ev->ev_flags & OMPI_EVLIST_INSERTED) + flags |= (ev->ev_events & (OMPI_EV_READ|OMPI_EV_WRITE)); + if (ev->ev_flags & OMPI_EVLIST_ACTIVE) flags |= ev->ev_res; - if (ev->ev_flags & LAM_EVLIST_TIMEOUT) - flags |= LAM_EV_TIMEOUT; + if (ev->ev_flags & OMPI_EVLIST_TIMEOUT) + flags |= OMPI_EV_TIMEOUT; - event &= (LAM_EV_TIMEOUT|LAM_EV_READ|LAM_EV_WRITE); + event &= (OMPI_EV_TIMEOUT|OMPI_EV_READ|OMPI_EV_WRITE); /* See if there is a timeout that we should report */ - if (tv != NULL && (flags & event & LAM_EV_TIMEOUT)) + if (tv != NULL && (flags & event & OMPI_EV_TIMEOUT)) *tv = ev->ev_timeout; return (flags & event); @@ -255,9 +255,9 @@ lam_event_pending(struct lam_event *ev, short event, struct timeval *tv) #ifdef WIN32 -#define lam_event_initialized(ev) ((ev)->ev_flags & LAM_EVLIST_INIT && (ev)->ev_fd != INVALID_HANDLE_VALUE) +#define ompi_event_initialized(ev) ((ev)->ev_flags & OMPI_EVLIST_INIT && (ev)->ev_fd != INVALID_HANDLE_VALUE) #else -#define lam_event_initialized(ev) ((ev)->ev_flags & LAM_EVLIST_INIT) +#define ompi_event_initialized(ev) ((ev)->ev_flags & OMPI_EVLIST_INIT) #endif #ifdef __cplusplus diff --git a/src/event/evsignal.h b/src/event/evsignal.h index ecd67ba739..714d761501 100644 --- a/src/event/evsignal.h +++ b/src/event/evsignal.h @@ -27,11 +27,11 @@ #ifndef _EVSIGNAL_H_ #define _EVSIGNAL_H_ -void lam_evsignal_init(sigset_t *); -void lam_evsignal_process(void); -int lam_evsignal_recalc(sigset_t *); -int lam_evsignal_deliver(sigset_t *); -int lam_evsignal_add(sigset_t *, struct lam_event *); -int lam_evsignal_del(sigset_t *, struct lam_event *); +void ompi_evsignal_init(sigset_t *); +void ompi_evsignal_process(void); +int ompi_evsignal_recalc(sigset_t *); +int ompi_evsignal_deliver(sigset_t *); +int ompi_evsignal_add(sigset_t *, struct ompi_event *); +int ompi_evsignal_del(sigset_t *, struct ompi_event *); #endif /* _EVSIGNAL_H_ */ diff --git a/src/event/kqueue.c b/src/event/kqueue.c index b4584a486b..83ba08d42d 100644 --- a/src/event/kqueue.c +++ b/src/event/kqueue.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "lam_config.h" +#include "ompi_config.h" #include #ifdef HAVE_SYS_TIME_H @@ -66,7 +66,7 @@ extern struct event_list timequeue; extern struct event_list eventqueue; extern struct event_list addqueue; -extern lam_mutex_t lam_event_lock; +extern ompi_mutex_t ompi_event_lock; #define EVLIST_X_KQINKERNEL 0x1000 @@ -81,13 +81,13 @@ struct kqop { } kqueueop; static void *kq_init (void); -static int kq_add (void *, struct lam_event *); -static int kq_del (void *, struct lam_event *); +static int kq_add (void *, struct ompi_event *); +static int kq_del (void *, struct ompi_event *); static int kq_recalc (void *, int); static int kq_dispatch (void *, struct timeval *); static int kq_insert (struct kqop *, struct kevent *); -const struct lam_eventop lam_kqops = { +const struct ompi_eventop ompi_kqops = { "kqueue", kq_init, kq_add, @@ -193,18 +193,18 @@ kq_dispatch(void *arg, struct timeval *tv) struct kqop *kqop = arg; struct kevent *changes = kqop->changes; struct kevent *events = kqop->events; - struct lam_event *ev; + struct ompi_event *ev; struct timespec ts; int i, res; TIMEVAL_TO_TIMESPEC(tv, &ts); /* release lock while waiting in kernel */ - if(lam_using_threads()) { - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_unlock(&ompi_event_lock); res = kevent(kqop->kq, changes, kqop->nchanges, events, kqop->nevents, &ts); - lam_mutex_lock(&lam_event_lock); + ompi_mutex_lock(&ompi_event_lock); } else { res = kevent(kqop->kq, changes, kqop->nchanges, events, kqop->nevents, &ts); @@ -242,26 +242,26 @@ kq_dispatch(void *arg, struct timeval *tv) return (-1); } - ev = (struct lam_event *)events[i].udata; + ev = (struct ompi_event *)events[i].udata; if (events[i].filter == EVFILT_READ) { - which |= LAM_EV_READ; + which |= OMPI_EV_READ; } else if (events[i].filter == EVFILT_WRITE) { - which |= LAM_EV_WRITE; + which |= OMPI_EV_WRITE; } else if (events[i].filter == EVFILT_SIGNAL) { - which |= LAM_EV_SIGNAL; + which |= OMPI_EV_SIGNAL; } if (!which) continue; - if (!(ev->ev_events & LAM_EV_PERSIST)) { + if (!(ev->ev_events & OMPI_EV_PERSIST)) { ev->ev_flags &= ~EVLIST_X_KQINKERNEL; - lam_event_del_i(ev); + ompi_event_del_i(ev); } - lam_event_active_i(ev, which, - ev->ev_events & LAM_EV_SIGNAL ? events[i].data : 1); + ompi_event_active_i(ev, which, + ev->ev_events & OMPI_EV_SIGNAL ? events[i].data : 1); } return (0); @@ -269,19 +269,19 @@ kq_dispatch(void *arg, struct timeval *tv) static int -kq_add(void *arg, struct lam_event *ev) +kq_add(void *arg, struct ompi_event *ev) { struct kqop *kqop = arg; struct kevent kev; - if (ev->ev_events & LAM_EV_SIGNAL) { - int nsignal = LAM_EVENT_SIGNAL(ev); + if (ev->ev_events & OMPI_EV_SIGNAL) { + int nsignal = OMPI_EVENT_SIGNAL(ev); memset(&kev, 0, sizeof(kev)); kev.ident = nsignal; kev.filter = EVFILT_SIGNAL; kev.flags = EV_ADD; - if (!(ev->ev_events & LAM_EV_PERSIST)) + if (!(ev->ev_events & OMPI_EV_PERSIST)) kev.flags |= EV_ONESHOT; kev.udata = (void *) INTPTR(ev); @@ -295,12 +295,12 @@ kq_add(void *arg, struct lam_event *ev) return (0); } - if (ev->ev_events & LAM_EV_READ) { + if (ev->ev_events & OMPI_EV_READ) { memset(&kev, 0, sizeof(kev)); kev.ident = ev->ev_fd; kev.filter = EVFILT_READ; kev.flags = EV_ADD; - if (!(ev->ev_events & LAM_EV_PERSIST)) + if (!(ev->ev_events & OMPI_EV_PERSIST)) kev.flags |= EV_ONESHOT; kev.udata = (void *) INTPTR(ev); @@ -310,12 +310,12 @@ kq_add(void *arg, struct lam_event *ev) ev->ev_flags |= EVLIST_X_KQINKERNEL; } - if (ev->ev_events & LAM_EV_WRITE) { + if (ev->ev_events & OMPI_EV_WRITE) { memset(&kev, 0, sizeof(kev)); kev.ident = ev->ev_fd; kev.filter = EVFILT_WRITE; kev.flags = EV_ADD; - if (!(ev->ev_events & LAM_EV_PERSIST)) + if (!(ev->ev_events & OMPI_EV_PERSIST)) kev.flags |= EV_ONESHOT; kev.udata = (void *) INTPTR(ev); @@ -329,7 +329,7 @@ kq_add(void *arg, struct lam_event *ev) } static int -kq_del(void *arg, struct lam_event *ev) +kq_del(void *arg, struct ompi_event *ev) { struct kqop *kqop = arg; struct kevent kev; @@ -337,8 +337,8 @@ kq_del(void *arg, struct lam_event *ev) if (!(ev->ev_flags & EVLIST_X_KQINKERNEL)) return (0); - if (ev->ev_events & LAM_EV_SIGNAL) { - int nsignal = LAM_EVENT_SIGNAL(ev); + if (ev->ev_events & OMPI_EV_SIGNAL) { + int nsignal = OMPI_EVENT_SIGNAL(ev); memset(&kev, 0, sizeof(kev)); kev.ident = (int)signal; @@ -355,7 +355,7 @@ kq_del(void *arg, struct lam_event *ev) return (0); } - if (ev->ev_events & LAM_EV_READ) { + if (ev->ev_events & OMPI_EV_READ) { memset(&kev, 0, sizeof(kev)); kev.ident = ev->ev_fd; kev.filter = EVFILT_READ; @@ -367,7 +367,7 @@ kq_del(void *arg, struct lam_event *ev) ev->ev_flags &= ~EVLIST_X_KQINKERNEL; } - if (ev->ev_events & LAM_EV_WRITE) { + if (ev->ev_events & OMPI_EV_WRITE) { memset(&kev, 0, sizeof(kev)); kev.ident = ev->ev_fd; kev.filter = EVFILT_WRITE; diff --git a/src/event/poll.c b/src/event/poll.c index d99fcb7502..215ad7d8fb 100644 --- a/src/event/poll.c +++ b/src/event/poll.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "lam_config.h" +#include "ompi_config.h" #include #ifdef HAVE_SYS_TIME_H @@ -52,32 +52,32 @@ #endif #include "event.h" -#if LAM_EVENT_USE_SIGNALS +#if OMPI_EVENT_USE_SIGNALS #include "evsignal.h" #endif #include "threads/mutex.h" -extern struct lam_event_list lam_eventqueue; -extern volatile sig_atomic_t lam_evsignal_caught; -extern lam_mutex_t lam_event_lock; +extern struct ompi_event_list ompi_eventqueue; +extern volatile sig_atomic_t ompi_evsignal_caught; +extern ompi_mutex_t ompi_event_lock; struct pollop { int event_count; /* Highest number alloc */ struct pollfd *event_set; - struct lam_event **event_back; -#if LAM_EVENT_USE_SIGNALS + struct ompi_event **event_back; +#if OMPI_EVENT_USE_SIGNALS sigset_t evsigmask; #endif } pollop; static void *poll_init (void); -static int poll_add (void *, struct lam_event *); -static int poll_del (void *, struct lam_event *); +static int poll_add (void *, struct ompi_event *); +static int poll_del (void *, struct ompi_event *); static int poll_recalc (void *, int); static int poll_dispatch (void *, struct timeval *); -const struct lam_eventop lam_pollops = { +const struct ompi_eventop ompi_pollops = { "poll", poll_init, poll_add, @@ -94,8 +94,8 @@ poll_init(void) return (NULL); memset(&pollop, 0, sizeof(pollop)); -#if LAM_EVENT_USE_SIGNALS - lam_evsignal_init(&pollop.evsigmask); +#if OMPI_EVENT_USE_SIGNALS + ompi_evsignal_init(&pollop.evsigmask); #endif return (&pollop); } @@ -108,9 +108,9 @@ poll_init(void) static int poll_recalc(void *arg, int max) { -#if LAM_EVENT_USE_SIGNALS +#if OMPI_EVENT_USE_SIGNALS struct pollop *pop = arg; - return (lam_evsignal_recalc(&pop->evsigmask)); + return (ompi_evsignal_recalc(&pop->evsigmask)); #else return (0); #endif @@ -120,12 +120,12 @@ static int poll_dispatch(void *arg, struct timeval *tv) { int res, i, count, sec, nfds; - struct lam_event *ev; + struct ompi_event *ev; struct pollop *pop = arg; count = pop->event_count; nfds = 0; - TAILQ_FOREACH(ev, &lam_eventqueue, ev_next) { + TAILQ_FOREACH(ev, &ompi_eventqueue, ev_next) { if (nfds + 1 >= count) { if (count < 256) count = 256; @@ -140,14 +140,14 @@ poll_dispatch(void *arg, struct timeval *tv) return (-1); } pop->event_back = realloc(pop->event_back, - count * sizeof(struct lam_event *)); + count * sizeof(struct ompi_event *)); if (pop->event_back == NULL) { log_error("realloc"); return (-1); } pop->event_count = count; } - if (ev->ev_events & LAM_EV_WRITE) { + if (ev->ev_events & OMPI_EV_WRITE) { struct pollfd *pfd = &pop->event_set[nfds]; pfd->fd = ev->ev_fd; pfd->events = POLLOUT; @@ -157,7 +157,7 @@ poll_dispatch(void *arg, struct timeval *tv) nfds++; } - if (ev->ev_events & LAM_EV_READ) { + if (ev->ev_events & OMPI_EV_READ) { struct pollfd *pfd = &pop->event_set[nfds]; pfd->fd = ev->ev_fd; @@ -170,22 +170,22 @@ poll_dispatch(void *arg, struct timeval *tv) } } -#if LAM_EVENT_USE_SIGNALS - if (lam_evsignal_deliver(&pop->evsigmask) == -1) +#if OMPI_EVENT_USE_SIGNALS + if (ompi_evsignal_deliver(&pop->evsigmask) == -1) return (-1); #endif sec = tv->tv_sec * 1000 + tv->tv_usec / 1000; - if(lam_using_threads()) { - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_unlock(&ompi_event_lock); res = poll(pop->event_set, nfds, sec); - lam_mutex_lock(&lam_event_lock); + ompi_mutex_lock(&ompi_event_lock); } else { res = poll(pop->event_set, nfds, sec); } -#if LAM_EVENT_USE_SIGNALS - if (lam_evsignal_recalc(&pop->evsigmask) == -1) +#if OMPI_EVENT_USE_SIGNALS + if (ompi_evsignal_recalc(&pop->evsigmask) == -1) return (-1); #endif @@ -195,15 +195,15 @@ poll_dispatch(void *arg, struct timeval *tv) return (-1); } -#if LAM_EVENT_USE_SIGNALS - lam_evsignal_process(); +#if OMPI_EVENT_USE_SIGNALS + ompi_evsignal_process(); #endif return (0); } -#if LAM_EVENT_USE_SIGNALS - else if (lam_evsignal_caught) - lam_evsignal_process(); +#if OMPI_EVENT_USE_SIGNALS + else if (ompi_evsignal_caught) + ompi_evsignal_process(); #endif LOG_DBG((LOG_MISC, 80, "%s: poll reports %d", __func__, res)); @@ -222,9 +222,9 @@ poll_dispatch(void *arg, struct timeval *tv) if (what & POLLERR) what |= POLLIN|POLLOUT; if (what & POLLIN) - res |= LAM_EV_READ; + res |= OMPI_EV_READ; if (what & POLLOUT) - res |= LAM_EV_WRITE; + res |= OMPI_EV_WRITE; if (res == 0) continue; @@ -232,9 +232,9 @@ poll_dispatch(void *arg, struct timeval *tv) res &= ev->ev_events; if (res) { - if (!(ev->ev_events & LAM_EV_PERSIST)) - lam_event_del_i(ev); - lam_event_active_i(ev, res, 1); + if (!(ev->ev_events & OMPI_EV_PERSIST)) + ompi_event_del_i(ev); + ompi_event_active_i(ev, res, 1); } } @@ -242,12 +242,12 @@ poll_dispatch(void *arg, struct timeval *tv) } static int -poll_add(void *arg, struct lam_event *ev) +poll_add(void *arg, struct ompi_event *ev) { -#if LAM_EVENT_USE_SIGNALS +#if OMPI_EVENT_USE_SIGNALS struct pollop *pop = arg; - if (ev->ev_events & LAM_EV_SIGNAL) - return (lam_evsignal_add(&pop->evsigmask, ev)); + if (ev->ev_events & OMPI_EV_SIGNAL) + return (ompi_evsignal_add(&pop->evsigmask, ev)); #endif return (0); } @@ -257,15 +257,15 @@ poll_add(void *arg, struct lam_event *ev) */ static int -poll_del(void *arg, struct lam_event *ev) +poll_del(void *arg, struct ompi_event *ev) { -#if LAM_EVENT_USE_SIGNALS +#if OMPI_EVENT_USE_SIGNALS struct pollop *pop = arg; #endif - if (!(ev->ev_events & LAM_EV_SIGNAL)) + if (!(ev->ev_events & OMPI_EV_SIGNAL)) return (0); -#if LAM_EVENT_USE_SIGNALS - return (lam_evsignal_del(&pop->evsigmask, ev)); +#if OMPI_EVENT_USE_SIGNALS + return (ompi_evsignal_del(&pop->evsigmask, ev)); #else return (0); #endif diff --git a/src/event/rtsig.c b/src/event/rtsig.c index 437a3dcdd5..703d744d0d 100644 --- a/src/event/rtsig.c +++ b/src/event/rtsig.c @@ -1,4 +1,4 @@ -#include "lam_config.h" +#include "ompi_config.h" /* Enable F_SETSIG and F_SETOWN */ #define _GNU_SOURCE @@ -123,7 +123,7 @@ static int rtsig_del(void *, struct event *); static int rtsig_recalc(void *, int); static int rtsig_dispatch(void *, struct timeval *); -struct lam_eventop rtsigops = { +struct ompi_eventop rtsigops = { "rtsig", rtsig_init, rtsig_add, diff --git a/src/event/sample/event-test.c b/src/event/sample/event-test.c index 9f9cfb67b2..110cda7477 100644 --- a/src/event/sample/event-test.c +++ b/src/event/sample/event-test.c @@ -25,13 +25,13 @@ fifo_read(int fd, short event, void *arg) { char buf[255]; int len; - struct lam_event *ev = arg; + struct ompi_event *ev = arg; #ifdef WIN32 DWORD dwBytesRead; #endif /* Reschedule this event */ - lam_event_add(ev, NULL); + ompi_event_add(ev, NULL); fprintf(stderr, "fifo_read called with fd: %d, event: %d, arg: %p\n", fd, event, arg); @@ -41,7 +41,7 @@ fifo_read(int fd, short event, void *arg) // Check for end of file. if(len && dwBytesRead == 0) { fprintf(stderr, "End Of File"); - lam_event_del(ev); + ompi_event_del(ev); return; } @@ -65,7 +65,7 @@ fifo_read(int fd, short event, void *arg) int main (int argc, char **argv) { - struct lam_event evfifo; + struct ompi_event evfifo; #ifdef WIN32 HANDLE socket; // Open a file. @@ -114,19 +114,19 @@ main (int argc, char **argv) fprintf(stderr, "Write data to %s\n", fifo); #endif /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); /* Initalize one event */ #ifdef WIN32 - lam_event_set(&evfifo, (int)socket, LAM_EV_READ, fifo_read, &evfifo); + ompi_event_set(&evfifo, (int)socket, OMPI_EV_READ, fifo_read, &evfifo); #else - lam_event_set(&evfifo, socket, LAM_EV_READ, fifo_read, &evfifo); + ompi_event_set(&evfifo, socket, OMPI_EV_READ, fifo_read, &evfifo); #endif /* Add it to the active events, without a timeout */ - lam_event_add(&evfifo, NULL); + ompi_event_add(&evfifo, NULL); - lam_event_dispatch(); + ompi_event_dispatch(); #ifdef WIN32 CloseHandle(socket); #endif diff --git a/src/event/sample/signal-test.c b/src/event/sample/signal-test.c index 94ca28e5d6..d57b7fa719 100644 --- a/src/event/sample/signal-test.c +++ b/src/event/sample/signal-test.c @@ -26,12 +26,12 @@ int called = 0; void signal_cb(int fd, short event, void *arg) { - struct lam_event *signal = arg; + struct ompi_event *signal = arg; - printf("%s: got signal %d\n", __func__, LAM_EVENT_SIGNAL(signal)); + printf("%s: got signal %d\n", __func__, OMPI_EVENT_SIGNAL(signal)); if (called >= 2) - lam_event_del(signal); + ompi_event_del(signal); called++; } @@ -39,18 +39,18 @@ signal_cb(int fd, short event, void *arg) int main (int argc, char **argv) { - struct lam_event signal_int; + struct ompi_event signal_int; /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); /* Initalize one event */ - lam_event_set(&signal_int, SIGINT, LAM_EV_SIGNAL|LAM_EV_PERSIST, signal_cb, + ompi_event_set(&signal_int, SIGINT, OMPI_EV_SIGNAL|OMPI_EV_PERSIST, signal_cb, &signal_int); - lam_event_add(&signal_int, NULL); + ompi_event_add(&signal_int, NULL); - lam_event_dispatch(); + ompi_event_dispatch(); return (0); } diff --git a/src/event/sample/time-test.c b/src/event/sample/time-test.c index a4d5930353..f3927b1455 100644 --- a/src/event/sample/time-test.c +++ b/src/event/sample/time-test.c @@ -26,7 +26,7 @@ void timeout_cb(int fd, short event, void *arg) { struct timeval tv; - struct lam_event *timeout = arg; + struct ompi_event *timeout = arg; int newtime = time(NULL); printf("%s: called at %d: %d\n", __func__, newtime, @@ -35,28 +35,28 @@ timeout_cb(int fd, short event, void *arg) timerclear(&tv); tv.tv_sec = 2; - lam_event_add(timeout, &tv); + ompi_event_add(timeout, &tv); } int main (int argc, char **argv) { - struct lam_event timeout; + struct ompi_event timeout; struct timeval tv; /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); /* Initalize one event */ - lam_evtimer_set(&timeout, timeout_cb, &timeout); + ompi_evtimer_set(&timeout, timeout_cb, &timeout); timerclear(&tv); tv.tv_sec = 2; - lam_event_add(&timeout, &tv); + ompi_event_add(&timeout, &tv); lasttime = time(NULL); - lam_event_dispatch(); + ompi_event_dispatch(); return (0); } diff --git a/src/event/select.c b/src/event/select.c index ed617bdcbb..1080d9d738 100644 --- a/src/event/select.c +++ b/src/event/select.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "lam_config.h" +#include "ompi_config.h" #include "util/output.h" #include @@ -55,14 +55,14 @@ #include "evsignal.h" #include "threads/mutex.h" -extern struct lam_event_list lam_eventqueue; -extern lam_mutex_t lam_event_lock; +extern struct ompi_event_list ompi_eventqueue; +extern ompi_mutex_t ompi_event_lock; #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif -extern volatile sig_atomic_t lam_evsignal_caught; +extern volatile sig_atomic_t ompi_evsignal_caught; struct selectop { int event_fds; /* Highest fd in fd set */ @@ -73,12 +73,12 @@ struct selectop { } sop; static void *select_init (void); -static int select_add (void *, struct lam_event *); -static int select_del (void *, struct lam_event *); +static int select_add (void *, struct ompi_event *); +static int select_del (void *, struct ompi_event *); static int select_recalc (void *, int); static int select_dispatch (void *, struct timeval *); -const struct lam_eventop lam_selectops = { +const struct ompi_eventop ompi_selectops = { "select", select_init, select_add, @@ -94,7 +94,7 @@ select_init(void) if (getenv("EVENT_NOSELECT")) return (NULL); memset(&sop, 0, sizeof(sop)); - lam_evsignal_init(&sop.evsigmask); + ompi_evsignal_init(&sop.evsigmask); return (&sop); } @@ -108,14 +108,14 @@ select_recalc(void *arg, int max) { struct selectop *sop = arg; fd_set *readset, *writeset; - struct lam_event *ev; + struct ompi_event *ev; int fdsz; if (sop->event_fds < max) sop->event_fds = max; if (!sop->event_fds) { - TAILQ_FOREACH(ev, &lam_eventqueue, ev_next) + TAILQ_FOREACH(ev, &ompi_eventqueue, ev_next) if (ev->ev_fd > sop->event_fds) sop->event_fds = ev->ev_fd; } @@ -142,8 +142,8 @@ select_recalc(void *arg, int max) sop->event_writeset = writeset; sop->event_fdsz = fdsz; } -#if LAM_EVENT_USE_SIGNALS - return (lam_evsignal_recalc(&sop->evsigmask)); +#if OMPI_EVENT_USE_SIGNALS + return (ompi_evsignal_recalc(&sop->evsigmask)); #else return (0); #endif @@ -153,37 +153,37 @@ static int select_dispatch(void *arg, struct timeval *tv) { int maxfd, res; - struct lam_event *ev, *next; + struct ompi_event *ev, *next; struct selectop *sop = arg; memset(sop->event_readset, 0, sop->event_fdsz); memset(sop->event_writeset, 0, sop->event_fdsz); - TAILQ_FOREACH(ev, &lam_eventqueue, ev_next) { - if (ev->ev_events & LAM_EV_WRITE) + TAILQ_FOREACH(ev, &ompi_eventqueue, ev_next) { + if (ev->ev_events & OMPI_EV_WRITE) FD_SET(ev->ev_fd, sop->event_writeset); - if (ev->ev_events & LAM_EV_READ) + if (ev->ev_events & OMPI_EV_READ) FD_SET(ev->ev_fd, sop->event_readset); } -#if LAM_EVENT_USE_SIGNALS - if (lam_evsignal_deliver(&sop->evsigmask) == -1) +#if OMPI_EVENT_USE_SIGNALS + if (ompi_evsignal_deliver(&sop->evsigmask) == -1) return (-1); #endif /* release lock while waiting in kernel */ - if(lam_using_threads()) { - lam_mutex_unlock(&lam_event_lock); + if(ompi_using_threads()) { + ompi_mutex_unlock(&ompi_event_lock); res = select(sop->event_fds + 1, sop->event_readset, sop->event_writeset, NULL, tv); - lam_mutex_lock(&lam_event_lock); + ompi_mutex_lock(&ompi_event_lock); } else { res = select(sop->event_fds + 1, sop->event_readset, sop->event_writeset, NULL, tv); } -#if LAM_EVENT_USE_SIGNALS - if (lam_evsignal_recalc(&sop->evsigmask) == -1) +#if OMPI_EVENT_USE_SIGNALS + if (ompi_evsignal_recalc(&sop->evsigmask) == -1) return (-1); #endif @@ -193,30 +193,30 @@ select_dispatch(void *arg, struct timeval *tv) return (-1); } -#if LAM_EVENT_USE_SIGNALS - lam_evsignal_process(); +#if OMPI_EVENT_USE_SIGNALS + ompi_evsignal_process(); #endif return (0); } -#if LAM_EVENT_USE_SIGNALS - else if (lam_evsignal_caught) - lam_evsignal_process(); +#if OMPI_EVENT_USE_SIGNALS + else if (ompi_evsignal_caught) + ompi_evsignal_process(); #endif maxfd = 0; - for (ev = TAILQ_FIRST(&lam_eventqueue); ev != NULL; ev = next) { + for (ev = TAILQ_FIRST(&ompi_eventqueue); ev != NULL; ev = next) { next = TAILQ_NEXT(ev, ev_next); res = 0; if (FD_ISSET(ev->ev_fd, sop->event_readset)) - res |= LAM_EV_READ; + res |= OMPI_EV_READ; if (FD_ISSET(ev->ev_fd, sop->event_writeset)) - res |= LAM_EV_WRITE; + res |= OMPI_EV_WRITE; res &= ev->ev_events; if (res) { - if (!(ev->ev_events & LAM_EV_PERSIST)) - lam_event_del_i(ev); - lam_event_active_i(ev, res, 1); + if (!(ev->ev_events & OMPI_EV_PERSIST)) + ompi_event_del_i(ev); + ompi_event_active_i(ev, res, 1); } if (ev->ev_fd > maxfd) maxfd = ev->ev_fd; @@ -228,13 +228,13 @@ select_dispatch(void *arg, struct timeval *tv) } static int -select_add(void *arg, struct lam_event *ev) +select_add(void *arg, struct ompi_event *ev) { struct selectop *sop = arg; -#if LAM_EVENT_USE_SIGNALS - if (ev->ev_events & LAM_EV_SIGNAL) - return (lam_evsignal_add(&sop->evsigmask, ev)); +#if OMPI_EVENT_USE_SIGNALS + if (ev->ev_events & OMPI_EV_SIGNAL) + return (ompi_evsignal_add(&sop->evsigmask, ev)); #endif /* @@ -252,15 +252,15 @@ select_add(void *arg, struct lam_event *ev) */ static int -select_del(void *arg, struct lam_event *ev) +select_del(void *arg, struct ompi_event *ev) { struct selectop *sop = arg; - if (!(ev->ev_events & LAM_EV_SIGNAL)) + if (!(ev->ev_events & OMPI_EV_SIGNAL)) return (0); -#if LAM_EVENT_USE_SIGNALS - return (lam_evsignal_del(&sop->evsigmask, ev)); +#if OMPI_EVENT_USE_SIGNALS + return (ompi_evsignal_del(&sop->evsigmask, ev)); #else return (0); #endif diff --git a/src/event/signal.c b/src/event/signal.c index 662d2bcbe4..d154cc2bef 100644 --- a/src/event/signal.c +++ b/src/event/signal.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "lam_config.h" +#include "ompi_config.h" #include #ifdef HAVE_SYS_TIME_H @@ -53,28 +53,28 @@ #include "event.h" #include "evsignal.h" -extern struct lam_event_list lam_signalqueue; +extern struct ompi_event_list ompi_signalqueue; -static short lam_evsigcaught[NSIG]; -static int lam_needrecalc; -volatile sig_atomic_t lam_evsignal_caught = 0; +static short ompi_evsigcaught[NSIG]; +static int ompi_needrecalc; +volatile sig_atomic_t ompi_evsignal_caught = 0; -void lam_evsignal_handler(int sig); +void ompi_evsignal_handler(int sig); void -lam_evsignal_init(sigset_t *evsigmask) +ompi_evsignal_init(sigset_t *evsigmask) { sigemptyset(evsigmask); } int -lam_evsignal_add(sigset_t *evsigmask, struct lam_event *ev) +ompi_evsignal_add(sigset_t *evsigmask, struct ompi_event *ev) { int evsignal; - if (ev->ev_events & (LAM_EV_READ|LAM_EV_WRITE)) - errx(1, "%s: LAM_EV_SIGNAL incompatible use", __func__); - evsignal = LAM_EVENT_SIGNAL(ev); + if (ev->ev_events & (OMPI_EV_READ|OMPI_EV_WRITE)) + errx(1, "%s: OMPI_EV_SIGNAL incompatible use", __func__); + evsignal = OMPI_EVENT_SIGNAL(ev); sigaddset(evsigmask, evsignal); return (0); @@ -85,54 +85,54 @@ lam_evsignal_add(sigset_t *evsigmask, struct lam_event *ev) */ int -lam_evsignal_del(sigset_t *evsigmask, struct lam_event *ev) +ompi_evsignal_del(sigset_t *evsigmask, struct ompi_event *ev) { int evsignal; - evsignal = LAM_EVENT_SIGNAL(ev); + evsignal = OMPI_EVENT_SIGNAL(ev); sigdelset(evsigmask, evsignal); - lam_needrecalc = 1; + ompi_needrecalc = 1; - return (sigaction(LAM_EVENT_SIGNAL(ev),(struct sigaction *)SIG_DFL, NULL)); + return (sigaction(OMPI_EVENT_SIGNAL(ev),(struct sigaction *)SIG_DFL, NULL)); } void -lam_evsignal_handler(int sig) +ompi_evsignal_handler(int sig) { - lam_evsigcaught[sig]++; - lam_evsignal_caught = 1; + ompi_evsigcaught[sig]++; + ompi_evsignal_caught = 1; } int -lam_evsignal_recalc(sigset_t *evsigmask) +ompi_evsignal_recalc(sigset_t *evsigmask) { struct sigaction sa; - struct lam_event *ev; + struct ompi_event *ev; - if (TAILQ_FIRST(&lam_signalqueue) == NULL && !lam_needrecalc) + if (TAILQ_FIRST(&ompi_signalqueue) == NULL && !ompi_needrecalc) return (0); - lam_needrecalc = 0; + ompi_needrecalc = 0; if (sigprocmask(SIG_BLOCK, evsigmask, NULL) == -1) return (-1); /* Reinstall our signal handler. */ memset(&sa, 0, sizeof(sa)); - sa.sa_handler = lam_evsignal_handler; + sa.sa_handler = ompi_evsignal_handler; sa.sa_mask = *evsigmask; sa.sa_flags |= SA_RESTART; - TAILQ_FOREACH(ev, &lam_signalqueue, ev_signal_next) { - if (sigaction(LAM_EVENT_SIGNAL(ev), &sa, NULL) == -1) + TAILQ_FOREACH(ev, &ompi_signalqueue, ev_signal_next) { + if (sigaction(OMPI_EVENT_SIGNAL(ev), &sa, NULL) == -1) return (-1); } return (0); } int -lam_evsignal_deliver(sigset_t *evsigmask) +ompi_evsignal_deliver(sigset_t *evsigmask) { - if (TAILQ_FIRST(&lam_signalqueue) == NULL) + if (TAILQ_FIRST(&ompi_signalqueue) == NULL) return (0); return (sigprocmask(SIG_UNBLOCK, evsigmask, NULL)); @@ -140,21 +140,21 @@ lam_evsignal_deliver(sigset_t *evsigmask) } void -lam_evsignal_process(void) +ompi_evsignal_process(void) { - struct lam_event *ev; + struct ompi_event *ev; short ncalls; - TAILQ_FOREACH(ev, &lam_signalqueue, ev_signal_next) { - ncalls = lam_evsigcaught[LAM_EVENT_SIGNAL(ev)]; + TAILQ_FOREACH(ev, &ompi_signalqueue, ev_signal_next) { + ncalls = ompi_evsigcaught[OMPI_EVENT_SIGNAL(ev)]; if (ncalls) { - if (!(ev->ev_events & LAM_EV_PERSIST)) - lam_event_del_i(ev); - lam_event_active_i(ev, LAM_EV_SIGNAL, ncalls); + if (!(ev->ev_events & OMPI_EV_PERSIST)) + ompi_event_del_i(ev); + ompi_event_active_i(ev, OMPI_EV_SIGNAL, ncalls); } } - memset(lam_evsigcaught, 0, sizeof(lam_evsigcaught)); - lam_evsignal_caught = 0; + memset(ompi_evsigcaught, 0, sizeof(ompi_evsigcaught)); + ompi_evsignal_caught = 0; } diff --git a/src/event/test/bench.c b/src/event/test/bench.c index c09bc65c01..d7cda2c408 100644 --- a/src/event/test/bench.c +++ b/src/event/test/bench.c @@ -16,13 +16,13 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO LAM_EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * IN NO OMPI_EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWLAM_EVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, LAM_EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE, OMPI_EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * Mon 03/10/2003 - Modified by Davide Libenzi @@ -56,7 +56,7 @@ static int count, writes, fired; static int *pipes; static int num_pipes, num_active, num_writes; -static struct lam_event *events; +static struct ompi_event *events; @@ -83,12 +83,12 @@ run_once(void) static struct timeval ts, te; for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) { - lam_event_del(&events[i]); - lam_event_set(&events[i], cp[0], LAM_EV_READ | LAM_EV_PERSIST, read_cb, (void *) i); - lam_event_add(&events[i], NULL); + ompi_event_del(&events[i]); + ompi_event_set(&events[i], cp[0], OMPI_EV_READ | OMPI_EV_PERSIST, read_cb, (void *) i); + ompi_event_add(&events[i], NULL); } - lam_event_loop(LAM_EVLOOP_ONCE | LAM_EVLOOP_NONBLOCK); + ompi_event_loop(OMPI_EVLOOP_ONCE | OMPI_EVLOOP_NONBLOCK); fired = 0; space = num_pipes / num_active; @@ -101,7 +101,7 @@ run_once(void) { int xcount = 0; gettimeofday(&ts, NULL); do { - lam_event_loop(LAM_EVLOOP_ONCE | LAM_EVLOOP_NONBLOCK); + ompi_event_loop(OMPI_EVLOOP_ONCE | OMPI_EVLOOP_NONBLOCK); xcount++; } while (count != fired); gettimeofday(&te, NULL); @@ -149,14 +149,14 @@ main (int argc, char **argv) exit(1); } - events = calloc(num_pipes, sizeof(struct lam_event)); + events = calloc(num_pipes, sizeof(struct ompi_event)); pipes = calloc(num_pipes * 2, sizeof(int)); if (events == NULL || pipes == NULL) { perror("malloc"); exit(1); } - lam_event_init(); + ompi_event_init(); for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) { #ifdef USE_PIPES diff --git a/src/event/test/regress.c b/src/event/test/regress.c index 7345d3db77..86be6d3db5 100644 --- a/src/event/test/regress.c +++ b/src/event/test/regress.c @@ -67,7 +67,7 @@ simple_read_cb(int fd, short event, void *arg) if (len) { if (!called) - lam_event_add(arg, NULL); + ompi_event_add(arg, NULL); } else if (called == 1) test_ok = 1; @@ -89,7 +89,7 @@ simple_write_cb(int fd, short event, void *arg) void multiple_write_cb(int fd, short event, void *arg) { - struct lam_event *ev = arg; + struct ompi_event *ev = arg; int len; len = 128; @@ -100,7 +100,7 @@ multiple_write_cb(int fd, short event, void *arg) if (len == -1) { fprintf(stderr, "%s: write\n", __func__); if (usepersist) - lam_event_del(ev); + ompi_event_del(ev); return; } @@ -109,18 +109,18 @@ multiple_write_cb(int fd, short event, void *arg) if (woff >= sizeof(wbuf)) { shutdown(fd, SHUT_WR); if (usepersist) - lam_event_del(ev); + ompi_event_del(ev); return; } if (!usepersist) - lam_event_add(ev, NULL); + ompi_event_add(ev, NULL); } void multiple_read_cb(int fd, short event, void *arg) { - struct lam_event *ev = arg; + struct ompi_event *ev = arg; int len; len = read(fd, rbuf + roff, sizeof(rbuf) - roff); @@ -128,13 +128,13 @@ multiple_read_cb(int fd, short event, void *arg) fprintf(stderr, "%s: read\n", __func__); if (len <= 0) { if (usepersist) - lam_event_del(ev); + ompi_event_del(ev); return; } roff += len; if (!usepersist) - lam_event_add(ev, NULL); + ompi_event_add(ev, NULL); } void @@ -160,14 +160,14 @@ timeout_cb(int fd, short event, void *arg) void signal_cb(int fd, short event, void *arg) { - struct lam_event *ev = arg; + struct ompi_event *ev = arg; - lam_signal_del(ev); + ompi_signal_del(ev); test_ok = 1; } struct both { - struct lam_event ev; + struct ompi_event ev; int nread; }; @@ -185,7 +185,7 @@ combined_read_cb(int fd, short event, void *arg) return; both->nread += len; - lam_event_add(&both->ev, NULL); + ompi_event_add(&both->ev, NULL); } void @@ -208,7 +208,7 @@ combined_write_cb(int fd, short event, void *arg) } both->nread -= len; - lam_event_add(&both->ev, NULL); + ompi_event_add(&both->ev, NULL); } /* Test infrastructure */ @@ -248,7 +248,7 @@ cleanup_test(void) int main (int argc, char **argv) { - struct lam_event ev, ev2; + struct ompi_event ev, ev2; struct timeval tv; struct itimerval itv; struct both r1, r2, w1, w2; @@ -257,7 +257,7 @@ main (int argc, char **argv) setvbuf(stdout, NULL, _IONBF, 0); /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); /* Very simple read test */ setup_test("Simple read: "); @@ -265,18 +265,18 @@ main (int argc, char **argv) write(pair[0], TEST1, strlen(TEST1)+1); shutdown(pair[0], SHUT_WR); - lam_event_set(&ev, pair[1], LAM_EV_READ, simple_read_cb, &ev); - lam_event_add(&ev, NULL); - lam_event_dispatch(); + ompi_event_set(&ev, pair[1], OMPI_EV_READ, simple_read_cb, &ev); + ompi_event_add(&ev, NULL); + ompi_event_dispatch(); cleanup_test(); /* Very simple write test */ setup_test("Simple write: "); - lam_event_set(&ev, pair[0], LAM_EV_WRITE, simple_write_cb, &ev); - lam_event_add(&ev, NULL); - lam_event_dispatch(); + ompi_event_set(&ev, pair[0], OMPI_EV_WRITE, simple_write_cb, &ev); + ompi_event_add(&ev, NULL); + ompi_event_dispatch(); cleanup_test(); @@ -289,11 +289,11 @@ main (int argc, char **argv) roff = woff = 0; usepersist = 0; - lam_event_set(&ev, pair[0], LAM_EV_WRITE, multiple_write_cb, &ev); - lam_event_add(&ev, NULL); - lam_event_set(&ev2, pair[1], LAM_EV_READ, multiple_read_cb, &ev2); - lam_event_add(&ev2, NULL); - lam_event_dispatch(); + ompi_event_set(&ev, pair[0], OMPI_EV_WRITE, multiple_write_cb, &ev); + ompi_event_add(&ev, NULL); + ompi_event_set(&ev2, pair[1], OMPI_EV_READ, multiple_read_cb, &ev2); + ompi_event_add(&ev2, NULL); + ompi_event_dispatch(); if (roff == woff) test_ok = memcmp(rbuf, wbuf, sizeof(wbuf)) == 0; @@ -309,11 +309,11 @@ main (int argc, char **argv) roff = woff = 0; usepersist = 1; - lam_event_set(&ev, pair[0], LAM_EV_WRITE|LAM_EV_PERSIST, multiple_write_cb, &ev); - lam_event_add(&ev, NULL); - lam_event_set(&ev2, pair[1], LAM_EV_READ|LAM_EV_PERSIST, multiple_read_cb, &ev2); - lam_event_add(&ev2, NULL); - lam_event_dispatch(); + ompi_event_set(&ev, pair[0], OMPI_EV_WRITE|OMPI_EV_PERSIST, multiple_write_cb, &ev); + ompi_event_add(&ev, NULL); + ompi_event_set(&ev2, pair[1], OMPI_EV_READ|OMPI_EV_PERSIST, multiple_read_cb, &ev2); + ompi_event_add(&ev2, NULL); + ompi_event_dispatch(); if (roff == woff) test_ok = memcmp(rbuf, wbuf, sizeof(wbuf)) == 0; @@ -329,16 +329,16 @@ main (int argc, char **argv) w1.nread = 4096; w2.nread = 8192; - lam_event_set(&r1.ev, pair[0], LAM_EV_READ, combined_read_cb, &r1); - lam_event_set(&w1.ev, pair[0], LAM_EV_WRITE, combined_write_cb, &w1); - lam_event_set(&r2.ev, pair[1], LAM_EV_READ, combined_read_cb, &r2); - lam_event_set(&w2.ev, pair[1], LAM_EV_WRITE, combined_write_cb, &w2); - lam_event_add(&r1.ev, NULL); - lam_event_add(&w1.ev, NULL); - lam_event_add(&r2.ev, NULL); - lam_event_add(&w2.ev, NULL); + ompi_event_set(&r1.ev, pair[0], OMPI_EV_READ, combined_read_cb, &r1); + ompi_event_set(&w1.ev, pair[0], OMPI_EV_WRITE, combined_write_cb, &w1); + ompi_event_set(&r2.ev, pair[1], OMPI_EV_READ, combined_read_cb, &r2); + ompi_event_set(&w2.ev, pair[1], OMPI_EV_WRITE, combined_write_cb, &w2); + ompi_event_add(&r1.ev, NULL); + ompi_event_add(&w1.ev, NULL); + ompi_event_add(&r2.ev, NULL); + ompi_event_add(&w2.ev, NULL); - lam_event_dispatch(); + ompi_event_dispatch(); if (r1.nread == 8192 && r2.nread == 4096) test_ok = 1; @@ -350,26 +350,26 @@ main (int argc, char **argv) tv.tv_usec = 0; tv.tv_sec = SECONDS; - lam_evtimer_set(&ev, timeout_cb, NULL); - lam_evtimer_add(&ev, &tv); + ompi_evtimer_set(&ev, timeout_cb, NULL); + ompi_evtimer_add(&ev, &tv); gettimeofday(&tset, NULL); - lam_event_dispatch(); + ompi_event_dispatch(); cleanup_test(); setup_test("Simple signal: "); - lam_signal_set(&ev, SIGALRM, signal_cb, &ev); - lam_signal_add(&ev, NULL); + ompi_signal_set(&ev, SIGALRM, signal_cb, &ev); + ompi_signal_add(&ev, NULL); memset(&itv, 0, sizeof(itv)); itv.it_value.tv_sec = 1; if (setitimer(ITIMER_REAL, &itv, NULL) == -1) goto skip_simplesignal; - lam_event_dispatch(); + ompi_event_dispatch(); skip_simplesignal: - lam_signal_del(&ev); + ompi_signal_del(&ev); cleanup_test(); diff --git a/src/event/test/test-eof.c b/src/event/test/test-eof.c index 6da7edd3cf..0708131744 100644 --- a/src/event/test/test-eof.c +++ b/src/event/test/test-eof.c @@ -32,7 +32,7 @@ read_cb(int fd, short event, void *arg) if (len) { if (!called) - lam_event_add(arg, NULL); + ompi_event_add(arg, NULL); } else if (called == 1) test_okay = 0; @@ -42,7 +42,7 @@ read_cb(int fd, short event, void *arg) int main (int argc, char **argv) { - struct lam_event ev; + struct ompi_event ev; char *test = "test string"; int pair[2]; @@ -54,14 +54,14 @@ main (int argc, char **argv) shutdown(pair[0], SHUT_WR); /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); /* Initalize one event */ - lam_event_set(&ev, pair[1], LAM_EV_READ, read_cb, &ev); + ompi_event_set(&ev, pair[1], OMPI_EV_READ, read_cb, &ev); - lam_event_add(&ev, NULL); + ompi_event_add(&ev, NULL); - lam_event_dispatch(); + ompi_event_dispatch(); return (test_okay); } diff --git a/src/event/test/test-init.c b/src/event/test/test-init.c index 111c042da9..dae70292eb 100644 --- a/src/event/test/test-init.c +++ b/src/event/test/test-init.c @@ -20,7 +20,7 @@ int main(int argc, char **argv) { /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); return (0); } diff --git a/src/event/test/test-time.c b/src/event/test/test-time.c index 4652a53f2a..0c29f31c21 100644 --- a/src/event/test/test-time.c +++ b/src/event/test/test-time.c @@ -19,7 +19,7 @@ int called = 0; #define NEVENT 20000 -struct lam_event *ev[NEVENT]; +struct ompi_event *ev[NEVENT]; void time_cb(int fd, short event, void *arg) @@ -35,9 +35,9 @@ time_cb(int fd, short event, void *arg) tv.tv_sec = 0; tv.tv_usec = random() % 50000L; if (tv.tv_usec % 2) - lam_evtimer_add(ev[j], &tv); + ompi_evtimer_add(ev[j], &tv); else - lam_evtimer_del(ev[j]); + ompi_evtimer_del(ev[j]); } } } @@ -49,19 +49,19 @@ main (int argc, char **argv) int i; /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); for (i = 0; i < NEVENT; i++) { - ev[i] = malloc(sizeof(struct lam_event)); + ev[i] = malloc(sizeof(struct ompi_event)); /* Initalize one event */ - lam_evtimer_set(ev[i], time_cb, ev[i]); + ompi_evtimer_set(ev[i], time_cb, ev[i]); tv.tv_sec = 0; tv.tv_usec = random() % 50000L; - lam_evtimer_add(ev[i], &tv); + ompi_evtimer_add(ev[i], &tv); } - lam_event_dispatch(); + ompi_event_dispatch(); return (called < NEVENT); } diff --git a/src/event/test/test-weof.c b/src/event/test/test-weof.c index 631d60a964..3749a5a2c7 100644 --- a/src/event/test/test-weof.c +++ b/src/event/test/test-weof.c @@ -34,7 +34,7 @@ write_cb(int fd, short event, void *arg) if (len > 0) { if (!called) - lam_event_add(arg, NULL); + ompi_event_add(arg, NULL); close(pair[0]); } else if (called == 1) test_okay = 0; @@ -45,7 +45,7 @@ write_cb(int fd, short event, void *arg) int main (int argc, char **argv) { - struct lam_event ev; + struct ompi_event ev; if (signal(SIGPIPE, SIG_IGN) == SIG_IGN) return (1); @@ -54,12 +54,12 @@ main (int argc, char **argv) return (1); /* Initalize the event library */ - lam_event_init(); + ompi_event_init(); /* Initalize one event */ - lam_event_set(&ev, pair[1], LAM_EV_WRITE, write_cb, &ev); - lam_event_add(&ev, NULL); - lam_event_dispatch(); + ompi_event_set(&ev, pair[1], OMPI_EV_WRITE, write_cb, &ev); + ompi_event_add(&ev, NULL); + ompi_event_dispatch(); return (test_okay); } diff --git a/src/file/Makefile.am b/src/file/Makefile.am index f4a95bacfb..be9912a1ac 100644 --- a/src/file/Makefile.am +++ b/src/file/Makefile.am @@ -17,8 +17,8 @@ headers = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/file -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/file +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/file/file.h b/src/file/file.h index 07be1cbf90..53a1e71a3c 100644 --- a/src/file/file.h +++ b/src/file/file.h @@ -2,22 +2,22 @@ * $HEADER$ */ -#ifndef LAM_FILE_H -#define LAM_FILE_H +#ifndef OMPI_FILE_H +#define OMPI_FILE_H #include "mpi.h" #include "errhandler/errhandler.h" #include "mca/io/io.h" typedef enum { - LAM_IO_1_0_0, - LAM_IO_2_0_0 -} lam_io_version_t; + OMPI_IO_1_0_0, + OMPI_IO_2_0_0 +} ompi_io_version_t; -struct lam_file_t { +struct ompi_file_t { char f_name[MPI_MAX_OBJECT_NAME]; - lam_io_version_t lam_io_version; + ompi_io_version_t ompi_io_version; /* Hooks for io modules to hang things */ @@ -30,11 +30,11 @@ struct lam_file_t { int f_f_to_c_index; /* Error handling. This field does not have the "f_" prefix so that - the LAM_ERRHDL_* macros can find it, regardless of whether it's a + the OMPI_ERRHDL_* macros can find it, regardless of whether it's a comm, window, or file. */ - lam_errhandler_t *error_handler; + ompi_errhandler_t *error_handler; }; -typedef struct lam_file_t lam_file_t; +typedef struct ompi_file_t ompi_file_t; -#endif /* LAM_FILE_H */ +#endif /* OMPI_FILE_H */ diff --git a/src/group/Makefile.am b/src/group/Makefile.am index f95dab7414..a94015d434 100644 --- a/src/group/Makefile.am +++ b/src/group/Makefile.am @@ -20,8 +20,8 @@ libgroup_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/group -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/group +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/group/group.h b/src/group/group.h index 23c5b842ad..713de92f7e 100644 --- a/src/group/group.h +++ b/src/group/group.h @@ -8,42 +8,42 @@ * Infrastructure for MPI group support. */ -#ifndef LAM_GROUP_H -#define LAM_GROUP_H +#ifndef OMPI_GROUP_H +#define OMPI_GROUP_H #include "mpi.h" #include "proc/proc.h" -#include "lfc/lam_pointer_array.h" +#include "class/ompi_pointer_array.h" /** This must correspond to the fortran MPI_GROUP_NULL index */ -#define LAM_GROUP_NULL_FORTRAN 0 +#define OMPI_GROUP_NULL_FORTRAN 0 /** This must correspond to the fortran MPI_GROUP_EMPTY index */ -#define LAM_GROUP_EMPTY_FORTRAN 1 +#define OMPI_GROUP_EMPTY_FORTRAN 1 /** * Group structure */ -struct lam_group_t { - lam_object_t super; /**< base class */ +struct ompi_group_t { + ompi_object_t super; /**< base class */ int grp_proc_count; /**< number of processes in group */ int grp_my_rank; /**< rank in group */ int grp_f_to_c_index; /**< index in Fortran <-> C translation array */ int grp_ok_to_free; /**< indicates if it is ok to call group_free() on this group */ - lam_proc_t **grp_proc_pointers; - /**< list of pointers to lam_proc_t structures + ompi_proc_t **grp_proc_pointers; + /**< list of pointers to ompi_proc_t structures for each process in the group */ }; -typedef struct lam_group_t lam_group_t; -OBJ_CLASS_DECLARATION(lam_group_t); +typedef struct ompi_group_t ompi_group_t; +OBJ_CLASS_DECLARATION(ompi_group_t); /** * Table for Fortran <-> C group handle conversion */ -extern lam_pointer_array_t *lam_group_f_to_c_table; +extern ompi_pointer_array_t *ompi_group_f_to_c_table; /* @@ -57,42 +57,42 @@ extern lam_pointer_array_t *lam_group_f_to_c_table; * * @return Pointer to new group structure */ -lam_group_t *lam_group_allocate(int group_size); +ompi_group_t *ompi_group_allocate(int group_size); /** * Increment the reference count of the proc structures. * - * @param group Pointer to lam_group_t structute (IN) + * @param group Pointer to ompi_group_t structute (IN) * */ -void lam_group_increment_proc_count(lam_group_t *group); +void ompi_group_increment_proc_count(ompi_group_t *group); /** - * Initialize LAM group infrastructure. + * Initialize OMPI group infrastructure. * * @return Error code */ -int lam_group_init(void); +int ompi_group_init(void); /** - * Clean up LAM group infrastructure. + * Clean up OMPI group infrastructure. * * @return Error code */ -int lam_group_finalize(void); +int ompi_group_finalize(void); /** * Get group size. * - * @param group Pointer to lam_group_t structute (IN) + * @param group Pointer to ompi_group_t structute (IN) * * @return Group size */ -static inline int lam_group_size(lam_group_t *group) +static inline int ompi_group_size(ompi_group_t *group) { return group->grp_proc_count; } @@ -101,11 +101,11 @@ static inline int lam_group_size(lam_group_t *group) /** * Get group rank * - * @param group Pointer to lam_group_t structure (IN) + * @param group Pointer to ompi_group_t structure (IN) * * @return Group rank */ -static inline int lam_group_rank(lam_group_t *group) +static inline int ompi_group_rank(ompi_group_t *group) { return group->grp_proc_count; } @@ -114,13 +114,13 @@ static inline int lam_group_rank(lam_group_t *group) /** * Set group rank in the input group structure * - * @param group Group Pointer to lam_group_t structure (IN) - * @param proc_pointer Pointer to lam_proc_t structure for process. + * @param group Group Pointer to ompi_group_t structure (IN) + * @param proc_pointer Pointer to ompi_proc_t structure for process. * MPI_PROC_NULL may be used to indicate proc not * in group * * @return Error code */ -void lam_set_group_rank(lam_group_t *group, lam_proc_t *proc_pointer); +void ompi_set_group_rank(ompi_group_t *group, ompi_proc_t *proc_pointer); -#endif /* LAM_GROUP_H */ +#endif /* OMPI_GROUP_H */ diff --git a/src/group/mpi_group_init.c b/src/group/mpi_group_init.c index 9b0124846c..defac3162a 100644 --- a/src/group/mpi_group_init.c +++ b/src/group/mpi_group_init.c @@ -7,64 +7,64 @@ #include "mpi.h" /* define class information */ -static void lam_group_construct(lam_group_t *); -static void lam_group_destruct(lam_group_t *); +static void ompi_group_construct(ompi_group_t *); +static void ompi_group_destruct(ompi_group_t *); -OBJ_CLASS_INSTANCE(lam_group_t, - lam_object_t, - lam_group_construct, - lam_group_destruct); +OBJ_CLASS_INSTANCE(ompi_group_t, + ompi_object_t, + ompi_group_construct, + ompi_group_destruct); /* * Table for Fortran <-> C group handle conversion */ -lam_pointer_array_t *lam_group_f_to_c_table; +ompi_pointer_array_t *ompi_group_f_to_c_table; /* * MPI_GROUP_EMPTY */ -lam_group_t lam_mpi_group_empty = { +ompi_group_t ompi_mpi_group_empty = { { NULL, 0 }, /* base class */ 0, /* number of processes in group */ MPI_PROC_NULL, /* rank in group */ - LAM_ERROR, /* index in Fortran <-> C translation array */ + OMPI_ERROR, /* index in Fortran <-> C translation array */ false, /* can't free group */ - (lam_proc_t **)NULL /* pointers to lam_proc_t structures */ + (ompi_proc_t **)NULL /* pointers to ompi_proc_t structures */ }; /* * MPI_GROUP_NULL - defining this group makes it much easier to handle * this group with out special case code */ -lam_group_t lam_mpi_group_null = { +ompi_group_t ompi_mpi_group_null = { { NULL, 0 }, /* base class */ 0, /* number of processes in group */ MPI_PROC_NULL, /* rank in group */ - LAM_ERROR, /* index in Fortran <-> C translation array */ + OMPI_ERROR, /* index in Fortran <-> C translation array */ false, /* can't free group */ - (lam_proc_t **)NULL /* pointers to lam_proc_t structures */ + (ompi_proc_t **)NULL /* pointers to ompi_proc_t structures */ }; /* * Allocate a new group structure */ -lam_group_t *lam_group_allocate(int group_size) +ompi_group_t *ompi_group_allocate(int group_size) { /* local variables */ - lam_group_t *new_group; + ompi_group_t *new_group; /* create new group group element */ - new_group = OBJ_NEW(lam_group_t); + new_group = OBJ_NEW(ompi_group_t); if (new_group) { - if (LAM_ERROR == new_group->grp_f_to_c_index) { + if (OMPI_ERROR == new_group->grp_f_to_c_index) { OBJ_RELEASE(new_group); new_group = NULL; } else { - /* allocate array of (lam_proc_t *)'s, one for each + /* allocate array of (ompi_proc_t *)'s, one for each * process in the group */ new_group->grp_proc_pointers = - malloc(sizeof(lam_proc_t *) * group_size); + malloc(sizeof(ompi_proc_t *) * group_size); if (0 < group_size) { /* non-empty group */ if (!new_group->grp_proc_pointers) { @@ -87,7 +87,7 @@ lam_group_t *lam_group_allocate(int group_size) /* * increment the reference count of the proc structures */ -void lam_group_increment_proc_count(lam_group_t *group) +void ompi_group_increment_proc_count(ompi_group_t *group) { /* local variable */ int proc; @@ -104,12 +104,12 @@ void lam_group_increment_proc_count(lam_group_t *group) /* * group constructor */ -static void lam_group_construct(lam_group_t *new_group) +static void ompi_group_construct(ompi_group_t *new_group) { int ret_val; /* assign entry in fortran <-> c translation array */ - ret_val = lam_pointer_array_add(lam_group_f_to_c_table, new_group); + ret_val = ompi_pointer_array_add(ompi_group_f_to_c_table, new_group); new_group->grp_f_to_c_index = ret_val; new_group->grp_ok_to_free=true; @@ -121,7 +121,7 @@ static void lam_group_construct(lam_group_t *new_group) /* * group destructor */ -static void lam_group_destruct(lam_group_t *group) +static void ompi_group_destruct(ompi_group_t *group) { int proc; @@ -133,11 +133,11 @@ static void lam_group_destruct(lam_group_t *group) if (NULL != group->grp_proc_pointers) free(group->grp_proc_pointers); - /* reset the lam_group_f_to_c_table entry - make sure that the + /* reset the ompi_group_f_to_c_table entry - make sure that the * entry is in the table */ - if (NULL != lam_pointer_array_get_item(lam_group_f_to_c_table, + if (NULL != ompi_pointer_array_get_item(ompi_group_f_to_c_table, group->grp_f_to_c_index)) { - lam_pointer_array_set_item(lam_group_f_to_c_table, + ompi_pointer_array_set_item(ompi_group_f_to_c_table, group->grp_f_to_c_index, NULL); } @@ -147,45 +147,45 @@ static void lam_group_destruct(lam_group_t *group) /* - * Initialize LAM group infrastructure + * Initialize OMPI group infrastructure */ -int lam_group_init(void) +int ompi_group_init(void) { /* local variables */ int return_value, ret_val; - return_value = LAM_SUCCESS; + return_value = OMPI_SUCCESS; - /* initialize lam_group_f_to_c_table */ - lam_group_f_to_c_table = OBJ_NEW(lam_pointer_array_t); - if (NULL == lam_group_f_to_c_table) { - return LAM_ERROR; + /* initialize ompi_group_f_to_c_table */ + ompi_group_f_to_c_table = OBJ_NEW(ompi_pointer_array_t); + if (NULL == ompi_group_f_to_c_table) { + return OMPI_ERROR; } /* add MPI_GROUP_NULL to table */ ret_val = - lam_pointer_array_add(lam_group_f_to_c_table, &lam_mpi_group_null); - if (LAM_ERROR == ret_val) { - return LAM_ERROR; + ompi_pointer_array_add(ompi_group_f_to_c_table, &ompi_mpi_group_null); + if (OMPI_ERROR == ret_val) { + return OMPI_ERROR; }; /* make sure that MPI_GROUP_NULL is in location in the table */ - if (LAM_GROUP_NULL_FORTRAN != ret_val) { - return LAM_ERROR; + if (OMPI_GROUP_NULL_FORTRAN != ret_val) { + return OMPI_ERROR; }; - lam_mpi_group_null.grp_f_to_c_index = ret_val; + ompi_mpi_group_null.grp_f_to_c_index = ret_val; /* add MPI_GROUP_EMPTY to table */ ret_val = - lam_pointer_array_add(lam_group_f_to_c_table, - &lam_mpi_group_empty); - if (LAM_ERROR == ret_val) { - return LAM_ERROR; + ompi_pointer_array_add(ompi_group_f_to_c_table, + &ompi_mpi_group_empty); + if (OMPI_ERROR == ret_val) { + return OMPI_ERROR; }; /* make sure that MPI_GROUP_NULL is in location in the table */ - if (LAM_GROUP_EMPTY_FORTRAN != ret_val) { - return LAM_ERROR; + if (OMPI_GROUP_EMPTY_FORTRAN != ret_val) { + return OMPI_ERROR; }; - lam_mpi_group_empty.grp_f_to_c_index = ret_val; + ompi_mpi_group_empty.grp_f_to_c_index = ret_val; /* return */ return return_value; @@ -195,14 +195,14 @@ int lam_group_init(void) /* * Clean up group infrastructure */ -int lam_group_finalize(void) +int ompi_group_finalize(void) { /* local variables */ - int return_value = LAM_SUCCESS; + int return_value = OMPI_SUCCESS; /* remove group for MPI_COMM_WORLD */ - OBJ_RELEASE(lam_group_f_to_c_table); + OBJ_RELEASE(ompi_group_f_to_c_table); /* return */ return return_value; diff --git a/src/group/mpi_set_group_rank.c b/src/group/mpi_set_group_rank.c index c90d40f2cf..db8eae49d7 100644 --- a/src/group/mpi_set_group_rank.c +++ b/src/group/mpi_set_group_rank.c @@ -8,7 +8,7 @@ /* * Set group rank in a group structure. */ -void lam_set_group_rank(lam_group_t *group, lam_proc_t *proc_pointer) +void ompi_set_group_rank(ompi_group_t *group, ompi_proc_t *proc_pointer) { /* local variables */ int proc; diff --git a/src/include/Makefile.am b/src/include/Makefile.am index b662c19ca6..3ce2f8e0fc 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -8,6 +8,6 @@ include $(top_srcdir)/config/Makefile.options include_HEADERS = \ atomic.h \ constants.h \ - lam.h \ + ompi.h \ totalview.h \ types.h diff --git a/src/include/atomic.h b/src/include/atomic.h index 74b70538f4..ac7c2f58f8 100644 --- a/src/include/atomic.h +++ b/src/include/atomic.h @@ -15,10 +15,10 @@ * Only the necessary subset of functions are implemented here. */ -#ifndef LAM_ATOMIC_H -#define LAM_ATOMIC_H 1 +#ifndef OMPI_ATOMIC_H +#define OMPI_ATOMIC_H 1 -#include "lam_config.h" +#include "ompi_config.h" #if 0 @@ -36,7 +36,7 @@ * Pseudo-code: * * @code - * int lam_atomic_cmpset_acq_32(addr, cmp, new) + * int ompi_atomic_cmpset_acq_32(addr, cmp, new) * { * if (*addr == cmp) { * *addr = new; @@ -47,7 +47,7 @@ * } * @endcode */ -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t cmp, uint32_t new); @@ -60,9 +60,9 @@ static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t cmp, uint32_t new); @@ -75,9 +75,9 @@ static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t cmp, uint32_t new); @@ -89,9 +89,9 @@ static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t cmp, uint64_t new); @@ -104,9 +104,9 @@ static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t cmp, uint64_t new); @@ -119,9 +119,9 @@ static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t cmp, uint64_t new); @@ -133,9 +133,9 @@ static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_acq_int(volatile int *addr, +static inline int ompi_atomic_cmpset_acq_int(volatile int *addr, int cmp, int new); @@ -147,9 +147,9 @@ static inline int lam_atomic_cmpset_acq_int(volatile int *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_acq_int(volatile int *addr, +static inline int ompi_atomic_cmpset_acq_int(volatile int *addr, int cmp, int new); @@ -161,9 +161,9 @@ static inline int lam_atomic_cmpset_acq_int(volatile int *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_rel_int(volatile int *addr, +static inline int ompi_atomic_cmpset_rel_int(volatile int *addr, int cmp, int new); @@ -175,9 +175,9 @@ static inline int lam_atomic_cmpset_rel_int(volatile int *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_ptr(volatile void *addr, void *cmp, void *new); @@ -189,9 +189,9 @@ static inline int lam_atomic_cmpset_ptr(volatile void *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_acq_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_acq_ptr(volatile void *addr, void *cmp, void *new); @@ -203,9 +203,9 @@ static inline int lam_atomic_cmpset_acq_ptr(volatile void *addr, * @param cmp Comparison value. * @param new New value to set if comparision is true. * - * See lam_atomic_cmpset_32 for pseudo-code. + * See ompi_atomic_cmpset_32 for pseudo-code. */ -static inline int lam_atomic_cmpset_rel_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_rel_ptr(volatile void *addr, void *cmp, void *new); @@ -216,7 +216,7 @@ static inline int lam_atomic_cmpset_rel_ptr(volatile void *addr, * @param delta Value to add. * @return New value of integer. */ -static inline uint32_t lam_atomic_add_32(uint32_t *addr, int delta); +static inline uint32_t ompi_atomic_add_32(uint32_t *addr, int delta); /** @@ -226,7 +226,7 @@ static inline uint32_t lam_atomic_add_32(uint32_t *addr, int delta); * @param delta Value to add. * @return New value of integer. */ -static inline uint64_t lam_atomic_add_64(uint64_t *addr, int delta); +static inline uint64_t ompi_atomic_add_64(uint64_t *addr, int delta); /** @@ -236,7 +236,7 @@ static inline uint64_t lam_atomic_add_64(uint64_t *addr, int delta); * @param delta Value to add. * @return New value of integer. */ -static inline int lam_atomic_add_int(int *addr, int delta); +static inline int ompi_atomic_add_int(int *addr, int delta); /* @@ -247,23 +247,23 @@ static inline int lam_atomic_add_int(int *addr, int delta); #if defined(__alpha__) # include "sys/alpha/atomic.h" -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 #elif defined(__amd64__) # include "sys/amd64/atomic.h" -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 #elif defined(__i386__) -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 # include "sys/ia32/atomic.h" -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 #elif defined(__ia64__) # include "sys/ia64/atomic.h" -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 #elif defined(__powerpc__) # include "sys/powerpc/atomic.h" -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 #elif defined(__sparc64__) # include "sys/sparc/atomic.h" -# define LAM_ATOMIC_OPS 1 +# define OMPI_ATOMIC_OPS 1 #endif #endif @@ -275,58 +275,58 @@ static inline int lam_atomic_add_int(int *addr, int delta); #if SIZEOF_INT == 4 -static inline int lam_atomic_cmpset_int(volatile int *addr, +static inline int ompi_atomic_cmpset_int(volatile int *addr, int cmp, int new) { - return lam_atomic_cmpset_32((volatile uint32_t *) addr, + return ompi_atomic_cmpset_32((volatile uint32_t *) addr, (uint32_t) cmp, (uint32_t) new); } -static inline int lam_atomic_cmpset_acq_int(volatile int *addr, +static inline int ompi_atomic_cmpset_acq_int(volatile int *addr, int cmp, int new) { - return lam_atomic_cmpset_acq_32((volatile uint32_t *) addr, + return ompi_atomic_cmpset_acq_32((volatile uint32_t *) addr, (uint32_t) cmp, (uint32_t) new); } -static inline int lam_atomic_cmpset_rel_int(volatile int *addr, +static inline int ompi_atomic_cmpset_rel_int(volatile int *addr, int cmp, int new) { - return lam_atomic_cmpset_rel_32((volatile uint32_t *) addr, + return ompi_atomic_cmpset_rel_32((volatile uint32_t *) addr, (uint32_t) cmp, (uint32_t) new); } #elif SIZEOF_INT == 8 -static inline int lam_atomic_cmpset_int(volatile int *addr, +static inline int ompi_atomic_cmpset_int(volatile int *addr, int cmp, int new) { - return lam_atomic_cmpset_64((volatile uint64_t *) addr, + return ompi_atomic_cmpset_64((volatile uint64_t *) addr, (uint64_t) cmp, (uint64_t) new); } -static inline int lam_atomic_cmpset_acq_int(volatile int *addr, +static inline int ompi_atomic_cmpset_acq_int(volatile int *addr, int cmp, int new) { - return lam_atomic_cmpset_acq_64((volatile uint64_t *) addr, + return ompi_atomic_cmpset_acq_64((volatile uint64_t *) addr, (uint64_t) cmp, (uint64_t) new); } -static inline int lam_atomic_cmpset_rel_int(volatile int *addr, +static inline int ompi_atomic_cmpset_rel_int(volatile int *addr, int cmp, int new) { - return lam_atomic_cmpset_rel_64((volatile uint64_t *) addr, + return ompi_atomic_cmpset_rel_64((volatile uint64_t *) addr, (uint64_t) cmp, (uint64_t) new); } @@ -340,55 +340,55 @@ static inline int lam_atomic_cmpset_rel_int(volatile int *addr, #if SIZEOF_VOID_P == 4 -static inline int lam_atomic_cmpset_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_ptr(volatile void *addr, void *cmp, void *new) { - return lam_atomic_cmpset_32((volatile uint32_t *) addr, + return ompi_atomic_cmpset_32((volatile uint32_t *) addr, (uint32_t) cmp, (uint32_t) new); } -static inline int lam_atomic_cmpset_acq_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_acq_ptr(volatile void *addr, void *cmp, void *new) { - return lam_atomic_cmpset_acq_32((volatile uint32_t *) addr, + return ompi_atomic_cmpset_acq_32((volatile uint32_t *) addr, (uint32_t) cmp, (uint32_t) new); } -static inline int lam_atomic_cmpset_rel_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_rel_ptr(volatile void *addr, void *cmp, void *new) { - return lam_atomic_cmpset_rel_32((volatile uint32_t *) addr, + return ompi_atomic_cmpset_rel_32((volatile uint32_t *) addr, (uint32_t) cmp, (uint32_t) new); } #elif SIZEOF_VOID_P == 8 -static inline int lam_atomic_cmpset_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_ptr(volatile void *addr, void *cmp, void *new) { - return lam_atomic_cmpset_64((volatile uint64_t *) addr, + return ompi_atomic_cmpset_64((volatile uint64_t *) addr, (uint64_t) cmp, (uint64_t) new); } -static inline int lam_atomic_cmpset_acq_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_acq_ptr(volatile void *addr, void *cmp, void *new) { - return lam_atomic_cmpset_acq_64((volatile uint64_t *) addr, + return ompi_atomic_cmpset_acq_64((volatile uint64_t *) addr, (uint64_t) cmp, (uint64_t) new); } -static inline int lam_atomic_cmpset_rel_ptr(volatile void *addr, +static inline int ompi_atomic_cmpset_rel_ptr(volatile void *addr, void *cmp, void *new) { - return lam_atomic_cmpset_rel_64((volatile uint64_t *) addr, + return ompi_atomic_cmpset_rel_64((volatile uint64_t *) addr, (uint64_t) cmp, (uint64_t) new); } @@ -400,38 +400,38 @@ static inline int lam_atomic_cmpset_rel_ptr(volatile void *addr, #endif -static inline uint32_t lam_atomic_add_32(uint32_t *addr, int delta) +static inline uint32_t ompi_atomic_add_32(uint32_t *addr, int delta) { uint32_t old; do { old = *addr; - } while (0 == lam_atomic_cmpset_32(addr, old, old + delta)); + } while (0 == ompi_atomic_cmpset_32(addr, old, old + delta)); return (old + delta); } -static inline uint64_t lam_atomic_add_64(uint64_t *addr, int delta) +static inline uint64_t ompi_atomic_add_64(uint64_t *addr, int delta) { uint64_t old; do { old = *addr; - } while (0 == lam_atomic_cmpset_64(addr, old, old + delta)); + } while (0 == ompi_atomic_cmpset_64(addr, old, old + delta)); return (old + delta); } -static inline int lam_atomic_add_int(int *addr, int delta) +static inline int ompi_atomic_add_int(int *addr, int delta) { int old; do { old = *addr; - } while (0 == lam_atomic_cmpset_int(addr, old, old + delta)); + } while (0 == ompi_atomic_cmpset_int(addr, old, old + delta)); return (old + delta); } #endif -#endif /* LAM_ATOMIC_H */ +#endif /* OMPI_ATOMIC_H */ diff --git a/src/include/constants.h b/src/include/constants.h index 525a9f6120..fe360c96fd 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -2,29 +2,29 @@ * $HEADER$ */ -#ifndef LAM_CONSTANTS_H -#define LAM_CONSTANTS_H +#ifndef OMPI_CONSTANTS_H +#define OMPI_CONSTANTS_H /* error codes */ enum { - LAM_SUCCESS = 0, - LAM_ERROR = -1, - LAM_ERR_OUT_OF_RESOURCE = -2, /* fatal error */ - LAM_ERR_TEMP_OUT_OF_RESOURCE = -3, /* try again later */ - LAM_ERR_RESOURCE_BUSY = -4, - LAM_ERR_BAD_PARAM = -5, /* equivalent to MPI_ERR_ARG error code */ - LAM_ERR_RECV_LESS_THAN_POSTED = -6, - LAM_ERR_RECV_MORE_THAN_POSTED = -7, - LAM_ERR_NO_MATCH_YET = -8, - LAM_ERR_FATAL = -9, - LAM_ERR_NOT_IMPLEMENTED = -10, - LAM_ERR_NOT_SUPPORTED = -11, - LAM_ERR_INTERUPTED = -12, - LAM_ERR_WOULD_BLOCK = -13, - LAM_ERR_IN_ERRNO = -14, - LAM_ERR_UNREACH = -15, - LAM_ERR_NOT_FOUND = -16 + OMPI_SUCCESS = 0, + OMPI_ERROR = -1, + OMPI_ERR_OUT_OF_RESOURCE = -2, /* fatal error */ + OMPI_ERR_TEMP_OUT_OF_RESOURCE = -3, /* try again later */ + OMPI_ERR_RESOURCE_BUSY = -4, + OMPI_ERR_BAD_PARAM = -5, /* equivalent to MPI_ERR_ARG error code */ + OMPI_ERR_RECV_LESS_THAN_POSTED = -6, + OMPI_ERR_RECV_MORE_THAN_POSTED = -7, + OMPI_ERR_NO_MATCH_YET = -8, + OMPI_ERR_FATAL = -9, + OMPI_ERR_NOT_IMPLEMENTED = -10, + OMPI_ERR_NOT_SUPPORTED = -11, + OMPI_ERR_INTERUPTED = -12, + OMPI_ERR_WOULD_BLOCK = -13, + OMPI_ERR_IN_ERRNO = -14, + OMPI_ERR_UNREACH = -15, + OMPI_ERR_NOT_FOUND = -16 }; -#endif /* LAM_CONSTANTS_H */ +#endif /* OMPI_CONSTANTS_H */ diff --git a/src/include/lam.h b/src/include/lam.h index 8b79aac3d9..09505b7d1e 100644 --- a/src/include/lam.h +++ b/src/include/lam.h @@ -2,14 +2,14 @@ * $HEADER$ */ -#ifndef LAM_H -#define LAM_H +#ifndef OMPI_H +#define OMPI_H #include #include -#include "lam_config.h" +#include "ompi_config.h" #include "types.h" #include "constants.h" -#endif /* LAM_H */ +#endif /* OMPI_H */ diff --git a/src/include/sys/alpha/atomic.h b/src/include/sys/alpha/atomic.h index 55c7be3b5a..91a6d0aaa6 100644 --- a/src/include/sys/alpha/atomic.h +++ b/src/include/sys/alpha/atomic.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_SYS_ATOMIC_H_INCLUDED -#define LAM_SYS_ATOMIC_H_INCLUDED +#ifndef OMPI_SYS_ATOMIC_H_INCLUDED +#define OMPI_SYS_ATOMIC_H_INCLUDED /* * On alpha, everything is load-locked, store-conditional... @@ -24,25 +24,25 @@ #endif -static inline lam_atomic_mb(void) +static inline ompi_atomic_mb(void) { MB(); } -static inline lam_atomic_rmb(void) +static inline ompi_atomic_rmb(void) { RMB(); } -static inline lam_atomic_wmb(void) +static inline ompi_atomic_wmb(void) { WMB(); } -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -66,29 +66,29 @@ static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, } -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { int rc; - rc = lam_atomic_cmpset_32(addr, old, new); - lam_atomic_rmb(); + rc = ompi_atomic_cmpset_32(addr, old, new); + ompi_atomic_rmb(); return rc; } -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - lam_atomic_wmb(); - return lam_atomic_cmpset_32(addr, old, new); + ompi_atomic_wmb(); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -112,26 +112,26 @@ static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, } -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { int rc; - rc = lam_atomic_cmpset_64(addr, old, new); - lam_atomic_rmb(); + rc = ompi_atomic_cmpset_64(addr, old, new); + ompi_atomic_rmb(); return rc; } -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - lam_atomic_wmb(); - return lam_atomic_cmpset_64(addr, old, new); + ompi_atomic_wmb(); + return ompi_atomic_cmpset_64(addr, old, new); } -#endif /* ! LAM_SYS_ATOMIC_H_INCLUDED */ +#endif /* ! OMPI_SYS_ATOMIC_H_INCLUDED */ diff --git a/src/include/sys/amd64/atomic.h b/src/include/sys/amd64/atomic.h index c269d603a9..c25d015a69 100644 --- a/src/include/sys/amd64/atomic.h +++ b/src/include/sys/amd64/atomic.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_SYS_ATOMIC_H_INCLUDED -#define LAM_SYS_ATOMIC_H_INCLUDED +#ifndef OMPI_SYS_ATOMIC_H_INCLUDED +#define OMPI_SYS_ATOMIC_H_INCLUDED /* * On amd64, we use cmpxchg. @@ -19,25 +19,25 @@ #endif -static inline lam_atomic_mb(void) +static inline ompi_atomic_mb(void) { MB(); } -static inline lam_atomic_rmb(void) +static inline ompi_atomic_rmb(void) { MB(); } -static inline lam_atomic_wmb(void) +static inline ompi_atomic_wmb(void) { MB(); } -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -55,23 +55,23 @@ LOCK "cmpxchgl %1,%2 \n\ } -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return lam_atomic_cmpset_32(addr, old, new); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return lam_atomic_cmpset_32(addr, old, new); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -89,19 +89,19 @@ LOCK "cmpxchgq %1,%2 \n\ } -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - return lam_atomic_cpmset_64(addr, old, new); + return ompi_atomic_cpmset_64(addr, old, new); } -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - return lam_atomic_cpmset_64(addr, old, new); + return ompi_atomic_cpmset_64(addr, old, new); } -#endif /* ! LAM_SYS_ATOMIC_H_INCLUDED */ +#endif /* ! OMPI_SYS_ATOMIC_H_INCLUDED */ diff --git a/src/include/sys/ia32/atomic.h b/src/include/sys/ia32/atomic.h index 067e65aa32..adae1e2910 100644 --- a/src/include/sys/ia32/atomic.h +++ b/src/include/sys/ia32/atomic.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_SYS_ATOMIC_H_INCLUDED -#define LAM_SYS_ATOMIC_H_INCLUDED +#ifndef OMPI_SYS_ATOMIC_H_INCLUDED +#define OMPI_SYS_ATOMIC_H_INCLUDED /* * On ia32, we use cmpxchg. @@ -19,25 +19,25 @@ #endif -static inline lam_atomic_mb(void) +static inline ompi_atomic_mb(void) { MB(); } -static inline lam_atomic_rmb(void) +static inline ompi_atomic_rmb(void) { MB(); } -static inline lam_atomic_wmb(void) +static inline ompi_atomic_wmb(void) { MB(); } -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -55,23 +55,23 @@ LOCK "cmpxchgl %1,%2 \n\ } -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return lam_atomic_cmpset_32(addr, old, new); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return lam_atomic_cmpset_32(addr, old, new); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -93,19 +93,19 @@ LOCK "cmpxchg8b %1\n" } -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - return lam_atomic_cpmset_64(addr, old, new); + return ompi_atomic_cpmset_64(addr, old, new); } -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - return lam_atomic_cpmset_64(addr, old, new); + return ompi_atomic_cpmset_64(addr, old, new); } -#endif /* ! LAM_SYS_ATOMIC_H_INCLUDED */ +#endif /* ! OMPI_SYS_ATOMIC_H_INCLUDED */ diff --git a/src/include/sys/ia64/atomic.h b/src/include/sys/ia64/atomic.h index 8c4b631bb6..13cd594883 100644 --- a/src/include/sys/ia64/atomic.h +++ b/src/include/sys/ia64/atomic.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_SYS_ATOMIC_H_INCLUDED -#define LAM_SYS_ATOMIC_H_INCLUDED +#ifndef OMPI_SYS_ATOMIC_H_INCLUDED +#define OMPI_SYS_ATOMIC_H_INCLUDED /* * On ia64, we use cmpxchg, which supports acquire/release semantics natively. @@ -17,25 +17,25 @@ #endif -static inline lam_atomic_mb(void) +static inline ompi_atomic_mb(void) { MB(); } -static inline lam_atomic_rmb(void) +static inline ompi_atomic_rmb(void) { MB(); } -static inline lam_atomic_wmb(void) +static inline ompi_atomic_wmb(void) { MB(); } -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -52,7 +52,7 @@ static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, } -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -69,15 +69,15 @@ static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, } -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return lam_atomic_cmpset_acq_32(addr, old, new); + return ompi_atomic_cmpset_acq_32(addr, old, new); } -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -94,7 +94,7 @@ static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, } -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -110,12 +110,12 @@ static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, } -static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - return lam_atomic_cmpset_acq_64(addr, old, new); + return ompi_atomic_cmpset_acq_64(addr, old, new); } -#endif /* ! LAM_SYS_ATOMIC_H_INCLUDED */ +#endif /* ! OMPI_SYS_ATOMIC_H_INCLUDED */ diff --git a/src/include/sys/powerpc/atomic.h b/src/include/sys/powerpc/atomic.h index bf06ccc455..9381f8dc13 100644 --- a/src/include/sys/powerpc/atomic.h +++ b/src/include/sys/powerpc/atomic.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_SYS_ATOMIC_H_INCLUDED -#define LAM_SYS_ATOMIC_H_INCLUDED +#ifndef OMPI_SYS_ATOMIC_H_INCLUDED +#define OMPI_SYS_ATOMIC_H_INCLUDED /* * On powerpc ... @@ -24,25 +24,25 @@ #endif -static inline lam_atomic_mb(void) +static inline ompi_atomic_mb(void) { MB(); } -static inline lam_atomic_rmb(void) +static inline ompi_atomic_rmb(void) { RMB(); } -static inline lam_atomic_wmb(void) +static inline ompi_atomic_wmb(void) { WMB(); } -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -63,29 +63,29 @@ static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, } -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { int rc; - rc = lam_atomic_cmpset_32(addr, old, new); - lam_atomic_rmb(); + rc = ompi_atomic_cmpset_32(addr, old, new); + ompi_atomic_rmb(); return rc; } -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - lam_atomic_wmb(); - return lam_atomic_cmpset_32(addr, old, new); + ompi_atomic_wmb(); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -106,26 +106,26 @@ static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, } -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { int rc; - rc = lam_atomic_cmpset_64(addr, old, new); - lam_atomic_rmb(); + rc = ompi_atomic_cmpset_64(addr, old, new); + ompi_atomic_rmb(); return rc; } -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - lam_atomic_wmb(); - return lam_atomic_cmpset_64(addr, old, new); + ompi_atomic_wmb(); + return ompi_atomic_cmpset_64(addr, old, new); } -#endif /* ! LAM_SYS_ATOMIC_H_INCLUDED */ +#endif /* ! OMPI_SYS_ATOMIC_H_INCLUDED */ diff --git a/src/include/sys/sparc64/atomic.h b/src/include/sys/sparc64/atomic.h index 4261a051cc..871836779b 100644 --- a/src/include/sys/sparc64/atomic.h +++ b/src/include/sys/sparc64/atomic.h @@ -2,8 +2,8 @@ * $HEADER$ */ -#ifndef LAM_SYS_ATOMIC_H_INCLUDED -#define LAM_SYS_ATOMIC_H_INCLUDED +#ifndef OMPI_SYS_ATOMIC_H_INCLUDED +#define OMPI_SYS_ATOMIC_H_INCLUDED /* * On sparc64, use casa and casxa (compare and swap) instructions. @@ -16,25 +16,25 @@ #endif -static inline lam_atomic_mb(void) +static inline ompi_atomic_mb(void) { MEMBAR("#LoadLoad | #LoadStore | #StoreStore | #StoreLoad"); } -static inline lam_atomic_rmb(void) +static inline ompi_atomic_rmb(void) { MEMBAR("#LoadLoad"); } -static inline lam_atomic_wmb(void) +static inline ompi_atomic_wmb(void) { MEMBAR("#StoreStore"); } -static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { @@ -47,29 +47,29 @@ static inline int lam_atomic_cmpset_32(volatile uint32_t *addr, } -static inline int lam_atomic_cmpset_acq_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_acq_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { int rc; - rc = lam_atomic_cmpset_32(addr, old, new); - lam_atomic_rmb(); + rc = ompi_atomic_cmpset_32(addr, old, new); + ompi_atomic_rmb(); return rc; } -static inline int lam_atomic_cmpset_rel_32(volatile uint32_t *addr, +static inline int ompi_atomic_cmpset_rel_32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - lam_atomic_wmb(); - return lam_atomic_cmpset_32(addr, old, new); + ompi_atomic_wmb(); + return ompi_atomic_cmpset_32(addr, old, new); } -static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { @@ -82,26 +82,26 @@ static inline int lam_atomic_cmpset_64(volatile uint64_t *addr, } -static inline int lam_atomic_cmpset_acq_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_acq_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { int rc; - rc = lam_atomic_cmpset_64(addr, old, new); - lam_atomic_rmb(); + rc = ompi_atomic_cmpset_64(addr, old, new); + ompi_atomic_rmb(); return rc; } -static inline int lam_atomic_cmpset_rel_64(volatile uint64_t *addr, +static inline int ompi_atomic_cmpset_rel_64(volatile uint64_t *addr, uint64_t old, uint64_t new) { - lam_atomic_wmb(); - return lam_atomic_cmpset_64(addr, old, new); + ompi_atomic_wmb(); + return ompi_atomic_cmpset_64(addr, old, new); } -#endif /* ! LAM_SYS_ATOMIC_H_INCLUDED */ +#endif /* ! OMPI_SYS_ATOMIC_H_INCLUDED */ diff --git a/src/include/totalview.h b/src/include/totalview.h index 1743121148..6fbfc901af 100644 --- a/src/include/totalview.h +++ b/src/include/totalview.h @@ -2,10 +2,10 @@ * $HEADER$ */ -#ifndef LAM_TOTALVIEW_H -#define LAM_TOTALVIEW_H +#ifndef OMPI_TOTALVIEW_H +#define OMPI_TOTALVIEW_H -extern int lam_tv_comm_sequence_number; +extern int ompi_tv_comm_sequence_number; -#endif /* LAM_TOTALVIEW_H */ +#endif /* OMPI_TOTALVIEW_H */ diff --git a/src/include/types.h b/src/include/types.h index 22c8edd8de..3bda047878 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2,20 +2,20 @@ * $HEADER$ */ -#ifndef LAM_TYPES_H -#define LAM_TYPES_H +#ifndef OMPI_TYPES_H +#define OMPI_TYPES_H #include #include #include -#include "lam_config.h" +#include "ompi_config.h" /* * Increase FD_SETSIZE */ -#ifndef LAM_FD_SETSIZE -#define LAM_FD_SETSIZE 4096 +#ifndef OMPI_FD_SETSIZE +#define OMPI_FD_SETSIZE 4096 #endif #if !defined(NFDBITS) && defined(__NFDBITS) @@ -25,21 +25,21 @@ #define NFDBITS __NFDBITS #endif -struct lam_fd_set_t { +struct ompi_fd_set_t { int i; - uint32_t fds_bits[LAM_FD_SETSIZE / NFDBITS]; + uint32_t fds_bits[OMPI_FD_SETSIZE / NFDBITS]; }; -typedef struct lam_fd_set_t lam_fd_set_t; +typedef struct ompi_fd_set_t ompi_fd_set_t; -#define LAM_FD_ZERO(fds) FD_ZERO((fd_set*)(fds)) -#define LAM_FD_SET(fd,fds) FD_SET((fd),(fd_set*)(fds)) -#define LAM_FD_CLR(fd,fds) FD_CLR((fd),(fd_set*)(fds)) -#define LAM_FD_ISSET(fd,fds) FD_ISSET((fd),(fd_set*)(fds)) +#define OMPI_FD_ZERO(fds) FD_ZERO((fd_set*)(fds)) +#define OMPI_FD_SET(fd,fds) FD_SET((fd),(fd_set*)(fds)) +#define OMPI_FD_CLR(fd,fds) FD_CLR((fd),(fd_set*)(fds)) +#define OMPI_FD_ISSET(fd,fds) FD_ISSET((fd),(fd_set*)(fds)) /* * handle to describe a parallel job */ -typedef char* lam_job_handle_t; +typedef char* ompi_job_handle_t; /* @@ -50,16 +50,16 @@ typedef union { uint64_t lval; uint32_t ival; void* pval; -} lam_ptr_t; +} ompi_ptr_t; /* * handle differences in iovec */ #if defined(__APPLE__) -typedef char* lam_iov_base_ptr_t; +typedef char* ompi_iov_base_ptr_t; #else -typedef void* lam_iov_base_ptr_t; +typedef void* ompi_iov_base_ptr_t; #endif /* @@ -67,8 +67,8 @@ typedef void* lam_iov_base_ptr_t; */ #if defined(__linux__) -typedef socklen_t lam_socklen_t; +typedef socklen_t ompi_socklen_t; #else -typedef int lam_socklen_t; +typedef int ompi_socklen_t; #endif #endif diff --git a/src/info/Makefile.am b/src/info/Makefile.am index 7fb81b8b8c..9ec8ff182a 100644 --- a/src/info/Makefile.am +++ b/src/info/Makefile.am @@ -19,8 +19,8 @@ libinfo_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/info -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/info +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/info/info.c b/src/info/info.c index 443030af49..0306dde0db 100644 --- a/src/info/info.c +++ b/src/info/info.c @@ -5,70 +5,70 @@ #include "info/info.h" /* - * lam_info_t classes + * ompi_info_t classes */ -lam_class_t lam_info_t_class = { - "lam_info_t", - OBJ_CLASS(lam_list_t), - (lam_construct_t)lam_info_construct, - (lam_destruct_t)lam_info_destruct +ompi_class_t ompi_info_t_class = { + "ompi_info_t", + OBJ_CLASS(ompi_list_t), + (ompi_construct_t)ompi_info_construct, + (ompi_destruct_t)ompi_info_destruct }; /* - * lam_info_entry_t classes + * ompi_info_entry_t classes */ -lam_class_t lam_info_entry_t_class = { - "lam_info_entry_t", - OBJ_CLASS(lam_list_item_t), - (lam_construct_t)lam_info_entry_construct, - (lam_destruct_t)lam_info_entry_destruct +ompi_class_t ompi_info_entry_t_class = { + "ompi_info_entry_t", + OBJ_CLASS(ompi_list_item_t), + (ompi_construct_t)ompi_info_entry_construct, + (ompi_destruct_t)ompi_info_entry_destruct }; /** * The global fortran <-> C translation table */ -lam_pointer_array_t *lam_info_f_to_c_table; +ompi_pointer_array_t *ompi_info_f_to_c_table; /* - * lam_info_t interface functions - * @param info lam_info_t pointer + * ompi_info_t interface functions + * @param info ompi_info_t pointer * * This function is invoked when OBJ_NEW() is called. Here, we add this * info pointer to the table and then store its index as the handle */ -void lam_info_construct(lam_info_t *info) { - info->i_fhandle = lam_pointer_array_add(lam_info_f_to_c_table, info); +void ompi_info_construct(ompi_info_t *info) { + info->i_fhandle = ompi_pointer_array_add(ompi_info_f_to_c_table, info); return; } /** - * lam_info_t interface function - * @param info lam_info_t pointer + * ompi_info_t interface function + * @param info ompi_info_t pointer * * This function is called during OBJ_DESTRUCT of "info". When this - * done, we need to remove the entry from the lam fortran to C + * done, we need to remove the entry from the ompi fortran to C * translation table */ -void lam_info_destruct(lam_info_t *info) { +void ompi_info_destruct(ompi_info_t *info) { /* - * reset the lam_info_f_to_c_table entry - make sure that the + * reset the ompi_info_f_to_c_table entry - make sure that the * entry is in the table */ - if (NULL != lam_pointer_array_get_item(lam_info_f_to_c_table, info->i_fhandle)){ - lam_pointer_array_set_item(lam_info_f_to_c_table, info->i_fhandle, NULL); + if (NULL != ompi_pointer_array_get_item(ompi_info_f_to_c_table, info->i_fhandle)){ + ompi_pointer_array_set_item(ompi_info_f_to_c_table, info->i_fhandle, NULL); } return; } /* - * lam_info_entry_t interface functions + * ompi_info_entry_t interface functions */ -void lam_info_entry_construct(lam_info_entry_t *entry) { +void ompi_info_entry_construct(ompi_info_entry_t *entry) { memset(entry->ie_key, 0, sizeof(entry->ie_key)); entry->ie_key[MPI_MAX_INFO_KEY] = 0; } -void lam_info_entry_destruct(lam_info_entry_t *entry) { +void ompi_info_entry_destruct(ompi_info_entry_t *entry) { if (NULL != entry->ie_value) { free(entry->ie_value); } @@ -88,14 +88,14 @@ void lam_info_entry_destruct(lam_info_entry_t *entry) { * When an info object is no longer being used, it should be freed with * 'MPI_Info_free'. */ -int lam_info_dup (lam_info_t *info, lam_info_t **newinfo) { +int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo) { int err; - lam_info_entry_t *iterator; + ompi_info_entry_t *iterator; - for (iterator = (lam_info_entry_t *)lam_list_get_first(&(info->super)); + for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super)); NULL != iterator; - iterator = (lam_info_entry_t *)lam_list_get_next(iterator)) { - err = lam_info_set(*newinfo, iterator->ie_key, iterator->ie_value); + iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator)) { + err = ompi_info_set(*newinfo, iterator->ie_key, iterator->ie_value); if (MPI_SUCCESS != err) { return err; } @@ -107,17 +107,17 @@ int lam_info_dup (lam_info_t *info, lam_info_t **newinfo) { /* * Set a new key,value pair on info * - * @param info pointer to lam_info_t object + * @param info pointer to ompi_info_t object * @param key pointer to the new key object * @param value pointer to the new value object * * @retval MPI_SUCCESS * @retval MPI_ERR_SYSRESOURCE */ -int lam_info_set (lam_info_t *info, char *key, char *value) { +int ompi_info_set (ompi_info_t *info, char *key, char *value) { char *new_value; - lam_info_entry_t *new_info; - lam_info_entry_t *old_info; + ompi_info_entry_t *new_info; + ompi_info_entry_t *old_info; int value_length; value_length = strlen(value); @@ -127,7 +127,7 @@ int lam_info_set (lam_info_t *info, char *key, char *value) { } strcpy (new_value, value); - old_info = lam_info_find_key (info, key); + old_info = ompi_info_find_key (info, key); if (NULL != old_info) { /* @@ -136,30 +136,30 @@ int lam_info_set (lam_info_t *info, char *key, char *value) { free(old_info->ie_value); old_info->ie_value = new_value; } else { - new_info = OBJ_NEW(lam_info_entry_t); + new_info = OBJ_NEW(ompi_info_entry_t); if (NULL == new_info) { return MPI_ERR_SYSRESOURCE; } strcpy (new_info->ie_key, key); new_info->ie_value = new_value; - lam_list_append (&(info->super), (lam_list_item_t *) new_info); + ompi_list_append (&(info->super), (ompi_list_item_t *) new_info); } return MPI_SUCCESS; } /** - * lam_info_free - Free an 'MPI_Info' object. + * ompi_info_free - Free an 'MPI_Info' object. * - * @param info pointer to info (lam_info_t *) object to be freed (handle) + * @param info pointer to info (ompi_info_t *) object to be freed (handle) * * @retval MPI_SUCCESS * @retval MPI_ERR_ARG * * Upon successful completion, 'info' will be set to 'MPI_INFO_NULL'. */ -int lam_info_free (lam_info_t **info) { - lam_info_entry_t *iterator; - lam_info_entry_t *trailer_iterator; +int ompi_info_free (ompi_info_t **info) { + ompi_info_entry_t *iterator; + ompi_info_entry_t *trailer_iterator; /* * We could just get each element from the list and then call @@ -167,10 +167,10 @@ int lam_info_free (lam_info_t **info) { * MPI_Info_delete has extra logic to it. So, do the simple * remove operation to save time. */ - for (iterator = (lam_info_entry_t *)lam_list_get_first(&((*info)->super)); + for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&((*info)->super)); NULL != iterator; - iterator = (lam_info_entry_t *)lam_list_get_next(iterator)) { - trailer_iterator = (lam_info_entry_t *)lam_list_get_prev(iterator); + iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator)) { + trailer_iterator = (ompi_info_entry_t *)ompi_list_get_prev(iterator); OBJ_RELEASE(trailer_iterator); } @@ -180,9 +180,9 @@ int lam_info_free (lam_info_t **info) { } /** - * lam_info_get- Get a (key, value) pair from an 'MPI_Info' object + * ompi_info_get- Get a (key, value) pair from an 'MPI_Info' object * - * @param info Pointer to lam_info_t object + * @param info Pointer to ompi_info_t object * @param key null-terminated character string of the index key * @param valuelen maximum length of 'value' (integer) * @param value null-terminated character string of the value @@ -194,12 +194,12 @@ int lam_info_free (lam_info_t **info) { * In C and C++, 'valuelen' should be one less than the allocated space * to allow for for the null terminator. */ -int lam_info_get (lam_info_t *info, char *key, int valuelen, +int ompi_info_get (ompi_info_t *info, char *key, int valuelen, char *value, int *flag) { - lam_info_entry_t *search; + ompi_info_entry_t *search; int value_length; - search = lam_info_find_key (info, key); + search = ompi_info_find_key (info, key); if (NULL == search){ *flag = 0; @@ -218,7 +218,7 @@ int lam_info_get (lam_info_t *info, char *key, int valuelen, if (value_length < valuelen ) { strcpy(value, search->ie_value); } else { - lam_strncpy(value, search->ie_value, valuelen); + ompi_strncpy(value, search->ie_value, valuelen); value[valuelen] = 0; } } @@ -228,18 +228,18 @@ int lam_info_get (lam_info_t *info, char *key, int valuelen, /** * Delete a (key,value) pair from "info" * - * @param info lam_info_t pointer on which we need to operate + * @param info ompi_info_t pointer on which we need to operate * @param key The key portion of the (key,value) pair that * needs to be deleted * * @retval MPI_SUCCESS * @retval MPI_ERR_NOKEY */ -int lam_info_delete (lam_info_t *info, char *key) { - lam_info_entry_t *search; - lam_info_entry_t *found; +int ompi_info_delete (ompi_info_t *info, char *key) { + ompi_info_entry_t *search; + ompi_info_entry_t *found; - search = lam_info_find_key (info, key); + search = ompi_info_find_key (info, key); if (NULL == search){ return MPI_ERR_INFO_NOKEY; @@ -248,16 +248,16 @@ int lam_info_delete (lam_info_t *info, char *key) { * An entry with this key value was found. Remove the item * and free the memory allocated to it */ - found = (lam_info_entry_t *) - lam_list_remove_item (&(info->super), - (lam_list_item_t *)search); + found = (ompi_info_entry_t *) + ompi_list_remove_item (&(info->super), + (ompi_list_item_t *)search); OBJ_RELEASE(search); } return MPI_SUCCESS; } /** - * @param info - lam_info_t pointer object (handle) + * @param info - ompi_info_t pointer object (handle) * @param key - null-terminated character string of the index key * @param valuelen - length of the value associated with 'key' (integer) * @param flag - true (1) if 'key' defined on 'info', false (0) if not @@ -271,11 +271,11 @@ int lam_info_delete (lam_info_t *info, char *key) { * character. If the 'key' is not found on 'info', 'valuelen' is left * alone. */ -int lam_info_get_valuelen (lam_info_t *info, char *key, int *valuelen, +int ompi_info_get_valuelen (ompi_info_t *info, char *key, int *valuelen, int *flag) { - lam_info_entry_t *search; + ompi_info_entry_t *search; - search = lam_info_find_key (info, key); + search = ompi_info_find_key (info, key); if (NULL == search){ *flag = 0; } else { @@ -290,28 +290,28 @@ int lam_info_get_valuelen (lam_info_t *info, char *key, int *valuelen, } /** - * function: lam_info_init + * function: ompi_info_init * - * This function is called during lam_init and initializes the fortran to C + * This function is called during ompi_init and initializes the fortran to C * translation table */ -int lam_info_init(void) { +int ompi_info_init(void) { /* initialize table */ - lam_info_f_to_c_table = OBJ_NEW(lam_pointer_array_t); - if (NULL == lam_info_f_to_c_table) { - return LAM_ERROR; + ompi_info_f_to_c_table = OBJ_NEW(ompi_pointer_array_t); + if (NULL == ompi_info_f_to_c_table) { + return OMPI_ERROR; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } /** - * function: lam_info_finalize + * function: ompi_info_finalize * * This functions is called during MPI Finalize */ -int lam_info_finalize(void) { +int ompi_info_finalize(void) { /* finalize */ - OBJ_RELEASE(lam_info_f_to_c_table); - return LAM_SUCCESS; + OBJ_RELEASE(ompi_info_f_to_c_table); + return OMPI_SUCCESS; } diff --git a/src/info/info.h b/src/info/info.h index e866d6a8f2..1eee65e6c7 100644 --- a/src/info/info.h +++ b/src/info/info.h @@ -2,70 +2,70 @@ * $HEADER$ */ -#ifndef LAM_INFO_H -#define LAM_INFO_H +#ifndef OMPI_INFO_H +#define OMPI_INFO_H #include #include "mpi.h" #include "util/strncpy.h" -#include "lfc/lam_list.h" -#include "lfc/lam_pointer_array.h" -#include "include/lam.h" +#include "class/ompi_list.h" +#include "class/ompi_pointer_array.h" +#include "include/ompi.h" /** - * lam_info_t structure. MPI_Info is a pointer to this structure + * ompi_info_t structure. MPI_Info is a pointer to this structure */ -struct lam_info_t { - lam_list_t super; /**< generic list pointer which is +struct ompi_info_t { + ompi_list_t super; /**< generic list pointer which is * the container for (key,value) pairs */ int i_fhandle; /**< fortran handle for info. This is needed * for translation from fortran to C and vice versa */ }; -typedef struct lam_info_t lam_info_t; +typedef struct ompi_info_t ompi_info_t; /** - * lam_info_entry_t object. Each item in lam_info_list is of this + * ompi_info_entry_t object. Each item in ompi_info_list is of this * type. It contains (key,value) pairs */ -struct lam_info_entry_t { - lam_list_item_t super; /**< required for lam_list_t type */ +struct ompi_info_entry_t { + ompi_list_item_t super; /**< required for ompi_list_t type */ char *ie_value; /**< value part of the (key, value) pair. * Maximum length is MPI_MAX_INFO_VAL */ char ie_key[MPI_MAX_INFO_KEY + 1]; /**< "key" part of the (key, value) * pair */ }; -typedef struct lam_info_entry_t lam_info_entry_t; +typedef struct ompi_info_entry_t ompi_info_entry_t; /** * Table for Fortran <-> C translation table */ -extern lam_pointer_array_t *lam_info_f_to_c_table; +extern ompi_pointer_array_t *ompi_info_f_to_c_table; /** * Some declarations needed to use OBJ_NEW and OBJ_DESTRUCT macros */ -extern lam_class_t lam_info_t_class; -extern lam_class_t lam_info_entry_t_class; +extern ompi_class_t ompi_info_t_class; +extern ompi_class_t ompi_info_entry_t_class; #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif -int lam_info_init(void); -int lam_info_finalize(void); -void lam_info_construct(lam_info_t *info); -void lam_info_destruct(lam_info_t *info); +int ompi_info_init(void); +int ompi_info_finalize(void); +void ompi_info_construct(ompi_info_t *info); +void ompi_info_destruct(ompi_info_t *info); -void lam_info_entry_construct(lam_info_entry_t *entry); -void lam_info_entry_destruct(lam_info_entry_t *entry); -int lam_info_dup (lam_info_t *info, lam_info_t **newinfo); -int lam_info_set (lam_info_t *info, char *key, char *value); -int lam_info_free (lam_info_t **info); -int lam_info_get (lam_info_t *info, char *key, int valuelen, +void ompi_info_entry_construct(ompi_info_entry_t *entry); +void ompi_info_entry_destruct(ompi_info_entry_t *entry); +int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo); +int ompi_info_set (ompi_info_t *info, char *key, char *value); +int ompi_info_free (ompi_info_t **info); +int ompi_info_get (ompi_info_t *info, char *key, int valuelen, char *value, int *flag); -int lam_info_delete (lam_info_t *info, char *key); -int lam_info_get_valuelen (lam_info_t *info, char *key, int *valuelen, +int ompi_info_delete (ompi_info_t *info, char *key); +int ompi_info_get_valuelen (ompi_info_t *info, char *key, int *valuelen, int *flag); #if defined(c_plusplus) || defined(__cplusplus) } @@ -74,10 +74,10 @@ int lam_info_get_valuelen (lam_info_t *info, char *key, int *valuelen, /** * Iterate through the list and search for "key" * - * @param info pointer to lam_info_t handle + * @param info pointer to ompi_info_t handle * @param key Key value to search for * - * @retval (lam_info_entry_t *) to the object having the same key + * @retval (ompi_info_entry_t *) to the object having the same key * NULL if no matching item is found * * We need a function to go through the entries and find whether @@ -88,41 +88,41 @@ int lam_info_get_valuelen (lam_info_t *info, char *key, int *valuelen, * Assumptions: * "info" is a valid key */ -static inline lam_info_entry_t *lam_info_find_key (lam_info_t *info, +static inline ompi_info_entry_t *ompi_info_find_key (ompi_info_t *info, char *key) { - lam_info_entry_t *iterator; + ompi_info_entry_t *iterator; /* Iterate over all the entries. If the key is found, then * return immediately. Else, the loop will fall of the edge * and NULL is returned */ - for (iterator = (lam_info_entry_t *)lam_list_get_first(&(info->super)); + for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super)); NULL != iterator; - iterator = (lam_info_entry_t *)lam_list_get_next(iterator)) { + iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator)) { if (0 == strcmp(key, iterator->ie_key)) { return iterator; } } - return (lam_info_entry_t *)0; + return (ompi_info_entry_t *)0; } /** * Get the number of keys defined on on an MPI_Info object - * @param info Pointer to lam_info_t object. + * @param info Pointer to ompi_info_t object. * @param nkeys Pointer to nkeys, which needs to be filled up. * * @retval The number of keys defined on info */ static inline int -lam_info_get_nkeys(lam_info_t *info, int *nkeys) { - *nkeys = (int) lam_list_get_size(&(info->super)); +ompi_info_get_nkeys(ompi_info_t *info, int *nkeys) { + *nkeys = (int) ompi_list_get_size(&(info->super)); return MPI_SUCCESS; } /** - * lam_info_get_nthkey - Get a key indexed by integer from an 'MPI_Info' o + * ompi_info_get_nthkey - Get a key indexed by integer from an 'MPI_Info' o * - * @param info Pointer to lam_info_t object + * @param info Pointer to ompi_info_t object * @param n index of key to retrieve (integer) * @param key character string of at least 'MPI_MAX_INFO_KEY' characters * @@ -130,26 +130,26 @@ lam_info_get_nkeys(lam_info_t *info, int *nkeys) { * @retval MPI_ERR_ARG */ static inline int -lam_info_get_nthkey (lam_info_t *info, int n, char *key) { - lam_info_entry_t *iterator; +ompi_info_get_nthkey (ompi_info_t *info, int n, char *key) { + ompi_info_entry_t *iterator; /* * Iterate over and over till we get to the nth key */ - for (iterator = (lam_info_entry_t *)lam_list_get_first(&(info->super)); + for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super)); n > 0; n--) { - iterator = (lam_info_entry_t *)lam_list_get_next(iterator); + iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator); if ( NULL == iterator) { return MPI_ERR_ARG; } } /* - * iterator is of the type lam_list_item_t. We have to - * cast it to lam_info_entry_t before we can use it to + * iterator is of the type ompi_list_item_t. We have to + * cast it to ompi_info_entry_t before we can use it to * access the value */ strcpy(key, iterator->ie_key); return MPI_SUCCESS; } -#endif /* LAM_INFO_H */ +#endif /* OMPI_INFO_H */ diff --git a/src/lfc/Makefile.am b/src/lfc/Makefile.am index 8224c7153c..ca312c9575 100644 --- a/src/lfc/Makefile.am +++ b/src/lfc/Makefile.am @@ -10,27 +10,27 @@ noinst_LTLIBRARIES = liblfc.la # Source code files headers = \ - lam_bitmap.h \ - lam_hash_table.h \ - lam_list.h \ - lam_object.h \ - lam_pointer_array.h \ - lam_value_array.h + ompi_bitmap.h \ + ompi_hash_table.h \ + ompi_list.h \ + ompi_object.h \ + ompi_pointer_array.h \ + ompi_value_array.h liblfc_la_SOURCES = \ $(headers) \ - lam_hash_table.c \ - lam_list.c \ - lam_object.c \ - lam_pointer_array.c \ - lam_bitmap.c \ - lam_value_array.c + ompi_hash_table.c \ + ompi_list.c \ + ompi_object.c \ + ompi_pointer_array.c \ + ompi_bitmap.c \ + ompi_value_array.c # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lfc -lam_HEADERS = $(headers) +ompidir = $(includedir)/class +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/lfc/lam_bitmap.c b/src/lfc/lam_bitmap.c index e839e7853c..fe509d2fd3 100644 --- a/src/lfc/lam_bitmap.c +++ b/src/lfc/lam_bitmap.c @@ -2,23 +2,23 @@ * $HEADER$ */ -#include "lfc/lam_bitmap.h" +#include "class/ompi_bitmap.h" #define SIZE_OF_CHAR (sizeof(char) * 8) -static void lam_bitmap_construct(lam_bitmap_t *bm); -static void lam_bitmap_destruct(lam_bitmap_t *bm); +static void ompi_bitmap_construct(ompi_bitmap_t *bm); +static void ompi_bitmap_destruct(ompi_bitmap_t *bm); -lam_class_t lam_bitmap_t_class = { - "lam_bitmap_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t)lam_bitmap_construct, - (lam_construct_t)lam_bitmap_destruct +ompi_class_t ompi_bitmap_t_class = { + "ompi_bitmap_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t)ompi_bitmap_construct, + (ompi_construct_t)ompi_bitmap_destruct }; static void -lam_bitmap_construct(lam_bitmap_t *bm) +ompi_bitmap_construct(ompi_bitmap_t *bm) { bm->legal_numbits = 0; bm->array_size = 0; @@ -27,19 +27,19 @@ lam_bitmap_construct(lam_bitmap_t *bm) static void -lam_bitmap_destruct(lam_bitmap_t *bm) +ompi_bitmap_destruct(ompi_bitmap_t *bm) { } int -lam_bitmap_init(lam_bitmap_t *bm, size_t size) +ompi_bitmap_init(ompi_bitmap_t *bm, size_t size) { size_t actual_size; if (((int)size <= 0) || (NULL == bm)) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; bm->legal_numbits = size; actual_size = size / SIZE_OF_CHAR; @@ -47,22 +47,22 @@ lam_bitmap_init(lam_bitmap_t *bm, size_t size) actual_size += (size % SIZE_OF_CHAR == 0) ? 0 : 1; bm->bitmap = (unsigned char *) malloc(actual_size); if (NULL == bm->bitmap) - return LAM_ERR_SYSRESOURCE; + return OMPI_ERR_SYSRESOURCE; bm->array_size = actual_size; - lam_bitmap_clear_all_bits(bm); + ompi_bitmap_clear_all_bits(bm); return 0; } int -lam_bitmap_set_bit(lam_bitmap_t *bm, int bit) +ompi_bitmap_set_bit(ompi_bitmap_t *bm, int bit) { size_t index, offset, new_size; int i; if ((bit < 0) || (NULL == bm)) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; index = bit / SIZE_OF_CHAR; offset = bit % SIZE_OF_CHAR; @@ -78,7 +78,7 @@ lam_bitmap_set_bit(lam_bitmap_t *bm, int bit) bm->bitmap = (unsigned char *) realloc(bm->bitmap, new_size); if (NULL == bm->bitmap) { - return LAM_ERR_SYSRESOURCE; + return OMPI_ERR_SYSRESOURCE; } /* zero out the new elements */ @@ -99,18 +99,18 @@ lam_bitmap_set_bit(lam_bitmap_t *bm, int bit) int -lam_bitmap_clear_bit(lam_bitmap_t *bm, int bit) +ompi_bitmap_clear_bit(ompi_bitmap_t *bm, int bit) { size_t index, offset; if ((bit < 0) || (bit > bm->legal_numbits - 1) || (NULL == bm)) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; index = bit / SIZE_OF_CHAR; offset = bit % SIZE_OF_CHAR; if (index >= bm->array_size) { - return LAM_INVALID_BIT; + return OMPI_INVALID_BIT; } bm->bitmap[index] &= ~(1 << offset); @@ -119,19 +119,19 @@ lam_bitmap_clear_bit(lam_bitmap_t *bm, int bit) int -lam_bitmap_is_set_bit(lam_bitmap_t *bm, int bit) +ompi_bitmap_is_set_bit(ompi_bitmap_t *bm, int bit) { size_t index, offset; if ((bit < 0) || (bit > bm->legal_numbits - 1) || (NULL == bm)) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; index = bit / SIZE_OF_CHAR; offset = bit % SIZE_OF_CHAR; if (index >= bm->array_size) { - return LAM_INVALID_BIT; + return OMPI_INVALID_BIT; } if (0 != (bm->bitmap[index] & (1 << offset))) @@ -142,10 +142,10 @@ lam_bitmap_is_set_bit(lam_bitmap_t *bm, int bit) int -lam_bitmap_clear_all_bits(lam_bitmap_t *bm) +ompi_bitmap_clear_all_bits(ompi_bitmap_t *bm) { if (NULL == bm) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; memset(bm->bitmap, 0, bm->array_size); return 0; @@ -153,12 +153,12 @@ lam_bitmap_clear_all_bits(lam_bitmap_t *bm) int -lam_bitmap_set_all_bits(lam_bitmap_t *bm) +ompi_bitmap_set_all_bits(ompi_bitmap_t *bm) { int i; if (NULL == bm) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; for (i = 0; i < bm->array_size; ++i) { bm->bitmap[i] = ~((char) 0); @@ -168,7 +168,7 @@ lam_bitmap_set_all_bits(lam_bitmap_t *bm) #include int -lam_bitmap_find_and_set_first_unset_bit(lam_bitmap_t *bm) +ompi_bitmap_find_and_set_first_unset_bit(ompi_bitmap_t *bm) { size_t i = 0; int position = 0; @@ -176,7 +176,7 @@ lam_bitmap_find_and_set_first_unset_bit(lam_bitmap_t *bm) unsigned char all_ones = 0xff; if (NULL == bm) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; /* Neglect all which dont have an unset bit */ while((i < bm->array_size) && (bm->bitmap[i] == all_ones)) { @@ -186,7 +186,7 @@ lam_bitmap_find_and_set_first_unset_bit(lam_bitmap_t *bm) if (i == bm->array_size) { /* increase the bitmap size then */ position = bm->array_size * SIZE_OF_CHAR; - lam_bitmap_set_bit(bm, position); + ompi_bitmap_set_bit(bm, position); return position; } @@ -207,10 +207,10 @@ lam_bitmap_find_and_set_first_unset_bit(lam_bitmap_t *bm) size_t -lam_bitmap_size(lam_bitmap_t *bm) +ompi_bitmap_size(ompi_bitmap_t *bm) { if (NULL == bm) - return LAM_ERR_ARG; + return OMPI_ERR_ARG; return bm->legal_numbits; } diff --git a/src/lfc/lam_bitmap.h b/src/lfc/lam_bitmap.h index d84ca8465f..87ac69bd18 100644 --- a/src/lfc/lam_bitmap.h +++ b/src/lfc/lam_bitmap.h @@ -15,25 +15,25 @@ * outside the initialized range will result in an error. */ -#ifndef LAM_BITMAP_H -#define LAM_BITMAP_H +#ifndef OMPI_BITMAP_H +#define OMPI_BITMAP_H #include -#include "lam_config.h" +#include "ompi_config.h" #include "include/types.h" -#include "lfc/lam_object.h" +#include "class/ompi_object.h" /* VPS: Just to compile right now, has to move later on */ -#define LAM_ERR_SYSRESOURCE -1 -#define LAM_INVALID_BIT -1 -#define LAM_ERR_ARG -2 +#define OMPI_ERR_SYSRESOURCE -1 +#define OMPI_INVALID_BIT -1 +#define OMPI_ERR_ARG -2 -extern lam_class_t lam_bitmap_t_class; +extern ompi_class_t ompi_bitmap_t_class; -struct lam_bitmap_t { - lam_object_t super; /**< Subclass of lam_object_t */ +struct ompi_bitmap_t { + ompi_object_t super; /**< Subclass of ompi_object_t */ unsigned char *bitmap; /**< The actual bitmap array of characters */ size_t array_size; /**< The actual array size that maintains the bitmap */ size_t legal_numbits; /**< The number of bits which are legal (the @@ -42,7 +42,7 @@ struct lam_bitmap_t { char */ }; -typedef struct lam_bitmap_t lam_bitmap_t; +typedef struct ompi_bitmap_t ompi_bitmap_t; #if defined(c_plusplus) || defined(__cplusplus) extern "C" { @@ -55,10 +55,10 @@ extern "C" { * * @param bitmap The input bitmap (IN) * @param size The initial size of the bitmap in terms of bits (IN) - * @return LAM error code or success + * @return OMPI error code or success * */ -int lam_bitmap_init (lam_bitmap_t *bm, size_t size); +int ompi_bitmap_init (ompi_bitmap_t *bm, size_t size); /** @@ -68,10 +68,10 @@ int lam_bitmap_init (lam_bitmap_t *bm, size_t size); * * @param bitmap The input bitmap (IN) * @param bit The bit which is to be set (IN) - * @return LAM error code or success + * @return OMPI error code or success * */ -int lam_bitmap_set_bit(lam_bitmap_t *bm, int bit); +int ompi_bitmap_set_bit(ompi_bitmap_t *bm, int bit); /** @@ -80,10 +80,10 @@ int lam_bitmap_set_bit(lam_bitmap_t *bm, int bit); * * @param bitmap The input bitmap (IN) * @param bit The bit which is to be cleared (IN) - * @return LAM error code if the bit is out of range, else success + * @return OMPI error code if the bit is out of range, else success * */ -int lam_bitmap_clear_bit(lam_bitmap_t *bm, int bit); +int ompi_bitmap_clear_bit(ompi_bitmap_t *bm, int bit); /** @@ -91,12 +91,12 @@ int lam_bitmap_clear_bit(lam_bitmap_t *bm, int bit); * * @param bitmap The input bitmap (IN) * @param bit The bit which is to be checked (IN) - * @return LAM error code if the bit is out of range + * @return OMPI error code if the bit is out of range * 1 if the bit is set * 0 if the bit is not set * */ -int lam_bitmap_is_set_bit(lam_bitmap_t *bm, int bit); +int ompi_bitmap_is_set_bit(ompi_bitmap_t *bm, int bit); /** @@ -105,26 +105,26 @@ int lam_bitmap_is_set_bit(lam_bitmap_t *bm, int bit); * @param bitmap The input bitmap (IN) * @return bit number The bit number of the first unset bit */ -int lam_bitmap_find_and_set_first_unset_bit(lam_bitmap_t *bm); +int ompi_bitmap_find_and_set_first_unset_bit(ompi_bitmap_t *bm); /** * Clear all bits in the bitmap * * @param bitmap The input bitmap (IN) - * @return LAM error code if bm is NULL + * @return OMPI error code if bm is NULL * */ -int lam_bitmap_clear_all_bits(lam_bitmap_t *bm); +int ompi_bitmap_clear_all_bits(ompi_bitmap_t *bm); /** * Set all bits in the bitmap * @param bitmap The input bitmap (IN) - * @return LAM error code if bm is NULL + * @return OMPI error code if bm is NULL * */ -int lam_bitmap_set_all_bits(lam_bitmap_t *bm); +int ompi_bitmap_set_all_bits(ompi_bitmap_t *bm); /** @@ -132,10 +132,10 @@ int lam_bitmap_set_all_bits(lam_bitmap_t *bm); * legal (accessible) number of bits * * @param bitmap The input bitmap (IN) - * @return LAM error code if bm is NULL + * @return OMPI error code if bm is NULL * */ -size_t lam_bitmap_size (lam_bitmap_t *bm); +size_t ompi_bitmap_size (ompi_bitmap_t *bm); #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/src/lfc/lam_hash_table.c b/src/lfc/lam_hash_table.c index d92d6cca39..e120638162 100644 --- a/src/lfc/lam_hash_table.c +++ b/src/lfc/lam_hash_table.c @@ -5,42 +5,42 @@ #include #include -#include "lam_config.h" +#include "ompi_config.h" #include "include/constants.h" #include "util/output.h" -#include "lfc/lam_hash_table.h" +#include "class/ompi_hash_table.h" /* - * lam_hash_table_t + * ompi_hash_table_t */ #define HASH_MULTIPLIER 31 -static void lam_hash_table_construct(lam_hash_table_t* ht); -static void lam_hash_table_destruct(lam_hash_table_t* ht); +static void ompi_hash_table_construct(ompi_hash_table_t* ht); +static void ompi_hash_table_destruct(ompi_hash_table_t* ht); OBJ_CLASS_INSTANCE( - lam_hash_table_t, - lam_object_t, - lam_hash_table_construct, - lam_hash_table_destruct + ompi_hash_table_t, + ompi_object_t, + ompi_hash_table_construct, + ompi_hash_table_destruct ); -static void lam_hash_table_construct(lam_hash_table_t* ht) +static void ompi_hash_table_construct(ompi_hash_table_t* ht) { - OBJ_CONSTRUCT(&ht->ht_nodes, lam_list_t); + OBJ_CONSTRUCT(&ht->ht_nodes, ompi_list_t); ht->ht_table = NULL; ht->ht_table_size = 0; ht->ht_size = 0; } -static void lam_hash_table_destruct(lam_hash_table_t* ht) +static void ompi_hash_table_destruct(ompi_hash_table_t* ht) { size_t i; - lam_hash_table_remove_all(ht); + ompi_hash_table_remove_all(ht); for(i=0; iht_table_size; i++) OBJ_DESTRUCT(ht->ht_table+i); if(NULL != ht->ht_table) @@ -49,7 +49,7 @@ static void lam_hash_table_destruct(lam_hash_table_t* ht) } -int lam_hash_table_init(lam_hash_table_t* ht, size_t table_size) +int ompi_hash_table_init(ompi_hash_table_t* ht, size_t table_size) { size_t i; size_t power2 = 1; @@ -60,79 +60,79 @@ int lam_hash_table_init(lam_hash_table_t* ht, size_t table_size) } ht->ht_mask = power2-1; - ht->ht_table = realloc(ht->ht_table, power2 * sizeof(lam_list_t)); + ht->ht_table = realloc(ht->ht_table, power2 * sizeof(ompi_list_t)); if(NULL == ht->ht_table) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; for(i=ht->ht_table_size; iht_table+i; - OBJ_CONSTRUCT(list, lam_list_t); + ompi_list_t* list = ht->ht_table+i; + OBJ_CONSTRUCT(list, ompi_list_t); } ht->ht_table_size = power2; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int lam_hash_table_remove_all(lam_hash_table_t* ht) +int ompi_hash_table_remove_all(ompi_hash_table_t* ht) { size_t i; for(i=0; iht_table_size; i++) { - lam_list_t* list = ht->ht_table+i; - while(lam_list_get_size(list)) { - lam_list_item_t *item = lam_list_remove_first(list); + ompi_list_t* list = ht->ht_table+i; + while(ompi_list_get_size(list)) { + ompi_list_item_t *item = ompi_list_remove_first(list); OBJ_RELEASE(item); } } - while(lam_list_get_size(&ht->ht_nodes)) { - lam_list_item_t* item = lam_list_remove_first(&ht->ht_nodes); + while(ompi_list_get_size(&ht->ht_nodes)) { + ompi_list_item_t* item = ompi_list_remove_first(&ht->ht_nodes); OBJ_RELEASE(item); } ht->ht_size = 0; - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* - * lam_uint32_hash_node_t + * ompi_uint32_hash_node_t */ -struct lam_uint32_hash_node_t +struct ompi_uint32_hash_node_t { - lam_list_item_t super; + ompi_list_item_t super; uint32_t hn_key; void *hn_value; }; -typedef struct lam_uint32_hash_node_t lam_uint32_hash_node_t; +typedef struct ompi_uint32_hash_node_t ompi_uint32_hash_node_t; -static void lam_uint32_hash_node_construct(lam_uint32_hash_node_t* hn) +static void ompi_uint32_hash_node_construct(ompi_uint32_hash_node_t* hn) { } -static void lam_uint32_hash_node_destruct(lam_uint32_hash_node_t* hn) +static void ompi_uint32_hash_node_destruct(ompi_uint32_hash_node_t* hn) { } -static lam_class_t lam_uint32_hash_node_t_class = { - "lam_uint32_hash_node_t", - &lam_list_item_t_class, - (lam_construct_t)lam_uint32_hash_node_construct, - (lam_destruct_t)lam_uint32_hash_node_destruct +static ompi_class_t ompi_uint32_hash_node_t_class = { + "ompi_uint32_hash_node_t", + &ompi_list_item_t_class, + (ompi_construct_t)ompi_uint32_hash_node_construct, + (ompi_destruct_t)ompi_uint32_hash_node_destruct }; -void* lam_hash_table_get_value_uint32(lam_hash_table_t* ht, uint32_t key) +void* ompi_hash_table_get_value_uint32(ompi_hash_table_t* ht, uint32_t key) { - lam_list_t* list = ht->ht_table + (key & ht->ht_mask); - lam_uint32_hash_node_t *node; + ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + ompi_uint32_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_get_value_uint32:" - "lam_hash_table_init() has not been called"); + ompi_output(0, "ompi_hash_table_get_value_uint32:" + "ompi_hash_table_init() has not been called"); return NULL; } #endif - for(node = (lam_uint32_hash_node_t*)lam_list_get_first(list); - node != (lam_uint32_hash_node_t*)lam_list_get_end(list); - node = (lam_uint32_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_uint32_hash_node_t*)ompi_list_get_first(list); + node != (ompi_uint32_hash_node_t*)ompi_list_get_end(list); + node = (ompi_uint32_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key == key) { return node->hn_value; } @@ -141,111 +141,111 @@ void* lam_hash_table_get_value_uint32(lam_hash_table_t* ht, uint32_t key) } -int lam_hash_table_set_value_uint32(lam_hash_table_t* ht, +int ompi_hash_table_set_value_uint32(ompi_hash_table_t* ht, uint32_t key, void* value) { - lam_list_t* list = ht->ht_table + (key & ht->ht_mask); - lam_uint32_hash_node_t *node; + ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + ompi_uint32_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_set_value_uint32:" - "lam_hash_table_init() has not been called"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_hash_table_set_value_uint32:" + "ompi_hash_table_init() has not been called"); + return OMPI_ERR_BAD_PARAM; } #endif - for(node = (lam_uint32_hash_node_t*)lam_list_get_first(list); - node != (lam_uint32_hash_node_t*)lam_list_get_end(list); - node = (lam_uint32_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_uint32_hash_node_t*)ompi_list_get_first(list); + node != (ompi_uint32_hash_node_t*)ompi_list_get_end(list); + node = (ompi_uint32_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key == key) { node->hn_value = value; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } - node = (lam_uint32_hash_node_t*)lam_list_remove_first(&ht->ht_nodes); + node = (ompi_uint32_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); if(NULL == node) { - node = OBJ_NEW(lam_uint32_hash_node_t); + node = OBJ_NEW(ompi_uint32_hash_node_t); if(NULL == node) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } node->hn_key = key; node->hn_value = value; - lam_list_append(list, (lam_list_item_t*)node); + ompi_list_append(list, (ompi_list_item_t*)node); ht->ht_size++; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int lam_hash_table_remove_value_uint32(lam_hash_table_t* ht, uint32_t key) +int ompi_hash_table_remove_value_uint32(ompi_hash_table_t* ht, uint32_t key) { - lam_list_t* list = ht->ht_table + (key & ht->ht_mask); - lam_uint32_hash_node_t *node; + ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + ompi_uint32_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_remove_value_uint32:" - "lam_hash_table_init() has not been called"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_hash_table_remove_value_uint32:" + "ompi_hash_table_init() has not been called"); + return OMPI_ERR_BAD_PARAM; } #endif - for(node = (lam_uint32_hash_node_t*)lam_list_get_first(list); - node != (lam_uint32_hash_node_t*)lam_list_get_end(list); - node = (lam_uint32_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_uint32_hash_node_t*)ompi_list_get_first(list); + node != (ompi_uint32_hash_node_t*)ompi_list_get_end(list); + node = (ompi_uint32_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key == key) { - lam_list_remove_item(list, (lam_list_item_t*)node); - lam_list_append(&ht->ht_nodes, (lam_list_item_t*)node); + ompi_list_remove_item(list, (ompi_list_item_t*)node); + ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); ht->ht_size--; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } - return LAM_ERR_NOT_FOUND; + return OMPI_ERR_NOT_FOUND; } /* - * lam_uint64_hash_node_t + * ompi_uint64_hash_node_t */ -struct lam_uint64_hash_node_t +struct ompi_uint64_hash_node_t { - lam_list_item_t super; + ompi_list_item_t super; uint64_t hn_key; void* hn_value; }; -typedef struct lam_uint64_hash_node_t lam_uint64_hash_node_t; +typedef struct ompi_uint64_hash_node_t ompi_uint64_hash_node_t; -static void lam_uint64_hash_node_construct(lam_uint64_hash_node_t* hn) +static void ompi_uint64_hash_node_construct(ompi_uint64_hash_node_t* hn) { } -static void lam_uint64_hash_node_destruct(lam_uint64_hash_node_t* hn) +static void ompi_uint64_hash_node_destruct(ompi_uint64_hash_node_t* hn) { } -static lam_class_t lam_uint64_hash_node_t_class = { - "lam_uint64_hash_node_t", - OBJ_CLASS(lam_list_item_t), - (lam_construct_t)lam_uint64_hash_node_construct, - (lam_destruct_t)lam_uint64_hash_node_destruct +static ompi_class_t ompi_uint64_hash_node_t_class = { + "ompi_uint64_hash_node_t", + OBJ_CLASS(ompi_list_item_t), + (ompi_construct_t)ompi_uint64_hash_node_construct, + (ompi_destruct_t)ompi_uint64_hash_node_destruct }; -void* lam_hash_table_get_value_uint64(lam_hash_table_t* ht, uint64_t key) +void* ompi_hash_table_get_value_uint64(ompi_hash_table_t* ht, uint64_t key) { - lam_list_t* list = ht->ht_table + (key & ht->ht_mask); - lam_uint64_hash_node_t *node; + ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + ompi_uint64_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_get_value_uint64:" - "lam_hash_table_init() has not been called"); + ompi_output(0, "ompi_hash_table_get_value_uint64:" + "ompi_hash_table_init() has not been called"); return NULL; } #endif - for(node = (lam_uint64_hash_node_t*)lam_list_get_first(list); - node != (lam_uint64_hash_node_t*)lam_list_get_end(list); - node = (lam_uint64_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_uint64_hash_node_t*)ompi_list_get_first(list); + node != (ompi_uint64_hash_node_t*)ompi_list_get_end(list); + node = (ompi_uint64_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key == key) { return node->hn_value; } @@ -254,104 +254,104 @@ void* lam_hash_table_get_value_uint64(lam_hash_table_t* ht, uint64_t key) } -int lam_hash_table_set_value_uint64(lam_hash_table_t* ht, +int ompi_hash_table_set_value_uint64(ompi_hash_table_t* ht, uint64_t key, void* value) { - lam_list_t* list = ht->ht_table + (key & ht->ht_mask); - lam_uint64_hash_node_t *node; + ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + ompi_uint64_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_set_value_uint64:" - "lam_hash_table_init() has not been called"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_hash_table_set_value_uint64:" + "ompi_hash_table_init() has not been called"); + return OMPI_ERR_BAD_PARAM; } #endif - for(node = (lam_uint64_hash_node_t*)lam_list_get_first(list); - node != (lam_uint64_hash_node_t*)lam_list_get_end(list); - node = (lam_uint64_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_uint64_hash_node_t*)ompi_list_get_first(list); + node != (ompi_uint64_hash_node_t*)ompi_list_get_end(list); + node = (ompi_uint64_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key == key) { node->hn_value = value; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } - node = (lam_uint64_hash_node_t*)lam_list_remove_first(&ht->ht_nodes); + node = (ompi_uint64_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); if(NULL == node) { - node = OBJ_NEW(lam_uint64_hash_node_t); + node = OBJ_NEW(ompi_uint64_hash_node_t); if(NULL == node) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } node->hn_key = key; node->hn_value = value; - lam_list_append(list, (lam_list_item_t*)node); + ompi_list_append(list, (ompi_list_item_t*)node); ht->ht_size++; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int lam_hash_table_remove_value_uint64(lam_hash_table_t* ht, uint64_t key) +int ompi_hash_table_remove_value_uint64(ompi_hash_table_t* ht, uint64_t key) { - lam_list_t* list = ht->ht_table + (key & ht->ht_mask); - lam_uint64_hash_node_t *node; + ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + ompi_uint64_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_remove_value_uint64:" - "lam_hash_table_init() has not been called"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_hash_table_remove_value_uint64:" + "ompi_hash_table_init() has not been called"); + return OMPI_ERR_BAD_PARAM; } #endif - for(node = (lam_uint64_hash_node_t*)lam_list_get_first(list); - node != (lam_uint64_hash_node_t*)lam_list_get_end(list); - node = (lam_uint64_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_uint64_hash_node_t*)ompi_list_get_first(list); + node != (ompi_uint64_hash_node_t*)ompi_list_get_end(list); + node = (ompi_uint64_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key == key) { - lam_list_remove_item(list, (lam_list_item_t*)node); - lam_list_append(&ht->ht_nodes, (lam_list_item_t*)node); + ompi_list_remove_item(list, (ompi_list_item_t*)node); + ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); ht->ht_size--; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } - return LAM_ERR_NOT_FOUND; + return OMPI_ERR_NOT_FOUND; } /* - * lam_ptr_hash_node_t + * ompi_ptr_hash_node_t */ -struct lam_ptr_hash_node_t +struct ompi_ptr_hash_node_t { - lam_list_item_t super; + ompi_list_item_t super; void* hn_key; size_t hn_key_size; void* hn_value; }; -typedef struct lam_ptr_hash_node_t lam_ptr_hash_node_t; +typedef struct ompi_ptr_hash_node_t ompi_ptr_hash_node_t; -static void lam_ptr_hash_node_construct(lam_ptr_hash_node_t* hn) +static void ompi_ptr_hash_node_construct(ompi_ptr_hash_node_t* hn) { hn->hn_key_size = 0; hn->hn_key = NULL; hn->hn_value = NULL; } -static void lam_ptr_hash_node_destruct(lam_ptr_hash_node_t* hn) +static void ompi_ptr_hash_node_destruct(ompi_ptr_hash_node_t* hn) { if(NULL != hn->hn_key) free(hn->hn_key); } -static lam_class_t lam_ptr_hash_node_t_class = { - "lam_ptr_hash_node_t", - OBJ_CLASS(lam_list_item_t), - (lam_construct_t)lam_ptr_hash_node_construct, - (lam_destruct_t)lam_ptr_hash_node_destruct +static ompi_class_t ompi_ptr_hash_node_t_class = { + "ompi_ptr_hash_node_t", + OBJ_CLASS(ompi_list_item_t), + (ompi_construct_t)ompi_ptr_hash_node_construct, + (ompi_destruct_t)ompi_ptr_hash_node_destruct }; -static inline uint32_t lam_hash_value(size_t mask, const void *key, +static inline uint32_t ompi_hash_value(size_t mask, const void *key, uint32_t keysize) { uint32_t h, i; @@ -364,23 +364,23 @@ static inline uint32_t lam_hash_value(size_t mask, const void *key, return (h & mask); } -void* lam_hash_table_get_value_ptr(lam_hash_table_t* ht, const void* key, +void* ompi_hash_table_get_value_ptr(ompi_hash_table_t* ht, const void* key, size_t key_size) { - lam_list_t* list = ht->ht_table + lam_hash_value(ht->ht_mask, key, + ompi_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, key_size); - lam_ptr_hash_node_t *node; + ompi_ptr_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_get_value_ptr:" - "lam_hash_table_init() has not been called"); + ompi_output(0, "ompi_hash_table_get_value_ptr:" + "ompi_hash_table_init() has not been called"); return NULL; } #endif - for(node = (lam_ptr_hash_node_t*)lam_list_get_first(list); - node != (lam_ptr_hash_node_t*)lam_list_get_end(list); - node = (lam_ptr_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_ptr_hash_node_t*)ompi_list_get_first(list); + node != (ompi_ptr_hash_node_t*)ompi_list_get_end(list); + node = (ompi_ptr_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key_size == key_size && memcmp(node->hn_key, key, key_size) == 0) { return node->hn_value; @@ -390,156 +390,156 @@ void* lam_hash_table_get_value_ptr(lam_hash_table_t* ht, const void* key, } -int lam_hash_table_set_value_ptr(lam_hash_table_t* ht, const void* key, +int ompi_hash_table_set_value_ptr(ompi_hash_table_t* ht, const void* key, size_t key_size, void* value) { - lam_list_t* list = ht->ht_table + lam_hash_value(ht->ht_mask, key, + ompi_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, key_size); - lam_ptr_hash_node_t *node; + ompi_ptr_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_set_value_ptr:" - "lam_hash_table_init() has not been called"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_hash_table_set_value_ptr:" + "ompi_hash_table_init() has not been called"); + return OMPI_ERR_BAD_PARAM; } #endif - for(node = (lam_ptr_hash_node_t*)lam_list_get_first(list); - node != (lam_ptr_hash_node_t*)lam_list_get_end(list); - node = (lam_ptr_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_ptr_hash_node_t*)ompi_list_get_first(list); + node != (ompi_ptr_hash_node_t*)ompi_list_get_end(list); + node = (ompi_ptr_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key_size == key_size && memcmp(node->hn_key, key, key_size) == 0) { node->hn_value = value; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } - node = (lam_ptr_hash_node_t*)lam_list_remove_first(&ht->ht_nodes); + node = (ompi_ptr_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); if(NULL == node) { - node = OBJ_NEW(lam_ptr_hash_node_t); + node = OBJ_NEW(ompi_ptr_hash_node_t); if(NULL == node) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } node->hn_key = malloc(key_size); node->hn_key_size = key_size; node->hn_value = value; memcpy(node->hn_key, key, key_size); - lam_list_append(list, (lam_list_item_t*)node); + ompi_list_append(list, (ompi_list_item_t*)node); ht->ht_size++; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int lam_hash_table_remove_value_ptr(lam_hash_table_t* ht, +int ompi_hash_table_remove_value_ptr(ompi_hash_table_t* ht, const void* key, size_t key_size) { - lam_list_t* list = ht->ht_table + lam_hash_value(ht->ht_mask, + ompi_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, key_size); - lam_ptr_hash_node_t *node; + ompi_ptr_hash_node_t *node; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(ht->ht_table_size == 0) { - lam_output(0, "lam_hash_table_remove_value_ptr: " - "lam_hash_table_init() has not been called"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_hash_table_remove_value_ptr: " + "ompi_hash_table_init() has not been called"); + return OMPI_ERR_BAD_PARAM; } #endif - for(node = (lam_ptr_hash_node_t*)lam_list_get_first(list); - node != (lam_ptr_hash_node_t*)lam_list_get_end(list); - node = (lam_ptr_hash_node_t*)lam_list_get_next(node)) { + for(node = (ompi_ptr_hash_node_t*)ompi_list_get_first(list); + node != (ompi_ptr_hash_node_t*)ompi_list_get_end(list); + node = (ompi_ptr_hash_node_t*)ompi_list_get_next(node)) { if (node->hn_key_size == key_size && memcmp(node->hn_key, key, key_size) == 0) { free(node->hn_key); node->hn_key = NULL; node->hn_key_size = 0; - lam_list_remove_item(list, (lam_list_item_t*)node); - lam_list_append(&ht->ht_nodes, (lam_list_item_t*)node); + ompi_list_remove_item(list, (ompi_list_item_t*)node); + ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); ht->ht_size--; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } - return LAM_ERR_NOT_FOUND; + return OMPI_ERR_NOT_FOUND; } int -lam_hash_table_get_first_key_uint32(lam_hash_table_t *ht, uint32_t *key, +ompi_hash_table_get_first_key_uint32(ompi_hash_table_t *ht, uint32_t *key, void **value, void **node) { - lam_uint32_hash_node_t *list_node; - list_node = (lam_uint32_hash_node_t*) lam_list_get_first(ht->ht_table); + ompi_uint32_hash_node_t *list_node; + list_node = (ompi_uint32_hash_node_t*) ompi_list_get_first(ht->ht_table); *node = list_node; /* Quit if there is no element in the list */ - if (*node == lam_list_get_end(ht->ht_table)) { - return LAM_ERROR; + if (*node == ompi_list_get_end(ht->ht_table)) { + return OMPI_ERROR; } *key = list_node->hn_key; *value = list_node->hn_value; - return LAM_SUCCESS; + return OMPI_SUCCESS; } int -lam_hash_table_get_next_key_uint32(lam_hash_table_t *ht, uint32_t *key, +ompi_hash_table_get_next_key_uint32(ompi_hash_table_t *ht, uint32_t *key, void **value, void *in_node, void **out_node) { - lam_list_t* list = ht->ht_table + (((lam_uint32_hash_node_t*) + ompi_list_t* list = ht->ht_table + (((ompi_uint32_hash_node_t*) in_node)->hn_key & ht->ht_mask); - if (in_node == lam_list_get_last(list)) { + if (in_node == ompi_list_get_last(list)) { ++list; - *out_node = (void *) lam_list_get_first(list); + *out_node = (void *) ompi_list_get_first(list); - if (*out_node == lam_list_get_end(list)) { - return LAM_ERROR; + if (*out_node == ompi_list_get_end(list)) { + return OMPI_ERROR; } } else { - *out_node = (void *) lam_list_get_next(in_node); + *out_node = (void *) ompi_list_get_next(in_node); } - *key = ((lam_uint32_hash_node_t*)(*out_node))->hn_key; - *value = ((lam_uint32_hash_node_t*)(*out_node))->hn_value; - return LAM_SUCCESS; + *key = ((ompi_uint32_hash_node_t*)(*out_node))->hn_key; + *value = ((ompi_uint32_hash_node_t*)(*out_node))->hn_value; + return OMPI_SUCCESS; } int -lam_hash_table_get_first_key_uint64(lam_hash_table_t *ht, uint64_t *key, +ompi_hash_table_get_first_key_uint64(ompi_hash_table_t *ht, uint64_t *key, void **value, void **node) { - *node = (lam_uint64_hash_node_t*) lam_list_get_first(ht->ht_table); + *node = (ompi_uint64_hash_node_t*) ompi_list_get_first(ht->ht_table); /* Quit if there is no element in the list */ - if (*node == lam_list_get_end(ht->ht_table)) { - return LAM_ERROR; + if (*node == ompi_list_get_end(ht->ht_table)) { + return OMPI_ERROR; } - *key = ((lam_uint64_hash_node_t*)(*node))->hn_key; - *value = ((lam_uint64_hash_node_t*)(*node))->hn_value; - return LAM_SUCCESS; + *key = ((ompi_uint64_hash_node_t*)(*node))->hn_key; + *value = ((ompi_uint64_hash_node_t*)(*node))->hn_value; + return OMPI_SUCCESS; } int -lam_hash_table_get_next_key_uint64(lam_hash_table_t *ht, uint64_t *key, +ompi_hash_table_get_next_key_uint64(ompi_hash_table_t *ht, uint64_t *key, void **value, void *in_node, void **out_node) { - lam_list_t* list = ht->ht_table + (((lam_uint64_hash_node_t*) + ompi_list_t* list = ht->ht_table + (((ompi_uint64_hash_node_t*) in_node)->hn_key & ht->ht_mask); - if (in_node == lam_list_get_last(list)) { + if (in_node == ompi_list_get_last(list)) { ++list; - *out_node = (void *) lam_list_get_first(list); + *out_node = (void *) ompi_list_get_first(list); - if (*out_node == lam_list_get_end(list)) { - return LAM_ERROR; + if (*out_node == ompi_list_get_end(list)) { + return OMPI_ERROR; } } else { - *out_node = (void *) lam_list_get_next(in_node); + *out_node = (void *) ompi_list_get_next(in_node); } - *key = ((lam_uint64_hash_node_t*)(*out_node))->hn_key; - *value = ((lam_uint32_hash_node_t*)(*out_node))->hn_value; - return LAM_SUCCESS; + *key = ((ompi_uint64_hash_node_t*)(*out_node))->hn_key; + *value = ((ompi_uint32_hash_node_t*)(*out_node))->hn_value; + return OMPI_SUCCESS; } diff --git a/src/lfc/lam_hash_table.h b/src/lfc/lam_hash_table.h index 137a35b598..2035a28917 100644 --- a/src/lfc/lam_hash_table.h +++ b/src/lfc/lam_hash_table.h @@ -11,28 +11,28 @@ * concurrently. */ -#ifndef LAM_HASH_TABLE_H -#define LAM_HASH_TABLE_H +#ifndef OMPI_HASH_TABLE_H +#define OMPI_HASH_TABLE_H -#include "lam_config.h" +#include "ompi_config.h" #include "include/types.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" -extern lam_class_t lam_hash_table_t_class; +extern ompi_class_t ompi_hash_table_t_class; -struct lam_hash_table_t +struct ompi_hash_table_t { - lam_object_t super; /**< subclass of lam_object_t */ - lam_list_t ht_nodes; /**< free list of hash nodes */ - lam_list_t *ht_table; /**< each item is an array of - lam_fhnode_t nodes */ + ompi_object_t super; /**< subclass of ompi_object_t */ + ompi_list_t ht_nodes; /**< free list of hash nodes */ + ompi_list_t *ht_table; /**< each item is an array of + ompi_fhnode_t nodes */ size_t ht_table_size; /**< size of table */ size_t ht_size; /**< number of values on table */ size_t ht_mask; }; -typedef struct lam_hash_table_t lam_hash_table_t; +typedef struct ompi_hash_table_t ompi_hash_table_t; #if defined(c_plusplus) || defined(__cplusplus) @@ -46,11 +46,11 @@ extern "C" { * @param table The input hash table (IN). * @param size The size of the table, which will be rounded up * (if required) to the next highest power of two (IN). - * @return LAM error code. + * @return OMPI error code. * */ -int lam_hash_table_init(lam_hash_table_t* ht, size_t table_size); +int ompi_hash_table_init(ompi_hash_table_t* ht, size_t table_size); /** @@ -61,7 +61,7 @@ int lam_hash_table_init(lam_hash_table_t* ht, size_t table_size); * */ -static inline size_t lam_hash_table_get_size(lam_hash_table_t *ht) +static inline size_t ompi_hash_table_get_size(ompi_hash_table_t *ht) { return ht->ht_size; } @@ -70,11 +70,11 @@ static inline size_t lam_hash_table_get_size(lam_hash_table_t *ht) * Remove all elements from the table. * * @param table The input hash table (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_remove_all(lam_hash_table_t *ht); +int ompi_hash_table_remove_all(ompi_hash_table_t *ht); /** * Retrieve value via uint32_t key. @@ -85,7 +85,7 @@ int lam_hash_table_remove_all(lam_hash_table_t *ht); * */ -void *lam_hash_table_get_value_uint32(lam_hash_table_t* table, uint32_t key); +void *ompi_hash_table_get_value_uint32(ompi_hash_table_t* table, uint32_t key); /** * Set value based on uint32_t key. @@ -93,22 +93,22 @@ void *lam_hash_table_get_value_uint32(lam_hash_table_t* table, uint32_t key); * @param table The input hash table (IN). * @param key The input key (IN). * @param value The value to be associated with the key (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_set_value_uint32(lam_hash_table_t* table, uint32_t key, void* value); +int ompi_hash_table_set_value_uint32(ompi_hash_table_t* table, uint32_t key, void* value); /** * Remove value based on uint32_t key. * * @param table The input hash table (IN). * @param key The input key (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_remove_value_uint32(lam_hash_table_t* table, uint32_t key); +int ompi_hash_table_remove_value_uint32(ompi_hash_table_t* table, uint32_t key); /** * Retrieve value via uint64_t key. @@ -119,7 +119,7 @@ int lam_hash_table_remove_value_uint32(lam_hash_table_t* table, uint32_t key); * */ -void *lam_hash_table_get_value_uint64(lam_hash_table_t *table, uint64_t key); +void *ompi_hash_table_get_value_uint64(ompi_hash_table_t *table, uint64_t key); /** * Set value based on uint64_t key. @@ -127,22 +127,22 @@ void *lam_hash_table_get_value_uint64(lam_hash_table_t *table, uint64_t key); * @param table The input hash table (IN). * @param key The input key (IN). * @param value The value to be associated with the key (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_set_value_uint64(lam_hash_table_t *table, uint64_t key, void* value); +int ompi_hash_table_set_value_uint64(ompi_hash_table_t *table, uint64_t key, void* value); /** * Remove value based on uint64_t key. * * @param table The input hash table (IN). * @param key The input key (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_remove_value_uint64(lam_hash_table_t *table, uint64_t key); +int ompi_hash_table_remove_value_uint64(ompi_hash_table_t *table, uint64_t key); /** * Retrieve value via arbitrary length binary key. @@ -153,7 +153,7 @@ int lam_hash_table_remove_value_uint64(lam_hash_table_t *table, uint64_t key); * */ -void *lam_hash_table_get_value_ptr(lam_hash_table_t *table, const void* key, size_t keylen); +void *ompi_hash_table_get_value_ptr(ompi_hash_table_t *table, const void* key, size_t keylen); /** * Set value based on arbitrary length binary key. @@ -161,22 +161,22 @@ void *lam_hash_table_get_value_ptr(lam_hash_table_t *table, const void* key, siz * @param table The input hash table (IN). * @param key The input key (IN). * @param value The value to be associated with the key (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_set_value_ptr(lam_hash_table_t *table, const void* key, size_t keylen, void* value); +int ompi_hash_table_set_value_ptr(ompi_hash_table_t *table, const void* key, size_t keylen, void* value); /** * Remove value based on arbitrary length binary key. * * @param table The input hash table (IN). * @param key The input key (IN). - * @return LAM return code. + * @return OMPI return code. * */ -int lam_hash_table_remove_value_ptr(lam_hash_table_t *table, const void* key, size_t keylen); +int ompi_hash_table_remove_value_ptr(ompi_hash_table_t *table, const void* key, size_t keylen); /** The following functions are only for allowing iterating through @@ -197,11 +197,11 @@ int lam_hash_table_remove_value_ptr(lam_hash_table_t *table, const void* key, si * @param node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls * to get_next_key) (OUT) - * @return LAM error code + * @return OMPI error code * */ -int lam_hash_table_get_first_key_uint32(lam_hash_table_t *table, uint32_t *key, +int ompi_hash_table_get_first_key_uint32(ompi_hash_table_t *table, uint32_t *key, void **value, void **node); @@ -215,11 +215,11 @@ int lam_hash_table_get_first_key_uint32(lam_hash_table_t *table, uint32_t *key, * @param out_node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls * to get_next_key) (OUT) - * @return LAM error code + * @return OMPI error code * */ -int lam_hash_table_get_next_key_uint32(lam_hash_table_t *table, uint32_t *key, +int ompi_hash_table_get_next_key_uint32(ompi_hash_table_t *table, uint32_t *key, void **value, void *in_node, void **out_node); @@ -233,11 +233,11 @@ int lam_hash_table_get_next_key_uint32(lam_hash_table_t *table, uint32_t *key, * @param node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls * to get_next_key) (OUT) - * @return LAM error code + * @return OMPI error code * */ -int lam_hash_table_get_first_key_uint64(lam_hash_table_t *table, uint64_t *key, +int ompi_hash_table_get_first_key_uint64(ompi_hash_table_t *table, uint64_t *key, void **value, void **node); @@ -251,11 +251,11 @@ int lam_hash_table_get_first_key_uint64(lam_hash_table_t *table, uint64_t *key, * @param out_node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls * to get_next_key) (OUT) - * @return LAM error code + * @return OMPI error code * */ -int lam_hash_table_get_next_key_uint64(lam_hash_table_t *table, uint64_t *key, +int ompi_hash_table_get_next_key_uint64(ompi_hash_table_t *table, uint64_t *key, void **value, void *in_node, void **out_node); @@ -265,4 +265,4 @@ int lam_hash_table_get_next_key_uint64(lam_hash_table_t *table, uint64_t *key, #endif -#endif /* LAM_HASH_TABLE_H */ +#endif /* OMPI_HASH_TABLE_H */ diff --git a/src/lfc/lam_list.c b/src/lfc/lam_list.c index 5c0d3f8cf5..fd54b40680 100644 --- a/src/lfc/lam_list.c +++ b/src/lfc/lam_list.c @@ -2,101 +2,101 @@ * $HEADER$ */ -#include "lfc/lam_list.h" +#include "class/ompi_list.h" /* * List classes */ -static void lam_list_item_construct(lam_list_item_t*); -static void lam_list_item_destruct(lam_list_item_t*); +static void ompi_list_item_construct(ompi_list_item_t*); +static void ompi_list_item_destruct(ompi_list_item_t*); -lam_class_t lam_list_item_t_class = { - "lam_list_item_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t) lam_list_item_construct, - (lam_destruct_t) lam_list_item_destruct +ompi_class_t ompi_list_item_t_class = { + "ompi_list_item_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t) ompi_list_item_construct, + (ompi_destruct_t) ompi_list_item_destruct }; -static void lam_list_construct(lam_list_t*); -static void lam_list_destruct(lam_list_t*); +static void ompi_list_construct(ompi_list_t*); +static void ompi_list_destruct(ompi_list_t*); OBJ_CLASS_INSTANCE( - lam_list_t, - lam_object_t, - lam_list_construct, - lam_list_destruct + ompi_list_t, + ompi_object_t, + ompi_list_construct, + ompi_list_destruct ); /* * - * lam_list_link_item_t interface + * ompi_list_link_item_t interface * */ -static void lam_list_item_construct(lam_list_item_t *item) +static void ompi_list_item_construct(ompi_list_item_t *item) { - item->lam_list_next = item->lam_list_prev = NULL; - item->lam_list_type = 0; + item->ompi_list_next = item->ompi_list_prev = NULL; + item->ompi_list_type = 0; } -static void lam_list_item_destruct(lam_list_item_t *item) +static void ompi_list_item_destruct(ompi_list_item_t *item) { } /* * - * lam_list_list_t interface + * ompi_list_list_t interface * */ -static void lam_list_construct(lam_list_t *list) +static void ompi_list_construct(ompi_list_t *list) { - list->lam_list_head.lam_list_prev = NULL; - list->lam_list_head.lam_list_next = &list->lam_list_tail; - list->lam_list_tail.lam_list_prev = &list->lam_list_head; - list->lam_list_tail.lam_list_next = NULL; - list->lam_list_type = 0; - list->lam_list_length = 0; + list->ompi_list_head.ompi_list_prev = NULL; + list->ompi_list_head.ompi_list_next = &list->ompi_list_tail; + list->ompi_list_tail.ompi_list_prev = &list->ompi_list_head; + list->ompi_list_tail.ompi_list_next = NULL; + list->ompi_list_type = 0; + list->ompi_list_length = 0; } -static void lam_list_destruct(lam_list_t *list) +static void ompi_list_destruct(ompi_list_t *list) { /* release all items in list */ - lam_list_construct(list); + ompi_list_construct(list); } -int lam_list_insert(lam_list_t *list, lam_list_item_t *item, long long idx) +int ompi_list_insert(ompi_list_t *list, ompi_list_item_t *item, long long idx) { /* Adds item to list at index and retains item. */ int i; - volatile lam_list_item_t *ptr, *next; + volatile ompi_list_item_t *ptr, *next; - if ( idx >= list->lam_list_length ) + if ( idx >= list->ompi_list_length ) return 0; if ( 0 == idx ) { - lam_list_prepend(list, item); + ompi_list_prepend(list, item); } else { /* pointer to element 0 */ - ptr = list->lam_list_head.lam_list_next; + ptr = list->ompi_list_head.ompi_list_next; for ( i = 0; i < idx-1; i++ ) - ptr = ptr->lam_list_next; + ptr = ptr->ompi_list_next; - next = ptr->lam_list_next; - item->lam_list_next = next; - item->lam_list_prev = ptr; - next->lam_list_prev = item; - ptr->lam_list_next = item; + next = ptr->ompi_list_next; + item->ompi_list_next = next; + item->ompi_list_prev = ptr; + next->ompi_list_prev = item; + ptr->ompi_list_next = item; } - list->lam_list_length++; + list->ompi_list_length++; return 1; } diff --git a/src/lfc/lam_list.h b/src/lfc/lam_list.h index 54d93274b1..0fc11d3a2d 100644 --- a/src/lfc/lam_list.h +++ b/src/lfc/lam_list.h @@ -2,11 +2,11 @@ * $HEADER$ */ -#ifndef LAM_LIST_H -#define LAM_LIST_H +#ifndef OMPI_LIST_H +#define OMPI_LIST_H #include -#include "lfc/lam_object.h" +#include "class/ompi_object.h" /* * @@ -14,102 +14,102 @@ * */ -extern lam_class_t lam_list_item_t_class; -extern lam_class_t lam_list_t_class; -typedef int lam_list_type_t; +extern ompi_class_t ompi_list_item_t_class; +extern ompi_class_t ompi_list_t_class; +typedef int ompi_list_type_t; /* * - * lam_dbl_item_t interface + * ompi_dbl_item_t interface * */ -typedef struct lam_list_item +typedef struct ompi_list_item { - lam_object_t super; - lam_list_type_t lam_list_type; - volatile struct lam_list_item *lam_list_next; - volatile struct lam_list_item *lam_list_prev; -} lam_list_item_t; + ompi_object_t super; + ompi_list_type_t ompi_list_type; + volatile struct ompi_list_item *ompi_list_next; + volatile struct ompi_list_item *ompi_list_prev; +} ompi_list_item_t; -#define lam_list_get_next(item) \ - ((item) ? ((lam_list_item_t*) ((lam_list_item_t*)(item))->lam_list_next) : NULL) +#define ompi_list_get_next(item) \ + ((item) ? ((ompi_list_item_t*) ((ompi_list_item_t*)(item))->ompi_list_next) : NULL) -#define lam_list_get_prev(item) \ - ((item) ? ((lam_list_item_t*) ((lam_list_item_t*)(item))->lam_list_prev) : NULL) +#define ompi_list_get_prev(item) \ + ((item) ? ((ompi_list_item_t*) ((ompi_list_item_t*)(item))->ompi_list_prev) : NULL) /* * - * lam_list_list_t interface + * ompi_list_list_t interface * */ -typedef struct lam_list +typedef struct ompi_list { - lam_object_t super; - lam_list_item_t lam_list_head; - lam_list_item_t lam_list_tail; - lam_list_type_t lam_list_type; - volatile size_t lam_list_length; -} lam_list_t; + ompi_object_t super; + ompi_list_item_t ompi_list_head; + ompi_list_item_t ompi_list_tail; + ompi_list_type_t ompi_list_type; + volatile size_t ompi_list_length; +} ompi_list_t; /* * Inlined accessor functions */ -static inline lam_list_type_t lam_list_get_type(lam_list_t* list) +static inline ompi_list_type_t ompi_list_get_type(ompi_list_t* list) { - return list->lam_list_type; + return list->ompi_list_type; } -static inline void lam_list_set_type(lam_list_t* list, lam_list_type_t type) +static inline void ompi_list_set_type(ompi_list_t* list, ompi_list_type_t type) { - list->lam_list_type = type; + list->ompi_list_type = type; } -static inline size_t lam_list_get_size(lam_list_t* list) +static inline size_t ompi_list_get_size(ompi_list_t* list) { - return list->lam_list_length; + return list->ompi_list_length; } -static inline void lam_list_set_size(lam_list_t* list, size_t size) +static inline void ompi_list_set_size(ompi_list_t* list, size_t size) { - list->lam_list_length=size; + list->ompi_list_length=size; } /* * Returns first item on list, but does not remove it from the list. */ -static inline lam_list_item_t* lam_list_get_first(lam_list_t* list) +static inline ompi_list_item_t* ompi_list_get_first(ompi_list_t* list) { - return (lam_list_item_t *)list->lam_list_head.lam_list_next; + return (ompi_list_item_t *)list->ompi_list_head.ompi_list_next; } /* * Returns last item on list, but does not remove it from the list. */ -static inline lam_list_item_t* lam_list_get_last(lam_list_t* list) +static inline ompi_list_item_t* ompi_list_get_last(ompi_list_t* list) { - return (lam_list_item_t *)list->lam_list_tail.lam_list_prev; + return (ompi_list_item_t *)list->ompi_list_tail.ompi_list_prev; } /* * Returns beginning of list, an invalid list entry. */ -static inline lam_list_item_t* lam_list_get_begin(lam_list_t* list) +static inline ompi_list_item_t* ompi_list_get_begin(ompi_list_t* list) { - return &(list->lam_list_head); + return &(list->ompi_list_head); } /* * Returns end of list, an invalid list entry. */ -static inline lam_list_item_t* lam_list_get_end(lam_list_t* list) +static inline ompi_list_item_t* ompi_list_get_end(ompi_list_t* list) { - return &(list->lam_list_tail); + return &(list->ompi_list_tail); } /* @@ -117,43 +117,43 @@ static inline lam_list_item_t* lam_list_get_end(lam_list_t* list) * pointing to item, so that a loop traversing the list from the * top of the list down can proceed. */ -static inline lam_list_item_t *lam_list_remove_item - (lam_list_t *list, lam_list_item_t *item) +static inline ompi_list_item_t *ompi_list_remove_item + (ompi_list_t *list, ompi_list_item_t *item) { -#if LAM_ENABLE_DEBUG - lam_list_item_t *item_ptr; +#if OMPI_ENABLE_DEBUG + ompi_list_item_t *item_ptr; bool found; #endif -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG found = false; #endif -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG /* check to see that the item is in the list */ - for (item_ptr = lam_list_get_first(list); - item_ptr != lam_list_get_end(list); - item_ptr = (lam_list_item_t *)(item_ptr->lam_list_next)) { - if (item_ptr == (lam_list_item_t *) item) { + for (item_ptr = ompi_list_get_first(list); + item_ptr != ompi_list_get_end(list); + item_ptr = (ompi_list_item_t *)(item_ptr->ompi_list_next)) { + if (item_ptr == (ompi_list_item_t *) item) { found = true; break; } } if (!found) { - fprintf(stderr," Warning :: lam_list_remove_item - the item %p is not on the list %p \n",(void*) item, (void*) list); + fprintf(stderr," Warning :: ompi_list_remove_item - the item %p is not on the list %p \n",(void*) item, (void*) list); fflush(stderr); - return (lam_list_item_t *)NULL; + return (ompi_list_item_t *)NULL; } #endif /* reset next pointer of previous element */ - item->lam_list_prev->lam_list_next=item->lam_list_next; + item->ompi_list_prev->ompi_list_next=item->ompi_list_next; /* reset previous pointer of next element */ - item->lam_list_next->lam_list_prev=item->lam_list_prev; + item->ompi_list_next->ompi_list_prev=item->ompi_list_prev; - list->lam_list_length--; - return (lam_list_item_t *)item->lam_list_prev; + list->ompi_list_length--; + return (ompi_list_item_t *)item->ompi_list_prev; } #if defined(c_plusplus) || defined(__cplusplus) @@ -163,22 +163,22 @@ extern "C" { * Adds item to the end of the list but does not retain item. */ - static inline void lam_list_append(lam_list_t *list, lam_list_item_t *item) + static inline void ompi_list_append(ompi_list_t *list, ompi_list_item_t *item) { /* set new element's previous pointer */ - item->lam_list_prev=list->lam_list_tail.lam_list_prev; + item->ompi_list_prev=list->ompi_list_tail.ompi_list_prev; /* reset previous pointer on current last element */ - list->lam_list_tail.lam_list_prev->lam_list_next=item; + list->ompi_list_tail.ompi_list_prev->ompi_list_next=item; /* reset new element's next pointer */ - item->lam_list_next=&(list->lam_list_tail); + item->ompi_list_next=&(list->ompi_list_tail); /* reset the list's tail element previous pointer */ - list->lam_list_tail.lam_list_prev = item; + list->ompi_list_tail.ompi_list_prev = item; /* increment list element counter */ - list->lam_list_length++; + list->ompi_list_length++; } @@ -188,28 +188,28 @@ extern "C" { Example: if idx = 2 and list = item1->item2->item3->item4, then after insert, list = item1->item2->item->item3->item4 */ - int lam_list_insert(lam_list_t *list, lam_list_item_t *item, long long idx); + int ompi_list_insert(ompi_list_t *list, ompi_list_item_t *item, long long idx); /* * Adds item to the front of the list and retains item. */ - static inline void lam_list_prepend(lam_list_t *list, lam_list_item_t *item) + static inline void ompi_list_prepend(ompi_list_t *list, ompi_list_item_t *item) { /* reset item's next pointer */ - item->lam_list_next = list->lam_list_head.lam_list_next; + item->ompi_list_next = list->ompi_list_head.ompi_list_next; /* reset item's previous pointer */ - item->lam_list_prev = &(list->lam_list_head); + item->ompi_list_prev = &(list->ompi_list_head); /* reset previous first element's previous poiner */ - list->lam_list_head.lam_list_next->lam_list_prev = item; + list->ompi_list_head.ompi_list_next->ompi_list_prev = item; /* reset head's next pointer */ - list->lam_list_head.lam_list_next = item; + list->ompi_list_head.ompi_list_next = item; /* increment list element counter */ - list->lam_list_length++; + list->ompi_list_length++; } @@ -217,70 +217,70 @@ extern "C" { /* * Removes and returns first item on list. */ - static inline lam_list_item_t *lam_list_remove_first(lam_list_t *list) + static inline ompi_list_item_t *ompi_list_remove_first(ompi_list_t *list) { /* Removes and returns first item on list. Caller now owns the item and should release the item when caller is done with it. */ - volatile lam_list_item_t *item; - if ( 0 == list->lam_list_length ) - return (lam_list_item_t *)NULL; + volatile ompi_list_item_t *item; + if ( 0 == list->ompi_list_length ) + return (ompi_list_item_t *)NULL; /* reset list length counter */ - list->lam_list_length--; + list->ompi_list_length--; /* get pointer to first element on the list */ - item = list->lam_list_head.lam_list_next; + item = list->ompi_list_head.ompi_list_next; /* reset previous pointer of next item on the list */ - item->lam_list_next->lam_list_prev=item->lam_list_prev; + item->ompi_list_next->ompi_list_prev=item->ompi_list_prev; /* reset the head next pointer */ - list->lam_list_head.lam_list_next=item->lam_list_next; + list->ompi_list_head.ompi_list_next=item->ompi_list_next; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG /* debug code */ - item->lam_list_prev=(lam_list_item_t *)NULL; - item->lam_list_next=(lam_list_item_t *)NULL; + item->ompi_list_prev=(ompi_list_item_t *)NULL; + item->ompi_list_next=(ompi_list_item_t *)NULL; #endif - return (lam_list_item_t *) item; + return (ompi_list_item_t *) item; } /* * Removes and returns last item on list. */ - static inline lam_list_item_t *lam_list_remove_last(lam_list_t *list) + static inline ompi_list_item_t *ompi_list_remove_last(ompi_list_t *list) { /* Removes, releases and returns last item on list. Caller now owns the item and should release the item when caller is done with it. */ - volatile lam_list_item_t *item; - if ( 0 == list->lam_list_length ) - return (lam_list_item_t *)NULL; + volatile ompi_list_item_t *item; + if ( 0 == list->ompi_list_length ) + return (ompi_list_item_t *)NULL; /* reset list length counter */ - list->lam_list_length--; + list->ompi_list_length--; /* get item */ - item = list->lam_list_tail.lam_list_prev; + item = list->ompi_list_tail.ompi_list_prev; /* reset previous pointer on next to last pointer */ - item->lam_list_prev->lam_list_next=item->lam_list_next; + item->ompi_list_prev->ompi_list_next=item->ompi_list_next; /* reset tail's previous pointer */ - list->lam_list_tail.lam_list_prev=item->lam_list_prev; + list->ompi_list_tail.ompi_list_prev=item->ompi_list_prev; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG /* debug code */ - item->lam_list_next = item->lam_list_prev = (lam_list_item_t *)NULL; + item->ompi_list_next = item->ompi_list_prev = (ompi_list_item_t *)NULL; #endif - return (lam_list_item_t *) item; + return (ompi_list_item_t *) item; } #if defined(c_plusplus) || defined(__cplusplus) } #endif -#endif /* LAM_LIST_H */ +#endif /* OMPI_LIST_H */ diff --git a/src/lfc/lam_object.c b/src/lfc/lam_object.c index 23e5af9e04..5fd5349ca4 100644 --- a/src/lfc/lam_object.c +++ b/src/lfc/lam_object.c @@ -5,21 +5,21 @@ /** * @file * - * Implementation of lam_object_t, the base lam foundation class + * Implementation of ompi_object_t, the base ompi foundation class */ #include #include "include/constants.h" -#include "lfc/lam_object.h" +#include "class/ompi_object.h" /* * Instantiation of class descriptor for the base class. This is * special, since be mark it as already initialized, with no parent * and no constructor or desctructor */ -lam_class_t lam_object_t_class = { - "lam_object_t", /* name */ +ompi_class_t ompi_object_t_class = { + "ompi_object_t", /* name */ NULL, /* parent class */ NULL, /* constructor */ NULL, /* destructor */ @@ -33,9 +33,9 @@ lam_class_t lam_object_t_class = { /* * Lazy initialization of class descriptor. */ -void lam_class_initialize(lam_class_t *class) +void ompi_class_initialize(ompi_class_t *class) { - lam_class_t *c; + ompi_class_t *c; int i; assert(class); @@ -55,13 +55,13 @@ void lam_class_initialize(lam_class_t *class) */ class->cls_construct_array = malloc(class->cls_depth * - sizeof(lam_construct_t)); + sizeof(ompi_construct_t)); if (NULL == class->cls_construct_array) { perror("Out of memory"); } class->cls_destruct_array = malloc(class->cls_depth * - sizeof(lam_destruct_t)); + sizeof(ompi_destruct_t)); if (NULL == class->cls_destruct_array) { perror("Out of memory"); } diff --git a/src/lfc/lam_object.h b/src/lfc/lam_object.h index 3f0edf8266..841c80ce5f 100644 --- a/src/lfc/lam_object.h +++ b/src/lfc/lam_object.h @@ -39,7 +39,7 @@ * @endcode * This macro actually expands to * @code - * lam_class_t sally_t_class = { + * ompi_class_t sally_t_class = { * "sally_t", * OBJ_CLASS(parent_t), // pointer to parent_t_class * sally_construct, @@ -97,14 +97,14 @@ * @endcode */ -#ifndef LAM_OBJECT_H -#define LAM_OBJECT_H +#ifndef OMPI_OBJECT_H +#define OMPI_OBJECT_H #include #include #ifdef HAVE_CONFIG_H -#include "lam_config.h" +#include "ompi_config.h" #endif /* @@ -146,11 +146,11 @@ * Put this in NAME.c */ #define OBJ_CLASS_INSTANCE(NAME, PARENT, CONSTRUCTOR, DESTRUCTOR) \ - lam_class_t NAME ## _class = { \ + ompi_class_t NAME ## _class = { \ # NAME, \ OBJ_CLASS(PARENT), \ - (lam_construct_t)CONSTRUCTOR, \ - (lam_destruct_t)DESTRUCTOR, \ + (ompi_construct_t)CONSTRUCTOR, \ + (ompi_destruct_t)DESTRUCTOR, \ 0, 0, NULL, NULL \ } @@ -163,7 +163,7 @@ * Put this in NAME.h */ #define OBJ_CLASS_DECLARATION(NAME) \ - extern lam_class_t NAME ## _class + extern ompi_class_t NAME ## _class /** @@ -174,7 +174,7 @@ * @return Pointer to the object */ #define OBJ_NEW(type) \ - ((type *) lam_obj_new(sizeof(type), OBJ_CLASS(type))) + ((type *) ompi_obj_new(sizeof(type), OBJ_CLASS(type))) /** @@ -185,11 +185,11 @@ #define OBJ_RETAIN(object) \ do { \ assert(NULL != object); \ - assert(NULL != ((lam_object_t *) (object))->obj_class); \ + assert(NULL != ((ompi_object_t *) (object))->obj_class); \ if (object) { \ - lam_obj_update((lam_object_t *) (object), 1); \ + ompi_obj_update((ompi_object_t *) (object), 1); \ } \ - assert(((lam_object_t *) (object))->obj_reference_count >= 0); \ + assert(((ompi_object_t *) (object))->obj_reference_count >= 0); \ } while (0) @@ -206,9 +206,9 @@ #define OBJ_RELEASE(object) \ do { \ assert(NULL != object); \ - assert(NULL != ((lam_object_t *) (object))->obj_class); \ - if (0 == lam_obj_update((lam_object_t *) (object), -1)) { \ - lam_obj_run_destructors((lam_object_t *) (object)); \ + assert(NULL != ((ompi_object_t *) (object))->obj_class); \ + if (0 == ompi_obj_update((ompi_object_t *) (object), -1)) { \ + ompi_obj_run_destructors((ompi_object_t *) (object)); \ free(object); \ object = NULL; \ } \ @@ -228,12 +228,12 @@ #define OBJ_CONSTRUCT_INTERNAL(object, type) \ do { \ if (0 == (type)->cls_initialized) { \ - lam_class_initialize((type)); \ + ompi_class_initialize((type)); \ } \ if (object) { \ - ((lam_object_t *) (object))->obj_class = (type); \ - ((lam_object_t *) (object))->obj_reference_count = 1; \ - lam_obj_run_constructors((lam_object_t *) (object)); \ + ((ompi_object_t *) (object))->obj_class = (type); \ + ((ompi_object_t *) (object))->obj_reference_count = 1; \ + ompi_obj_run_constructors((ompi_object_t *) (object)); \ } \ } while (0) @@ -246,17 +246,17 @@ #define OBJ_DESTRUCT(object) \ do { \ if (object) { \ - lam_obj_run_destructors((lam_object_t *) (object)); \ + ompi_obj_run_destructors((ompi_object_t *) (object)); \ } \ } while (0) /* typedefs ***********************************************************/ -typedef struct lam_object_t lam_object_t; -typedef struct lam_class_t lam_class_t; -typedef void (*lam_construct_t) (lam_object_t *); -typedef void (*lam_destruct_t) (lam_object_t *); +typedef struct ompi_object_t ompi_object_t; +typedef struct ompi_class_t ompi_class_t; +typedef void (*ompi_construct_t) (ompi_object_t *); +typedef void (*ompi_destruct_t) (ompi_object_t *); /* types **************************************************************/ @@ -267,16 +267,16 @@ typedef void (*lam_destruct_t) (lam_object_t *); * There should be a single instance of this descriptor for each class * definition. */ -struct lam_class_t { +struct ompi_class_t { const char *cls_name; /**< symbolic name for class */ - lam_class_t *cls_parent; /**< parent class descriptor */ - lam_construct_t cls_construct; /**< class constructor */ - lam_destruct_t cls_destruct; /**< class destructor */ + ompi_class_t *cls_parent; /**< parent class descriptor */ + ompi_construct_t cls_construct; /**< class constructor */ + ompi_destruct_t cls_destruct; /**< class destructor */ int cls_initialized; /**< is class initialized */ int cls_depth; /**< depth of class hierarchy tree */ - lam_construct_t *cls_construct_array; + ompi_construct_t *cls_construct_array; /**< array of parent class constructors */ - lam_destruct_t *cls_destruct_array; + ompi_destruct_t *cls_destruct_array; /**< array of parent class destructors */ }; @@ -286,12 +286,12 @@ struct lam_class_t { * * This is special and does not follow the pattern for other classes. */ -struct lam_object_t { - lam_class_t *obj_class; /**< class descriptor */ +struct ompi_object_t { + ompi_class_t *obj_class; /**< class descriptor */ int obj_reference_count; /**< reference count */ }; -OBJ_CLASS_DECLARATION(lam_object_t); +OBJ_CLASS_DECLARATION(ompi_object_t); /* declarations *******************************************************/ @@ -306,7 +306,7 @@ BEGIN_C_DECLS * * @param class Pointer to class descriptor */ -void lam_class_initialize(lam_class_t *); +void ompi_class_initialize(ompi_class_t *); END_C_DECLS @@ -322,9 +322,9 @@ END_C_DECLS * Hardwired for fairly shallow inheritance trees * @param size Pointer to the object. */ -static inline void lam_obj_run_constructors(lam_object_t *object) +static inline void ompi_obj_run_constructors(ompi_object_t *object) { - lam_class_t *cls; + ompi_class_t *cls; int i; assert(NULL != object); @@ -347,9 +347,9 @@ static inline void lam_obj_run_constructors(lam_object_t *object) * * @param size Pointer to the object. */ -static inline void lam_obj_run_destructors(lam_object_t *object) +static inline void ompi_obj_run_destructors(ompi_object_t *object) { - lam_class_t *cls; + ompi_class_t *cls; int i; assert(NULL != object); @@ -374,26 +374,26 @@ static inline void lam_obj_run_destructors(lam_object_t *object) * @param cls Pointer to the class descriptor of this object * @return Pointer to the object */ -static inline lam_object_t *lam_obj_new(size_t size, lam_class_t *cls) +static inline ompi_object_t *ompi_obj_new(size_t size, ompi_class_t *cls) { - lam_object_t *object; + ompi_object_t *object; - assert(size >= sizeof(lam_object_t)); + assert(size >= sizeof(ompi_object_t)); - object = (lam_object_t *) malloc(size); + object = (ompi_object_t *) malloc(size); if (0 == cls->cls_initialized) { - lam_class_initialize(cls); + ompi_class_initialize(cls); } if (NULL != object) { object->obj_class = cls; object->obj_reference_count = 1; - lam_obj_run_constructors(object); + ompi_obj_run_constructors(object); } return object; } -static inline int lam_atomic_cmpset_int(int *addr, int oldval, int newval) +static inline int ompi_atomic_cmpset_int(int *addr, int oldval, int newval) { *addr = newval; return 1; @@ -409,7 +409,7 @@ static inline int lam_atomic_cmpset_int(int *addr, int oldval, int newval) * @param inc Increment by which to update reference count * @return New value of the reference count */ -static inline int lam_obj_update(lam_object_t *object, int inc) +static inline int ompi_obj_update(ompi_object_t *object, int inc) { int oldval; int newval; @@ -419,11 +419,11 @@ static inline int lam_obj_update(lam_object_t *object, int inc) do { oldval = *addr; newval = oldval + inc; - } while (lam_atomic_cmpset_int(addr, oldval, newval) == 0); + } while (ompi_atomic_cmpset_int(addr, oldval, newval) == 0); return newval; } /**********************************************************************/ -#endif /* LAM_OBJECT_H */ +#endif /* OMPI_OBJECT_H */ diff --git a/src/lfc/lam_pointer_array.c b/src/lfc/lam_pointer_array.c index 261dde7f88..fd21598518 100644 --- a/src/lfc/lam_pointer_array.c +++ b/src/lfc/lam_pointer_array.c @@ -12,26 +12,26 @@ #include #include "include/constants.h" -#include "lfc/lam_pointer_array.h" +#include "class/ompi_pointer_array.h" #include "util/output.h" -static void lam_pointer_array_construct(lam_pointer_array_t *); -static void lam_pointer_array_destruct(lam_pointer_array_t *); +static void ompi_pointer_array_construct(ompi_pointer_array_t *); +static void ompi_pointer_array_destruct(ompi_pointer_array_t *); enum { TABLE_INIT = 1, TABLE_GROW = 2 }; -lam_class_t lam_pointer_array_t_class = { - "lam_pointer_array_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t) lam_pointer_array_construct, - (lam_destruct_t) lam_pointer_array_destruct +ompi_class_t ompi_pointer_array_t_class = { + "ompi_pointer_array_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t) ompi_pointer_array_construct, + (ompi_destruct_t) ompi_pointer_array_destruct }; /** - * lam_pointer_array constructor + * ompi_pointer_array constructor */ -void lam_pointer_array_construct(lam_pointer_array_t *array) +void ompi_pointer_array_construct(ompi_pointer_array_t *array) { - OBJ_CONSTRUCT(&array->lock, lam_mutex_t); + OBJ_CONSTRUCT(&array->lock, ompi_mutex_t); array->lowest_free = 0; array->number_free = 0; array->size = 0; @@ -39,9 +39,9 @@ void lam_pointer_array_construct(lam_pointer_array_t *array) } /** - * lam_pointer_array destructor + * ompi_pointer_array destructor */ -void lam_pointer_array_destruct(lam_pointer_array_t *array){ +void ompi_pointer_array_destruct(ompi_pointer_array_t *array){ /* free table */ if( NULL != array->addr) @@ -54,19 +54,19 @@ void lam_pointer_array_destruct(lam_pointer_array_t *array){ /** * add a pointer to dynamic pointer table * - * @param table Pointer to lam_pointer_array_t object (IN) + * @param table Pointer to ompi_pointer_array_t object (IN) * @param ptr Pointer to be added to table (IN) * - * @return Array index where ptr is inserted or LAM_ERROR if it fails + * @return Array index where ptr is inserted or OMPI_ERROR if it fails */ -size_t lam_pointer_array_add(lam_pointer_array_t *table, void *ptr) +size_t ompi_pointer_array_add(ompi_pointer_array_t *table, void *ptr) { void **p; int i; size_t index; if (0) { - lam_output(0,"lam_pointer_array_add: IN: " + ompi_output(0,"ompi_pointer_array_add: IN: " " table %p (size %ld, lowest free %ld, number free %ld)" " ptr = %p\n", table, table->size, table->lowest_free, table->number_free, @@ -84,13 +84,13 @@ size_t lam_pointer_array_add(lam_pointer_array_t *table, void *ptr) */ if (0) { - lam_output(0,"lam_pointer_array_add: INIT: table %p\n", table); + ompi_output(0,"ompi_pointer_array_add: INIT: table %p\n", table); } p = malloc(TABLE_INIT * sizeof(void *)); if (p == NULL) { THREAD_UNLOCK(&(table->lock)); - return LAM_ERROR; + return OMPI_ERROR; } table->lowest_free = 0; table->number_free = TABLE_INIT; @@ -107,14 +107,14 @@ size_t lam_pointer_array_add(lam_pointer_array_t *table, void *ptr) */ if (0) { - lam_output(0,"lam_pointer_array_add: GROW: table %p growing %d -> %d\n", + ompi_output(0,"ompi_pointer_array_add: GROW: table %p growing %d -> %d\n", table, table->size, table->size * TABLE_GROW); } p = realloc(table->addr, TABLE_GROW * table->size * sizeof(void *)); if (p == NULL) { THREAD_UNLOCK(&(table->lock)); - return LAM_ERROR; + return OMPI_ERROR; } table->lowest_free = table->size; table->number_free = (TABLE_GROW - 1) * table->size; @@ -153,7 +153,7 @@ size_t lam_pointer_array_add(lam_pointer_array_t *table, void *ptr) } if (0) { - lam_output(0,"lam_pointer_array_add: OUT: " + ompi_output(0,"ompi_pointer_array_add: OUT: " " table %p (size %ld, lowest free %ld, number free %ld)" " addr[%d] = %p\n", table, table->size, table->lowest_free, table->number_free, @@ -169,20 +169,20 @@ size_t lam_pointer_array_add(lam_pointer_array_t *table, void *ptr) * free a slot in dynamic pointer table for reuse * * - * @param table Pointer to lam_pointer_array_t object (IN) + * @param table Pointer to ompi_pointer_array_t object (IN) * @param ptr Pointer to be added to table (IN) * * @return Error code * * Assumption: NULL element is free element. */ -int lam_pointer_array_set_item(lam_pointer_array_t *table, size_t index, +int ompi_pointer_array_set_item(ompi_pointer_array_t *table, size_t index, void * value) { assert(table != NULL); #if 0 - lam_output(0,"lam_pointer_array_set_item: IN: " + ompi_output(0,"ompi_pointer_array_set_item: IN: " " table %p (size %ld, lowest free %ld, number free %ld)" " addr[%d] = %p\n", table, table->size, table->lowest_free, table->number_free, @@ -196,7 +196,7 @@ int lam_pointer_array_set_item(lam_pointer_array_t *table, size_t index, void *p = realloc(table->addr, new_size * sizeof(void *)); if (p == NULL) { THREAD_UNLOCK(&(table->lock)); - return LAM_ERROR; + return OMPI_ERROR; } table->number_free += new_size - table->size; table->addr = p; @@ -219,7 +219,7 @@ int lam_pointer_array_set_item(lam_pointer_array_t *table, size_t index, } #if 0 - lam_output(0,"lam_pointer_array_set_item: OUT: " + ompi_output(0,"ompi_pointer_array_set_item: OUT: " " table %p (size %ld, lowest free %ld, number free %ld)" " addr[%d] = %p\n", table, table->size, table->lowest_free, table->number_free, @@ -227,7 +227,7 @@ int lam_pointer_array_set_item(lam_pointer_array_t *table, size_t index, #endif THREAD_UNLOCK(&(table->lock)); - return LAM_SUCCESS; + return OMPI_SUCCESS; } /** @@ -244,7 +244,7 @@ int lam_pointer_array_set_item(lam_pointer_array_t *table, size_t index, * In contrary to array_set, this function does not allow to overwrite * a value, unless the previous value is NULL ( equiv. to free ). */ -int lam_pointer_array_test_and_set_item (lam_pointer_array_t *table, size_t index, +int ompi_pointer_array_test_and_set_item (ompi_pointer_array_t *table, size_t index, void *value) { int flag=true; @@ -253,7 +253,7 @@ int lam_pointer_array_test_and_set_item (lam_pointer_array_t *table, size_t inde assert(index >= 0); #if 0 - lam_output(0,"lam_pointer_array_test_and_set_item: IN: " + ompi_output(0,"ompi_pointer_array_test_and_set_item: IN: " " table %p (size %ld, lowest free %ld, number free %ld)" " addr[%d] = %p\n", table, table->size, table->lowest_free, table->number_free, @@ -274,7 +274,7 @@ int lam_pointer_array_test_and_set_item (lam_pointer_array_t *table, size_t inde void *p = realloc(table->addr, new_size * sizeof(void *)); if (p == NULL) { THREAD_UNLOCK(&(table->lock)); - return LAM_ERROR; + return OMPI_ERROR; } table->number_free += new_size - table->size; table->addr = p; @@ -290,7 +290,7 @@ int lam_pointer_array_test_and_set_item (lam_pointer_array_t *table, size_t inde table->addr[index] = value; #if 0 - lam_output(0,"lam_pointer_array_test_and_set_item: OUT: " + ompi_output(0,"ompi_pointer_array_test_and_set_item: OUT: " " table %p (size %ld, lowest free %ld, number free %ld)" " addr[%d] = %p\n", table, table->size, table->lowest_free, table->number_free, diff --git a/src/lfc/lam_pointer_array.h b/src/lfc/lam_pointer_array.h index 042f5b582f..86d86d9956 100644 --- a/src/lfc/lam_pointer_array.h +++ b/src/lfc/lam_pointer_array.h @@ -2,26 +2,26 @@ * $HEADER$ */ -#ifndef LAM_POINTER_ARRAY_H -#define LAM_POINTER_ARRAY_H +#ifndef OMPI_POINTER_ARRAY_H +#define OMPI_POINTER_ARRAY_H #include "threads/mutex.h" -#include "lfc/lam_object.h" +#include "class/ompi_object.h" /* * typedefs */ -typedef struct lam_pointer_array_t lam_pointer_array_t; -extern lam_class_t lam_pointer_array_t_class; +typedef struct ompi_pointer_array_t ompi_pointer_array_t; +extern ompi_class_t ompi_pointer_array_t_class; /* * dynamic pointer array */ -struct lam_pointer_array_t { +struct ompi_pointer_array_t { /* base class */ - lam_object_t super; + ompi_object_t super; /* synchronization object */ - lam_mutex_t lock; + ompi_mutex_t lock; /* index of lowest free element */ size_t lowest_free; /* number of fee elements in the list */ @@ -42,7 +42,7 @@ struct lam_pointer_array_t { * @return Index of inserted array element. Return value of * (size_t)(-1) indicates an error. */ -size_t lam_pointer_array_add(lam_pointer_array_t *array, void *ptr); +size_t ompi_pointer_array_add(ompi_pointer_array_t *array, void *ptr); /** * Set the value of an element in array @@ -53,7 +53,7 @@ size_t lam_pointer_array_add(lam_pointer_array_t *array, void *ptr); * * @return Error code. (-1) indicates an error. */ -int lam_pointer_array_set_item(lam_pointer_array_t *array, +int ompi_pointer_array_set_item(ompi_pointer_array_t *array, size_t index, void *value); /** @@ -65,7 +65,7 @@ int lam_pointer_array_set_item(lam_pointer_array_t *array, * @return Error code. NULL indicates an error. */ -static inline void *lam_pointer_array_get_item(lam_pointer_array_t *table, size_t index) +static inline void *ompi_pointer_array_get_item(ompi_pointer_array_t *table, size_t index) { void *p; THREAD_LOCK(&(table->lock)); @@ -85,7 +85,7 @@ static inline void *lam_pointer_array_get_item(lam_pointer_array_t *table, size_ * Simple inline function to return the size of the array in order to * hide the member field from external users. */ -static inline size_t lam_pointer_array_get_size(lam_pointer_array_t *array) +static inline size_t ompi_pointer_array_get_size(ompi_pointer_array_t *array) { return array->size; } @@ -104,7 +104,7 @@ static inline size_t lam_pointer_array_get_size(lam_pointer_array_t *array) * In contrary to array_set, this function does not allow to overwrite * a value, unless the previous value is NULL ( equiv. to free ). */ -int lam_pointer_array_test_and_set_item (lam_pointer_array_t *table, size_t index, +int ompi_pointer_array_test_and_set_item (ompi_pointer_array_t *table, size_t index, void *value); -#endif /* LAM_POINTER_ARRAY_H */ +#endif /* OMPI_POINTER_ARRAY_H */ diff --git a/src/lfc/lam_value_array.c b/src/lfc/lam_value_array.c index ae3dc1cdbc..cf899a8638 100644 --- a/src/lfc/lam_value_array.c +++ b/src/lfc/lam_value_array.c @@ -2,10 +2,10 @@ * $HEADER$ */ -#include "lfc/lam_value_array.h" +#include "class/ompi_value_array.h" -static void lam_value_array_construct(lam_value_array_t* array) +static void ompi_value_array_construct(ompi_value_array_t* array) { array->array_items = NULL; array->array_size = 0; @@ -13,26 +13,26 @@ static void lam_value_array_construct(lam_value_array_t* array) array->array_alloc_size = 0; } -static void lam_value_array_destruct(lam_value_array_t* array) +static void ompi_value_array_destruct(ompi_value_array_t* array) { if (NULL != array->array_items) free(array->array_items); } -lam_class_t lam_value_array_t_class = { - "lam_value_array_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t)lam_value_array_construct, - (lam_destruct_t)lam_value_array_destruct +ompi_class_t ompi_value_array_t_class = { + "ompi_value_array_t", + OBJ_CLASS(ompi_object_t), + (ompi_construct_t)ompi_value_array_construct, + (ompi_destruct_t)ompi_value_array_destruct }; -int lam_value_array_set_size(lam_value_array_t* array, size_t size) +int ompi_value_array_set_size(ompi_value_array_t* array, size_t size) { -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(array->array_item_sizeof == 0) { - lam_output(0, "lam_value_array_set_size: item size must be initialized"); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_value_array_set_size: item size must be initialized"); + return OMPI_ERR_BAD_PARAM; } #endif @@ -42,9 +42,9 @@ int lam_value_array_set_size(lam_value_array_t* array, size_t size) array->array_items = realloc(array->array_items, array->array_alloc_size * array->array_item_sizeof); if (NULL == array->array_items) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } array->array_size = size; - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/lfc/lam_value_array.h b/src/lfc/lam_value_array.h index bb331743d9..9abcf4da79 100644 --- a/src/lfc/lam_value_array.h +++ b/src/lfc/lam_value_array.h @@ -2,15 +2,15 @@ * $HEADER$ */ -#ifndef LAM_VALUE_ARRAY_H -#define LAM_VALUE_ARRAY_H +#ifndef OMPI_VALUE_ARRAY_H +#define OMPI_VALUE_ARRAY_H #include -#include "lam_config.h" +#include "ompi_config.h" #include "include/constants.h" #include "include/types.h" -#include "lfc/lam_object.h" -#if LAM_ENABLE_DEBUG +#include "class/ompi_object.h" +#if OMPI_ENABLE_DEBUG #include "util/output.h" #endif @@ -18,18 +18,18 @@ * @file Array of elements maintained by value. */ -extern lam_class_t lam_value_array_t_class; +extern ompi_class_t ompi_value_array_t_class; -struct lam_value_array_t +struct ompi_value_array_t { - lam_object_t super; + ompi_object_t super; unsigned char* array_items; size_t array_item_sizeof; size_t array_size; size_t array_alloc_size; }; -typedef struct lam_value_array_t lam_value_array_t; +typedef struct ompi_value_array_t ompi_value_array_t; #if defined(c_plusplus) || defined(__cplusplus) @@ -42,20 +42,20 @@ extern "C" { * * @param array The array to initialize (IN). * @param item_size The sizeof each array element (IN). - * @return LAM error code + * @return OMPI error code * * Note that there is no corresponding "finalize" function -- use * OBJ_DESTRUCT (for stack arrays) or OBJ_RELEASE (for heap arrays) to * delete it. */ -static inline int lam_value_array_init(lam_value_array_t *array, size_t item_sizeof) +static inline int ompi_value_array_init(ompi_value_array_t *array, size_t item_sizeof) { array->array_item_sizeof = item_sizeof; array->array_alloc_size = 1; array->array_size = 0; array->array_items = (unsigned char*)realloc(array->array_items, item_sizeof * array->array_alloc_size); - return (NULL != array->array_items) ? LAM_SUCCESS : LAM_ERR_OUT_OF_RESOURCE; + return (NULL != array->array_items) ? OMPI_SUCCESS : OMPI_ERR_OUT_OF_RESOURCE; } @@ -64,21 +64,21 @@ static inline int lam_value_array_init(lam_value_array_t *array, size_t item_siz * * @param array The input array (IN). * @param size The anticipated size of the array (IN). - * @return LAM error code. + * @return OMPI error code. */ -static inline int lam_value_array_reserve(lam_value_array_t* array, size_t size) +static inline int ompi_value_array_reserve(ompi_value_array_t* array, size_t size) { if(size > array->array_alloc_size) { array->array_items = (unsigned char*)realloc(array->array_items, array->array_item_sizeof * size); if(NULL == array->array_items) { array->array_size = 0; array->array_alloc_size = 0; - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } array->array_alloc_size = 1; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -90,7 +90,7 @@ static inline int lam_value_array_reserve(lam_value_array_t* array, size_t size) * @return The number of elements currently in use. */ -static inline size_t lam_value_array_get_size(lam_value_array_t* array) +static inline size_t ompi_value_array_get_size(ompi_value_array_t* array) { return array->array_size; } @@ -102,16 +102,16 @@ static inline size_t lam_value_array_get_size(lam_value_array_t* array) * @param array The input array (IN). * @param size The new array size. * - * @return LAM error code. + * @return OMPI error code. * * Note that resizing the array to a smaller size may not change * the underlying memory allocated by the array. However, setting * the size larger than the current allocation will grow it. In either - * case, if the routine is successful, lam_value_array_get_size() will + * case, if the routine is successful, ompi_value_array_get_size() will * return the new size. */ -int lam_value_array_set_size(lam_value_array_t* array, size_t size); +int ompi_value_array_set_size(ompi_value_array_t* array, size_t size); /** @@ -128,7 +128,7 @@ int lam_value_array_set_size(lam_value_array_t* array, size_t size); * ensuring the array index is valid (0 <= item index < array size). */ -#define LAM_VALUE_ARRAY_GET_ITEM(array, item_type, item_index) \ +#define OMPI_VALUE_ARRAY_GET_ITEM(array, item_type, item_index) \ ((item_type*)((array)->array_items))[item_index] /** @@ -143,9 +143,9 @@ int lam_value_array_set_size(lam_value_array_t* array, size_t size); * array size, the array is grown to satisfy the request. */ -static inline void* lam_value_array_get_item(lam_value_array_t *array, size_t index) +static inline void* ompi_value_array_get_item(ompi_value_array_t *array, size_t index) { - if(index >= array->array_size && lam_value_array_set_size(array, index+1) != LAM_SUCCESS) + if(index >= array->array_size && ompi_value_array_set_size(array, index+1) != OMPI_SUCCESS) return NULL; return array->array_items + (index * array->array_item_sizeof); } @@ -166,7 +166,7 @@ static inline void* lam_value_array_get_item(lam_value_array_t *array, size_t in * copied into the array by value. */ -#define LAM_VALUE_ARRAY_SET_ITEM(array, item_type, item_index, item_value) \ +#define OMPI_VALUE_ARRAY_SET_ITEM(array, item_type, item_index, item_value) \ (((item_type*)((array)->array_items))[item_index] = item_value) /** @@ -177,20 +177,20 @@ static inline void* lam_value_array_get_item(lam_value_array_t *array, size_t in * @param item_value A pointer to the item, which is copied into * the array. * - * @return LAM error code. + * @return OMPI error code. * * It is safe to free the item after returning from this call; it is * copied into the array by value. */ -static inline int lam_value_array_set_item(lam_value_array_t *array, size_t index, const void* item) +static inline int ompi_value_array_set_item(ompi_value_array_t *array, size_t index, const void* item) { int rc; if(index >= array->array_size && - (rc = lam_value_array_set_size(array, index+1)) != LAM_SUCCESS) + (rc = ompi_value_array_set_size(array, index+1)) != OMPI_SUCCESS) return rc; memcpy(array->array_items + (index * array->array_item_sizeof), item, array->array_item_sizeof); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -201,16 +201,16 @@ static inline int lam_value_array_set_item(lam_value_array_t *array, size_t inde * @param item A pointer to the item to append, which is copied * into the array. * - * @return LAM error code + * @return OMPI error code * * This will grow the array if it is not large enough to contain the * item. It is safe to free the item after returning from this call; * it is copied by value into the array. */ -static inline int lam_value_array_append_item(lam_value_array_t *array, const void *item) +static inline int ompi_value_array_append_item(ompi_value_array_t *array, const void *item) { - return lam_value_array_set_item(array, array->array_size, item); + return ompi_value_array_set_item(array, array->array_size, item); } @@ -221,24 +221,24 @@ static inline int lam_value_array_append_item(lam_value_array_t *array, const vo * @param index The index to remove, which must be less than * the current array size (IN). * - * @return LAM error code. + * @return OMPI error code. * * All elements following this index are shifted down. */ -static inline int lam_value_array_remove_item(lam_value_array_t *array, size_t index) +static inline int ompi_value_array_remove_item(ompi_value_array_t *array, size_t index) { -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if (index >= array->array_size) { - lam_output(0, "lam_value_array_remove_item: invalid index %d\n", index); - return LAM_ERR_BAD_PARAM; + ompi_output(0, "ompi_value_array_remove_item: invalid index %d\n", index); + return OMPI_ERR_BAD_PARAM; } #endif memmove(array->array_items+(array->array_item_sizeof * index), array->array_items+(array->array_item_sizeof * (index+1)), array->array_item_sizeof * (array->array_size - index - 1)); array->array_size--; - return LAM_SUCCESS; + return OMPI_SUCCESS; } /** @@ -252,12 +252,12 @@ static inline int lam_value_array_remove_item(lam_value_array_t *array, size_t i * This function is helpful when you need to iterate through an * entire array; simply get the base value of the array and use native * C to iterate through it manually. This can have better performance - * than looping over LAM_VALUE_ARRAY_GET_ITEM() and - * LAM_VALUE_ARRAY_SET_ITEM() because it will [potentially] reduce the + * than looping over OMPI_VALUE_ARRAY_GET_ITEM() and + * OMPI_VALUE_ARRAY_SET_ITEM() because it will [potentially] reduce the * number of pointer dereferences. */ -#define LAM_VALUE_ARRAY_GET_BASE(array, item_type) \ +#define OMPI_VALUE_ARRAY_GET_BASE(array, item_type) \ ((item_type*) ((array)->array_items)) #if defined(c_plusplus) || defined(__cplusplus) diff --git a/src/mca/Makefile.am b/src/mca/Makefile.am index 7d84877d15..a979f6ca6a 100644 --- a/src/mca/Makefile.am +++ b/src/mca/Makefile.am @@ -44,8 +44,8 @@ not_implemented_yet = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/base/Makefile.am b/src/mca/base/Makefile.am index 7f45b62cd7..551600af1b 100644 --- a/src/mca/base/Makefile.am +++ b/src/mca/base/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/config/Makefile.options -AM_CPPFLAGS = -DLAM_PKGLIBDIR=\"$(pkglibdir)\" +AM_CPPFLAGS = -DOMPI_PKGLIBDIR=\"$(pkglibdir)\" noinst_LTLIBRARIES = libmca_base.la @@ -35,8 +35,8 @@ libmca_base_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/base -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/base +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/base/base.h b/src/mca/base/base.h index a70646c0b4..1033e5d992 100644 --- a/src/mca/base/base.h +++ b/src/mca/base/base.h @@ -20,7 +20,7 @@ * Structure for making plain lists of modules */ struct mca_base_module_list_item_t { - lam_list_item_t super; + ompi_list_item_t super; const mca_base_module_t *mli_module; }; typedef struct mca_base_module_list_item_t mca_base_module_list_item_t; @@ -30,7 +30,7 @@ typedef struct mca_base_module_list_item_t mca_base_module_list_item_t; * Structure for making priority lists of modules */ struct mca_base_module_priority_list_item_t { - lam_list_item_t super; + ompi_list_item_t super; int mpli_priority; int mpli_thread_min, mpli_thread_max; @@ -70,8 +70,8 @@ extern "C" { /* mca_base_cmd_line.c */ - int mca_base_cmd_line_setup(lam_cmd_line_t *cmd); - int mca_base_cmd_line_process_args(lam_cmd_line_t *cmd); + int mca_base_cmd_line_setup(ompi_cmd_line_t *cmd); + int mca_base_cmd_line_process_args(ompi_cmd_line_t *cmd); int mca_base_cmd_line_process_arg(const char *param, const char *value); /* mca_base_module_compare.c */ @@ -85,7 +85,7 @@ extern "C" { int mca_base_module_find(const char *directory, const char *type, const mca_base_module_t *static_modules[], - lam_list_t *found_modules); + ompi_list_t *found_modules); /* mca_base_module_register.c */ @@ -104,11 +104,11 @@ extern "C" { int mca_base_modules_open(const char *type_name, int output_id, const mca_base_module_t **static_modules, - lam_list_t *modules_available); + ompi_list_t *modules_available); /* mca_base_modules_close.c */ - int mca_base_modules_close(int output_id, lam_list_t *modules_available, + int mca_base_modules_close(int output_id, ompi_list_t *modules_available, const mca_base_module_t *skip); diff --git a/src/mca/base/mca_base_close.c b/src/mca/base/mca_base_close.c index d21a8930b4..9668e2e8ce 100644 --- a/src/mca/base/mca_base_close.c +++ b/src/mca/base/mca_base_close.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "util/output.h" #include "mca/mca.h" @@ -28,5 +28,5 @@ int mca_base_close(void) /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/base/mca_base_cmd_line.c b/src/mca/base/mca_base_cmd_line.c index 98c54a35f3..87b6ca4e90 100644 --- a/src/mca/base/mca_base_cmd_line.c +++ b/src/mca/base/mca_base_cmd_line.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -25,9 +25,9 @@ static char **mca_value_argv = NULL; /* * Add -mca to the possible command line options list */ -int mca_base_cmd_line_setup(lam_cmd_line_t *cmd) +int mca_base_cmd_line_setup(ompi_cmd_line_t *cmd) { - return lam_cmd_line_make_opt(cmd, 'm', "mca", 2, + return ompi_cmd_line_make_opt(cmd, 'm', "mca", 2, "General mechanism to pass MCA parameters"); } @@ -35,7 +35,7 @@ int mca_base_cmd_line_setup(lam_cmd_line_t *cmd) /* * Look for and handle any -mca options on the command line */ -int mca_base_cmd_line_process_args(lam_cmd_line_t *cmd) +int mca_base_cmd_line_process_args(ompi_cmd_line_t *cmd) { int i, num_insts; char *buf = 0; @@ -43,37 +43,37 @@ int mca_base_cmd_line_process_args(lam_cmd_line_t *cmd) /* If no "-mca" parameters were given, just return */ - if (!lam_cmd_line_is_taken(cmd, "mca")) - return LAM_SUCCESS; + if (!ompi_cmd_line_is_taken(cmd, "mca")) + return OMPI_SUCCESS; /* Otherwise, assemble them into an argc/argv */ - num_insts = lam_cmd_line_get_ninsts(cmd, "mca"); + num_insts = ompi_cmd_line_get_ninsts(cmd, "mca"); for (i = 0; i < num_insts; ++i) - mca_base_cmd_line_process_arg(lam_cmd_line_get_param(cmd, "mca", i, 0), - lam_cmd_line_get_param(cmd, "mca", i, 1)); + mca_base_cmd_line_process_arg(ompi_cmd_line_get_param(cmd, "mca", i, 0), + ompi_cmd_line_get_param(cmd, "mca", i, 1)); /* Now put that argc/argv in the environment */ if (NULL == mca_param_argv) - return LAM_SUCCESS; + return OMPI_SUCCESS; /* Loop through all the -mca args that we've gotten and make env - vars of the form LAM_MPI_MCA_*=value. This is a memory leak, but + vars of the form OMPI_MPI_MCA_*=value. This is a memory leak, but that's how putenv works. :-( */ for (i = 0; NULL != mca_param_argv[i]; ++i) { buflen = strlen(mca_param_argv[i]) + strlen(mca_value_argv[i]) + 32; buf = malloc(buflen); if (NULL == buf) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; - snprintf(buf, buflen, "LAM_MPI_MCA_%s=%s", mca_param_argv[i], + snprintf(buf, buflen, "OMPI_MPI_MCA_%s=%s", mca_param_argv[i], mca_value_argv[i]); putenv(buf); } - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -99,15 +99,15 @@ int mca_base_cmd_line_process_arg(const char *param, const char *value) free(mca_value_argv[i]); mca_value_argv[i] = new_str; - return LAM_SUCCESS; + return OMPI_SUCCESS; } } /* If we didn't already have an value for the same param, save this one away */ - lam_argv_append(&mca_param_argc, &mca_param_argv, param); - lam_argv_append(&mca_value_argc, &mca_value_argv, value); + ompi_argv_append(&mca_param_argc, &mca_param_argv, param); + ompi_argv_append(&mca_value_argc, &mca_value_argv, value); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/base/mca_base_init_select_modules.c b/src/mca/base/mca_base_init_select_modules.c index a080eefd5e..c7c5408b84 100644 --- a/src/mca/base/mca_base_init_select_modules.c +++ b/src/mca/base/mca_base_init_select_modules.c @@ -2,12 +2,12 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include "include/constants.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/base/base.h" #include "mca/coll/coll.h" #include "mca/coll/base/base.h" @@ -29,7 +29,7 @@ int mca_base_init_select_modules(int requested, bool allow_multi_user_threads, bool have_hidden_threads, int *provided) { - lam_list_t colls; + ompi_list_t colls; bool user_threads, hidden_threads; /* Make final lists of available modules (i.e., call the query/init @@ -39,23 +39,23 @@ int mca_base_init_select_modules(int requested, /* JMS: At some point, we'll need to feed it the thread level to ensure to pick one high enough (e.g., if we need CR) */ - if (LAM_SUCCESS != mca_pml_base_select(&mca_pml, + if (OMPI_SUCCESS != mca_pml_base_select(&mca_pml, &user_threads, &hidden_threads)) { - return LAM_ERROR; + return OMPI_ERROR; } allow_multi_user_threads |= user_threads; have_hidden_threads |= hidden_threads; - if (LAM_SUCCESS != mca_ptl_base_select(&user_threads, &hidden_threads)) { - return LAM_ERROR; + if (OMPI_SUCCESS != mca_ptl_base_select(&user_threads, &hidden_threads)) { + return OMPI_ERROR; } allow_multi_user_threads |= user_threads; have_hidden_threads |= hidden_threads; - OBJ_CONSTRUCT(&colls, lam_list_t); - if (LAM_SUCCESS != mca_coll_base_select(&colls, &user_threads, + OBJ_CONSTRUCT(&colls, ompi_list_t); + if (OMPI_SUCCESS != mca_coll_base_select(&colls, &user_threads, &hidden_threads)) { - return LAM_ERROR; + return OMPI_ERROR; } allow_multi_user_threads |= user_threads; have_hidden_threads |= hidden_threads; @@ -66,7 +66,7 @@ int mca_base_init_select_modules(int requested, /* JMS ...Do more here with the thread level, etc.... */ *provided = requested; if(have_hidden_threads) - lam_set_using_threads(true); + ompi_set_using_threads(true); /* Tell the selected pml module about all the selected ptl modules */ @@ -75,6 +75,6 @@ int mca_base_init_select_modules(int requested, /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/base/mca_base_mem.c b/src/mca/base/mca_base_mem.c index b7f837a387..a0c338cb1f 100644 --- a/src/mca/base/mca_base_mem.c +++ b/src/mca/base/mca_base_mem.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -21,13 +21,13 @@ int mca_base_alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) if (0 == size) return MPI_SUCCESS; else if (size < 0) - return LAM_ERROR; + return OMPI_ERROR; /* Do the alloc */ temp = malloc(size); if (NULL == temp) - return LAM_ERROR; + return OMPI_ERROR; /* All done */ diff --git a/src/mca/base/mca_base_module_compare.c b/src/mca/base/mca_base_module_compare.c index 746e4eb266..be6aa4eedc 100644 --- a/src/mca/base/mca_base_module_compare.c +++ b/src/mca/base/mca_base_module_compare.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include diff --git a/src/mca/base/mca_base_module_exchange.c b/src/mca/base/mca_base_module_exchange.c index 7fcd65f360..709ba230b5 100644 --- a/src/mca/base/mca_base_module_exchange.c +++ b/src/mca/base/mca_base_module_exchange.c @@ -3,8 +3,8 @@ */ #include -#include "lam_config.h" -#include "lfc/lam_hash_table.h" +#include "ompi_config.h" +#include "class/ompi_hash_table.h" #include "util/output.h" #include "proc/proc.h" #include "mca/mca.h" @@ -21,7 +21,7 @@ */ struct mca_base_modex_module_t { - lam_list_item_t super; + ompi_list_item_t super; mca_base_module_t *module; void *module_data; size_t module_data_size; @@ -41,7 +41,7 @@ static void mca_base_modex_module_destruct(mca_base_modex_module_t *module) OBJ_CLASS_INSTANCE( mca_base_modex_module_t, - lam_list_item_t, + ompi_list_item_t, mca_base_modex_module_construct, mca_base_modex_module_destruct ); @@ -53,14 +53,14 @@ OBJ_CLASS_INSTANCE( * received from peers. */ struct mca_base_modex_t { - lam_object_t super; - lam_list_t modex_modules; + ompi_object_t super; + ompi_list_t modex_modules; }; typedef struct mca_base_modex_t mca_base_modex_t; static void mca_base_modex_construct(mca_base_modex_t* modex) { - OBJ_CONSTRUCT(&modex->modex_modules, lam_list_t); + OBJ_CONSTRUCT(&modex->modex_modules, ompi_list_t); } static void mca_base_modex_destruct(mca_base_modex_t* modex) @@ -70,7 +70,7 @@ static void mca_base_modex_destruct(mca_base_modex_t* modex) OBJ_CLASS_INSTANCE( mca_base_modex_t, - lam_object_t, + ompi_object_t, mca_base_modex_construct, mca_base_modex_destruct ); @@ -85,9 +85,9 @@ static inline mca_base_modex_module_t* mca_base_modex_lookup_module( mca_base_module_t* module) { mca_base_modex_module_t* modex_module; - for(modex_module = (mca_base_modex_module_t*)lam_list_get_first(&modex->modex_modules); - modex_module != (mca_base_modex_module_t*)lam_list_get_end(&modex->modex_modules); - modex_module = (mca_base_modex_module_t*)lam_list_get_next(modex_module)) { + for(modex_module = (mca_base_modex_module_t*)ompi_list_get_first(&modex->modex_modules); + modex_module != (mca_base_modex_module_t*)ompi_list_get_end(&modex->modex_modules); + modex_module = (mca_base_modex_module_t*)ompi_list_get_next(modex_module)) { if(mca_base_module_compare(modex_module->module, module) == 0) { return modex_module; } @@ -109,7 +109,7 @@ static inline mca_base_modex_module_t* mca_base_modex_create_module( modex_module = OBJ_NEW(mca_base_modex_module_t); if(NULL != modex_module) { modex_module->module = module; - lam_list_append(&modex->modex_modules, (lam_list_item_t*)modex_module); + ompi_list_append(&modex->modex_modules, (ompi_list_item_t*)modex_module); } } return modex_module; @@ -124,12 +124,12 @@ static inline mca_base_modex_module_t* mca_base_modex_create_module( int mca_base_modex_send(mca_base_module_t *source_module, const void *buffer, size_t size) { - lam_proc_t *self = lam_proc_local(); + ompi_proc_t *self = ompi_proc_local(); mca_base_modex_t* modex; mca_base_modex_module_t* modex_module; if(NULL == self) - return LAM_ERROR; + return OMPI_ERROR; THREAD_LOCK(&self->proc_lock); if(NULL == (modex = self->proc_modex)) { @@ -138,18 +138,18 @@ int mca_base_modex_send(mca_base_module_t *source_module, const void *buffer, si if(NULL == (modex_module = mca_base_modex_create_module(modex, source_module))) { THREAD_UNLOCK(&self->proc_lock); - return LAM_ERROR; + return OMPI_ERROR; } modex_module->module_data = malloc(size); if(NULL == modex_module->module_data) { THREAD_UNLOCK(&self->proc_lock); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } memcpy(modex_module->module_data, buffer, size); modex_module->module_data_size = size; THREAD_UNLOCK(&self->proc_lock); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -159,7 +159,7 @@ int mca_base_modex_send(mca_base_module_t *source_module, const void *buffer, si * mca_base_modex_exchange(). */ -int mca_base_modex_recv(mca_base_module_t *module, lam_proc_t *source_proc, void **buffer, size_t *size) +int mca_base_modex_recv(mca_base_module_t *module, ompi_proc_t *source_proc, void **buffer, size_t *size) { mca_base_modex_t* modex; mca_base_modex_module_t* modex_module; @@ -169,26 +169,26 @@ int mca_base_modex_recv(mca_base_module_t *module, lam_proc_t *source_proc, void if(NULL == (modex = source_proc->proc_modex) || NULL == (modex_module = mca_base_modex_lookup_module(modex, module))) { THREAD_UNLOCK(&source_proc->proc_lock); - return LAM_ERR_NOT_FOUND; + return OMPI_ERR_NOT_FOUND; } if(0 == modex_module->module_data_size) { *buffer = NULL; *size = 0; THREAD_UNLOCK(&source_proc->proc_lock); - return LAM_SUCCESS; + return OMPI_SUCCESS; } copy = malloc(modex_module->module_data_size); if(NULL == copy) { THREAD_UNLOCK(&source_proc->proc_lock); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } memcpy(copy, modex_module->module_data, modex_module->module_data_size); *buffer = copy; *size = modex_module->module_data_size; THREAD_UNLOCK(&source_proc->proc_lock); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -200,20 +200,20 @@ int mca_base_modex_recv(mca_base_module_t *module, lam_proc_t *source_proc, void int mca_base_modex_exchange(void) { - lam_proc_t *self = lam_proc_local(); + ompi_proc_t *self = ompi_proc_local(); mca_base_modex_t* modex; mca_base_modex_module_t* self_module; size_t nprocs; - lam_proc_t **procs = lam_proc_all(&nprocs); + ompi_proc_t **procs = ompi_proc_all(&nprocs); if(nprocs <= 1) { if(procs) free(procs); - return LAM_SUCCESS; + return OMPI_SUCCESS; } if(NULL == self) { free(procs); - return LAM_ERROR; + return OMPI_ERROR; } if(NULL == (modex = self->proc_modex)) { @@ -222,12 +222,12 @@ int mca_base_modex_exchange(void) /* loop through all modules with data cached on local process and send to all peers */ THREAD_LOCK(&self->proc_lock); - for(self_module = (mca_base_modex_module_t*)lam_list_get_first(&modex->modex_modules); - self_module != (mca_base_modex_module_t*)lam_list_get_end(&modex->modex_modules); - self_module = (mca_base_modex_module_t*)lam_list_get_next(self_module)) { + for(self_module = (mca_base_modex_module_t*)ompi_list_get_first(&modex->modex_modules); + self_module != (mca_base_modex_module_t*)ompi_list_get_end(&modex->modex_modules); + self_module = (mca_base_modex_module_t*)ompi_list_get_next(self_module)) { size_t i; for(i=0; imodule_data, self_module->module_data_size); - if(rc != LAM_SUCCESS) { + if(rc != OMPI_SUCCESS) { free(procs); THREAD_UNLOCK(&self->proc_lock); return rc; @@ -248,12 +248,12 @@ int mca_base_modex_exchange(void) } /* loop through the same modules and receive data from all peers */ - for(self_module = (mca_base_modex_module_t*)lam_list_get_first(&modex->modex_modules); - self_module != (mca_base_modex_module_t*)lam_list_get_end(&modex->modex_modules); - self_module = (mca_base_modex_module_t*)lam_list_get_next(self_module)) { + for(self_module = (mca_base_modex_module_t*)ompi_list_get_first(&modex->modex_modules); + self_module != (mca_base_modex_module_t*)ompi_list_get_end(&modex->modex_modules); + self_module = (mca_base_modex_module_t*)ompi_list_get_next(self_module)) { size_t i; for(i=0; iproc_modex) { free(procs); THREAD_UNLOCK(&self->proc_lock); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } } proc_module = mca_base_modex_create_module(proc->proc_modex, self_module->module); @@ -275,7 +275,7 @@ int mca_base_modex_exchange(void) free(procs); THREAD_UNLOCK(&proc->proc_lock); THREAD_UNLOCK(&self->proc_lock); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } rc = mca_oob.oob_recv( @@ -284,7 +284,7 @@ int mca_base_modex_exchange(void) &tag, &proc_module->module_data, &proc_module->module_data_size); - if(rc != LAM_SUCCESS) { + if(rc != OMPI_SUCCESS) { free(procs); THREAD_UNLOCK(&proc->proc_lock); THREAD_UNLOCK(&self->proc_lock); @@ -295,7 +295,7 @@ int mca_base_modex_exchange(void) } free(procs); THREAD_UNLOCK(&self->proc_lock); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/base/mca_base_module_exchange.h b/src/mca/base/mca_base_module_exchange.h index 75e20d8f20..374a2309ae 100644 --- a/src/mca/base/mca_base_module_exchange.h +++ b/src/mca/base/mca_base_module_exchange.h @@ -4,10 +4,10 @@ /** @file **/ -#ifndef MCA_LAM_MODULE_EXCHANGE_H -#define MCA_LAM_MODULE_EXCHANGE_H +#ifndef MCA_OMPI_MODULE_EXCHANGE_H +#define MCA_OMPI_MODULE_EXCHANGE_H -#include "lam_config.h" +#include "ompi_config.h" #include @@ -28,8 +28,8 @@ extern "C" { * @param size Number of bytes of each instance in the buffer. * @param count Number of instances in the buffer. * - * @retval LAM_SUCCESS On success - * @retval LAM_ERROR On failure + * @retval OMPI_SUCCESS On success + * @retval OMPI_ERROR On failure * * This function takes a contiguous buffer of network-ordered data * and makes it available to all other MCA processes during the @@ -88,9 +88,9 @@ extern "C" { * @param count Pointer to an int that will be filled with the * number of instances in the buffer. * - * @retval LAM_SUCCESS If a corresponding module buffer is found and + * @retval OMPI_SUCCESS If a corresponding module buffer is found and * is successfully returned to the caller. - * @retval LAM_FAILURE If no corresponding module buffer is found, + * @retval OMPI_FAILURE If no corresponding module buffer is found, * or if an error occurs wil returning the buffer to the caller. * * This is the corresponding "get" call to mca_base_modex_send(). @@ -108,7 +108,7 @@ extern "C" { * number of bytes is split into two parts. */ int mca_base_modex_recv(mca_base_module_t *dest_module, - lam_proc_t *source_proc, + ompi_proc_t *source_proc, void **buffer, size_t *size); /* @@ -120,4 +120,4 @@ extern "C" { } #endif -#endif /* MCA_LAM_MODULE_EXCHANGE_H */ +#endif /* MCA_OMPI_MODULE_EXCHANGE_H */ diff --git a/src/mca/base/mca_base_module_find.c b/src/mca/base/mca_base_module_find.c index 7c2f6ea60e..e7adfdb119 100644 --- a/src/mca/base/mca_base_module_find.c +++ b/src/mca/base/mca_base_module_find.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -14,7 +14,7 @@ #include "include/constants.h" #include "util/output.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -32,18 +32,18 @@ typedef enum module_status { } module_status_t; struct module_file_item_t { - lam_list_item_t super; + ompi_list_item_t super; char type[MCA_BASE_MAX_TYPE_NAME_LEN]; char name[MCA_BASE_MAX_MODULE_NAME_LEN]; - char basename[LAM_PATH_MAX]; - char filename[LAM_PATH_MAX]; + char basename[OMPI_PATH_MAX]; + char filename[OMPI_PATH_MAX]; module_status_t status; }; typedef struct module_file_item_t module_file_item_t; struct dependency_item_t { - lam_list_item_t super; + ompi_list_item_t super; module_file_item_t *di_module_file_item; }; @@ -60,26 +60,26 @@ typedef struct ltfn_data_holder_t ltfn_data_holder_t; * Private functions */ static void find_dyn_modules(const char *path, const char *type, - const char *name, lam_list_t *found_modules); + const char *name, ompi_list_t *found_modules); static int save_filename(const char *filename, lt_ptr data); static int open_module(module_file_item_t *target_file, - lam_list_t *found_modules); -static int check_laminfo(module_file_item_t *target_file, - lam_list_t *dependencies, - lam_list_t *found_modules); + ompi_list_t *found_modules); +static int check_ompi_info(module_file_item_t *target_file, + ompi_list_t *dependencies, + ompi_list_t *found_modules); static int check_dependency(char *line, module_file_item_t *target_file, - lam_list_t *dependencies, - lam_list_t *found_modules); -static void free_dependency_list(lam_list_t *dependencies); + ompi_list_t *dependencies, + ompi_list_t *found_modules); +static void free_dependency_list(ompi_list_t *dependencies); /* * Private variables */ -static const char *laminfo_suffix = ".laminfo"; +static const char *ompi_info_suffix = ".ompi_info"; static const char *key_dependency = "dependency="; static const char module_template[] = "mca_%s_"; -static lam_list_t found_files; +static ompi_list_t found_files; /* @@ -93,22 +93,22 @@ static lam_list_t found_files; */ int mca_base_module_find(const char *directory, const char *type, const mca_base_module_t *static_modules[], - lam_list_t *found_modules) + ompi_list_t *found_modules) { int i; mca_base_module_list_item_t *mli; /* Find all the modules that were statically linked in */ - OBJ_CONSTRUCT(found_modules, lam_list_t); + OBJ_CONSTRUCT(found_modules, ompi_list_t); for (i = 0; NULL != static_modules[i]; ++i) { mli = malloc(sizeof(mca_base_module_list_item_t)); if (NULL == mli) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(mli, lam_list_item_t); + OBJ_CONSTRUCT(mli, ompi_list_item_t); mli->mli_module = static_modules[i]; - lam_list_append(found_modules, (lam_list_item_t *) mli); + ompi_list_append(found_modules, (ompi_list_item_t *) mli); } /* Find any available dynamic modules in the specified directory */ @@ -117,7 +117,7 @@ int mca_base_module_find(const char *directory, const char *type, /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -127,28 +127,28 @@ int mca_base_module_find(const char *directory, const char *type, * * Note that we use our own path iteration functionality (vs. ltdl's * lt_dladdsearchdir() functionality) because we need to look at - * companion .laminfo files in the same directory as the library to + * companion .ompi_info files in the same directory as the library to * generate dependencies, etc. If we use the plain lt_dlopen() * functionality, we would not get the directory name of the file * finally opened in recursive dependency traversals. */ static void find_dyn_modules(const char *path, const char *type_name, - const char *name, lam_list_t *found_modules) + const char *name, ompi_list_t *found_modules) { ltfn_data_holder_t params; char *path_to_use, *dir, *end, *param; module_file_item_t *file; - lam_list_item_t *cur; + ompi_list_item_t *cur; strcpy(params.type, type_name); if (NULL == name) { params.name[0] = '\0'; - lam_output_verbose(0, 40, " looking for all dynamic %s MCA modules", + ompi_output_verbose(0, 40, " looking for all dynamic %s MCA modules", type_name, NULL); } else { strcpy(params.name, name); - lam_output_verbose(0, 40, + ompi_output_verbose(0, 40, " looking for dynamic %s MCA module named \"%s\"", type_name, name, NULL); } @@ -172,7 +172,7 @@ static void find_dyn_modules(const char *path, const char *type_name, make a master array of all the matching filenames that we find. */ - OBJ_CONSTRUCT(&found_files, lam_list_t); + OBJ_CONSTRUCT(&found_files, ompi_list_t); dir = path_to_use; do { end = strchr(dir, ':'); @@ -191,9 +191,9 @@ static void find_dyn_modules(const char *path, const char *type_name, give every file one chance to try to load. If they load, great. If not, great. */ - for (cur = lam_list_get_first(&found_files); - lam_list_get_end(&found_files) != cur; - cur = lam_list_get_next(cur)) { + for (cur = ompi_list_get_first(&found_files); + ompi_list_get_end(&found_files) != cur; + cur = ompi_list_get_next(cur)) { file = (module_file_item_t *) cur; if (UNVISITED == file->status) open_module(file, found_modules); @@ -202,12 +202,12 @@ static void find_dyn_modules(const char *path, const char *type_name, /* So now we have a final list of loaded modules. We can free all the file information. */ - for (cur = lam_list_get_first(&found_files); - lam_list_get_end(&found_files) != cur; ) { + for (cur = ompi_list_get_first(&found_files); + ompi_list_get_end(&found_files) != cur; ) { file = (module_file_item_t *) cur; - cur = lam_list_get_next(cur); + cur = ompi_list_get_next(cur); free(file); - lam_list_remove_first(&found_files); + ompi_list_remove_first(&found_files); } /* All done */ @@ -217,7 +217,7 @@ static void find_dyn_modules(const char *path, const char *type_name, } /* JMS This list memory management may change */ #if 0 - lam_list_destruct(&found_files); + ompi_list_destruct(&found_files); #endif free(path_to_use); } @@ -267,15 +267,15 @@ static int save_filename(const char *filename, lt_ptr data) module_file = malloc(sizeof(module_file_item_t)); if (NULL == module_file) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(module_file, lam_list_item_t); + OBJ_CONSTRUCT(module_file, ompi_list_item_t); strcpy(module_file->type, params->type); strcpy(module_file->name, basename + prefix_len); strcpy(module_file->basename, basename); strcpy(module_file->filename, filename); module_file->status = UNVISITED; - lam_list_append(&found_files, (lam_list_item_t *) module_file); + ompi_list_append(&found_files, (ompi_list_item_t *) module_file); /* All done */ @@ -288,43 +288,43 @@ static int save_filename(const char *filename, lt_ptr data) * Open a module, chasing down its dependencies first, if possible. */ static int open_module(module_file_item_t *target_file, - lam_list_t *found_modules) + ompi_list_t *found_modules) { int len; lt_dlhandle module_handle; mca_base_module_t *module_struct; char *struct_name; - lam_list_t dependencies; - lam_list_item_t *cur; + ompi_list_t dependencies; + ompi_list_item_t *cur; mca_base_module_list_item_t *mitem; dependency_item_t *ditem; - lam_output_verbose(0, 40, " examining dyanmic %s MCA module \"%s\"", + ompi_output_verbose(0, 40, " examining dyanmic %s MCA module \"%s\"", target_file->type, target_file->name, NULL); - lam_output_verbose(0, 40, " %s", target_file->filename, NULL); + ompi_output_verbose(0, 40, " %s", target_file->filename, NULL); /* Was this module already loaded (e.g., via dependency)? */ if (LOADED == target_file->status) { - lam_output_verbose(0, 40, " already loaded (ignored)", NULL); - return LAM_SUCCESS; + ompi_output_verbose(0, 40, " already loaded (ignored)", NULL); + return OMPI_SUCCESS; } /* Ensure that this module is not already loaded (should only happen if it was statically loaded). It's an error if it's already loaded because we're evaluating this file -- not this module. - Hence, returning LAM_ERR_PARAM indicates that the *file* failed + Hence, returning OMPI_ERR_PARAM indicates that the *file* failed to load, not the module. */ - for (cur = lam_list_get_first(found_modules); - lam_list_get_end(found_modules) != cur; - cur = lam_list_get_next(cur)) { + for (cur = ompi_list_get_first(found_modules); + ompi_list_get_end(found_modules) != cur; + cur = ompi_list_get_next(cur)) { mitem = (mca_base_module_list_item_t *) cur; if (0 == strcmp(mitem->mli_module->mca_type_name, target_file->type) && 0 == strcmp(mitem->mli_module->mca_module_name, target_file->name)) { - lam_output_verbose(0, 40, " already loaded (ignored)", NULL); + ompi_output_verbose(0, 40, " already loaded (ignored)", NULL); target_file->status = FAILED_TO_LOAD; - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; } } @@ -332,22 +332,22 @@ static int open_module(module_file_item_t *target_file, them. If we can't load them, then this module must also fail to load. */ - OBJ_CONSTRUCT(&dependencies, lam_list_t); - if (0 != check_laminfo(target_file, &dependencies, found_modules)) { + OBJ_CONSTRUCT(&dependencies, ompi_list_t); + if (0 != check_ompi_info(target_file, &dependencies, found_modules)) { target_file->status = FAILED_TO_LOAD; free_dependency_list(&dependencies); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } /* Now try to load the module */ module_handle = lt_dlopenext(target_file->filename); if (NULL == module_handle) { - lam_output_verbose(0, 40, " unable to open: %s (ignored)", + ompi_output_verbose(0, 40, " unable to open: %s (ignored)", lt_dlerror(), NULL); target_file->status = FAILED_TO_LOAD; free_dependency_list(&dependencies); - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; } /* Successfully opened the module; now find the public struct. @@ -359,7 +359,7 @@ static int open_module(module_file_item_t *target_file, lt_dlclose(module_handle); target_file->status = FAILED_TO_LOAD; free_dependency_list(&dependencies); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } snprintf(struct_name, len, "mca_%s_%s_module", target_file->type, target_file->name); @@ -370,13 +370,13 @@ static int open_module(module_file_item_t *target_file, lt_dlclose(module_handle); target_file->status = FAILED_TO_LOAD; free_dependency_list(&dependencies); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(mitem, lam_list_item_t); + OBJ_CONSTRUCT(mitem, ompi_list_item_t); module_struct = lt_dlsym(module_handle, struct_name); if (NULL == module_struct) { - lam_output_verbose(0, 40, " \"%s\" does not appear to be a valid " + ompi_output_verbose(0, 40, " \"%s\" does not appear to be a valid " "%s MCA dynamic module (ignored)", target_file->basename, target_file->type, NULL); free(mitem); @@ -384,23 +384,23 @@ static int open_module(module_file_item_t *target_file, lt_dlclose(module_handle); target_file->status = FAILED_TO_LOAD; free_dependency_list(&dependencies); - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; } /* We found the public struct. Save it, and register this module to be closed later. */ mitem->mli_module = module_struct; - lam_list_append(found_modules, (lam_list_item_t *) mitem); + ompi_list_append(found_modules, (ompi_list_item_t *) mitem); mca_base_module_repository_retain(target_file->type, module_handle, module_struct); /* Now that that's all done, link all the dependencies in to this module's repository entry */ - for (cur = lam_list_remove_first(&dependencies); + for (cur = ompi_list_remove_first(&dependencies); NULL != cur; - cur = lam_list_remove_first(&dependencies)) { + cur = ompi_list_remove_first(&dependencies)) { ditem = (dependency_item_t *) cur; mca_base_module_repository_link(target_file->type, target_file->name, @@ -410,26 +410,26 @@ static int open_module(module_file_item_t *target_file, } OBJ_DESTRUCT(&dependencies); - lam_output_verbose(0, 40, " opened dynamic %s MCA module \"%s\"", + ompi_output_verbose(0, 40, " opened dynamic %s MCA module \"%s\"", target_file->type, target_file->name, NULL); target_file->status = LOADED; /* All done */ free(struct_name); - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* - * For a given filename, see if there exists a filename.laminfo, which + * For a given filename, see if there exists a filename.ompi_info, which * lists dependencies that must be loaded before this module is * loaded. If we find this file, try to load those modules first. * * Detect dependency cycles and error out. */ -static int check_laminfo(module_file_item_t *target_file, - lam_list_t *dependencies, lam_list_t *found_modules) +static int check_ompi_info(module_file_item_t *target_file, + ompi_list_t *dependencies, ompi_list_t *found_modules) { int len; FILE *fp; @@ -438,11 +438,11 @@ static int check_laminfo(module_file_item_t *target_file, /* Form the filename */ - len = strlen(target_file->filename) + strlen(laminfo_suffix) + 16; + len = strlen(target_file->filename) + strlen(ompi_info_suffix) + 16; depname = malloc(len); if (NULL == depname) - return LAM_ERR_OUT_OF_RESOURCE; - snprintf(depname, len, "%s%s", target_file->filename, laminfo_suffix); + return OMPI_ERR_OUT_OF_RESOURCE; + snprintf(depname, len, "%s%s", target_file->filename, ompi_info_suffix); /* Try to open the file. If there's no file, return success (i.e., there are no dependencies). */ @@ -456,7 +456,7 @@ static int check_laminfo(module_file_item_t *target_file, them. Return failure upon the first module that fails to load. */ - lam_output_verbose(0, 40, " opening laminfo file: %s", depname, NULL); + ompi_output_verbose(0, 40, " opening ompi_info file: %s", depname, NULL); while (NULL != fgets(buffer, BUFSIZ, fp)) { /* Perl chomp */ @@ -480,7 +480,7 @@ static int check_laminfo(module_file_item_t *target_file, /* Is it a dependency? */ else if (0 == strncasecmp(p, key_dependency, strlen(key_dependency))) { - if (LAM_SUCCESS != check_dependency(p + strlen(key_dependency), + if (OMPI_SUCCESS != check_dependency(p + strlen(key_dependency), target_file, dependencies, found_modules)) { fclose(fp); @@ -494,11 +494,11 @@ static int check_laminfo(module_file_item_t *target_file, list. */ free_dependency_list(dependencies); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } } } - lam_output_verbose(0, 40, " laminfo file closed (%s)", + ompi_output_verbose(0, 40, " ompi_info file closed (%s)", target_file->basename, NULL); /* All done -- all depenencies satisfied */ @@ -510,27 +510,27 @@ static int check_laminfo(module_file_item_t *target_file, /* - * A DEPENDENCY key was found in the laminfo file. Chase it down: see + * A DEPENDENCY key was found in the ompi_info file. Chase it down: see * if we've already got such a module loaded, or go try to load it if * it's not already loaded. */ static int check_dependency(char *line, module_file_item_t *target_file, - lam_list_t *dependencies, - lam_list_t *found_modules) + ompi_list_t *dependencies, + ompi_list_t *found_modules) { bool happiness; char buffer[BUFSIZ]; char *type, *name; module_file_item_t *mitem; dependency_item_t *ditem; - lam_list_item_t *cur; + ompi_list_item_t *cur; /* Ensure that this was a valid dependency statement */ type = line; name = strchr(line, ':'); if (NULL == name) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; *name = '\0'; ++name; @@ -538,7 +538,7 @@ static int check_dependency(char *line, module_file_item_t *target_file, if (strlen(type) + strlen(name) + 32 >= BUFSIZ) { target_file->status = FAILED_TO_LOAD; - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } snprintf(buffer, BUFSIZ, module_template, type); strcat(buffer, name); @@ -547,9 +547,9 @@ static int check_dependency(char *line, module_file_item_t *target_file, find it */ target_file->status = CHECKING_CYCLE; - for (happiness = false, cur = lam_list_get_first(&found_files); - lam_list_get_end(&found_files) != cur; - cur = lam_list_get_next(cur)) { + for (happiness = false, cur = ompi_list_get_first(&found_files); + ompi_list_get_end(&found_files) != cur; + cur = ompi_list_get_next(cur)) { mitem = (module_file_item_t *) cur; /* Compare the name to the basename */ @@ -560,7 +560,7 @@ static int check_dependency(char *line, module_file_item_t *target_file, /* Catch the bozo dependency on itself */ else if (mitem == target_file) { - lam_output_verbose(0, 40, + ompi_output_verbose(0, 40, " module depends on itself (ignored dependency)", NULL); happiness = true; @@ -571,7 +571,7 @@ static int check_dependency(char *line, module_file_item_t *target_file, dependency sub-tree) */ else if (LOADED == mitem->status) { - lam_output_verbose(0, 40, " dependency has already been loaded (%s)", + ompi_output_verbose(0, 40, " dependency has already been loaded (%s)", mitem->basename, NULL); happiness = true; break; @@ -582,7 +582,7 @@ static int check_dependency(char *line, module_file_item_t *target_file, dependencies. */ else if (FAILED_TO_LOAD == mitem->status) { - lam_output_verbose(0, 40, " dependency previously failed to load (%s)", + ompi_output_verbose(0, 40, " dependency previously failed to load (%s)", mitem->basename, NULL); break; } @@ -590,7 +590,7 @@ static int check_dependency(char *line, module_file_item_t *target_file, /* If we hit a cycle, return badness */ else if (CHECKING_CYCLE == mitem->status) { - lam_output_verbose(0, 40, " found cycle! (%s)", + ompi_output_verbose(0, 40, " found cycle! (%s)", mitem->basename, NULL); break; } @@ -599,12 +599,12 @@ static int check_dependency(char *line, module_file_item_t *target_file, to load it. */ else if (UNVISITED == mitem->status) { - lam_output_verbose(0, 40, " loading dependency (%s)", + ompi_output_verbose(0, 40, " loading dependency (%s)", mitem->basename, NULL); - if (LAM_SUCCESS == open_module(target_file, found_modules)) { + if (OMPI_SUCCESS == open_module(target_file, found_modules)) { happiness = true; } else { - lam_output_verbose(0, 40, " dependency failed to load (%s)", + ompi_output_verbose(0, 40, " dependency failed to load (%s)", mitem->basename, NULL); } break; @@ -615,7 +615,7 @@ static int check_dependency(char *line, module_file_item_t *target_file, if (!happiness) { target_file->status = FAILED_TO_LOAD; - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; } /* The dependency loaded properly. Increment its refcount so that @@ -623,28 +623,28 @@ static int check_dependency(char *line, module_file_item_t *target_file, ditem = malloc(sizeof(dependency_item_t)); if (NULL == ditem) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - cur = (lam_list_item_t *) ditem; - OBJ_CONSTRUCT(cur, lam_list_item_t); - lam_list_append(dependencies, cur); + cur = (ompi_list_item_t *) ditem; + OBJ_CONSTRUCT(cur, ompi_list_item_t); + ompi_list_append(dependencies, cur); /* All done -- all depenencies satisfied */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* * Free a dependency list */ -static void free_dependency_list(lam_list_t *dependencies) +static void free_dependency_list(ompi_list_t *dependencies) { - lam_list_item_t *item; + ompi_list_item_t *item; - for (item = lam_list_remove_first(dependencies); + for (item = ompi_list_remove_first(dependencies); NULL != item; - item = lam_list_remove_first(dependencies)) { + item = ompi_list_remove_first(dependencies)) { free(item); } OBJ_DESTRUCT(dependencies); diff --git a/src/mca/base/mca_base_module_repository.c b/src/mca/base/mca_base_module_repository.c index 964233a00a..dad7e84de2 100644 --- a/src/mca/base/mca_base_module_repository.c +++ b/src/mca/base/mca_base_module_repository.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -13,7 +13,7 @@ #include "libltdl/ltdl.h" #include "include/constants.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -22,18 +22,18 @@ * Private types */ struct repository_item_t { - lam_list_item_t super; + ompi_list_item_t super; char ri_type[MCA_BASE_MAX_TYPE_NAME_LEN]; lt_dlhandle ri_dlhandle; const mca_base_module_t *ri_module_struct; int ri_refcount; - lam_list_t ri_dependencies; + ompi_list_t ri_dependencies; }; typedef struct repository_item_t repository_item_t; struct dependency_item_t { - lam_list_item_t super; + ompi_list_item_t super; repository_item_t *di_repository_entry; }; @@ -44,7 +44,7 @@ typedef struct dependency_item_t dependency_item_t; * Private variables */ static bool initialized = false; -static lam_list_t repository; +static ompi_list_t repository; /* @@ -67,15 +67,15 @@ int mca_base_module_repository_construct(void) /* Initialize libltdl */ if (lt_dlinit() != 0) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; - OBJ_CONSTRUCT(&repository, lam_list_t); + OBJ_CONSTRUCT(&repository, ompi_list_t); initialized = true; } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -92,24 +92,24 @@ int mca_base_module_repository_retain(char *type, lt_dlhandle module_handle, ri = malloc(sizeof(repository_item_t)); if (NULL == ri) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; /* Initialize the repository item */ - OBJ_CONSTRUCT(ri, lam_list_item_t); + OBJ_CONSTRUCT(ri, ompi_list_item_t); strcpy(ri->ri_type, type); ri->ri_dlhandle = module_handle; ri->ri_module_struct = module_struct; ri->ri_refcount = 1; - OBJ_CONSTRUCT(&ri->ri_dependencies, lam_list_t); + OBJ_CONSTRUCT(&ri->ri_dependencies, ompi_list_t); /* Append the new item to the repository */ - lam_list_append(&repository, (lam_list_item_t *) ri); + ompi_list_append(&repository, (ompi_list_item_t *) ri); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -127,10 +127,10 @@ int mca_base_module_repository_link(const char *src_type, src = find_module(src_type, src_name); if (NULL == src) - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; depend = find_module(depend_type, depend_name); if (NULL == depend) - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; /* Link them */ @@ -156,7 +156,7 @@ void mca_base_module_repository_release(const mca_base_module_t *module) */ void mca_base_module_repository_finalize(void) { - lam_list_item_t *item; + ompi_list_item_t *item; repository_item_t *ri; bool changed; @@ -177,9 +177,9 @@ void mca_base_module_repository_finalize(void) do { changed = false; - for (item = lam_list_get_first(&repository); - lam_list_get_end(&repository) != item && changed; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&repository); + ompi_list_get_end(&repository) != item && changed; + item = ompi_list_get_next(item)) { ri = (repository_item_t *) ri; if (ri->ri_refcount == 1) { @@ -187,7 +187,7 @@ void mca_base_module_repository_finalize(void) changed = true; } } - } while (lam_list_get_size(&repository) > 0 && changed); + } while (ompi_list_get_size(&repository) > 0 && changed); /* Close down libltdl */ @@ -199,12 +199,12 @@ void mca_base_module_repository_finalize(void) static repository_item_t *find_module(const char *type, const char *name) { - lam_list_item_t *item; + ompi_list_item_t *item; repository_item_t *ri; - for (item = lam_list_get_first(&repository); - lam_list_get_end(&repository) != item; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&repository); + ompi_list_get_end(&repository) != item; + item = ompi_list_get_next(item)) { ri = (repository_item_t *) ri; if (0 == strcmp(ri->ri_type, type) && 0 == strcmp(ri->ri_module_struct->mca_module_name, name)) @@ -224,22 +224,22 @@ static int link_items(repository_item_t *src, repository_item_t *depend) /* Bozo check */ if (NULL == src || NULL == depend) - return LAM_ERR_BAD_PARAM; + return OMPI_ERR_BAD_PARAM; /* Make a new depedency item */ di = malloc(sizeof(dependency_item_t)); if (NULL == di) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; /* Initialize the new dependency item */ - OBJ_CONSTRUCT((lam_list_item_t *) di, lam_list_item_t); + OBJ_CONSTRUCT((ompi_list_item_t *) di, ompi_list_item_t); di->di_repository_entry = depend; /* Add it to the dependency list on the source repository entry */ - lam_list_append(&src->ri_dependencies, (lam_list_item_t *) di); + ompi_list_append(&src->ri_dependencies, (ompi_list_item_t *) di); /* Increment the refcount in the dependency */ @@ -247,14 +247,14 @@ static int link_items(repository_item_t *src, repository_item_t *depend) /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } static void release_repository_item(repository_item_t *ri) { dependency_item_t *di; - lam_list_item_t *item; + ompi_list_item_t *item; /* Bozo check */ @@ -270,9 +270,9 @@ static void release_repository_item(repository_item_t *ri) /* Now go release/close (at a minimum: decrement the refcount) any dependencies of this module */ - for (item = lam_list_remove_first(&ri->ri_dependencies); + for (item = ompi_list_remove_first(&ri->ri_dependencies); NULL != item; - item = lam_list_remove_first(&ri->ri_dependencies)) { + item = ompi_list_remove_first(&ri->ri_dependencies)) { di = (dependency_item_t *) item; --di->di_repository_entry->ri_refcount; free(di); @@ -284,7 +284,7 @@ static void release_repository_item(repository_item_t *ri) unloaded from memory. So don't try to use it. :-) */ OBJ_DESTRUCT(&di->di_repository_entry->ri_dependencies); - lam_list_remove_item(&repository, (lam_list_item_t *) ri); + ompi_list_remove_item(&repository, (ompi_list_item_t *) ri); free(ri); } } diff --git a/src/mca/base/mca_base_modules_close.c b/src/mca/base/mca_base_modules_close.c index 12212d22a1..dc78a6c1cb 100644 --- a/src/mca/base/mca_base_modules_close.c +++ b/src/mca/base/mca_base_modules_close.c @@ -2,18 +2,18 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "util/output.h" #include "mca/mca.h" #include "mca/base/base.h" -int mca_base_modules_close(int output_id, lam_list_t *modules_available, +int mca_base_modules_close(int output_id, ompi_list_t *modules_available, const mca_base_module_t *skip) { - lam_list_item_t *item; + ompi_list_item_t *item; mca_base_module_list_item_t *mli; const mca_base_module_t *module; @@ -22,9 +22,9 @@ int mca_base_modules_close(int output_id, lam_list_t *modules_available, modules. It's easier to simply remove the entire list and then simply re-add the skip entry when done. */ - for (item = lam_list_remove_first(modules_available); + for (item = ompi_list_remove_first(modules_available); NULL != item; - item = lam_list_remove_first(modules_available)) { + item = ompi_list_remove_first(modules_available)) { mli = (mca_base_module_list_item_t *) item; module = mli->mli_module; @@ -35,14 +35,14 @@ int mca_base_modules_close(int output_id, lam_list_t *modules_available, if (NULL != module->mca_close_module) { module->mca_close_module(); - lam_output_verbose(10, output_id, "close: module %s closed", + ompi_output_verbose(10, output_id, "close: module %s closed", module->mca_module_name); } /* Unload */ mca_base_module_repository_release((mca_base_module_t *) module); - lam_output_verbose(10, output_id, "close: module %s unloaded", + ompi_output_verbose(10, output_id, "close: module %s unloaded", module->mca_module_name); } free(mli); @@ -54,13 +54,13 @@ int mca_base_modules_close(int output_id, lam_list_t *modules_available, if (NULL != skip) { mli = malloc(sizeof(mca_base_module_list_item_t)); if (NULL == mli) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } mli->mli_module = skip; - lam_list_append(modules_available, (lam_list_item_t *) mli); + ompi_list_append(modules_available, (ompi_list_item_t *) mli); } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/base/mca_base_modules_open.c b/src/mca/base/mca_base_modules_open.c index d0ad28f322..ddd180b0aa 100644 --- a/src/mca/base/mca_base_modules_open.c +++ b/src/mca/base/mca_base_modules_open.c @@ -2,13 +2,13 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include #include -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "util/strncpy.h" #include "util/argv.h" #include "util/output.h" @@ -17,7 +17,7 @@ struct module_name_t { - lam_list_item_t super; + ompi_list_item_t super; char mn_name[MCA_BASE_MAX_MODULE_NAME_LEN]; }; @@ -28,8 +28,8 @@ typedef struct module_name_t module_name_t; * Local functions */ static int open_modules(const char *type_name, int output_id, - lam_list_t *modules_found, - lam_list_t *modules_available, + ompi_list_t *modules_found, + ompi_list_t *modules_available, char **requested_module_names); static int parse_requested(int mca_param, char ***requested_module_names); @@ -40,11 +40,11 @@ static int parse_requested(int mca_param, char ***requested_module_names); */ int mca_base_modules_open(const char *type_name, int output_id, const mca_base_module_t **static_modules, - lam_list_t *modules_available) + ompi_list_t *modules_available) { int ret; - lam_list_item_t *item; - lam_list_t modules_found; + ompi_list_item_t *item; + ompi_list_t modules_found; char **requested_module_names; int param_verbose = -1; int param_type; @@ -62,31 +62,31 @@ int mca_base_modules_open(const char *type_name, int output_id, mca_base_set_verbose(param_verbose, &lds, &mca_pcm_verbose, &mca_pcm_did); #endif - lam_output_verbose(10, output_id, "open: Looking for modules"); + ompi_output_verbose(10, output_id, "open: Looking for modules"); /* Find and load all available modules */ - if (LAM_SUCCESS != + if (OMPI_SUCCESS != mca_base_module_find(NULL, type_name, static_modules, &modules_found)) { - return LAM_ERROR; + return OMPI_ERROR; } /* See if one or more specific modules were requested */ ret = parse_requested(param_type, &requested_module_names); - if (LAM_SUCCESS == ret) { + if (OMPI_SUCCESS == ret) { ret = open_modules(type_name, output_id, &modules_found, modules_available, requested_module_names); } /* Free resources */ - for (item = lam_list_remove_first(&modules_found); NULL != item; - item = lam_list_remove_first(&modules_found)) { + for (item = ompi_list_remove_first(&modules_found); NULL != item; + item = ompi_list_remove_first(&modules_found)) { free(item); } if (NULL != requested_module_names) { - lam_argv_free(requested_module_names); + ompi_argv_free(requested_module_names); } /* All done */ @@ -106,11 +106,11 @@ static int parse_requested(int mca_param, char ***requested_module_names) /* See if the user requested anything */ - if (LAM_ERROR == mca_base_param_lookup_string(mca_param, &requested)) { - return LAM_ERROR; + if (OMPI_ERROR == mca_base_param_lookup_string(mca_param, &requested)) { + return OMPI_ERROR; } if (NULL == requested) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* Loop over all names (yes, this could be more clever, but it's @@ -120,7 +120,7 @@ static int parse_requested(int mca_param, char ***requested_module_names) comma = strchr(start, ','); while (NULL != comma) { *comma = '\0'; - lam_argv_append(&argc, requested_module_names, start); + ompi_argv_append(&argc, requested_module_names, start); start = comma + 1; comma = strchr(start, ','); @@ -128,11 +128,11 @@ static int parse_requested(int mca_param, char ***requested_module_names) /* The last name */ - lam_argv_append(&argc, requested_module_names, start); + ompi_argv_append(&argc, requested_module_names, start); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -144,12 +144,12 @@ static int parse_requested(int mca_param, char ***requested_module_names) * add it to the modules_available list. */ static int open_modules(const char *type_name, int output_id, - lam_list_t *modules_found, - lam_list_t *modules_available, + ompi_list_t *modules_found, + ompi_list_t *modules_available, char **requested_module_names) { int i; - lam_list_item_t *item; + ompi_list_item_t *item; const mca_base_module_t *module; mca_base_module_list_item_t *mli; bool acceptable; @@ -159,23 +159,23 @@ static int open_modules(const char *type_name, int output_id, /* Announce */ if (NULL == requested_module_names) { - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: looking for any %s modules", type_name); } else { - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: looking for specific %s modules:", type_name); for (i = 0; NULL != requested_module_names[i]; ++i) { - lam_output_verbose(10, output_id, "open: %s", + ompi_output_verbose(10, output_id, "open: %s", requested_module_names[i]); } } /* Traverse the list of found modules */ - OBJ_CONSTRUCT(modules_available, lam_list_t); - for (item = lam_list_get_first(modules_found); - lam_list_get_end(modules_found) != item; - item = lam_list_get_next(item)) { + OBJ_CONSTRUCT(modules_available, ompi_list_t); + for (item = ompi_list_get_first(modules_found); + ompi_list_get_end(modules_found) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = mli->mli_module; @@ -197,23 +197,23 @@ static int open_modules(const char *type_name, int output_id, if (acceptable) { opened = called_open = false; - lam_output_verbose(10, output_id, "open: found loaded module %s", + ompi_output_verbose(10, output_id, "open: found loaded module %s", module->mca_module_name); if (NULL == module->mca_open_module) { opened = true; - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: module %s has no open function", module->mca_module_name); } else { called_open = true; if (MCA_SUCCESS == module->mca_open_module()) { opened = true; - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: module %s open function successful", module->mca_module_name); } else { - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: module %s open function failed", module->mca_module_name); } @@ -226,13 +226,13 @@ static int open_modules(const char *type_name, int output_id, if (NULL != module->mca_close_module) { module->mca_close_module(); } - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: module %s closed", module->mca_module_name); called_open = false; } mca_base_module_repository_release(module); - lam_output_verbose(10, output_id, + ompi_output_verbose(10, output_id, "open: module %s unloaded", module->mca_module_name); } @@ -242,7 +242,7 @@ static int open_modules(const char *type_name, int output_id, list */ else { - if (LAM_ERROR == mca_base_param_find(type_name, + if (OMPI_ERROR == mca_base_param_find(type_name, module->mca_module_name, "priority")) { mca_base_param_register_int(type_name, @@ -252,16 +252,16 @@ static int open_modules(const char *type_name, int output_id, mli = malloc(sizeof(mca_base_module_list_item_t)); if (NULL == mli) { - return LAM_ERROR; + return OMPI_ERROR; } - OBJ_CONSTRUCT(&mli->super, lam_list_item_t); + OBJ_CONSTRUCT(&mli->super, ompi_list_item_t); mli->mli_module = module; - lam_list_append(modules_available, (lam_list_item_t *) mli); + ompi_list_append(modules_available, (ompi_list_item_t *) mli); } } } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/base/mca_base_open.c b/src/mca/base/mca_base_open.c index 493a9a9e5b..1ed854c72e 100644 --- a/src/mca/base/mca_base_open.c +++ b/src/mca/base/mca_base_open.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -22,8 +22,8 @@ bool mca_base_opened = false; /* * Private functions */ -static void set_defaults(lam_output_stream_t *lds); -static void parse_verbose(char *e, lam_output_stream_t *lds); +static void set_defaults(ompi_output_stream_t *lds); +static void parse_verbose(char *e, ompi_output_stream_t *lds); /* @@ -33,19 +33,19 @@ int mca_base_open(void) { int param_index; char *value; - lam_output_stream_t lds; + ompi_output_stream_t lds; if (!mca_base_opened) { mca_base_opened = true; } else { - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* Register some params */ mca_base_param_module_path = mca_base_param_register_string("base", NULL, "module_path", - "module_path", LAM_PKGLIBDIR); + "module_path", OMPI_PKGLIBDIR); param_index = mca_base_param_register_string("base", NULL, "verbose", "verbose", NULL); @@ -58,8 +58,8 @@ int mca_base_open(void) } else { set_defaults(&lds); } - lam_output_reopen(0, &lds); - lam_output_verbose(0, 5, " Opening"); + ompi_output_reopen(0, &lds); + ompi_output_verbose(0, 5, " Opening"); /* Open up the module repository */ @@ -70,7 +70,7 @@ int mca_base_open(void) /* * Set sane default values for the lds */ -static void set_defaults(lam_output_stream_t *lds) +static void set_defaults(ompi_output_stream_t *lds) { /* Load up defaults */ @@ -78,7 +78,7 @@ static void set_defaults(lam_output_stream_t *lds) lds->lds_verbose_level = 0; lds->lds_want_syslog = false; lds->lds_syslog_priority = LOG_INFO; - lds->lds_syslog_ident = "lam"; + lds->lds_syslog_ident = "ompi"; lds->lds_want_stdout = false; lds->lds_want_stderr = true; lds->lds_want_file = false; @@ -91,7 +91,7 @@ static void set_defaults(lam_output_stream_t *lds) /* * Parse the value of an environment variable describing verbosity */ -static void parse_verbose(char *e, lam_output_stream_t *lds) +static void parse_verbose(char *e, ompi_output_stream_t *lds) { char *edup; char *ptr, *next; diff --git a/src/mca/base/mca_base_param.c b/src/mca/base/mca_base_param.c index 55ec8e1f0e..9727738055 100644 --- a/src/mca/base/mca_base_param.c +++ b/src/mca/base/mca_base_param.c @@ -2,14 +2,14 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include #include #include #include "include/constants.h" -#include "lfc/lam_value_array.h" +#include "class/ompi_value_array.h" #include "mca/mca.h" #include "mca/base/mca_base_param.h" @@ -18,16 +18,16 @@ * Public variables * * This variable is public, but not advertised in mca_base_param.h. - * It's only public so that laminfo can see it. The relevant module - * in laminfo will provide an extern to see this variable. + * It's only public so that ompi_info can see it. The relevant module + * in ompi_info will provide an extern to see this variable. */ -lam_value_array_t mca_base_params; +ompi_value_array_t mca_base_params; /* * local variables */ -static char *mca_prefix = "LAM_MPI_MCA_"; +static char *mca_prefix = "OMPI_MPI_MCA_"; static bool initialized = false; @@ -87,9 +87,9 @@ int mca_base_param_lookup_int(int index, int *value) if (param_lookup(index, &storage)) { *value = storage.intval; - return LAM_SUCCESS; + return OMPI_SUCCESS; } - return LAM_ERROR; + return OMPI_ERROR; } @@ -102,9 +102,9 @@ int mca_base_param_lookup_string(int index, char **value) if (param_lookup(index, &storage)) { *value = storage.stringval; - return LAM_SUCCESS; + return OMPI_SUCCESS; } - return LAM_ERROR; + return OMPI_ERROR; } @@ -120,15 +120,15 @@ int mca_base_param_find(const char *type_name, const char *module_name, /* Check for bozo cases */ if (!initialized) - return LAM_ERROR; + return OMPI_ERROR; if (NULL == type_name || NULL == param_name) - return LAM_ERROR; + return OMPI_ERROR; /* Loop through looking for a parameter of a given type/module/param */ - size = lam_value_array_get_size(&mca_base_params); - array = LAM_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); + size = ompi_value_array_get_size(&mca_base_params); + array = OMPI_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); for (i = 0; i < size; ++i) { if (0 == strcmp(type_name, array[i].mbp_type_name) && ((NULL == module_name && NULL == array[i].mbp_module_name) || @@ -140,7 +140,7 @@ int mca_base_param_find(const char *type_name, const char *module_name, /* Didn't find it */ - return LAM_ERROR; + return OMPI_ERROR; } @@ -153,16 +153,16 @@ int mca_base_param_finalize(void) mca_base_param_t *array; if (initialized) { - array = LAM_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); - while (0 < lam_value_array_get_size(&mca_base_params)) { + array = OMPI_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); + while (0 < ompi_value_array_get_size(&mca_base_params)) { param_free(&array[0]); - lam_value_array_remove_item(&mca_base_params, 0); + ompi_value_array_remove_item(&mca_base_params, 0); } OBJ_DESTRUCT(&mca_base_params); initialized = false; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -179,8 +179,8 @@ static int param_register(const char *type_name, const char *module_name, /* Initialize the array if it has never been initialized */ if (!initialized) { - OBJ_CONSTRUCT(&mca_base_params, lam_value_array_t); - lam_value_array_init(&mca_base_params, sizeof(mca_base_param_t)); + OBJ_CONSTRUCT(&mca_base_params, ompi_value_array_t); + ompi_value_array_init(&mca_base_params, sizeof(mca_base_param_t)); initialized = true; } @@ -192,13 +192,13 @@ static int param_register(const char *type_name, const char *module_name, param.mbp_type_name = strdup(type_name); if (NULL == param.mbp_type_name) { - return LAM_ERROR; + return OMPI_ERROR; } if (NULL != module_name) { param.mbp_module_name = strdup(module_name); if (NULL == param.mbp_module_name) { free(param.mbp_type_name); - return LAM_ERROR; + return OMPI_ERROR; } } else { param.mbp_module_name = NULL; @@ -208,7 +208,7 @@ static int param_register(const char *type_name, const char *module_name, if (NULL == param.mbp_param_name) { free(param.mbp_type_name); free(param.mbp_module_name); - return LAM_ERROR; + return OMPI_ERROR; } } else { param.mbp_param_name = NULL; @@ -243,7 +243,7 @@ static int param_register(const char *type_name, const char *module_name, if (NULL != param.mbp_param_name) { free(param.mbp_param_name); } - return LAM_ERROR; + return OMPI_ERROR; } strncpy(param.mbp_full_name, type_name, len); @@ -269,7 +269,7 @@ static int param_register(const char *type_name, const char *module_name, free(param.mbp_type_name); free(param.mbp_module_name); free(param.mbp_param_name); - return LAM_ERROR; + return OMPI_ERROR; } snprintf(param.mbp_env_var_name, len, "%s%s", mca_prefix, param.mbp_full_name); @@ -290,8 +290,8 @@ static int param_register(const char *type_name, const char *module_name, /* See if this entry is already in the Array */ - len = lam_value_array_get_size(&mca_base_params); - array = LAM_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); + len = ompi_value_array_get_size(&mca_base_params); + array = OMPI_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); for (i = 0; i < len; ++i) { if (0 == strcmp(param.mbp_full_name, array[i].mbp_full_name)) { @@ -314,17 +314,17 @@ static int param_register(const char *type_name, const char *module_name, /* Add it to the array */ - if (LAM_SUCCESS != lam_value_array_append_item(&mca_base_params, ¶m)) { - return LAM_ERROR; + if (OMPI_SUCCESS != ompi_value_array_append_item(&mca_base_params, ¶m)) { + return OMPI_ERROR; } - return lam_value_array_get_size(&mca_base_params) - 1; + return ompi_value_array_get_size(&mca_base_params) - 1; } /* * DO NOT MODIFY THIS FUNCTION WITHOUT ALSO MODIFYING mca_base_param.c! * - * This function appears in liblam. Because of unix linker semantics, + * This function appears in libompi. Because of unix linker semantics, * it's simply easier to essentially duplicate this function in libmpi * because in libmpi, we need to lookup on a keyval before looking in * the environment. The logic is simpler if we just duplicate/alter @@ -343,11 +343,11 @@ static bool param_lookup(int index, mca_base_param_storage_t *storage) if (!initialized) { return false; } - if (lam_value_array_get_size(&mca_base_params) < index) { + if (ompi_value_array_get_size(&mca_base_params) < index) { return false; } - size = lam_value_array_get_size(&mca_base_params); - array = LAM_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); + size = ompi_value_array_get_size(&mca_base_params); + array = OMPI_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); /* We either don't have a keyval or didn't find it. So look in the environment. */ diff --git a/src/mca/base/mca_base_param.h b/src/mca/base/mca_base_param.h index 1852db1637..e85729e89d 100644 --- a/src/mca/base/mca_base_param.h +++ b/src/mca/base/mca_base_param.h @@ -4,8 +4,8 @@ /** @file **/ -#ifndef LAM_MCA_BASE_PARAM_H -#define LAM_MCA_BASE_PARAM_H +#ifndef OMPI_MCA_BASE_PARAM_H +#define OMPI_MCA_BASE_PARAM_H #include "mpi.h" @@ -23,7 +23,7 @@ typedef union { /* * The following types are really in this public .h file so that - * laminfo can see them. No one else should use them! + * ompi_info can see them. No one else should use them! */ typedef enum { MCA_BASE_PARAM_TYPE_INT, @@ -66,7 +66,7 @@ extern "C" { * @param default_value The value that is used for this parameter if * the user does not supply one. * - * @retval LAM_ERROR Upon failure to register the parameter. + * @retval OMPI_ERROR Upon failure to register the parameter. * @retval index Index value that can be used with * mca_base_param_lookup_int() to retrieve the value of the parameter. * @@ -93,7 +93,7 @@ extern "C" { * @param default_value The value that is used for this parameter if * the user does not supply one. * - * @retval LAM_ERROR Upon failure to register the parameter. + * @retval OMPI_ERROR Upon failure to register the parameter. * @retval index Index value that can be used with * mca_base_param_lookup_string() to retrieve the value of the * parameter. @@ -117,9 +117,9 @@ extern "C" { * @param value Pointer to int where the parameter value will be * stored. * - * @retvalue LAM_ERROR Upon failure. The contents of value are + * @retvalue OMPI_ERROR Upon failure. The contents of value are * undefined. - * @retvalue LAM_SUCCESS Upon success. value will be filled with the + * @retvalue OMPI_SUCCESS Upon success. value will be filled with the * parameter's current value. * * The value of a specific MCA parameter can be looked up using the @@ -134,9 +134,9 @@ extern "C" { * @param value Pointer to (char *) where the parameter value will be * stored. * - * @retvalue LAM_ERROR Upon failure. The contents of value are + * @retvalue OMPI_ERROR Upon failure. The contents of value are * undefined. - * @retvalue LAM_SUCCESS Upon success. value will be filled with the + * @retvalue OMPI_SUCCESS Upon success. value will be filled with the * parameter's current value. * * The value of a specific MCA parameter can be looked up using the @@ -150,7 +150,7 @@ extern "C" { * @param module_name Name of the module containing the parameter. * @param param_name Name of the parameter. * - * @retval LAM_ERROR If the parameter was not found. + * @retval OMPI_ERROR If the parameter was not found. * @retval index If the parameter was found. * * It is not always convenient to widely propagate a parameter's index @@ -168,7 +168,7 @@ extern "C" { * Shut down the MCA parameter system (normally only invoked by the * MCA framework itself). * - * @returns LAM_SUCCESS This function never fails. + * @returns OMPI_SUCCESS This function never fails. * * This function shuts down the MCA parameter repository and frees all * associated memory. No other mca_base_param*() functions can be @@ -190,4 +190,4 @@ extern "C" { } #endif -#endif /* LAM_MCA_BASE_PARAM_H */ +#endif /* OMPI_MCA_BASE_PARAM_H */ diff --git a/src/mca/coll/Makefile.am b/src/mca/coll/Makefile.am index a50719387d..9037f5d5f0 100644 --- a/src/mca/coll/Makefile.am +++ b/src/mca/coll/Makefile.am @@ -21,8 +21,8 @@ libmca_coll_la_DEPENDENCIES = $(libmca_coll_la_LIBADD) # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/coll -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/coll +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/coll/base/Makefile.am b/src/mca/coll/base/Makefile.am index 2cbd21182e..c10c33fde7 100644 --- a/src/mca/coll/base/Makefile.am +++ b/src/mca/coll/base/Makefile.am @@ -20,8 +20,8 @@ libmca_coll_base_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/coll/base -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/coll/base +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/coll/base/base.h b/src/mca/coll/base/base.h index 9b3be2f4f7..46fc464913 100644 --- a/src/mca/coll/base/base.h +++ b/src/mca/coll/base/base.h @@ -5,10 +5,10 @@ #ifndef MCA_COLL_BASE_H #define MCA_COLL_BASE_H -#include "lam_config.h" +#include "ompi_config.h" #include "mpi.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/coll/coll.h" @@ -20,7 +20,7 @@ extern "C" { #endif int mca_coll_base_open(void); - int mca_coll_base_select(lam_list_t *selected, + int mca_coll_base_select(ompi_list_t *selected, bool *allow_multi_user_threads, bool *have_hidden_threads); int mca_coll_base_query(void); @@ -40,7 +40,7 @@ extern int mca_coll_base_output; extern int mca_coll_base_crossover; extern int mca_coll_base_associative; extern int mca_coll_base_reduce_crossover; -extern lam_list_t mca_coll_base_modules_opened; +extern ompi_list_t mca_coll_base_modules_opened; extern int mca_coll_base_bcast_collmaxlin; extern int mca_coll_base_bcast_collmaxdim; diff --git a/src/mca/coll/base/coll_base_close.c b/src/mca/coll/base/coll_base_close.c index 9ef4b5799a..3bf0713b40 100644 --- a/src/mca/coll/base/coll_base_close.c +++ b/src/mca/coll/base/coll_base_close.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -15,15 +15,15 @@ int mca_coll_base_close(void) { - extern lam_list_t mca_coll_base_modules_opened; + extern ompi_list_t mca_coll_base_modules_opened; /* Close all remaining available modules (may be one if this is a - LAM RTE program, or [possibly] multiple if this is laminfo) */ + OMPI RTE program, or [possibly] multiple if this is ompi_info) */ mca_base_modules_close(mca_coll_base_output, &mca_coll_base_modules_opened, NULL); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/coll/base/coll_base_comm_init.c b/src/mca/coll/base/coll_base_comm_init.c index a7dd83c60c..95cdd62eb6 100644 --- a/src/mca/coll/base/coll_base_comm_init.c +++ b/src/mca/coll/base/coll_base_comm_init.c @@ -3,7 +3,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -16,7 +16,7 @@ #include "mca/coll/base/base.h" #include "communicator/communicator.h" -extern lam_list_t mca_coll_base_available; +extern ompi_list_t mca_coll_base_available; /* * Public variables @@ -35,19 +35,19 @@ static mca_coll_1_0_0_t lb_functions; #if 0 -static int check_module_name(lam_communicator_t *comm, char *name); +static int check_module_name(ompi_communicator_t *comm, char *name); #endif -static int check_all_modules(lam_communicator_t *comm); -static int check_module(lam_communicator_t *comm, mca_base_module_t *coll, +static int check_all_modules(ompi_communicator_t *comm); +static int check_module(ompi_communicator_t *comm, mca_base_module_t *coll, const mca_coll_1_0_0_t **actions); static const mca_coll_1_0_0_t * - query_1_0_0(mca_base_module_t *coll, lam_communicator_t *comm, int *priority); -static int init_module(mca_base_module_t *module, lam_communicator_t *comm, + query_1_0_0(mca_base_module_t *coll, ompi_communicator_t *comm, int *priority); +static int init_module(mca_base_module_t *module, ompi_communicator_t *comm, const mca_coll_1_0_0_t **actions); -static int init_1_0_0(lam_communicator_t *comm, +static int init_1_0_0(ompi_communicator_t *comm, const mca_coll_1_0_0_t **actions); -static void replace_null_with_lam_basic(mca_coll_1_0_0_t *sel_module); +static void replace_null_with_ompi_basic(mca_coll_1_0_0_t *sel_module); /* @@ -61,7 +61,7 @@ static void replace_null_with_lam_basic(mca_coll_1_0_0_t *sel_module); * we construct is probably ok. */ int -mca_coll_base_init_comm(lam_communicator_t *comm) +mca_coll_base_init_comm(ompi_communicator_t *comm) { int i; #if 0 @@ -80,7 +80,7 @@ mca_coll_base_init_comm(lam_communicator_t *comm) else snprintf(name, sizeof(name), " (cid %d)", comm->c_contextid); name[sizeof(name) - 1] = '\0'; - lam_debug(mca_coll_did, "init_comm: new communicator: %s", name); + ompi_debug(mca_coll_did, "init_comm: new communicator: %s", name); } /* WARNING: This will go away someday. It is *only* here for a @@ -95,7 +95,7 @@ mca_coll_base_init_comm(lam_communicator_t *comm) else { - MPI_Comm_get_attr(comm, LAM_MPI_SSI_COLL, &module_name, &found); + MPI_Comm_get_attr(comm, OMPI_MPI_SSI_COLL, &module_name, &found); if (found == 1) i = check_module_name(comm, module_name); @@ -115,22 +115,22 @@ mca_coll_base_init_comm(lam_communicator_t *comm) /* If we have no collective modules available, it's an error. Thanks for playing! */ - if (i == LAM_ERROR) { + if (i == OMPI_ERROR) { #if 0 if (mca_coll_verbose >= 10) - lam_debug(mca_coll_did, "init_comm: No modules available!"); + ompi_debug(mca_coll_did, "init_comm: No modules available!"); show_help("ssi-coll", "none-available", NULL); - return LAM_ERROR; + return OMPI_ERROR; } /* Otherwise, announce the winner */ if (mca_coll_verbose > 0) - lam_debug(mca_coll_did, "init_comm: Selected coll module %s", + ompi_debug(mca_coll_did, "init_comm: Selected coll module %s", mca_coll_modules[i]->ssi_module_name); #endif - return LAM_ERROR; + return OMPI_ERROR; } return 0; } @@ -145,7 +145,7 @@ return 0; * error (i.e., don't try to find any other available modules). */ static int -check_module_name(lam_communicator_t *comm, char *name) +check_module_name(ompi_communicator_t *comm, char *name) { mca_module_t *module; mca_base_module_t *coll; @@ -153,8 +153,8 @@ check_module_name(lam_communicator_t *comm, char *name) /* Find the target module by its name */ - for (module = al_top(lam_ssi_coll_base_available); module != NULL; - module = al_next(lam_ssi_coll_base_available, module)) { + for (module = al_top(ompi_ssi_coll_base_available); module != NULL; + module = al_next(ompi_ssi_coll_base_available, module)) { coll = module->lsm_module; if (strcmp(coll->ssi_module_name, name) == 0) { @@ -169,11 +169,11 @@ check_module_name(lam_communicator_t *comm, char *name) comm->c_ssi_coll = *actions; actions = NULL; if (init_module(coll, comm, &actions) != 0) - return LAM_ERROR; + return OMPI_ERROR; if (actions != NULL) comm->c_ssi_coll = *actions; - /* Some logic is required if we decide to use lam_basic pointers + /* Some logic is required if we decide to use ompi_basic pointers for the NULL pointers */ return 0; } @@ -185,7 +185,7 @@ check_module_name(lam_communicator_t *comm, char *name) } } - return LAM_ERROR; + return OMPI_ERROR; } #endif @@ -199,23 +199,23 @@ check_module_name(lam_communicator_t *comm, char *name) * structs with the data from the winner. Call finalize and close on * all the losers that we invoked initialize on. * - * Return LAM_ERROR if there are no modules available. + * Return OMPI_ERROR if there are no modules available. */ static int -check_all_modules(lam_communicator_t *comm) +check_all_modules(ompi_communicator_t *comm) { int priority, best_priority = -1; mca_base_module_t *best_module; - lam_list_item_t *module; + ompi_list_item_t *module; const mca_coll_1_0_0_t *cur, *best = NULL; /* Call the query function in every collective module and see if they want to run on this communicator */ for (best_priority = -1, - module = lam_list_get_first(&mca_coll_base_available); - module != lam_list_get_end(&mca_coll_base_available); - module = lam_list_get_next(module)) { + module = ompi_list_get_first(&mca_coll_base_available); + module != ompi_list_get_end(&mca_coll_base_available); + module = ompi_list_get_next(module)) { priority = check_module(comm, ((mca_base_module_priority_list_item_t *) module)->mpli_module, @@ -232,7 +232,7 @@ check_all_modules(lam_communicator_t *comm) /* If we didn't find any available modules, return an error */ if (best_priority == -1) - return LAM_ERROR; + return OMPI_ERROR; /* Otherwise, we have a winner. Assign all the function pointers in the comm to that module, and call its init function. */ @@ -240,14 +240,14 @@ check_all_modules(lam_communicator_t *comm) comm->c_coll = *best; best = NULL; if (init_module(best_module, comm, &best) != 0) - return LAM_ERROR; + return OMPI_ERROR; if (best != NULL) comm->c_coll = *best; - /* Replace all the Non null collective functions by corresponding lam_basic + /* Replace all the Non null collective functions by corresponding ompi_basic ones */ - replace_null_with_lam_basic(&(comm->c_coll)); + replace_null_with_ompi_basic(&(comm->c_coll)); return 0; } @@ -257,7 +257,7 @@ check_all_modules(lam_communicator_t *comm) * Check a single module */ static int -check_module(lam_communicator_t *comm, mca_base_module_t *coll, +check_module(ompi_communicator_t *comm, mca_base_module_t *coll, const mca_coll_1_0_0_t **actions) { int priority = -1; @@ -270,7 +270,7 @@ check_module(lam_communicator_t *comm, mca_base_module_t *coll, if (*actions != NULL) { /* If the module is basic then store the pointers so that you can - replace NULL pointers by lam_basic ones */ + replace NULL pointers by ompi_basic ones */ if (strcmp(coll->mca_module_name, "basic") == 0) { lb_functions = **actions; } @@ -278,8 +278,8 @@ check_module(lam_communicator_t *comm, mca_base_module_t *coll, /* VPS: add after debug streams done */ #if 0 - if (lam_ssi_coll_verbose >= 10) - lam_debug(lam_ssi_coll_did, + if (ompi_ssi_coll_verbose >= 10) + ompi_debug(ompi_ssi_coll_did, "init_comm: module available: %s, priority: %d", coll->ssi_module_name, priority); fprintf(stderr, "init_comm: module available: %s, priority: %d", @@ -288,8 +288,8 @@ check_module(lam_communicator_t *comm, mca_base_module_t *coll, } else { #if 0 - if (lam_ssi_coll_verbose >= 10) - lam_debug(lam_ssi_coll_did, + if (ompi_ssi_coll_verbose >= 10) + ompi_debug(ompi_ssi_coll_did, "init_comm: module not available: %s, priority: %d", coll->ssi_module_name, priority); fprintf(stderr, "init_comm: module not available: %s, priority: %d", @@ -310,7 +310,7 @@ check_module(lam_communicator_t *comm, mca_base_module_t *coll, * 1.1.0 actions struct. */ static const mca_coll_1_0_0_t * -query_1_0_0(mca_base_module_t *coll, lam_communicator_t *comm, int *priority) +query_1_0_0(mca_base_module_t *coll, ompi_communicator_t *comm, int *priority) { mca_coll_base_module_1_0_0_t *coll100 = (mca_coll_base_module_1_0_0_t *)coll; @@ -326,7 +326,7 @@ query_1_0_0(mca_base_module_t *coll, lam_communicator_t *comm, int *priority) * Initialize a module */ static int -init_module(mca_base_module_t *module, lam_communicator_t *comm, +init_module(mca_base_module_t *module, ompi_communicator_t *comm, const mca_coll_1_0_0_t **actions) { if (module->mca_major_version == 1 && @@ -334,7 +334,7 @@ init_module(mca_base_module_t *module, lam_communicator_t *comm, module->mca_release_version == 0) return init_1_0_0(comm, actions); else - return LAM_ERROR; + return OMPI_ERROR; } @@ -343,7 +343,7 @@ init_module(mca_base_module_t *module, lam_communicator_t *comm, * convert it before returning. */ static int -init_1_0_0(lam_communicator_t *comm, const mca_coll_1_0_0_t **actions) +init_1_0_0(ompi_communicator_t *comm, const mca_coll_1_0_0_t **actions) { const mca_coll_1_0_0_t *actions100; mca_coll_base_init_1_0_0_fn_t init100; @@ -356,18 +356,18 @@ init_1_0_0(lam_communicator_t *comm, const mca_coll_1_0_0_t **actions) init100 = (mca_coll_base_init_1_0_0_fn_t) comm->c_coll.coll_init; if (init100(comm, &actions100) != 0) - return LAM_ERROR; + return OMPI_ERROR; return 0; } /* - * Replace the NULL pointers by corresponsing lam_basic pointers + * Replace the NULL pointers by corresponsing ompi_basic pointers */ static void -replace_null_with_lam_basic(mca_coll_1_0_0_t *selected_module) { +replace_null_with_ompi_basic(mca_coll_1_0_0_t *selected_module) { if (selected_module->coll_allgather_intra == NULL) selected_module->coll_allgather_intra = lb_functions.coll_allgather_intra; if (selected_module->coll_allgatherv_intra == NULL) diff --git a/src/mca/coll/base/coll_base_open.c b/src/mca/coll/base/coll_base_open.c index 6ec029b80d..bd4417003e 100644 --- a/src/mca/coll/base/coll_base_open.c +++ b/src/mca/coll/base/coll_base_open.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -30,7 +30,7 @@ int mca_coll_base_associative = 1; int mca_coll_base_reduce_crossover = 4; int mca_coll_base_bcast_collmaxlin = 4; int mca_coll_base_bcast_collmaxdim = 64; -lam_list_t mca_coll_base_modules_opened; +ompi_list_t mca_coll_base_modules_opened; /** @@ -41,13 +41,13 @@ int mca_coll_base_open(void) { /* Open up all available modules */ - if (LAM_SUCCESS != + if (OMPI_SUCCESS != mca_base_modules_open("coll", 0, mca_coll_base_static_modules, &mca_coll_base_modules_opened)) { - return LAM_ERROR; + return OMPI_ERROR; } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/coll/base/coll_base_query.c b/src/mca/coll/base/coll_base_query.c index e2c1f6ac3f..29d112db51 100644 --- a/src/mca/coll/base/coll_base_query.c +++ b/src/mca/coll/base/coll_base_query.c @@ -3,7 +3,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include #include @@ -15,14 +15,14 @@ #include "mca/coll/coll.h" #include "mca/coll/base/base.h" #include "communicator/communicator.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "include/constants.h" /* * Global variables */ -lam_list_t mca_coll_base_available; +ompi_list_t mca_coll_base_available; /* @@ -47,30 +47,30 @@ mca_coll_base_query() { int found, count = 0; mca_base_module_priority_list_item_t *entry; - lam_list_item_t *p; + ompi_list_item_t *p; /* Initialize the list */ /* VPS: This is not thread safe, this needs to be a local thingy */ - OBJ_CONSTRUCT(&mca_coll_base_available, lam_list_t); + OBJ_CONSTRUCT(&mca_coll_base_available, ompi_list_t); /* In 64 bit mode, this struct can have empty padding */ #if 0 - LAM_ZERO_ME(entry); + OMPI_ZERO_ME(entry); #endif /* The list of modules that we should check has already been established in mca_coll_base_opened. */ - for (found = 0, p = lam_list_get_first(&mca_coll_base_modules_opened); - p != lam_list_get_end(&mca_coll_base_modules_opened); - p = lam_list_get_next(p)) { + for (found = 0, p = ompi_list_get_first(&mca_coll_base_modules_opened); + p != ompi_list_get_end(&mca_coll_base_modules_opened); + p = ompi_list_get_next(p)) { entry = malloc (sizeof(mca_base_module_priority_list_item_t)); if (NULL == entry) - return LAM_ERROR; + return OMPI_ERROR; - OBJ_CONSTRUCT(&entry->super, lam_list_item_t); + OBJ_CONSTRUCT(&entry->super, ompi_list_item_t); entry->mpli_module = ((mca_base_module_list_item_t *) p)->mli_module; @@ -90,8 +90,8 @@ mca_coll_base_query() ++count; entry->mpli_priority = 0; - lam_list_append(&mca_coll_base_available, - (lam_list_item_t *) entry); + ompi_list_append(&mca_coll_base_available, + (ompi_list_item_t *) entry); found = 1; } else { @@ -122,16 +122,16 @@ mca_coll_base_query() #if 0 if (mca_coll_verbose >= 10) - lam_debug(mca_coll_did, "query: no collectives available!"); + ompi_debug(mca_coll_did, "query: no collectives available!"); show_help("ssi-coll", "none-available", NULL); #endif - return LAM_ERROR; + return OMPI_ERROR; } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -142,8 +142,8 @@ thread_query(mca_base_module_t *ls, int ret; #if 0 - if (lam_ssi_coll_verbose > 10) - lam_debug(lam_ssi_coll_did, "query: querying coll module %s", + if (ompi_ssi_coll_verbose > 10) + ompi_debug(ompi_ssi_coll_did, "query: querying coll module %s", ls->ssi_module_name); fprintf(stderr, "query: querying coll module %s\n", ls->mca_module_name); @@ -162,8 +162,8 @@ thread_query(mca_base_module_t *ls, if (ret != 0) { #if 0 - if (lam_mca_coll_verbose > 10) - lam_debug(lam_mca_coll_did, + if (ompi_mca_coll_verbose > 10) + ompi_debug(ompi_mca_coll_did, "query: coll module %s is not available", ls->mca_module_name); fprintf(stderr, "query: coll module %s is not available\n", @@ -176,8 +176,8 @@ thread_query(mca_base_module_t *ls, } else { #if 0 - if (lam_mca_coll_verbose >= 10) - lam_debug(lam_mca_coll_did, "query: coll module %s available", + if (ompi_mca_coll_verbose >= 10) + ompi_debug(ompi_mca_coll_did, "query: coll module %s available", ls->mca_module_name); fprintf(stderr, "query: coll module %s available\n", ls->mca_module_name); diff --git a/src/mca/coll/base/coll_base_select.c b/src/mca/coll/base/coll_base_select.c index 3d3e51bada..81f81b8e56 100644 --- a/src/mca/coll/base/coll_base_select.c +++ b/src/mca/coll/base/coll_base_select.c @@ -2,14 +2,14 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/mca.h" #include "mca/coll/coll.h" #include "mca/coll/base/base.h" -int mca_coll_base_select(lam_list_t *selected, bool *allow_multi_user_threads, +int mca_coll_base_select(ompi_list_t *selected, bool *allow_multi_user_threads, bool *have_hidden_threads) { /* JMS Need to implement */ @@ -19,5 +19,5 @@ int mca_coll_base_select(lam_list_t *selected, bool *allow_multi_user_threads, /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/coll/basic/Makefile.am b/src/mca/coll/basic/Makefile.am index cb30dc90ea..b2636502df 100644 --- a/src/mca/coll/basic/Makefile.am +++ b/src/mca/coll/basic/Makefile.am @@ -3,9 +3,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -13,9 +13,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_coll_basic_LOADABLE_MODULE +if OMPI_BUILD_coll_basic_LOADABLE_MODULE module_noinst = module_install = mca_coll_basic.la else @@ -23,7 +23,7 @@ module_noinst = libmca_coll_basic.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_coll_basic_la_SOURCES = mca_coll_basic_la_LIBADD = \ diff --git a/src/mca/coll/basic/src/Makefile.am b/src/mca/coll/basic/src/Makefile.am index 7a87274f21..2ffe9381cd 100644 --- a/src/mca/coll/basic/src/Makefile.am +++ b/src/mca/coll/basic/src/Makefile.am @@ -3,12 +3,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_coll_basic.la libmca_coll_basic_la_SOURCES = \ diff --git a/src/mca/coll/basic/src/coll_basic.c b/src/mca/coll/basic/src/coll_basic.c index f5876f7cd5..ba204320e6 100644 --- a/src/mca/coll/basic/src/coll_basic.c +++ b/src/mca/coll/basic/src/coll_basic.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -176,7 +176,7 @@ int mca_coll_basic_init_query(int *thread_min, int *thread_max) *thread_min = MPI_THREAD_SINGLE; *thread_max = MPI_THREAD_MULTIPLE; - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -217,7 +217,7 @@ int mca_coll_basic_init(MPI_Comm comm, const mca_coll_1_0_0_t **new_coll) { /* Nothing to init on the communicator */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -228,5 +228,5 @@ int mca_coll_basic_finalize(MPI_Comm comm) { /* Nothing to finalize on the communicator */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/coll/basic/src/coll_basic.h b/src/mca/coll/basic/src/coll_basic.h index acb6dcace6..063812138a 100644 --- a/src/mca/coll/basic/src/coll_basic.h +++ b/src/mca/coll/basic/src/coll_basic.h @@ -5,7 +5,7 @@ #ifndef MCA_COLL_BASIC_EXPORT_H #define MCA_COLL_BASIC_EXPORT_H -#include "lam_config.h" +#include "ompi_config.h" #include "mca/mca.h" #include "mca/coll/coll.h" diff --git a/src/mca/coll/basic/src/coll_basic_allgather.c b/src/mca/coll/basic/src/coll_basic_allgather.c index b6bbe3431f..ff81494ba8 100644 --- a/src/mca/coll/basic/src/coll_basic_allgather.c +++ b/src/mca/coll/basic/src/coll_basic_allgather.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -30,7 +30,7 @@ int mca_coll_basic_allgather(void *sbuf, int scount, /* Gather and broadcast. */ - size = lam_comm_size(comm); + size = ompi_comm_size(comm); err = comm->c_coll.coll_gather_intra(sbuf, scount, sdtype, rbuf, rcount, rdtype, 0, comm); diff --git a/src/mca/coll/basic/src/coll_basic_allgatherv.c b/src/mca/coll/basic/src/coll_basic_allgatherv.c index 703fd7a161..5427154ed7 100644 --- a/src/mca/coll/basic/src/coll_basic_allgatherv.c +++ b/src/mca/coll/basic/src/coll_basic_allgatherv.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -27,7 +27,7 @@ int mca_coll_basic_allgatherv(void *sbuf, int scount, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i, size; int err; diff --git a/src/mca/coll/basic/src/coll_basic_allreduce.c b/src/mca/coll/basic/src/coll_basic_allreduce.c index c9140ef7db..7636d29077 100644 --- a/src/mca/coll/basic/src/coll_basic_allreduce.c +++ b/src/mca/coll/basic/src/coll_basic_allreduce.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -25,7 +25,7 @@ int mca_coll_basic_allreduce(void *sbuf, void *rbuf, int count, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int err; diff --git a/src/mca/coll/basic/src/coll_basic_alltoall.c b/src/mca/coll/basic/src/coll_basic_alltoall.c index 520a9dd75b..e893b0c0ab 100644 --- a/src/mca/coll/basic/src/coll_basic_alltoall.c +++ b/src/mca/coll/basic/src/coll_basic_alltoall.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -40,24 +40,24 @@ int mca_coll_basic_alltoall(void *sbuf, int scount, MPI_Aint sndinc; MPI_Aint rcvinc; - lam_request_t **req; - lam_request_t **sreq; - lam_request_t **rreq; + ompi_request_t **req; + ompi_request_t **sreq; + ompi_request_t **rreq; /* Initialize. */ - size = lam_comm_size(comm); - rank = lam_comm_rank(comm); + size = ompi_comm_size(comm); + rank = ompi_comm_rank(comm); - err = lam_ddt_get_extent(sdtype, &lb, &sndinc); + err = ompi_ddt_get_extent(sdtype, &lb, &sndinc); if (0 != err) { - return LAM_ERROR; + return OMPI_ERROR; } - err = lam_ddt_get_extent(rdtype, &lb, &rcvinc); + err = ompi_ddt_get_extent(rdtype, &lb, &rcvinc); if (0 != err) { - return LAM_ERROR; + return OMPI_ERROR; } sndinc *= scount; @@ -67,7 +67,7 @@ int mca_coll_basic_alltoall(void *sbuf, int scount, nreqs = 2 * (size - 1); if (nreqs > 0) { - req = malloc(nreqs * sizeof(lam_request_t *)); + req = malloc(nreqs * sizeof(ompi_request_t *)); if (NULL == req) { return ENOMEM; } @@ -80,7 +80,7 @@ int mca_coll_basic_alltoall(void *sbuf, int scount, psnd = ((char *) sbuf) + (rank * sndinc); prcv = ((char *) rbuf) + (rank * rcvinc); - err = lam_ddt_sndrcv(psnd, scount, sdtype, + err = ompi_ddt_sndrcv(psnd, scount, sdtype, prcv, rcount, rdtype, MCA_COLL_BASE_TAG_ALLTOALL, comm); diff --git a/src/mca/coll/basic/src/coll_basic_alltoallv.c b/src/mca/coll/basic/src/coll_basic_alltoallv.c index c0a911bc64..8b3bc9a068 100644 --- a/src/mca/coll/basic/src/coll_basic_alltoallv.c +++ b/src/mca/coll/basic/src/coll_basic_alltoallv.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -19,7 +19,7 @@ /* * alltoallv * - * Function: - MPI_Alltoallv for non-lamd RPIs + * Function: - MPI_Alltoallv for non-ompid RPIs * Accepts: - same as MPI_Alltoallv() * Returns: - MPI_SUCCESS or an MPI error code */ @@ -30,7 +30,7 @@ mca_coll_basic_alltoallv(void *sbuf, int *scounts, int *sdisps, MPI_Datatype rdtype, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int size; @@ -69,13 +69,13 @@ mca_coll_basic_alltoallv(void *sbuf, int *scounts, int *sdisps, psnd = ((char *) sbuf) + (sdisps[rank] * sndextent); prcv = ((char *) rbuf) + (rdisps[rank] * rcvextent); #if 0 - /* JMS: Need a lam_datatype_something() here that allows two + /* JMS: Need a ompi_datatype_something() here that allows two different datatypes */ - err = lam_dtsndrcv(psnd, scounts[rank], sdtype, + err = ompi_dtsndrcv(psnd, scounts[rank], sdtype, prcv, rcounts[rank], rdtype, BLKMPIALLTOALLV, comm); if (MPI_SUCCESS != err) { if (NULL != req) - LAM_FREE(req); + OMPI_FREE(req); return err; } #endif @@ -100,7 +100,7 @@ mca_coll_basic_alltoallv(void *sbuf, int *scounts, int *sdisps, err = MPI_Recv_init(prcv, rcounts[i], rdtype, i, BLKMPIALLTOALLV, comm, preq++); if (MPI_SUCCESS != err) { - LAM_FREE(req); + OMPI_FREE(req); return err; } #endif @@ -117,7 +117,7 @@ mca_coll_basic_alltoallv(void *sbuf, int *scounts, int *sdisps, err = MPI_Send_init(psnd, scounts[i], sdtype, i, BLKMPIALLTOALLV, comm, preq++); if (MPI_SUCCESS != err) { - LAM_FREE(req); + OMPI_FREE(req); return err; } #endif diff --git a/src/mca/coll/basic/src/coll_basic_alltoallw.c b/src/mca/coll/basic/src/coll_basic_alltoallw.c index 8d3622685e..5fb7d909b5 100644 --- a/src/mca/coll/basic/src/coll_basic_alltoallw.c +++ b/src/mca/coll/basic/src/coll_basic_alltoallw.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -19,7 +19,7 @@ /* * alltoallw * - * Function: - MPI_Alltoallw for non-lamd RPIs + * Function: - MPI_Alltoallw for non-ompid RPIs * Accepts: - same as MPI_Alltoallw() * Returns: - MPI_SUCCESS or an MPI error code */ @@ -29,7 +29,7 @@ int mca_coll_basic_alltoallw(void *sbuf, int *scounts, int *sdisps, MPI_Datatype *rdtypes, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int size; @@ -64,13 +64,13 @@ int mca_coll_basic_alltoallw(void *sbuf, int *scounts, int *sdisps, psnd = ((char *) sbuf) + sdisps[rank]; prcv = ((char *) rbuf) + rdisps[rank]; #if 0 - /* JMS: Need a lam_datatype_something() here that allows two + /* JMS: Need a ompi_datatype_something() here that allows two different datatypes */ - err = lam_dtsndrcv(psnd, scounts[rank], sdtypes[rank], + err = ompi_dtsndrcv(psnd, scounts[rank], sdtypes[rank], prcv, rcounts[rank], rdtypes[rank], BLKMPIALLTOALLW, comm); if (MPI_SUCCESS != err) { if (MPI_REQUEST_NULL != req) - LAM_FREE(req); + OMPI_FREE(req); return err; } #endif @@ -95,7 +95,7 @@ int mca_coll_basic_alltoallw(void *sbuf, int *scounts, int *sdisps, err = MPI_Recv_init(prcv, rcounts[i], rdtypes[i], i, BLKMPIALLTOALLW, comm, preq++); if (MPI_SUCCESS != err) { - LAM_FREE(req); + OMPI_FREE(req); return err; } #endif @@ -112,7 +112,7 @@ int mca_coll_basic_alltoallw(void *sbuf, int *scounts, int *sdisps, err = MPI_Send_init(psnd, scounts[i], sdtypes[i], i, BLKMPIALLTOALLW, comm, preq++); if (MPI_SUCCESS != err) { - LAM_FREE(req); + OMPI_FREE(req); return err; } #endif diff --git a/src/mca/coll/basic/src/coll_basic_barrier.c b/src/mca/coll/basic/src/coll_basic_barrier.c index 67fd22b700..0a1f460b45 100644 --- a/src/mca/coll/basic/src/coll_basic_barrier.c +++ b/src/mca/coll/basic/src/coll_basic_barrier.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -26,8 +26,8 @@ int mca_coll_basic_barrier_lin(MPI_Comm comm) { int i; int err; - int size = lam_comm_size(comm); - int rank = lam_comm_rank(comm); + int size = ompi_comm_size(comm); + int rank = ompi_comm_rank(comm); /* All non-root send & receive zero-length message. */ @@ -88,14 +88,14 @@ mca_coll_basic_barrier_log(MPI_Comm comm) int dim; int hibit; int mask; - int size = lam_comm_size(comm); - int rank = lam_comm_rank(comm); + int size = ompi_comm_size(comm); + int rank = ompi_comm_rank(comm); /* Send null-messages up and down the tree. Synchronization at the root (rank 0). */ dim = comm->c_cube_dim; - hibit = lam_hibit(rank, dim); + hibit = ompi_hibit(rank, dim); --dim; /* Receive from children. */ diff --git a/src/mca/coll/basic/src/coll_basic_bcast.c b/src/mca/coll/basic/src/coll_basic_bcast.c index e26c05cefa..9ddd8502d0 100644 --- a/src/mca/coll/basic/src/coll_basic_bcast.c +++ b/src/mca/coll/basic/src/coll_basic_bcast.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -30,11 +30,11 @@ int mca_coll_basic_bcast_lin(void *buff, int count, int size; int rank; int err; - lam_request_t **preq; - lam_request_t **reqs = comm->bcast_lin_reqs; + ompi_request_t **preq; + ompi_request_t **reqs = comm->bcast_lin_reqs; - size = lam_comm_size(comm); - rank = lam_comm_rank(comm); + size = ompi_comm_size(comm); + rank = ompi_comm_rank(comm); /* Non-root receive the data. */ @@ -101,15 +101,15 @@ int mca_coll_basic_bcast_log(void *buff, int count, int mask; int err; int nreqs; - lam_request_t **preq; - lam_request_t **reqs = comm->bcast_log_reqs; + ompi_request_t **preq; + ompi_request_t **reqs = comm->bcast_log_reqs; - size = lam_comm_size(comm); - rank = lam_comm_rank(comm); + size = ompi_comm_size(comm); + rank = ompi_comm_rank(comm); vrank = (rank + size - root) % size; dim = comm->c_cube_dim; - hibit = lam_hibit(vrank, dim); + hibit = ompi_hibit(vrank, dim); --dim; /* Receive data from parent in the tree. */ diff --git a/src/mca/coll/basic/src/coll_basic_exscan.c b/src/mca/coll/basic/src/coll_basic_exscan.c index 43b4acd2cd..1fb9099def 100644 --- a/src/mca/coll/basic/src/coll_basic_exscan.c +++ b/src/mca/coll/basic/src/coll_basic_exscan.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -25,7 +25,7 @@ int mca_coll_basic_exscan(void *sbuf, void *rbuf, int count, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int size; int rank; @@ -38,16 +38,16 @@ int mca_coll_basic_exscan(void *sbuf, void *rbuf, int count, MPI_Comm_rank(comm, &rank); MPI_Comm_size(comm, &size); - /* JMS: Need to replace lots things in this file: lam_dt* stuff with - lam_datatype_*() functions. Also need to replace lots of + /* JMS: Need to replace lots things in this file: ompi_dt* stuff with + ompi_datatype_*() functions. Also need to replace lots of MPI_Send/MPI_Recv with negative tags and PML entry points. */ /* Otherwise receive previous buffer and reduce. Store the recieved buffer in different array and then send the reduced array to the next process */ - /* JMS Need to replace this with some lam_datatype_*() function */ - err = lam_dtbuffer(dtype, count, &gathered_buffer, &gathered_origin); + /* JMS Need to replace this with some ompi_datatype_*() function */ + err = ompi_dtbuffer(dtype, count, &gathered_buffer, &gathered_origin); if (MPI_SUCCESS != err) { return err; } @@ -55,26 +55,26 @@ int mca_coll_basic_exscan(void *sbuf, void *rbuf, int count, if (0 != rank) { if (!op->op_commute) { - /* JMS Need to replace with this some lam_datatype_*() function */ - err = lam_dtbuffer(dtype, count, &tmpbuf, &origin); + /* JMS Need to replace with this some ompi_datatype_*() function */ + err = ompi_dtbuffer(dtype, count, &tmpbuf, &origin); if (MPI_SUCCESS != err) { if (NULL != gathered_buffer) { - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); } return err; } /* Copy the send buffer into the receive buffer. */ - /* JMS Need to replace with this some lam_datatype_*() function */ - err = lam_dtsndrcv(sbuf, count, dtype, rbuf, + /* JMS Need to replace with this some ompi_datatype_*() function */ + err = ompi_dtsndrcv(sbuf, count, dtype, rbuf, count, dtype, BLKMPIEXSCAN, comm); if (MPI_SUCCESS != err) { if (NULL != gathered_buffer) { - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); } if (NULL != tmpbuf) { - LAM_FREE(tmpbuf); + OMPI_FREE(tmpbuf); } return err; } @@ -85,8 +85,8 @@ int mca_coll_basic_exscan(void *sbuf, void *rbuf, int count, rank - 1, BLKMPIEXSCAN, comm, MPI_STATUS_IGNORE); /* JMS Need to add error checking here */ - /* JMS Need to replace with this some lam_datatype_*() function */ - err = lam_dtsndrcv(origin, count, dtype, gathered_origin, + /* JMS Need to replace with this some ompi_datatype_*() function */ + err = ompi_dtsndrcv(origin, count, dtype, gathered_origin, count, dtype, BLKMPIEXSCAN, comm); } else { origin = sbuf; @@ -98,30 +98,30 @@ int mca_coll_basic_exscan(void *sbuf, void *rbuf, int count, if (MPI_SUCCESS != err) { if (NULL != gathered_buffer) { - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); } if (NULL != tmpbuf) { - LAM_FREE(tmpbuf); + OMPI_FREE(tmpbuf); } return err; } - /* JMS Need to replace with this some lam_datatype_*() function */ - err = lam_dtsndrcv(rbuf, count, dtype, gathered_origin, + /* JMS Need to replace with this some ompi_datatype_*() function */ + err = ompi_dtsndrcv(rbuf, count, dtype, gathered_origin, count, dtype, BLKMPIEXSCAN, comm); } if (err != MPI_SUCCESS) { if (NULL != gathered_buffer) { - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); } if (NULL != tmpbuf) { - LAM_FREE(tmpbuf); + OMPI_FREE(tmpbuf); } return err; } - if (op->op_flags & LAM_LANGF77) { + if (op->op_flags & OMPI_LANGF77) { (op->op_func)(origin, rbuf, &count, &dtype->dt_f77handle); } else { (op->op_func)(origin, rbuf, &count, &dtype); @@ -137,33 +137,33 @@ int mca_coll_basic_exscan(void *sbuf, void *rbuf, int count, err = MPI_Send(rbuf, count, dtype, rank + 1, BLKMPIEXSCAN, comm); if (MPI_SUCCESS != err) { if (NULL != gathered_buffer) { - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); } if (NULL != tmpbuf) { - LAM_FREE(tmpbuf); + OMPI_FREE(tmpbuf); } return err; } } if (rank != 0) { - err = lam_dtsndrcv(gathered_origin, count, dtype, rbuf, + err = ompi_dtsndrcv(gathered_origin, count, dtype, rbuf, count, dtype, BLKMPIEXSCAN, comm); if (MPI_SUCCESS != err) { if (NULL != gathered_buffer) { - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); } if (NULL != tmpbuf) { - LAM_FREE(tmpbuf); + OMPI_FREE(tmpbuf); } return err; } } if (NULL != gathered_buffer) - LAM_FREE(gathered_buffer); + OMPI_FREE(gathered_buffer); if (NULL != tmpbuf) - LAM_FREE(tmpbuf); + OMPI_FREE(tmpbuf); /* All done */ diff --git a/src/mca/coll/basic/src/coll_basic_gather.c b/src/mca/coll/basic/src/coll_basic_gather.c index 898e5bc91f..61e27f2177 100644 --- a/src/mca/coll/basic/src/coll_basic_gather.c +++ b/src/mca/coll/basic/src/coll_basic_gather.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -33,8 +33,8 @@ int mca_coll_basic_gather(void *sbuf, int scount, MPI_Datatype sdtype, MPI_Aint extent; MPI_Aint lb; - size = lam_comm_size(comm); - rank = lam_comm_rank(comm); + size = ompi_comm_size(comm); + rank = ompi_comm_rank(comm); /* Everyone but root sends data and returns. */ @@ -47,9 +47,9 @@ int mca_coll_basic_gather(void *sbuf, int scount, MPI_Datatype sdtype, /* I am the root, loop receiving the data. */ - err = lam_ddt_get_extent(rdtype, &lb, &extent); + err = ompi_ddt_get_extent(rdtype, &lb, &extent); if (0 != err) - return LAM_ERROR; + return OMPI_ERROR; incr = extent * rcount; for (i = 0, ptmp = (char *) rbuf; i < size; ++i, ptmp += incr) { @@ -57,7 +57,7 @@ int mca_coll_basic_gather(void *sbuf, int scount, MPI_Datatype sdtype, /* simple optimization */ if (i == rank) { - err = lam_ddt_sndrcv(sbuf, scount, sdtype, ptmp, + err = ompi_ddt_sndrcv(sbuf, scount, sdtype, ptmp, rcount, rdtype, MCA_COLL_BASE_TAG_GATHER, comm); } else { diff --git a/src/mca/coll/basic/src/coll_basic_gatherv.c b/src/mca/coll/basic/src/coll_basic_gatherv.c index 2ec6f6e988..981102d79b 100644 --- a/src/mca/coll/basic/src/coll_basic_gatherv.c +++ b/src/mca/coll/basic/src/coll_basic_gatherv.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -25,7 +25,7 @@ int mca_coll_basic_gatherv(void *sbuf, int scount, MPI_Datatype sdtype, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int rank; @@ -34,8 +34,8 @@ int mca_coll_basic_gatherv(void *sbuf, int scount, MPI_Datatype sdtype, char *ptmp; MPI_Aint extent; - /* JMS: Need to replace lots things in this file: lam_dt* stuff with - lam_datatype_*() functions. Also need to replace lots of + /* JMS: Need to replace lots things in this file: ompi_dt* stuff with + ompi_datatype_*() functions. Also need to replace lots of MPI_Send/MPI_Recv with negative tags and PML entry points. */ MPI_Comm_size(comm, &size); @@ -57,7 +57,7 @@ int mca_coll_basic_gatherv(void *sbuf, int scount, MPI_Datatype sdtype, /* simple optimization */ if (i == rank) { - err = lam_dtsndrcv(sbuf, scount, sdtype, + err = ompi_dtsndrcv(sbuf, scount, sdtype, ptmp, rcounts[i], rdtype, BLKMPIGATHERV, comm); } else { err = MPI_Recv(ptmp, rcounts[i], rdtype, i, diff --git a/src/mca/coll/basic/src/coll_basic_module.c b/src/mca/coll/basic/src/coll_basic_module.c index c274aa2ea9..0f892d06ea 100644 --- a/src/mca/coll/basic/src/coll_basic_module.c +++ b/src/mca/coll/basic/src/coll_basic_module.c @@ -4,11 +4,11 @@ * These symbols are in a file by themselves to provide nice linker * semantics. Since linkers generally pull in symbols by object * files, keeping these symbols as the only symbols in this file - * prevents utility programs such as "laminfo" from having to import + * prevents utility programs such as "ompi_info" from having to import * entire modules just to query their version and parameters. */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "mpi.h" @@ -16,10 +16,10 @@ #include "coll_basic.h" /* - * Public string showing the coll lam_basic module version number + * Public string showing the coll ompi_basic module version number */ const char *mca_coll_basic_module_version_string = - "LAM/MPI basic collective MCA module version " MCA_coll_basic_FULL_VERSION; + "OMPI/MPI basic collective MCA module version " MCA_coll_basic_FULL_VERSION; /* * Instantiate the public struct with all of our public information diff --git a/src/mca/coll/basic/src/coll_basic_reduce.c b/src/mca/coll/basic/src/coll_basic_reduce.c index 2772f3c14b..80bacce4c7 100644 --- a/src/mca/coll/basic/src/coll_basic_reduce.c +++ b/src/mca/coll/basic/src/coll_basic_reduce.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -26,7 +26,7 @@ int mca_coll_basic_reduce_lin(void *sbuf, void *rbuf, int count, int root, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int size; @@ -55,8 +55,8 @@ int mca_coll_basic_reduce_lin(void *sbuf, void *rbuf, int count, if (size > 1) { #if 0 - /* JMS Needs to be replaced with lam_datatype_*() functions */ - err = lam_dtbuffer(dtype, count, &buffer, &origin); + /* JMS Needs to be replaced with ompi_datatype_*() functions */ + err = ompi_dtbuffer(dtype, count, &buffer, &origin); if (MPI_SUCCESS != err) return err; #endif @@ -66,8 +66,8 @@ int mca_coll_basic_reduce_lin(void *sbuf, void *rbuf, int count, if (rank == (size - 1)) { #if 0 - /* JMS Needs to be replaced with lam_datatype_*() functions */ - err = lam_dtsndrcv(sbuf, count, dtype, rbuf, count, + /* JMS Needs to be replaced with ompi_datatype_*() functions */ + err = ompi_dtsndrcv(sbuf, count, dtype, rbuf, count, dtype, BLKMPIREDUCE, comm); #endif } else { @@ -109,7 +109,7 @@ int mca_coll_basic_reduce_lin(void *sbuf, void *rbuf, int count, #if 0 /* JMS Need MPI_Op */ - if (op->op_flags & LAM_LANGF77) { + if (op->op_flags & OMPI_LANGF77) { (op->op_func)(inbuf, rbuf, &count, &dtype->dt_f77handle); } else { (op->op_func)(inbuf, rbuf, &count, &dtype); @@ -139,7 +139,7 @@ int mca_coll_basic_reduce_log(void *sbuf, void *rbuf, int count, int root, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int size; @@ -160,7 +160,7 @@ int mca_coll_basic_reduce_log(void *sbuf, void *rbuf, int count, /* Allocate the incoming and resulting message buffers. */ #if 0 - /* JMS Needs to be replaced with lam_datatype_*() functions */ + /* JMS Needs to be replaced with ompi_datatype_*() functions */ /* JMS: result of Feb meeting: if (dtype != MPI_IN_PLACE) { @@ -169,11 +169,11 @@ int mca_coll_basic_reduce_log(void *sbuf, void *rbuf, int count, buffer_for_mpi = buffer_to_free - true_lb; } */ - err = lam_dtbuffer(dtype, count, &buf1, &origin1); + err = ompi_dtbuffer(dtype, count, &buf1, &origin1); if (MPI_SUCCESS != err) return err; - err = lam_dtbuffer(dtype, count, &buf2, &origin2); + err = ompi_dtbuffer(dtype, count, &buf2, &origin2); if (MPI_SUCCESS != err) { if (NULL != buf1) free(buf1); @@ -257,7 +257,7 @@ int mca_coll_basic_reduce_log(void *sbuf, void *rbuf, int count, #if 0 /* JMS Need MPI_Op */ - if (op->op_flags & LAM_LANGF77) { + if (op->op_flags & OMPI_LANGF77) { (*op->op_func)((i > 0) ? resmsg : sbuf, inmsg, &count, &dtype->dt_f77handle); } else { @@ -281,8 +281,8 @@ int mca_coll_basic_reduce_log(void *sbuf, void *rbuf, int count, if (0 == vrank) { if (root == rank) { #if 0 - /* JMS Needs to be replaced with lam_datatype_*() functions */ - lam_dtcpy(rbuf, (i > 0) ? resmsg : sbuf, count, dtype); + /* JMS Needs to be replaced with ompi_datatype_*() functions */ + ompi_dtcpy(rbuf, (i > 0) ? resmsg : sbuf, count, dtype); #endif } else { #if 0 diff --git a/src/mca/coll/basic/src/coll_basic_reduce_scatter.c b/src/mca/coll/basic/src/coll_basic_reduce_scatter.c index d791027416..6af5764fc0 100644 --- a/src/mca/coll/basic/src/coll_basic_reduce_scatter.c +++ b/src/mca/coll/basic/src/coll_basic_reduce_scatter.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -27,7 +27,7 @@ int mca_coll_basic_reduce_scatter(void *sbuf, void *rbuf, int *rcounts, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int err; @@ -58,8 +58,8 @@ int mca_coll_basic_reduce_scatter(void *sbuf, void *rbuf, int *rcounts, } #if 0 - /* JMS Need to replace this with lam_datatype_*() functions */ - err = lam_dtbuffer(dtype, count, &buffer, &origin); + /* JMS Need to replace this with ompi_datatype_*() functions */ + err = ompi_dtbuffer(dtype, count, &buffer, &origin); if (MPI_SUCCESS != err) { free(disps); return err; diff --git a/src/mca/coll/basic/src/coll_basic_scan.c b/src/mca/coll/basic/src/coll_basic_scan.c index 4cacb08313..093181ffc5 100644 --- a/src/mca/coll/basic/src/coll_basic_scan.c +++ b/src/mca/coll/basic/src/coll_basic_scan.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include @@ -25,7 +25,7 @@ int mca_coll_basic_scan(void *sbuf, void *rbuf, int count, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int size; int rank; @@ -42,8 +42,8 @@ int mca_coll_basic_scan(void *sbuf, void *rbuf, int count, if (0 == rank) { #if 0 - /* JMS Need to replace this with lam_datatype_*() functions */ - err = lam_dtsndrcv(sbuf, count, dtype, + /* JMS Need to replace this with ompi_datatype_*() functions */ + err = ompi_dtsndrcv(sbuf, count, dtype, rbuf, count, dtype, BLKMPISCAN, comm); if (MPI_SUCCESS != err) { return err; @@ -63,8 +63,8 @@ int mca_coll_basic_scan(void *sbuf, void *rbuf, int count, /* Allocate a temporary buffer. */ #if 0 - /* JMS Need to replace this with lam_datatype_*() functions */ - err = lam_dtbuffer(dtype, count, &tmpbuf, &origin); + /* JMS Need to replace this with ompi_datatype_*() functions */ + err = ompi_dtbuffer(dtype, count, &tmpbuf, &origin); if (MPI_SUCCESS != err) { return err; } @@ -73,8 +73,8 @@ int mca_coll_basic_scan(void *sbuf, void *rbuf, int count, /* Copy the send buffer into the receive buffer. */ #if 0 - /* JMS Need to replace this with lam_datatype_*() functions */ - err = lam_dtsndrcv(sbuf, count, dtype, rbuf, + /* JMS Need to replace this with ompi_datatype_*() functions */ + err = ompi_dtsndrcv(sbuf, count, dtype, rbuf, count, dtype, BLKMPISCAN, comm); if (MPI_SUCCESS != err) { if (NULL != tmpbuf) @@ -108,7 +108,7 @@ int mca_coll_basic_scan(void *sbuf, void *rbuf, int count, #if 0 /* JMS Need MPI_Op */ - if (op->op_flags & LAM_LANGF77) { + if (op->op_flags & OMPI_LANGF77) { (op->op_func)(origin, rbuf, &count, &dtype->dt_f77handle); } else { (op->op_func)(origin, rbuf, &count, &dtype); diff --git a/src/mca/coll/basic/src/coll_basic_scatter.c b/src/mca/coll/basic/src/coll_basic_scatter.c index 23932aa229..f458357f8e 100644 --- a/src/mca/coll/basic/src/coll_basic_scatter.c +++ b/src/mca/coll/basic/src/coll_basic_scatter.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -24,7 +24,7 @@ int mca_coll_basic_scatter(void *sbuf, int scount, MPI_Datatype sdtype, int root, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int rank; @@ -57,8 +57,8 @@ int mca_coll_basic_scatter(void *sbuf, int scount, MPI_Datatype sdtype, if (i == rank) { #if 0 - /* JMS Need to replace this with lam_datatype_*() functions */ - err = lam_dtsndrcv(ptmp, scount, sdtype, rbuf, + /* JMS Need to replace this with ompi_datatype_*() functions */ + err = ompi_dtsndrcv(ptmp, scount, sdtype, rbuf, rcount, rdtype, BLKMPISCATTER, comm); #endif } else { diff --git a/src/mca/coll/basic/src/coll_basic_scatterv.c b/src/mca/coll/basic/src/coll_basic_scatterv.c index fed60ef964..a237418b7f 100644 --- a/src/mca/coll/basic/src/coll_basic_scatterv.c +++ b/src/mca/coll/basic/src/coll_basic_scatterv.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "coll_basic.h" #include "constants.h" @@ -26,7 +26,7 @@ int mca_coll_basic_scatterv(void *sbuf, int *scounts, MPI_Comm comm) { #if 1 - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; #else int i; int rank; @@ -59,8 +59,8 @@ int mca_coll_basic_scatterv(void *sbuf, int *scounts, if (i == rank) { #if 0 - /* JMS Need to replace this with lam_datatype_*() functions */ - err = lam_dtsndrcv(ptmp, scounts[i], sdtype, rbuf, + /* JMS Need to replace this with ompi_datatype_*() functions */ + err = ompi_dtsndrcv(ptmp, scounts[i], sdtype, rbuf, rcount, rdtype, BLKMPISCATTERV, comm); #endif } else { diff --git a/src/mca/coll/coll.h b/src/mca/coll/coll.h index 13366567df..87c867becb 100644 --- a/src/mca/coll/coll.h +++ b/src/mca/coll/coll.h @@ -5,7 +5,7 @@ #ifndef MCA_COLL_H #define MCA_COLL_H -#include "lam_config.h" +#include "ompi_config.h" #include "mpi.h" #include "mca/mca.h" @@ -210,7 +210,7 @@ typedef mca_coll_1_0_0_t mca_coll_t; /* * This function is technically part of the basic module, but since it - * ships with LAM, and other modules may use the basic module for + * ships with OMPI, and other modules may use the basic module for * query/init functionality, prototype this function here. */ diff --git a/src/mca/io/Makefile.am b/src/mca/io/Makefile.am index 8f89fd6fa7..6fff1c3a25 100644 --- a/src/mca/io/Makefile.am +++ b/src/mca/io/Makefile.am @@ -14,8 +14,8 @@ headers = io.h # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/io -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/io +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/io/romio/Makefile.am b/src/mca/io/romio/Makefile.am index 868e157479..b6bdcb90e2 100644 --- a/src/mca/io/romio/Makefile.am +++ b/src/mca/io/romio/Makefile.am @@ -2,9 +2,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -12,9 +12,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_io_romio_LOADABLE_MODULE +if OMPI_BUILD_io_romio_LOADABLE_MODULE module_noinst = module_install = mca_io_romio.la else @@ -22,12 +22,12 @@ module_noinst = libmca_mpi_io_romio.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_io_romio_la_SOURCES = mca_io_romio_la_LIBADD = \ src/libmca_io_romio.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_io_romio_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/io/romio/src/Makefile.am b/src/mca/io/romio/src/Makefile.am index 7a93f3d942..790b76a825 100644 --- a/src/mca/io/romio/src/Makefile.am +++ b/src/mca/io/romio/src/Makefile.am @@ -3,14 +3,14 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = romio-1.2.5.1 AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_io_romio.la libmca_io_romio_la_SOURCES = \ diff --git a/src/mca/io/romio/src/file_open.c b/src/mca/io/romio/src/file_open.c index 7e1d7878cc..7b7ce31d76 100644 --- a/src/mca/io/romio/src/file_open.c +++ b/src/mca/io/romio/src/file_open.c @@ -15,11 +15,11 @@ int mca_io_romio_File_open(MPI_Comm comm, char *filename, int amode, mca_io_romio_MPI_File romio_fh; mca_io_romio_file_t *mca_romio_fh; - /* create a new lam_file_t */ + /* create a new ompi_file_t */ mca_romio_fh = malloc(sizeof(mca_io_romio_file_t)); - (*fh) = (lam_file_t *) mca_romio_fh; + (*fh) = (ompi_file_t *) mca_romio_fh; strncpy((*fh)->f_name,filename,MPI_MAX_OBJECT_NAME); - (*fh)->lam_io_version=LAM_IO_1_0_0; + (*fh)->ompi_io_version=OMPI_IO_1_0_0; (*fh)->mca_io_functions.f_io=romio_actions; romio_fh = mca_romio_fh->romio_fh; diff --git a/src/mca/io/romio/src/file_read.c b/src/mca/io/romio/src/file_read.c index 6846da39da..b6ef2b4f3c 100644 --- a/src/mca/io/romio/src/file_read.c +++ b/src/mca/io/romio/src/file_read.c @@ -51,8 +51,8 @@ int mca_io_romio_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int co /* create MPI_request */ rq = malloc(sizeof(mca_io_romio_request_t)); - (*request) = (lam_request_t *) rq; - (*request)->req_type = LAM_REQUEST_IO; + (*request) = (ompi_request_t *) rq; + (*request)->req_type = OMPI_REQUEST_IO; /* extract the ROMIO request */ romio_rq = rq->romio_rq; @@ -113,8 +113,8 @@ int mca_io_romio_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype data /* create MPI_request */ rq = malloc(sizeof(mca_io_romio_request_t)); - (*request) = (lam_request_t *) rq; - (*request)->req_type = LAM_REQUEST_IO; + (*request) = (ompi_request_t *) rq; + (*request)->req_type = OMPI_REQUEST_IO; /* extract the ROMIO request */ romio_rq = rq->romio_rq; @@ -154,8 +154,8 @@ int mca_io_romio_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Dataty /* create MPI_request */ rq = malloc(sizeof(mca_io_romio_request_t)); - (*request) = (lam_request_t *) rq; - (*request)->req_type = LAM_REQUEST_IO; + (*request) = (ompi_request_t *) rq; + (*request)->req_type = OMPI_REQUEST_IO; /* extract the ROMIO request */ romio_rq = rq->romio_rq; diff --git a/src/mca/io/romio/src/file_write.c b/src/mca/io/romio/src/file_write.c index 7d652ab2d9..d2054f7cfc 100644 --- a/src/mca/io/romio/src/file_write.c +++ b/src/mca/io/romio/src/file_write.c @@ -54,8 +54,8 @@ int mca_io_romio_File_iwrite_at(MPI_File fh, MPI_Offset offset, void *buf,int co /* create MPI_request */ rq = malloc(sizeof(mca_io_romio_request_t)); - (*request) = (lam_request_t *) rq; - (*request)->req_type = LAM_REQUEST_IO; + (*request) = (ompi_request_t *) rq; + (*request)->req_type = OMPI_REQUEST_IO; /* extract the ROMIO request */ romio_rq = rq->romio_rq; @@ -110,7 +110,7 @@ int mca_io_romio_File_write_all(MPI_File fh, void *buf, int count, MPI_Datatype int mca_io_romio_File_iwrite(MPI_File fh, void *buf, int count, - MPI_Datatype datatype, lam_request_t **request) + MPI_Datatype datatype, ompi_request_t **request) { mca_io_romio_request_t *rq; mca_io_romio_MPIO_Request romio_rq; @@ -120,8 +120,8 @@ int mca_io_romio_File_iwrite(MPI_File fh, void *buf, int count, /* create MPI_request */ rq = malloc(sizeof(mca_io_romio_request_t)); - *request = (lam_request_t*) rq; - (*request)->req_type = LAM_REQUEST_IO; + *request = (ompi_request_t*) rq; + (*request)->req_type = OMPI_REQUEST_IO; /* extract the ROMIO request */ romio_rq = rq->romio_rq; @@ -160,8 +160,8 @@ int mca_io_romio_File_iwrite_shared(MPI_File fh, void *buf, int count, /* create MPI_request */ rq = malloc(sizeof(mca_io_romio_request_t)); - (*request) = (lam_request_t *) rq; - (*request)->req_type = LAM_REQUEST_IO; + (*request) = (ompi_request_t *) rq; + (*request)->req_type = OMPI_REQUEST_IO; /* extract the ROMIO request */ romio_rq = rq->romio_rq; diff --git a/src/mca/io/romio/src/global.c b/src/mca/io/romio/src/global.c index cf7a6407ad..06bea25ae1 100644 --- a/src/mca/io/romio/src/global.c +++ b/src/mca/io/romio/src/global.c @@ -4,7 +4,7 @@ #include "threads/mutex.h" #include "io_romio.h" -lam_mutex_t mca_io_romio_mutex; +ompi_mutex_t mca_io_romio_mutex; mca_io_1_0_0_t romio_actions = { mca_io_romio_File_open, diff --git a/src/mca/io/romio/src/io_romio.h b/src/mca/io/romio/src/io_romio.h index dfb9e30969..ea2dc9ee98 100644 --- a/src/mca/io/romio/src/io_romio.h +++ b/src/mca/io/romio/src/io_romio.h @@ -11,27 +11,27 @@ #include "romio-1.2.5.1/include/mpio.h" /* global variables, instantiated in global.c */ -extern lam_mutex_t mca_io_romio_mutex; +extern ompi_mutex_t mca_io_romio_mutex; extern mca_io_1_0_0_t romio_actions; /* -MPI_Request: "inherit" the lam_request, and add more stuff: +MPI_Request: "inherit" the ompi_request, and add more stuff: (romio module will instantiate) */ struct mca_io_romio_request_t { - lam_request_t super; + ompi_request_t super; mca_io_romio_MPIO_Request romio_rq; }; typedef struct mca_io_romio_request_t mca_io_romio_request_t; /* -MPI_File: "inherit" the lam_file_t, and add more stuff +MPI_File: "inherit" the ompi_file_t, and add more stuff (romio module will instantiate) */ struct mca_io_romio_file_t { - lam_file_t super; + ompi_file_t super; mca_io_romio_MPI_File romio_fh; }; typedef struct mca_io_romio_file_t mca_io_romio_file_t; @@ -99,7 +99,7 @@ int mca_io_romio_File_write_all(MPI_File fh, void *buf, int count, MPI_Datatype int mca_io_romio_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); int mca_io_romio_File_iwrite(MPI_File fh, void *buf, int count, - MPI_Datatype datatype, lam_request_t **request); + MPI_Datatype datatype, ompi_request_t **request); int mca_io_romio_File_seek(MPI_File fh, MPI_Offset offset, int whence); @@ -159,7 +159,7 @@ int mca_io_romio_File_get_errhandler( MPI_File, MPI_Errhandler * ); -/* The funtions will not be called by users, but by LAM's MPI_Test/Wait +/* The funtions will not be called by users, but by OMPI's MPI_Test/Wait * functions when they are called with an I/O request. */ int mca_io_romio_Test(MPI_Request *request, int *flag, MPI_Status *status); int mca_io_romio_Wait(MPI_Request *request, MPI_Status *status); diff --git a/src/mca/io/romio/src/io_romio_module.c b/src/mca/io/romio/src/io_romio_module.c index 37bc6cf216..a7a2949832 100644 --- a/src/mca/io/romio/src/io_romio_module.c +++ b/src/mca/io/romio/src/io_romio_module.c @@ -45,14 +45,14 @@ mca_io_base_module_1_0_0_t mca_io_romio_module = { int mca_io_romio_module_open(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; /* register all mca parameters */ } int mca_io_romio_module_close(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/io/romio/src/romio-1.2.5.1/Makefile.am b/src/mca/io/romio/src/romio-1.2.5.1/Makefile.am index acd4cf1fa3..fa17ca14b5 100644 --- a/src/mca/io/romio/src/romio-1.2.5.1/Makefile.am +++ b/src/mca/io/romio/src/romio-1.2.5.1/Makefile.am @@ -3,6 +3,6 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = include diff --git a/src/mca/io/romio/src/romio-1.2.5.1/include/Makefile.am b/src/mca/io/romio/src/romio-1.2.5.1/include/Makefile.am index f96b95a760..21e30715b9 100644 --- a/src/mca/io/romio/src/romio-1.2.5.1/include/Makefile.am +++ b/src/mca/io/romio/src/romio-1.2.5.1/include/Makefile.am @@ -3,6 +3,6 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options noinst_HEADERS = mpio.h diff --git a/src/mca/io/romio/src/romio-1.2.5.1/include/mpio.h b/src/mca/io/romio/src/romio-1.2.5.1/include/mpio.h index d6ec121c89..57a27f8c46 100644 --- a/src/mca/io/romio/src/romio-1.2.5.1/include/mpio.h +++ b/src/mca/io/romio/src/romio-1.2.5.1/include/mpio.h @@ -5,12 +5,12 @@ * all of these routines have been renamed: prefix with "mca_io_romio" * * Two ROMIO specific types have also been renamed: (cant do this with #define - * since this file is included by LAM's I/O module) + * since this file is included by OMPI's I/O module) * all ROMIO references to: * MPIO_Request changed to: mca_io_romio_MPIO_Request * MPI_File changed to: mca_io_romio_MPI_File * - * All other types have been deleted, since they appear in LAM's mpi.h + * All other types have been deleted, since they appear in OMPI's mpi.h * */ diff --git a/src/mca/mca.h b/src/mca/mca.h index e9f2eb0a3b..8748d2be5f 100644 --- a/src/mca/mca.h +++ b/src/mca/mca.h @@ -2,11 +2,11 @@ * $HEADER$ */ -#ifndef LAM_MCA_H -#define LAM_MCA_H +#ifndef OMPI_MCA_H +#define OMPI_MCA_H #include "mpi.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "util/cmd_line.h" /* @@ -114,13 +114,13 @@ enum { #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif - int mca_base_arg_setup(lam_cmd_line_t *cmd); - int mca_base_arg_process(lam_cmd_line_t *cmd); + int mca_base_arg_setup(ompi_cmd_line_t *cmd); + int mca_base_arg_process(ompi_cmd_line_t *cmd); int mca_base_arg_process_one(char *type, char *arg); #if 0 /* JMS Add after debug streams added */ - int mca_base_set_verbose(int index, lam_debug_stream_info_t *lds, + int mca_base_set_verbose(int index, ompi_debug_stream_info_t *lds, int *level, int *did); #endif @@ -128,4 +128,4 @@ extern "C" { } #endif -#endif /* LAM_MCA_H */ +#endif /* OMPI_MCA_H */ diff --git a/src/mca/one/Makefile.am b/src/mca/one/Makefile.am index dd01dfa39d..426c97c1fb 100644 --- a/src/mca/one/Makefile.am +++ b/src/mca/one/Makefile.am @@ -14,8 +14,8 @@ headers = one.h # Conditonenally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/one -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/one +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/oob/Makefile.am b/src/mca/oob/Makefile.am index 522ff6f096..c9b6bdfc8f 100644 --- a/src/mca/oob/Makefile.am +++ b/src/mca/oob/Makefile.am @@ -24,8 +24,8 @@ libmca_oob_la_DEPENDENCIES = $(libmca_oob_la_LIBADD) # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/oob -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/oob +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/oob/base/Makefile.am b/src/mca/oob/base/Makefile.am index 5c191e12eb..c296ba176a 100644 --- a/src/mca/oob/base/Makefile.am +++ b/src/mca/oob/base/Makefile.am @@ -26,8 +26,8 @@ libmca_oob_base_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/oob/base -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/oob/base +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/oob/base/base.h b/src/mca/oob/base/base.h index 4f7e040e21..24ffeb8797 100644 --- a/src/mca/oob/base/base.h +++ b/src/mca/oob/base/base.h @@ -6,7 +6,7 @@ #ifndef MCA_OOB_BASE_H_ #define MCA_OOB_BASE_H_ -#include "lam_config.h" +#include "ompi_config.h" #include "include/types.h" #include "mca/mca.h" @@ -37,7 +37,7 @@ extern "C" { * Global struct holding the selected module's function pointers */ extern int mca_oob_base_output; -extern lam_list_t mca_oob_base_modules_available; +extern ompi_list_t mca_oob_base_modules_available; extern mca_oob_base_module_t mca_oob_base_selected_module; extern mca_oob_t mca_oob; diff --git a/src/mca/oob/base/oob_base_close.c b/src/mca/oob/base/oob_base_close.c index e4b0fd7b00..140f0f1b5d 100644 --- a/src/mca/oob/base/oob_base_close.c +++ b/src/mca/oob/base/oob_base_close.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -16,12 +16,12 @@ int mca_oob_base_close(void) { /* Close all remaining available modules (may be one if this is a - LAM RTE program, or [possibly] multiple if this is laminfo) */ + OMPI RTE program, or [possibly] multiple if this is ompi_info) */ mca_base_modules_close(mca_oob_base_output, &mca_oob_base_modules_available, NULL); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/oob/base/oob_base_open.c b/src/mca/oob/base/oob_base_open.c index 87a94be5d0..a92304b2b9 100644 --- a/src/mca/oob/base/oob_base_open.c +++ b/src/mca/oob/base/oob_base_open.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -24,7 +24,7 @@ */ int mca_oob_base_output = -1; mca_oob_t mca_oob; -lam_list_t mca_oob_base_modules_available; +ompi_list_t mca_oob_base_modules_available; mca_oob_base_module_t mca_oob_base_selected_module; @@ -36,13 +36,13 @@ int mca_oob_base_open(void) { /* Open up all available modules */ - if (LAM_SUCCESS != + if (OMPI_SUCCESS != mca_base_modules_open("oob", 0, mca_oob_base_static_modules, &mca_oob_base_modules_available)) { - return LAM_ERROR; + return OMPI_ERROR; } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/oob/base/oob_base_select.c b/src/mca/oob/base/oob_base_select.c index e84c12e720..ecb54adb4e 100644 --- a/src/mca/oob/base/oob_base_select.c +++ b/src/mca/oob/base/oob_base_select.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -28,37 +28,37 @@ int mca_oob_base_select(bool *allow_multi_user_threads, int priority, best_priority; bool user_threads, hidden_threads; bool best_user_threads, best_hidden_threads; - lam_list_item_t *item; + ompi_list_item_t *item; mca_base_module_list_item_t *mli; mca_oob_base_module_t *module, *best_module; mca_oob_t *actions, *best_actions; - extern lam_list_t mca_oob_base_modules_available; + extern ompi_list_t mca_oob_base_modules_available; /* Traverse the list of available modules; call their init functions. */ best_priority = -1; best_module = NULL; - for (item = lam_list_get_first(&mca_oob_base_modules_available); - lam_list_get_end(&mca_oob_base_modules_available) != item; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&mca_oob_base_modules_available); + ompi_list_get_end(&mca_oob_base_modules_available) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = (mca_oob_base_module_t *) mli->mli_module; - lam_output_verbose(10, mca_oob_base_output, + ompi_output_verbose(10, mca_oob_base_output, "select: initializing %s module %s", module->oobm_version.mca_type_name, module->oobm_version.mca_module_name); if (NULL == module->oobm_init) { - lam_output_verbose(10, mca_oob_base_output, + ompi_output_verbose(10, mca_oob_base_output, "select: no init function; ignoring module"); } else { actions = module->oobm_init(&priority, &user_threads, &hidden_threads); if (NULL == actions) { - lam_output_verbose(10, mca_oob_base_output, + ompi_output_verbose(10, mca_oob_base_output, "select: init returned failure"); } else { - lam_output_verbose(10, mca_oob_base_output, + ompi_output_verbose(10, mca_oob_base_output, "select: init returned priority %d", priority); if (priority > best_priority) { best_priority = priority; @@ -75,14 +75,14 @@ int mca_oob_base_select(bool *allow_multi_user_threads, if (NULL == best_module) { /* JMS Replace with show_help */ - lam_abort(1, "No OOB module available. This shouldn't happen."); + ompi_abort(1, "No OOB module available. This shouldn't happen."); } /* Finalize all non-selected modules */ - for (item = lam_list_get_first(&mca_oob_base_modules_available); - lam_list_get_end(&mca_oob_base_modules_available) != item; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&mca_oob_base_modules_available); + ompi_list_get_end(&mca_oob_base_modules_available) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = (mca_oob_base_module_t *) mli->mli_module; @@ -97,7 +97,7 @@ int mca_oob_base_select(bool *allow_multi_user_threads, don't matter anymore) */ module->oobm_finalize(); - lam_output_verbose(10, mca_oob_base_output, + ompi_output_verbose(10, mca_oob_base_output, "select: module %s finalized", module->oobm_version.mca_module_name); } @@ -117,11 +117,11 @@ int mca_oob_base_select(bool *allow_multi_user_threads, mca_oob = *best_actions; *allow_multi_user_threads = best_user_threads; *have_hidden_threads = best_hidden_threads; - lam_output_verbose(10, mca_oob_base_output, + ompi_output_verbose(10, mca_oob_base_output, "select: module %s initialized", module->oobm_version.mca_module_name); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/oob/cofs/Makefile.am b/src/mca/oob/cofs/Makefile.am index 37720c2d5e..f55fbd3b66 100644 --- a/src/mca/oob/cofs/Makefile.am +++ b/src/mca/oob/cofs/Makefile.am @@ -3,9 +3,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -13,9 +13,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_oob_cofs_LOADABLE_MODULE +if OMPI_BUILD_oob_cofs_LOADABLE_MODULE module_noinst = module_install = mca_oob_cofs.la else @@ -23,12 +23,12 @@ module_noinst = libmca_oob_cofs.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_oob_cofs_la_SOURCES = mca_oob_cofs_la_LIBADD = \ src/libmca_oob_cofs.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_oob_cofs_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/oob/cofs/src/Makefile.am b/src/mca/oob/cofs/src/Makefile.am index 61cfc9a455..239433dccb 100644 --- a/src/mca/oob/cofs/src/Makefile.am +++ b/src/mca/oob/cofs/src/Makefile.am @@ -2,12 +2,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_oob_cofs.la libmca_oob_cofs_la_SOURCES = \ diff --git a/src/mca/oob/cofs/src/oob_cofs.c b/src/mca/oob/cofs/src/oob_cofs.c index 7724f7c848..9edf932ef6 100644 --- a/src/mca/oob/cofs/src/oob_cofs.c +++ b/src/mca/oob/cofs/src/oob_cofs.c @@ -4,7 +4,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/oob/oob.h" #include "mca/oob/cofs/src/oob_cofs.h" @@ -17,27 +17,27 @@ #include static int blocking_recv_posted = 0; -static int do_recv(lam_job_handle_t job_handle, int vpid, int* tag, +static int do_recv(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len); int -mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag, +mca_oob_cofs_send(ompi_job_handle_t job_handle, int vpid, int tag, void* data, size_t data_len) { FILE *fp; size_t wlen; - char msg_file[LAM_PATH_MAX]; - char msg_file_tmp[LAM_PATH_MAX]; + char msg_file[OMPI_PATH_MAX]; + char msg_file_tmp[OMPI_PATH_MAX]; /* create the file and open it... */ - snprintf(msg_file, LAM_PATH_MAX, "%s/%s_%d_%d_%d_%lld.msg", mca_oob_cofs_comm_loc, + snprintf(msg_file, OMPI_PATH_MAX, "%s/%s_%d_%d_%d_%lld.msg", mca_oob_cofs_comm_loc, job_handle, mca_oob_cofs_my_vpid, vpid, tag, mca_oob_cofs_serial); - snprintf(msg_file_tmp, LAM_PATH_MAX, "%s/.%s_%d_%d_%d_%lld.msg", mca_oob_cofs_comm_loc, + snprintf(msg_file_tmp, OMPI_PATH_MAX, "%s/.%s_%d_%d_%d_%lld.msg", mca_oob_cofs_comm_loc, job_handle, mca_oob_cofs_my_vpid, vpid, tag, mca_oob_cofs_serial); fp = fopen(msg_file_tmp, "w"); if (fp == NULL) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } /* BWB - do network byte ordering... */ @@ -46,7 +46,7 @@ mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag, if (wlen != 1) { fclose(fp); unlink(msg_file_tmp); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } /* write packet */ @@ -54,7 +54,7 @@ mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag, if (wlen != data_len) { fclose(fp); unlink(msg_file_tmp); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } /* publish the thing... */ @@ -63,17 +63,17 @@ mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag, mca_oob_cofs_serial++; - return LAM_SUCCESS; + return OMPI_SUCCESS; } int -mca_oob_cofs_recv(lam_job_handle_t job_handle, int vpid, int* tag, +mca_oob_cofs_recv(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len) { - int ret = LAM_ERR_WOULD_BLOCK; + int ret = OMPI_ERR_WOULD_BLOCK; blocking_recv_posted = 1; - while (ret == LAM_ERR_WOULD_BLOCK) { + while (ret == OMPI_ERR_WOULD_BLOCK) { ret = do_recv(job_handle, vpid, tag, data, data_len); sleep(1); } @@ -83,11 +83,11 @@ mca_oob_cofs_recv(lam_job_handle_t job_handle, int vpid, int* tag, int -mca_oob_cofs_recv_nb(lam_job_handle_t job_handle, int vpid, int* tag, +mca_oob_cofs_recv_nb(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len) { if (blocking_recv_posted != 0) { - return LAM_ERR_WOULD_BLOCK; + return OMPI_ERR_WOULD_BLOCK; } return do_recv(job_handle, vpid, tag, data, data_len); @@ -95,24 +95,24 @@ mca_oob_cofs_recv_nb(lam_job_handle_t job_handle, int vpid, int* tag, int -mca_oob_cofs_recv_cb(lam_job_handle_t job_handle, int vpid, int tag, +mca_oob_cofs_recv_cb(ompi_job_handle_t job_handle, int vpid, int tag, mca_oob_base_recv_cb_t callback) { - return LAM_ERR_NOT_SUPPORTED; + return OMPI_ERR_NOT_SUPPORTED; } static char* -find_match(lam_job_handle_t job_handle, int vpid, int* tag) +find_match(ompi_job_handle_t job_handle, int vpid, int* tag) { DIR* dir; struct dirent *ent; - char tmp_handle[LAM_PATH_MAX]; + char tmp_handle[OMPI_PATH_MAX]; uint64_t tmp_serial; int tmp_tag, tmp_vpid, tmp_myvpid; int ret; bool found = false; - char best_name[LAM_PATH_MAX]; + char best_name[OMPI_PATH_MAX]; int best_tag; uint64_t best_serial = ((1ULL << 63) - 1); @@ -163,24 +163,24 @@ find_match(lam_job_handle_t job_handle, int vpid, int* tag) static int -do_recv(lam_job_handle_t job_handle, int vpid, int* tag, +do_recv(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len) { char *fname; - char full_fname[LAM_PATH_MAX]; + char full_fname[OMPI_PATH_MAX]; FILE *fp; size_t rlen; fname = find_match(job_handle, vpid, tag); if (fname == NULL) { - return LAM_ERR_WOULD_BLOCK; + return OMPI_ERR_WOULD_BLOCK; } - snprintf(full_fname, LAM_PATH_MAX, "%s/%s", mca_oob_cofs_comm_loc, fname); + snprintf(full_fname, OMPI_PATH_MAX, "%s/%s", mca_oob_cofs_comm_loc, fname); free(fname); fp = fopen(full_fname, "r"); if (fp == NULL) { - return LAM_ERROR; + return OMPI_ERROR; } unlink(full_fname); @@ -188,14 +188,14 @@ do_recv(lam_job_handle_t job_handle, int vpid, int* tag, rlen = fread(data_len, sizeof(size_t), 1, fp); if (rlen != 1) { fclose(fp); - return LAM_ERROR; + return OMPI_ERROR; } *data = (void*) malloc(*data_len); if (*data == NULL) { fclose(fp); *data_len = 0; - return LAM_ERROR; + return OMPI_ERROR; } rlen = fread(*data, 1, *data_len, fp); @@ -203,10 +203,10 @@ do_recv(lam_job_handle_t job_handle, int vpid, int* tag, fclose(fp); free(*data); *data_len = 0; - return LAM_ERROR; + return OMPI_ERROR; } fclose(fp); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/oob/cofs/src/oob_cofs.h b/src/mca/oob/cofs/src/oob_cofs.h index 6927a5f8de..00ab011cc7 100644 --- a/src/mca/oob/cofs/src/oob_cofs.h +++ b/src/mca/oob/cofs/src/oob_cofs.h @@ -3,7 +3,7 @@ * $HEADER$ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/oob/oob.h" #include "types.h" @@ -27,16 +27,16 @@ int mca_oob_cofs_finalize(void); /* * "Action" functions */ -int mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag, +int mca_oob_cofs_send(ompi_job_handle_t job_handle, int vpid, int tag, void* data, size_t data_len); -int mca_oob_cofs_recv(lam_job_handle_t job_handle, int vpid, int* tag, +int mca_oob_cofs_recv(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len); -int mca_oob_cofs_recv_nb(lam_job_handle_t job_handle, int vpid, int* tag, +int mca_oob_cofs_recv_nb(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len); -int mca_oob_cofs_recv_cb(lam_job_handle_t job_handle, int vpid, int tag, +int mca_oob_cofs_recv_cb(ompi_job_handle_t job_handle, int vpid, int tag, mca_oob_base_recv_cb_t callback); -extern char mca_oob_cofs_comm_loc[LAM_PATH_MAX]; /* location for file drop-off */ +extern char mca_oob_cofs_comm_loc[OMPI_PATH_MAX]; /* location for file drop-off */ extern int mca_oob_cofs_my_vpid; extern uint64_t mca_oob_cofs_serial; diff --git a/src/mca/oob/cofs/src/oob_cofs_module.c b/src/mca/oob/cofs/src/oob_cofs_module.c index bfc917ae90..a5dab78422 100644 --- a/src/mca/oob/cofs/src/oob_cofs_module.c +++ b/src/mca/oob/cofs/src/oob_cofs_module.c @@ -4,7 +4,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "constants.h" #include "mca/mca.h" @@ -45,21 +45,21 @@ struct mca_oob_1_0_0_t mca_oob_cofs_1_0_0 = { mca_oob_cofs_recv_cb }; -char mca_oob_cofs_comm_loc[LAM_PATH_MAX]; +char mca_oob_cofs_comm_loc[OMPI_PATH_MAX]; int mca_oob_cofs_my_vpid; uint64_t mca_oob_cofs_serial; int mca_oob_cofs_open(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_oob_cofs_close(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -77,7 +77,7 @@ mca_oob_cofs_init(int *priority, bool *allow_multi_user_threads, /* * BWB - fix me, make register the "right" way... */ - tmp = getenv("MCA_common_lam_cofs_comm_dir"); + tmp = getenv("MCA_common_ompi_cofs_comm_dir"); if (tmp == NULL) { /* make it $HOME */ tmp = getenv("HOME"); @@ -85,16 +85,16 @@ mca_oob_cofs_init(int *priority, bool *allow_multi_user_threads, printf("oob_cofs can not find communication dir\n"); return NULL; } - snprintf(mca_oob_cofs_comm_loc, LAM_PATH_MAX, "%s/cofs", tmp); + snprintf(mca_oob_cofs_comm_loc, OMPI_PATH_MAX, "%s/cofs", tmp); } else { - snprintf(mca_oob_cofs_comm_loc, LAM_PATH_MAX, "%s", tmp); + snprintf(mca_oob_cofs_comm_loc, OMPI_PATH_MAX, "%s", tmp); } /* * BWB - fix me, make register the "right" way... */ /* find our vpid */ - tmp = getenv("MCA_common_lam_cofs_my_vpid"); + tmp = getenv("MCA_common_ompi_cofs_my_vpid"); if (tmp == NULL) { printf("oob_cofs can not find vpid\n"); return NULL; @@ -126,5 +126,5 @@ mca_oob_cofs_init(int *priority, bool *allow_multi_user_threads, int mca_oob_cofs_finalize(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/oob/oob.h b/src/mca/oob/oob.h index 6a6302962f..a22f0c1975 100644 --- a/src/mca/oob/oob.h +++ b/src/mca/oob/oob.h @@ -7,9 +7,9 @@ /** * \brief Out of Band Messaging Interface * - * LAM/MPI provides a simple point-to-point tagged messaging system + * OMPI/MPI provides a simple point-to-point tagged messaging system * intended for out-of-band communication. This interface should be - * used minimally in general LAM code and should not be used + * used minimally in general OMPI code and should not be used * explicitly in the MPI layer. Not all run-time environments provide * a sufficient out-of-band messaging system, so some environments may * choose not to implement this interface, at the cost of reduced @@ -33,7 +33,7 @@ #ifndef MCA_OOB_H_ #define MCA_OOB_H_ -#include "lam_config.h" +#include "ompi_config.h" #include "include/types.h" #include "mca/mca.h" @@ -49,7 +49,7 @@ /* "Special" vpids */ #define MCA_OOB_MPIRUN -1 -typedef void (*mca_oob_base_recv_cb_t)(lam_job_handle_t job_handle, int tag, +typedef void (*mca_oob_base_recv_cb_t)(ompi_job_handle_t job_handle, int tag, int vpid, void* data, size_t data_len, int status); @@ -59,13 +59,13 @@ typedef void (*mca_oob_base_recv_cb_t)(lam_job_handle_t job_handle, int tag, typedef struct mca_oob_1_0_0_t* (*mca_oob_base_init_fn_t)(int *priority, bool *allow_multi_user_threads, bool *have_hidden_threads); -typedef int (*mca_oob_base_send_fn_t)(lam_job_handle_t job_handle, int vpid, int tag, +typedef int (*mca_oob_base_send_fn_t)(ompi_job_handle_t job_handle, int vpid, int tag, void* data, size_t data_len); -typedef int (*mca_oob_base_recv_fn_t)(lam_job_handle_t job_handle, int vpid, int* tag, +typedef int (*mca_oob_base_recv_fn_t)(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len); -typedef int (*mca_oob_base_recv_nb_fn_t)(lam_job_handle_t job_handle, int vpid, int* tag, +typedef int (*mca_oob_base_recv_nb_fn_t)(ompi_job_handle_t job_handle, int vpid, int* tag, void** data, size_t* data_len); -typedef int (*mca_oob_base_recv_cb_fn_t)(lam_job_handle_t job_handle, int vpid, int tag, +typedef int (*mca_oob_base_recv_cb_fn_t)(ompi_job_handle_t job_handle, int vpid, int tag, mca_oob_base_recv_cb_t callback); typedef int (*mca_oob_base_finalize_fn_t)(void); diff --git a/src/mca/pcm/Makefile.am b/src/mca/pcm/Makefile.am index 0770cf493b..8f980398ab 100644 --- a/src/mca/pcm/Makefile.am +++ b/src/mca/pcm/Makefile.am @@ -24,8 +24,8 @@ libmca_pcm_la_DEPENDENCIES = $(libmca_pcm_la_LIBADD) # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/pcm -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/pcm +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/pcm/base/Makefile.am b/src/mca/pcm/base/Makefile.am index 349bd9a9a4..ea60fe3507 100644 --- a/src/mca/pcm/base/Makefile.am +++ b/src/mca/pcm/base/Makefile.am @@ -26,8 +26,8 @@ libmca_pcm_base_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/pcm/base -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/pcm/base +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/pcm/base/base.h b/src/mca/pcm/base/base.h index 0fb64188f0..fd70d85a14 100644 --- a/src/mca/pcm/base/base.h +++ b/src/mca/pcm/base/base.h @@ -6,7 +6,7 @@ #ifndef MCA_PCM_BASE_H_ #define MCA_PCM_BASE_H_ -#include "lam_config.h" +#include "ompi_config.h" #include "include/types.h" #include "mca/mca.h" @@ -38,7 +38,7 @@ extern "C" { * Globals */ extern int mca_pcm_base_output; -extern lam_list_t mca_pcm_base_modules_available; +extern ompi_list_t mca_pcm_base_modules_available; extern mca_pcm_base_module_t mca_pcm_base_selected_module; extern mca_pcm_t mca_pcm; diff --git a/src/mca/pcm/base/pcm_base_close.c b/src/mca/pcm/base/pcm_base_close.c index ad23ca841f..1c0bea2a77 100644 --- a/src/mca/pcm/base/pcm_base_close.c +++ b/src/mca/pcm/base/pcm_base_close.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -15,12 +15,12 @@ int mca_pcm_base_close(void) { /* Close all remaining available modules (may be one if this is a - LAM RTE program, or [possibly] multiple if this is laminfo) */ + OMPI RTE program, or [possibly] multiple if this is ompi_info) */ mca_base_modules_close(mca_pcm_base_output, &mca_pcm_base_modules_available, NULL); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pcm/base/pcm_base_open.c b/src/mca/pcm/base/pcm_base_open.c index 6454320294..19dab0f4ba 100644 --- a/src/mca/pcm/base/pcm_base_open.c +++ b/src/mca/pcm/base/pcm_base_open.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -23,7 +23,7 @@ */ int mca_pcm_base_output = -1; mca_pcm_t mca_pcm; -lam_list_t mca_pcm_base_modules_available; +ompi_list_t mca_pcm_base_modules_available; mca_pcm_base_module_t mca_pcm_base_selected_module; @@ -35,13 +35,13 @@ int mca_pcm_base_open(void) { /* Open up all available modules */ - if (LAM_SUCCESS != + if (OMPI_SUCCESS != mca_base_modules_open("pcm", 0, mca_pcm_base_static_modules, &mca_pcm_base_modules_available)) { - return LAM_ERROR; + return OMPI_ERROR; } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pcm/base/pcm_base_select.c b/src/mca/pcm/base/pcm_base_select.c index bc3ca9b678..c7c904fcbf 100644 --- a/src/mca/pcm/base/pcm_base_select.c +++ b/src/mca/pcm/base/pcm_base_select.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -27,37 +27,37 @@ int mca_pcm_base_select(bool *allow_multi_user_threads, int priority, best_priority; bool user_threads, hidden_threads; bool best_user_threads, best_hidden_threads; - lam_list_item_t *item; + ompi_list_item_t *item; mca_base_module_list_item_t *mli; mca_pcm_base_module_t *module, *best_module; mca_pcm_t *actions, *best_actions; - extern lam_list_t mca_pcm_base_modules_available; + extern ompi_list_t mca_pcm_base_modules_available; /* Traverse the list of available modules; call their init functions. */ best_priority = -1; best_module = NULL; - for (item = lam_list_get_first(&mca_pcm_base_modules_available); - lam_list_get_end(&mca_pcm_base_modules_available) != item; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&mca_pcm_base_modules_available); + ompi_list_get_end(&mca_pcm_base_modules_available) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = (mca_pcm_base_module_t *) mli->mli_module; - lam_output_verbose(10, mca_pcm_base_output, + ompi_output_verbose(10, mca_pcm_base_output, "select: initializing %s module %s", module->pcmm_version.mca_type_name, module->pcmm_version.mca_module_name); if (NULL == module->pcmm_init) { - lam_output_verbose(10, mca_pcm_base_output, + ompi_output_verbose(10, mca_pcm_base_output, "select: no init function; ignoring module"); } else { actions = module->pcmm_init(&priority, &user_threads, &hidden_threads); if (NULL == actions) { - lam_output_verbose(10, mca_pcm_base_output, + ompi_output_verbose(10, mca_pcm_base_output, "select: init returned failure"); } else { - lam_output_verbose(10, mca_pcm_base_output, + ompi_output_verbose(10, mca_pcm_base_output, "select: init returned priority %d", priority); if (priority > best_priority) { best_priority = priority; @@ -74,14 +74,14 @@ int mca_pcm_base_select(bool *allow_multi_user_threads, if (NULL == best_module) { /* JMS Replace with show_help */ - lam_abort(1, "No PCM module available. This shouldn't happen."); + ompi_abort(1, "No PCM module available. This shouldn't happen."); } /* Finalize all non-selected modules */ - for (item = lam_list_get_first(&mca_pcm_base_modules_available); - lam_list_get_end(&mca_pcm_base_modules_available) != item; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&mca_pcm_base_modules_available); + ompi_list_get_end(&mca_pcm_base_modules_available) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = (mca_pcm_base_module_t *) mli->mli_module; @@ -96,7 +96,7 @@ int mca_pcm_base_select(bool *allow_multi_user_threads, don't matter anymore) */ module->pcmm_finalize(); - lam_output_verbose(10, mca_pcm_base_output, + ompi_output_verbose(10, mca_pcm_base_output, "select: module %s finalized", module->pcmm_version.mca_module_name); } @@ -116,11 +116,11 @@ int mca_pcm_base_select(bool *allow_multi_user_threads, mca_pcm = *best_actions; *allow_multi_user_threads = best_user_threads; *have_hidden_threads = best_hidden_threads; - lam_output_verbose(10, mca_pcm_base_output, + ompi_output_verbose(10, mca_pcm_base_output, "select: module %s initialized", module->pcmm_version.mca_module_name); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pcm/cofs/Makefile.am b/src/mca/pcm/cofs/Makefile.am index a6e323c997..34575170d0 100644 --- a/src/mca/pcm/cofs/Makefile.am +++ b/src/mca/pcm/cofs/Makefile.am @@ -3,9 +3,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -13,9 +13,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_pcm_cofs_LOADABLE_MODULE +if OMPI_BUILD_pcm_cofs_LOADABLE_MODULE module_noinst = module_install = mca_pcm_cofs.la else @@ -23,12 +23,12 @@ module_noinst = libmca_pcm_cofs.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_pcm_cofs_la_SOURCES = mca_pcm_cofs_la_LIBADD = \ src/libmca_pcm_cofs.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_pcm_cofs_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/pcm/cofs/src/Makefile.am b/src/mca/pcm/cofs/src/Makefile.am index 2f84095a7a..37d82cc54f 100644 --- a/src/mca/pcm/cofs/src/Makefile.am +++ b/src/mca/pcm/cofs/src/Makefile.am @@ -2,12 +2,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_pcm_cofs.la libmca_pcm_cofs_la_SOURCES = \ diff --git a/src/mca/pcm/cofs/src/pcm_cofs.c b/src/mca/pcm/cofs/src/pcm_cofs.c index fa1baae762..fab1cef7b3 100644 --- a/src/mca/pcm/cofs/src/pcm_cofs.c +++ b/src/mca/pcm/cofs/src/pcm_cofs.c @@ -4,7 +4,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/pcm/pcm.h" #include "mca/pcm/cofs/src/pcm_cofs.h" @@ -29,12 +29,12 @@ mca_pcm_cofs_query_get_nodes(mca_pcm_rte_node_t **nodes, size_t * nodes_len, *nodes_len = 0; *available_procs = 0; - return LAM_ERR_NOT_SUPPORTED; + return OMPI_ERR_NOT_SUPPORTED; } -lam_job_handle_t -mca_pcm_cofs_handle_new(lam_job_handle_t parent) +ompi_job_handle_t +mca_pcm_cofs_handle_new(ompi_job_handle_t parent) { pid_t pid; char *ret; @@ -56,7 +56,7 @@ mca_pcm_cofs_handle_new(lam_job_handle_t parent) } -lam_job_handle_t +ompi_job_handle_t mca_pcm_cofs_handle_get(void) { return mca_pcm_cofs_my_handle; @@ -64,7 +64,7 @@ mca_pcm_cofs_handle_get(void) void -mca_pcm_cofs_handle_free(lam_job_handle_t * job_handle) +mca_pcm_cofs_handle_free(ompi_job_handle_t * job_handle) { if (*job_handle == mca_pcm_cofs_my_handle) { printf("WARNING: attempting to free static internal job handle!\n"); @@ -77,75 +77,75 @@ mca_pcm_cofs_handle_free(lam_job_handle_t * job_handle) int -mca_pcm_cofs_job_can_spawn(lam_job_handle_t job_handle) +mca_pcm_cofs_job_can_spawn(ompi_job_handle_t job_handle) { #if 1 /* Currently, have not coded up spawning support. Need to do so soon */ - return LAM_ERR_NOT_SUPPORTED; + return OMPI_ERR_NOT_SUPPORTED; #else if (job_handle != NULL) { - return LAM_ERR_NOT_SUPPORTED; + return OMPI_ERR_NOT_SUPPORTED; } else { - return LAM_SUCCESS; + return OMPI_SUCCESS; } #endif } int -mca_pcm_cofs_job_set_arguments(lam_job_handle_t job_handle, +mca_pcm_cofs_job_set_arguments(ompi_job_handle_t job_handle, mca_pcm_control_args_t * opts, size_t opts_len) { /* need to implement, but not needed to get INIT going */ - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_cofs_job_launch_procs(lam_job_handle_t job_handle, +mca_pcm_cofs_job_launch_procs(ompi_job_handle_t job_handle, mca_pcm_rte_node_t *nodes, size_t nodes_len, const char *file, int argc, const char *argv[], const char *env[]) { /* need to implement, but not needed to get INIT going */ - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_cofs_job_rendezvous(lam_job_handle_t job_handle) +mca_pcm_cofs_job_rendezvous(ompi_job_handle_t job_handle) { /* need to implement, but not needed to get INIT going */ - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_cofs_job_wait(lam_job_handle_t job_handle) +mca_pcm_cofs_job_wait(ompi_job_handle_t job_handle) { /* need to implement, but not needed to get INIT going */ - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_cofs_job_running(lam_job_handle_t job_handle, +mca_pcm_cofs_job_running(ompi_job_handle_t job_handle, int *running) { /* need to implement, but not needed to get INIT going */ - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_cofs_job_list_running(lam_job_handle_t ** handles, +mca_pcm_cofs_job_list_running(ompi_job_handle_t ** handles, size_t handles_len) { /* need to implement, but not needed to get INIT going */ - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } @@ -156,12 +156,12 @@ mca_pcm_cofs_proc_startup(void) if (mca_pcm_cofs_nprocs == 0) { /* well, this really shouldn't happen - we know we have at least ourselves */ - return LAM_ERR_FATAL; + return OMPI_ERR_FATAL; } mca_pcm_cofs_procs = malloc(sizeof(mca_pcm_proc_t) * mca_pcm_cofs_nprocs); if (mca_pcm_cofs_procs == NULL) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } for (i = 0 ; i < mca_pcm_cofs_nprocs ; ++i) { @@ -170,7 +170,7 @@ mca_pcm_cofs_proc_startup(void) mca_pcm_cofs_procs[i].vpid = i; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -178,13 +178,13 @@ int mca_pcm_cofs_proc_get_peers(mca_pcm_proc_t **procs, size_t *nprocs) { if (mca_pcm_cofs_procs == NULL) { - return LAM_ERROR; + return OMPI_ERROR; } *procs = mca_pcm_cofs_procs; *nprocs = mca_pcm_cofs_nprocs; - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -198,5 +198,5 @@ mca_pcm_cofs_proc_get_me(void) int mca_pcm_cofs_proc_get_parent(void) { - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } diff --git a/src/mca/pcm/cofs/src/pcm_cofs.h b/src/mca/pcm/cofs/src/pcm_cofs.h index a7fda118cd..171836dca6 100644 --- a/src/mca/pcm/cofs/src/pcm_cofs.h +++ b/src/mca/pcm/cofs/src/pcm_cofs.h @@ -3,7 +3,7 @@ * $HEADER$ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/pcm/pcm.h" #include "types.h" @@ -29,24 +29,24 @@ int mca_pcm_cofs_finalize(void); int mca_pcm_cofs_query_get_nodes(mca_pcm_rte_node_t **nodes, size_t *nodes_len, int *available_procs); -lam_job_handle_t mca_pcm_cofs_handle_new(lam_job_handle_t parent); -lam_job_handle_t mca_pcm_cofs_handle_get(void); -void mca_pcm_cofs_handle_free(lam_job_handle_t *job_handle); +ompi_job_handle_t mca_pcm_cofs_handle_new(ompi_job_handle_t parent); +ompi_job_handle_t mca_pcm_cofs_handle_get(void); +void mca_pcm_cofs_handle_free(ompi_job_handle_t *job_handle); -int mca_pcm_cofs_job_can_spawn(lam_job_handle_t job_handle); -int mca_pcm_cofs_job_set_arguments(lam_job_handle_t job_handle, +int mca_pcm_cofs_job_can_spawn(ompi_job_handle_t job_handle); +int mca_pcm_cofs_job_set_arguments(ompi_job_handle_t job_handle, mca_pcm_control_args_t* opts, size_t opts_len); -int mca_pcm_cofs_job_launch_procs(lam_job_handle_t job_handle, +int mca_pcm_cofs_job_launch_procs(ompi_job_handle_t job_handle, mca_pcm_rte_node_t *nodes, size_t nodes_len, const char* file, int argc, const char* argv[], const char *env[]); -int mca_pcm_cofs_job_rendezvous(lam_job_handle_t job_handle); -int mca_pcm_cofs_job_wait(lam_job_handle_t job_handle); -int mca_pcm_cofs_job_running(lam_job_handle_t job_handle, +int mca_pcm_cofs_job_rendezvous(ompi_job_handle_t job_handle); +int mca_pcm_cofs_job_wait(ompi_job_handle_t job_handle); +int mca_pcm_cofs_job_running(ompi_job_handle_t job_handle, int* running); -int mca_pcm_cofs_job_list_running(lam_job_handle_t **handles, +int mca_pcm_cofs_job_list_running(ompi_job_handle_t **handles, size_t handles_len); int mca_pcm_cofs_proc_startup(void); @@ -54,7 +54,7 @@ int mca_pcm_cofs_proc_get_peers(mca_pcm_proc_t **procs, size_t *nprocs); mca_pcm_proc_t* mca_pcm_cofs_proc_get_me(void); int mca_pcm_cofs_proc_get_parent(void); -extern char mca_pcm_cofs_comm_loc[LAM_PATH_MAX]; /* location for file drop-off */ +extern char mca_pcm_cofs_comm_loc[OMPI_PATH_MAX]; /* location for file drop-off */ extern int mca_pcm_cofs_my_vpid; extern char *mca_pcm_cofs_my_handle; diff --git a/src/mca/pcm/cofs/src/pcm_cofs_module.c b/src/mca/pcm/cofs/src/pcm_cofs_module.c index f17cceb004..10101c3496 100644 --- a/src/mca/pcm/cofs/src/pcm_cofs_module.c +++ b/src/mca/pcm/cofs/src/pcm_cofs_module.c @@ -4,7 +4,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "constants.h" #include "types.h" @@ -61,7 +61,7 @@ struct mca_pcm_1_0_0_t mca_pcm_cofs_1_0_0 = { }; -char mca_pcm_cofs_comm_loc[LAM_PATH_MAX]; +char mca_pcm_cofs_comm_loc[OMPI_PATH_MAX]; int mca_pcm_cofs_my_vpid = -1; char *mca_pcm_cofs_my_handle = NULL; mca_pcm_proc_t *mca_pcm_cofs_procs = NULL; @@ -72,14 +72,14 @@ mca_pcm_cofs_open(void) { /* JMS/BWB: Register MCA params in here -- see src/mca/base/mca_base_param.h */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_pcm_cofs_close(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -98,45 +98,45 @@ mca_pcm_cofs_init(int *priority, bool *allow_multi_user_threads, /* BWB - remove printfs once things settle down some... */ /* JMS: Look in src/mca/base/mca_base_param.h */ - test_ret = getenv("MCA_common_lam_cofs_my_vpid"); + test_ret = getenv("MCA_common_ompi_cofs_my_vpid"); if (test_ret == NULL) { - printf("COFS PCM will not be running because MCA_common_lam_cofs_my_vpid not set\n"); + printf("COFS PCM will not be running because MCA_common_ompi_cofs_my_vpid not set\n"); return NULL; } - test_ret = getenv("MCA_common_lam_cofs_job_handle"); + test_ret = getenv("MCA_common_ompi_cofs_job_handle"); if (test_ret == NULL) { - printf("COFS PCM will not be running because MCA_common_lam_cofs_job_handle not set\n"); + printf("COFS PCM will not be running because MCA_common_ompi_cofs_job_handle not set\n"); return NULL; } - test_ret = getenv("MCA_common_lam_cofs_num_procs"); + test_ret = getenv("MCA_common_ompi_cofs_num_procs"); if (test_ret == NULL) { - printf("COFS PCM will not be running because MCA_common_lam_cofs_num_procs not set\n"); + printf("COFS PCM will not be running because MCA_common_ompi_cofs_num_procs not set\n"); return NULL; } /* * BWB - fix me, make register the "right" way... */ - tmp = getenv("MCA_common_lam_cofs_comm_dir"); + tmp = getenv("MCA_common_ompi_cofs_comm_dir"); if (tmp == NULL) { /* make it $HOME */ tmp = getenv("HOME"); if (tmp == NULL) { - printf("pcm_cofs can not find communication dir (MCA_common_lam_cofs_comm_dir)\n"); + printf("pcm_cofs can not find communication dir (MCA_common_ompi_cofs_comm_dir)\n"); return NULL; } - snprintf(mca_pcm_cofs_comm_loc, LAM_PATH_MAX, "%s/cofs", tmp); + snprintf(mca_pcm_cofs_comm_loc, OMPI_PATH_MAX, "%s/cofs", tmp); } else { - snprintf(mca_pcm_cofs_comm_loc, LAM_PATH_MAX, "%s", tmp); + snprintf(mca_pcm_cofs_comm_loc, OMPI_PATH_MAX, "%s", tmp); } /* * BWB - fix me, make register the "right" way... */ /* find our vpid */ - tmp = getenv("MCA_common_lam_cofs_my_vpid"); + tmp = getenv("MCA_common_ompi_cofs_my_vpid"); if (tmp == NULL) { printf("pcm_cofs can not find vpid\n"); return NULL; @@ -159,11 +159,11 @@ mca_pcm_cofs_init(int *priority, bool *allow_multi_user_threads, unlink(tmp); free(tmp); - mca_pcm_cofs_my_handle = getenv("MCA_common_lam_cofs_job_handle"); + mca_pcm_cofs_my_handle = getenv("MCA_common_ompi_cofs_job_handle"); mca_pcm_cofs_procs = NULL; - tmp = getenv("MCA_common_lam_cofs_num_procs"); + tmp = getenv("MCA_common_ompi_cofs_num_procs"); if (tmp == NULL) { printf("pcm_cofs can not find nprocs\n"); return NULL; @@ -183,6 +183,6 @@ mca_pcm_cofs_finalize(void) mca_pcm_cofs_nprocs = 0; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pcm/pcm.h b/src/mca/pcm/pcm.h index 7616aa7c7b..aa9478b148 100644 --- a/src/mca/pcm/pcm.h +++ b/src/mca/pcm/pcm.h @@ -5,31 +5,31 @@ /** @file **/ /** - * \brief LAM/MPI Interface for Parallel Job & Process Control (pcm) + * \brief OMPI/MPI Interface for Parallel Job & Process Control (pcm) * - * LAM/MPI assumes it is running under a fully operational parallel + * OMPI/MPI assumes it is running under a fully operational parallel * run-time environment (RTE). This environment may be provided by * batch schedulers such as PBS and LSF, single system image tools * such as bproc, or specially designed MPI control daemons (the MPICH - * mpd or the included LAM daemon). The functionality provided + * mpd or the included OMPI daemon). The functionality provided * through the process control interface is dependant on the support - * of the underlying infrastructure. For example, lam_pcm_spawn + * of the underlying infrastructure. For example, ompi_pcm_spawn * (essentially, the "go do it" part of MPI_COMM_SPAWN) is not - * available for jobs running under the Qadrics/RMS RTE. The LAM + * available for jobs running under the Qadrics/RMS RTE. The OMPI * daemons will always provide the complete pcm interface. * - * Like the other LAM run-time interfaces, the pcm interface is + * Like the other OMPI run-time interfaces, the pcm interface is * implemented through mca modules (pcm). For details on the * capabilities of a particular module, please see the individual * module's documentation. * - * A run-time environment suitable for use by LAM/MPI must provide the + * A run-time environment suitable for use by OMPI/MPI must provide the * following capabilities: * * - Remote process startup at job-start time with the ability to: * - push an environment (or a large chunk of an environment) to the started process * - redirect the stdout and stderr of the process to either a file (batch - * schedulers) or the mpirun application (LAM daemons) without interaction from the + * schedulers) or the mpirun application (OMPI daemons) without interaction from the * started process * - A working registry interface * - A "unique" job id for each parallel job @@ -54,7 +54,7 @@ #ifndef MCA_PCM_H_ #define MCA_PCM_H_ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/mca.h" #include "include/types.h" @@ -64,9 +64,9 @@ /* * "PCM" global types */ -#define LAM_PCM_PROC_MPIRUN 0 -#define LAM_PCM_PROC_MPIAPP 1 -#define LAM_PCM_PROC_OTHER 2 +#define OMPI_PCM_PROC_MPIRUN 0 +#define OMPI_PCM_PROC_MPIAPP 1 +#define OMPI_PCM_PROC_OTHER 2 struct mca_pcm_rte_node_t { char name[MAXHOSTNAMELEN]; @@ -82,7 +82,7 @@ struct mca_pcm_control_args_t { typedef struct mca_pcm_control_args_t mca_pcm_control_args_t; struct mca_pcm_proc_t { - lam_job_handle_t job_handle; + ompi_job_handle_t job_handle; int vpid; }; typedef struct mca_pcm_proc_t mca_pcm_proc_t; @@ -104,8 +104,8 @@ typedef struct mca_pcm_1_0_0_t* * @param nodes_len Length of nodes array * @param available_procs Number of available processors in the RTE * - * @retval LAM_SUCCESS success - * @retval LAM_NOT_SUPPORTED Not available + * @retval OMPI_SUCCESS success + * @retval OMPI_NOT_SUPPORTED Not available * * Obtain a list of nodes available for execution. No promises are * made that such information is available - for some environments @@ -141,7 +141,7 @@ typedef int (*mca_pcm_base_query_get_nodes_fn_t)(mca_pcm_rte_node_t **nodes, * * \warning The handle must be released using mca_pcm_handle_free */ -typedef lam_job_handle_t (*mca_pcm_base_handle_new_fn_t)(lam_job_handle_t parent); +typedef ompi_job_handle_t (*mca_pcm_base_handle_new_fn_t)(ompi_job_handle_t parent); /** @@ -154,18 +154,18 @@ typedef lam_job_handle_t (*mca_pcm_base_handle_new_fn_t)(lam_job_handle_t parent * * \warning The handle must be released using mca_pcm_handle_free */ -typedef lam_job_handle_t (*mca_pcm_base_handle_get_fn_t)(void); +typedef ompi_job_handle_t (*mca_pcm_base_handle_get_fn_t)(void); /** * Free a job handle * - * @param job_handle Poiner to a lam_job_handle_t + * @param job_handle Poiner to a ompi_job_handle_t * * Free a job handle returned by mca_pcm_handle_new or * mca_pcm_handle_get. */ -typedef void (*mca_pcm_base_handle_free_fn_t)(lam_job_handle_t *job_handle); +typedef void (*mca_pcm_base_handle_free_fn_t)(ompi_job_handle_t *job_handle); /** @@ -173,15 +173,15 @@ typedef void (*mca_pcm_base_handle_free_fn_t)(lam_job_handle_t *job_handle); * * @param job_handle Parallel job handle of running process * - * @retval LAM_SUCCESS LAM can spawn more jobs - * @retval LAM_NOT_SUPPORTED LAM can not spawn more jobs + * @retval OMPI_SUCCESS OMPI can spawn more jobs + * @retval OMPI_NOT_SUPPORTED OMPI can not spawn more jobs * * Ask the currently running mca module for the runtime environment * if it supports spawning more processes. This question should - * always return LAM_SUCCESS (yes) if called from mpirun. Useful + * always return OMPI_SUCCESS (yes) if called from mpirun. Useful * for asking if MPI_SPAWN and friends can run. */ -typedef int (*mca_pcm_base_job_can_spawn_fn_t)(lam_job_handle_t job_handle); +typedef int (*mca_pcm_base_job_can_spawn_fn_t)(ompi_job_handle_t job_handle); /** @@ -191,8 +191,8 @@ typedef int (*mca_pcm_base_job_can_spawn_fn_t)(lam_job_handle_t job_handle); * @param opts Array of key=value structures requesting job behaviour * @param opts_len Length of opts array * - * @retval LAM_SUCCESS Sucess - * @retval LAM_ERROR Unkonwn failure + * @retval OMPI_SUCCESS Sucess + * @retval OMPI_ERROR Unkonwn failure * * Configure the job using key=value arguments. The meanings of the * arguments are up to the specific mca module providing run-time support. @@ -204,7 +204,7 @@ typedef int (*mca_pcm_base_job_can_spawn_fn_t)(lam_job_handle_t job_handle); * \Warning It is an error to call this function more than once on a single * job handle. */ -typedef int (*mca_pcm_base_job_set_arguments_fn_t)(lam_job_handle_t job_handle, +typedef int (*mca_pcm_base_job_set_arguments_fn_t)(ompi_job_handle_t job_handle, mca_pcm_control_args_t* opts, size_t opts_len); @@ -220,10 +220,10 @@ typedef int (*mca_pcm_base_job_set_arguments_fn_t)(lam_job_handle_t job_handle, * @param argv Argv array for launched processes * @param env Environment array for launched process. See note below * - * @retval LAM_SUCCESS Success - * @retval LAM_ERR_RESOURCE_BUSY Try again real soon now - * @retval LAM_ERR_NOT_SUPPORTED non-MPIRUN process can not spawn jobs - * @retval LAM_FAILURE Unkonwn failure + * @retval OMPI_SUCCESS Success + * @retval OMPI_ERR_RESOURCE_BUSY Try again real soon now + * @retval OMPI_ERR_NOT_SUPPORTED non-MPIRUN process can not spawn jobs + * @retval OMPI_FAILURE Unkonwn failure * * Launch num_procs nodes[?].processes on nodes[?].node_num for each * nodes entry, as part of job_handle's job. The env array should @@ -231,10 +231,10 @@ typedef int (*mca_pcm_base_job_set_arguments_fn_t)(lam_job_handle_t job_handle, * remote processes. The mca may provide a more detailed * environment if necessary (bporc, etc.). * - * LAM_ERR_NOT_SUPPORTED will be returned if the mca module does not + * OMPI_ERR_NOT_SUPPORTED will be returned if the mca module does not * support spawning of new applications from */ -typedef int (*mca_pcm_base_job_launch_procs_fn_t)(lam_job_handle_t job_handle, +typedef int (*mca_pcm_base_job_launch_procs_fn_t)(ompi_job_handle_t job_handle, mca_pcm_rte_node_t *nodes, size_t nodes_len, const char* file, int argc, const char* argv[], @@ -246,8 +246,8 @@ typedef int (*mca_pcm_base_job_launch_procs_fn_t)(lam_job_handle_t job_handle, * * @param job_handle Parallel job handle to run through startup * - * @retval LAM_SUCCESS Success - * @retval LAM_FAILURE Unknown failure + * @retval OMPI_SUCCESS Success + * @retval OMPI_FAILURE Unknown failure * * Do the civic duties required to complete the rendezvous part of * the startup protocol. After this, the MPI application should @@ -259,7 +259,7 @@ typedef int (*mca_pcm_base_job_launch_procs_fn_t)(lam_job_handle_t job_handle, * * This function only needs to be called by the launching procs. */ -typedef int (*mca_pcm_base_job_rendezvous_fn_t)(lam_job_handle_t job_handle); +typedef int (*mca_pcm_base_job_rendezvous_fn_t)(ompi_job_handle_t job_handle); /** @@ -267,14 +267,14 @@ typedef int (*mca_pcm_base_job_rendezvous_fn_t)(lam_job_handle_t job_handle); * * @param job_handle Parallel job handle to wait on * - * @retval LAM_SUCCESS Success - * @retval LAM_ERR_INTERUPTED Interupted (due to signal, etc.) + * @retval OMPI_SUCCESS Success + * @retval OMPI_ERR_INTERUPTED Interupted (due to signal, etc.) * - * The LAM parallel version of "wait". It is not required to wait + * The OMPI parallel version of "wait". It is not required to wait * on a job at termination, as job results will be expunged over * time as resource limits dictate. */ -typedef int (*mca_pcm_base_job_wait_fn_t)(lam_job_handle_t job_handle); +typedef int (*mca_pcm_base_job_wait_fn_t)(ompi_job_handle_t job_handle); /** @@ -283,13 +283,13 @@ typedef int (*mca_pcm_base_job_wait_fn_t)(lam_job_handle_t job_handle); * @param job_handle Parallel job handle to query * @param running Job is running, if true * - * @retval LAM_SUCCESS Success - * @retval LAM_ERR_BAD_PARAM Invalid job handle + * @retval OMPI_SUCCESS Success + * @retval OMPI_ERR_BAD_PARAM Invalid job handle * * Ask if job is running. If job has recently finished, this does * not imply wait the pcm interface will call wait for you. */ -typedef int (*mca_pcm_base_job_running_fn_t)(lam_job_handle_t job_handle, +typedef int (*mca_pcm_base_job_running_fn_t)(ompi_job_handle_t job_handle, int* running); @@ -299,7 +299,7 @@ typedef int (*mca_pcm_base_job_running_fn_t)(lam_job_handle_t job_handle, * @param handles Pointer to job handles array * @param handles_len length of handles array * - * @retval LAM_ERR_NOT_IMPLEMENTED Not implemented + * @retval OMPI_ERR_NOT_IMPLEMENTED Not implemented * * Query the environment about currently running jobs. Intended for * applications outside MPI and mpirun, to be user friendly and all @@ -307,16 +307,16 @@ typedef int (*mca_pcm_base_job_running_fn_t)(lam_job_handle_t job_handle, * * \warning This function is not yet implemented. */ -typedef int (*mca_pcm_base_job_list_running_fn_t)(lam_job_handle_t **handles, +typedef int (*mca_pcm_base_job_list_running_fn_t)(ompi_job_handle_t **handles, size_t handles_len); /** * Do process startup code * - * @retval LAM_SUCCESS Success - * @retval LAM_ERR_FATAL Fatal error occurred - * @retval LAM_ERROR Unkonwn failure + * @retval OMPI_SUCCESS Success + * @retval OMPI_ERR_FATAL Fatal error occurred + * @retval OMPI_ERROR Unkonwn failure * * Do all communication work required to get peer list and establish * the out of band communictaion mechanism. If a pcm interface uses @@ -335,10 +335,10 @@ typedef int (*mca_pcm_base_proc_startup_fn_t)(void); /** * Get peers list * - * @param procs Ordered array of lam_proc_t entries describing the job peers + * @param procs Ordered array of ompi_proc_t entries describing the job peers * - * @retval LAM_SUCCESS success - * @retval LAM_ERROR Unknown error + * @retval OMPI_SUCCESS success + * @retval OMPI_ERROR Unknown error * * Get list of peers in the parallel job. Should not require any * communication with other nodes (communication with processes on @@ -353,7 +353,7 @@ typedef int (*mca_pcm_base_proc_get_peers_fn_t)(mca_pcm_proc_t **procs, size_t * /** * Get my entry in the peers list * - * @retval LAM_ERR_NOT_IMPLEMENTED Function not implemented + * @retval OMPI_ERR_NOT_IMPLEMENTED Function not implemented * * Get my entry in the peers list * @@ -363,7 +363,7 @@ typedef mca_pcm_proc_t* (*mca_pcm_base_proc_get_me_fn_t)(void); /** * Get my entry in the peers list * - * @retval LAM_ERR_NOT_IMPLEMENTED Function not implemented + * @retval OMPI_ERR_NOT_IMPLEMENTED Function not implemented * * Get my entry in the peers list * @@ -450,7 +450,7 @@ extern "C" { * Globals */ extern int mca_pcm_base_output; -extern lam_list_t mca_pcm_base_modules_available; +extern ompi_list_t mca_pcm_base_modules_available; extern mca_pcm_base_module_t mca_pcm_base_selected_module; extern mca_pcm_t mca_pcm; diff --git a/src/mca/pcm/rsh/Makefile.am b/src/mca/pcm/rsh/Makefile.am index 69aa3d485e..d34a9d6ed9 100644 --- a/src/mca/pcm/rsh/Makefile.am +++ b/src/mca/pcm/rsh/Makefile.am @@ -3,9 +3,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -13,9 +13,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_pcm_rsh_LOADABLE_MODULE +if OMPI_BUILD_pcm_rsh_LOADABLE_MODULE module_noinst = module_install = mca_pcm_rsh.la else @@ -23,12 +23,12 @@ module_noinst = libmca_pcm_rsh.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_pcm_rsh_la_SOURCES = mca_pcm_rsh_la_LIBADD = \ src/libmca_pcm_rsh.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_pcm_rsh_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/pcm/rsh/src/Makefile.am b/src/mca/pcm/rsh/src/Makefile.am index d0725dbb49..69eee785f1 100644 --- a/src/mca/pcm/rsh/src/Makefile.am +++ b/src/mca/pcm/rsh/src/Makefile.am @@ -2,12 +2,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_pcm_rsh.la libmca_pcm_rsh_la_SOURCES = \ diff --git a/src/mca/pcm/rsh/src/pcm_rsh.c b/src/mca/pcm/rsh/src/pcm_rsh.c index 7311eb472c..e05db66fcc 100644 --- a/src/mca/pcm/rsh/src/pcm_rsh.c +++ b/src/mca/pcm/rsh/src/pcm_rsh.c @@ -4,7 +4,7 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/pcm/pcm.h" #include "mca/pcm/rsh/src/pcm_rsh.h" @@ -26,12 +26,12 @@ int mca_pcm_rsh_query_get_nodes(mca_pcm_rte_node_t **nodes, size_t * nodes_len, int *available_procs) { - return LAM_ERR_NOT_SUPPORTED; + return OMPI_ERR_NOT_SUPPORTED; } -lam_job_handle_t -mca_pcm_rsh_handle_new(lam_job_handle_t parent) +ompi_job_handle_t +mca_pcm_rsh_handle_new(ompi_job_handle_t parent) { char *new_handle = NULL; int mypid = 0; @@ -53,7 +53,7 @@ mca_pcm_rsh_handle_new(lam_job_handle_t parent) } -lam_job_handle_t +ompi_job_handle_t mca_pcm_rsh_handle_get(void) { return mca_pcm_rsh_my_job_handle; @@ -61,7 +61,7 @@ mca_pcm_rsh_handle_get(void) void -mca_pcm_rsh_handle_free(lam_job_handle_t * job_handle) +mca_pcm_rsh_handle_free(ompi_job_handle_t * job_handle) { if (*job_handle != NULL) { free(*job_handle); @@ -71,93 +71,93 @@ mca_pcm_rsh_handle_free(lam_job_handle_t * job_handle) int -mca_pcm_rsh_job_can_spawn(lam_job_handle_t job_handle) +mca_pcm_rsh_job_can_spawn(ompi_job_handle_t job_handle) { if (mca_pcm_rsh_handle_get() != NULL) { /* no support for spawned jobs */ - return LAM_ERR_NOT_SUPPORTED; + return OMPI_ERR_NOT_SUPPORTED; } else { - return LAM_SUCCESS; + return OMPI_SUCCESS; } } int -mca_pcm_rsh_job_set_arguments(lam_job_handle_t job_handle, +mca_pcm_rsh_job_set_arguments(ompi_job_handle_t job_handle, mca_pcm_control_args_t * opts, size_t opts_len) { - if (have_launched != 0) return LAM_ERROR; + if (have_launched != 0) return OMPI_ERROR; - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_rsh_job_launch_procs(lam_job_handle_t job_handle, +mca_pcm_rsh_job_launch_procs(ompi_job_handle_t job_handle, mca_pcm_rte_node_t *nodes, size_t nodes_len, const char *file, int argc, const char *argv[], const char *env[]) { - if (have_connected != 0) return LAM_ERROR; + if (have_connected != 0) return OMPI_ERROR; have_launched = 1; - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_rsh_job_rendezvous(lam_job_handle_t job_handle) +mca_pcm_rsh_job_rendezvous(ompi_job_handle_t job_handle) { - if (have_connected != 0 || have_launched == 0) return LAM_ERROR; + if (have_connected != 0 || have_launched == 0) return OMPI_ERROR; - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_rsh_job_wait(lam_job_handle_t job_handle) +mca_pcm_rsh_job_wait(ompi_job_handle_t job_handle) { - if (have_connected == 0 || have_launched == 0) return LAM_ERROR; + if (have_connected == 0 || have_launched == 0) return OMPI_ERROR; - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_rsh_job_running(lam_job_handle_t job_handle, +mca_pcm_rsh_job_running(ompi_job_handle_t job_handle, int *running) { - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int -mca_pcm_rsh_job_list_running(lam_job_handle_t ** handles, +mca_pcm_rsh_job_list_running(ompi_job_handle_t ** handles, size_t handles_len) { - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } int mca_pcm_rsh_proc_startup(void) { - if (have_connected != 0) return LAM_ERROR; + if (have_connected != 0) return OMPI_ERROR; have_connected = 1; - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_pcm_rsh_proc_get_peers(mca_pcm_proc_t **procs, size_t *nprocs) { - if (have_connected == 0) return LAM_ERROR; + if (have_connected == 0) return OMPI_ERROR; - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -171,5 +171,5 @@ mca_pcm_rsh_proc_get_me(void) int mca_pcm_rsh_proc_get_parent(void) { - return LAM_ERR_NOT_IMPLEMENTED; + return OMPI_ERR_NOT_IMPLEMENTED; } diff --git a/src/mca/pcm/rsh/src/pcm_rsh.h b/src/mca/pcm/rsh/src/pcm_rsh.h index 803f5c96c3..b93b848721 100644 --- a/src/mca/pcm/rsh/src/pcm_rsh.h +++ b/src/mca/pcm/rsh/src/pcm_rsh.h @@ -3,7 +3,7 @@ * $HEADER$ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "mca/pcm/pcm.h" #include "types.h" @@ -31,24 +31,24 @@ int mca_pcm_rsh_finalize(void); int mca_pcm_rsh_query_get_nodes(mca_pcm_rte_node_t **nodes, size_t *nodes_len, int *available_procs); -lam_job_handle_t mca_pcm_rsh_handle_new(lam_job_handle_t parent); -lam_job_handle_t mca_pcm_rsh_handle_get(void); -void mca_pcm_rsh_handle_free(lam_job_handle_t *job_handle); +ompi_job_handle_t mca_pcm_rsh_handle_new(ompi_job_handle_t parent); +ompi_job_handle_t mca_pcm_rsh_handle_get(void); +void mca_pcm_rsh_handle_free(ompi_job_handle_t *job_handle); -int mca_pcm_rsh_job_can_spawn(lam_job_handle_t job_handle); -int mca_pcm_rsh_job_set_arguments(lam_job_handle_t job_handle, +int mca_pcm_rsh_job_can_spawn(ompi_job_handle_t job_handle); +int mca_pcm_rsh_job_set_arguments(ompi_job_handle_t job_handle, mca_pcm_control_args_t* opts, size_t opts_len); -int mca_pcm_rsh_job_launch_procs(lam_job_handle_t job_handle, +int mca_pcm_rsh_job_launch_procs(ompi_job_handle_t job_handle, mca_pcm_rte_node_t *nodes, size_t nodes_len, const char* file, int argc, const char* argv[], const char *env[]); -int mca_pcm_rsh_job_rendezvous(lam_job_handle_t job_handle); -int mca_pcm_rsh_job_wait(lam_job_handle_t job_handle); -int mca_pcm_rsh_job_running(lam_job_handle_t job_handle, +int mca_pcm_rsh_job_rendezvous(ompi_job_handle_t job_handle); +int mca_pcm_rsh_job_wait(ompi_job_handle_t job_handle); +int mca_pcm_rsh_job_running(ompi_job_handle_t job_handle, int* running); -int mca_pcm_rsh_job_list_running(lam_job_handle_t **handles, +int mca_pcm_rsh_job_list_running(ompi_job_handle_t **handles, size_t handles_len); int mca_pcm_rsh_proc_startup(void); @@ -61,7 +61,7 @@ int mca_pcm_rsh_proc_get_parent(void); */ struct mca_pcm_rsh_connection_item_t { - lam_list_item_t super; + ompi_list_item_t super; pid_t rshpid; int vpid; @@ -69,9 +69,9 @@ struct mca_pcm_rsh_connection_item_t { }; typedef struct mca_pcm_rsh_connection_t mca_pcm_rsh_connection_t; -extern lam_list_t mca_pcm_rsh_connections; +extern ompi_list_t mca_pcm_rsh_connections; -extern lam_job_handle_t mca_pcm_rsh_my_job_handle; +extern ompi_job_handle_t mca_pcm_rsh_my_job_handle; extern int mca_pcm_rsh_my_vpid; extern char *mca_pcm_rsh_rsh; diff --git a/src/mca/pcm/rsh/src/pcm_rsh_module.c b/src/mca/pcm/rsh/src/pcm_rsh_module.c index a7253d0064..b37393ec97 100644 --- a/src/mca/pcm/rsh/src/pcm_rsh_module.c +++ b/src/mca/pcm/rsh/src/pcm_rsh_module.c @@ -4,12 +4,12 @@ * */ -#include "lam_config.h" +#include "ompi_config.h" #include "constants.h" #include "types.h" #include "mem/malloc.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/mca.h" #include "mca/base/mca_base_param.h" #include "mca/pcm/pcm.h" @@ -63,9 +63,9 @@ struct mca_pcm_1_0_0_t mca_pcm_rsh_1_0_0 = { mca_pcm_rsh_proc_get_parent }; -lam_list_t mca_pcm_rsh_connections; +ompi_list_t mca_pcm_rsh_connections; -lam_job_handle_t mca_pcm_rsh_my_job_handle = NULL; +ompi_job_handle_t mca_pcm_rsh_my_job_handle = NULL; int mca_pcm_rsh_my_vpid = -1; char *mca_pcm_rsh_rsh = NULL; @@ -88,7 +88,7 @@ mca_pcm_rsh_open(void) id = mca_base_param_register_string("pcm", "rsh", "hostfile", NULL, NULL); mca_base_param_lookup_string(id, &mca_pcm_rsh_hostfile); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -100,7 +100,7 @@ mca_pcm_rsh_close(void) OBJ_DESTRUCT(&mca_pcm_rsh_connections); #endif - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -126,6 +126,6 @@ mca_pcm_rsh_init(int *priority, bool *allow_multi_user_threads, int mca_pcm_rsh_finalize(void) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/Makefile.am b/src/mca/pml/Makefile.am index af4dd9bd60..75745d401b 100644 --- a/src/mca/pml/Makefile.am +++ b/src/mca/pml/Makefile.am @@ -21,8 +21,8 @@ libmca_pml_la_DEPENDENCIES = $(libmca_pml_la_LIBADD) # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/pml -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/pml +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/pml/base/Makefile.am b/src/mca/pml/base/Makefile.am index aff4132f59..e3777597f3 100644 --- a/src/mca/pml/base/Makefile.am +++ b/src/mca/pml/base/Makefile.am @@ -28,9 +28,9 @@ libmca_pml_base_la_SOURCES = \ # Conditionally install the header files if WANT_INSTALL_HEADERS -lamdir = $(includedir)/lam/mca/pml/base -lam_HEADERS = $(headers) +ompidir = $(includedir)/ompi/mca/pml/base +ompi_HEADERS = $(headers) else -lamdir = $(includedir) +ompidir = $(includedir) endif diff --git a/src/mca/pml/base/base.h b/src/mca/pml/base/base.h index 25d89ece7c..62dd414aa1 100644 --- a/src/mca/pml/base/base.h +++ b/src/mca/pml/base/base.h @@ -5,7 +5,7 @@ #ifndef MCA_PML_BASE_H #define MCA_PML_BASE_H -#include "lam_config.h" +#include "ompi_config.h" #include "mca/mca.h" #include "mca/pml/pml.h" @@ -32,7 +32,7 @@ extern "C" { * Globals */ extern int mca_pml_base_output; -extern lam_list_t mca_pml_base_modules_available; +extern ompi_list_t mca_pml_base_modules_available; extern mca_pml_base_module_t mca_pml_base_selected_module; extern mca_pml_t mca_pml; diff --git a/src/mca/pml/base/pml_base_close.c b/src/mca/pml/base/pml_base_close.c index 8fddaa6797..72ca0cc60e 100644 --- a/src/mca/pml/base/pml_base_close.c +++ b/src/mca/pml/base/pml_base_close.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -24,13 +24,13 @@ int mca_pml_base_close(void) } /* Close all remaining available modules (may be one if this is a - LAM RTE program, or [possibly] multiple if this is laminfo) */ + OMPI RTE program, or [possibly] multiple if this is ompi_info) */ mca_base_modules_close(mca_pml_base_output, &mca_pml_base_modules_available, NULL); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/base/pml_base_open.c b/src/mca/pml/base/pml_base_open.c index a22efe9af6..64a819c05b 100644 --- a/src/mca/pml/base/pml_base_open.c +++ b/src/mca/pml/base/pml_base_open.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -26,7 +26,7 @@ */ int mca_pml_base_output = -1; mca_pml_t mca_pml; -lam_list_t mca_pml_base_modules_available; +ompi_list_t mca_pml_base_modules_available; mca_pml_base_module_t mca_pml_base_selected_module; @@ -38,18 +38,18 @@ int mca_pml_base_open(void) { /* Open up all available modules */ - if (LAM_SUCCESS != + if (OMPI_SUCCESS != mca_base_modules_open("pml", 0, mca_pml_base_static_modules, &mca_pml_base_modules_available)) { - return LAM_ERROR; + return OMPI_ERROR; } /* Set a sentinel in case we don't select any modules (e.g., - laminfo) */ + ompi_info) */ mca_pml_base_selected_module.pmlm_finalize = NULL; /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/base/pml_base_request.c b/src/mca/pml/base/pml_base_request.c index 82d91dd6b2..ca39416343 100644 --- a/src/mca/pml/base/pml_base_request.c +++ b/src/mca/pml/base/pml_base_request.c @@ -7,18 +7,18 @@ static void mca_pml_base_request_construct(mca_pml_base_request_t* req) { - req->super.req_type = LAM_REQUEST_PML; + req->super.req_type = OMPI_REQUEST_PML; } static void mca_pml_base_request_destruct(mca_pml_base_request_t* req) { } -lam_class_t mca_pml_base_request_t_class = { +ompi_class_t mca_pml_base_request_t_class = { "mca_pml_base_request_t", - OBJ_CLASS(lam_request_t), - (lam_construct_t) mca_pml_base_request_construct, - (lam_destruct_t) mca_pml_base_request_destruct + OBJ_CLASS(ompi_request_t), + (ompi_construct_t) mca_pml_base_request_construct, + (ompi_destruct_t) mca_pml_base_request_destruct }; diff --git a/src/mca/pml/base/pml_base_request.h b/src/mca/pml/base/pml_base_request.h index b16b0d24ab..4cf22072da 100644 --- a/src/mca/pml/base/pml_base_request.h +++ b/src/mca/pml/base/pml_base_request.h @@ -13,7 +13,7 @@ #include "communicator/communicator.h" #include "mca/ptl/ptl.h" -extern lam_class_t mca_pml_base_request_t_class; +extern ompi_class_t mca_pml_base_request_t_class; /** * Type of request. @@ -29,17 +29,17 @@ typedef enum { * Base type for PML P2P requests */ struct mca_pml_base_request_t { - lam_request_t super; /**< base request */ + ompi_request_t super; /**< base request */ void *req_addr; /**< pointer to application buffer */ size_t req_count; /**< count of user datatype elements */ int32_t req_peer; /**< peer process - rank w/in this communicator */ int32_t req_tag; /**< user defined tag */ - lam_communicator_t *req_comm; /**< communicator pointer */ - lam_proc_t* req_proc; /**< peer process */ + ompi_communicator_t *req_comm; /**< communicator pointer */ + ompi_proc_t* req_proc; /**< peer process */ mca_ptl_sequence_t req_sequence; /**< sequence number for MPI pt-2-pt ordering */ - lam_datatype_t *req_datatype; /**< pointer to data type */ + ompi_datatype_t *req_datatype; /**< pointer to data type */ mca_pml_base_request_type_t req_type; /**< MPI request type - used for test */ - lam_status_public_t req_status; /**< completion status */ + ompi_status_public_t req_status; /**< completion status */ bool req_persistent; /**< flag indicating if the this is a persistent request */ volatile bool req_mpi_done; /**< flag indicating if MPI is done with this request */ volatile bool req_pml_done; /**< flag indicating if the pt-2-pt layer is done with this request */ diff --git a/src/mca/pml/base/pml_base_select.c b/src/mca/pml/base/pml_base_select.c index 5bbd443d5c..7459e0cf93 100644 --- a/src/mca/pml/base/pml_base_select.c +++ b/src/mca/pml/base/pml_base_select.c @@ -2,9 +2,9 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "runtime/runtime.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -13,7 +13,7 @@ typedef struct opened_module_t { - lam_list_item_t super; + ompi_list_item_t super; mca_pml_base_module_t *om_module; } opened_module_t; @@ -35,11 +35,11 @@ int mca_pml_base_select(mca_pml_t *selected, bool *allow_multi_user_threads, int priority, best_priority; bool user_threads, hidden_threads; bool best_user_threads, best_hidden_threads; - lam_list_item_t *item; + ompi_list_item_t *item; mca_base_module_list_item_t *mli; mca_pml_base_module_t *module, *best_module; mca_pml_t *actions; - lam_list_t opened; + ompi_list_t opened; opened_module_t *om; /* Traverse the list of available modules; call their init @@ -47,28 +47,28 @@ int mca_pml_base_select(mca_pml_t *selected, bool *allow_multi_user_threads, best_priority = -1; best_module = NULL; - OBJ_CONSTRUCT(&opened, lam_list_t); - for (item = lam_list_get_first(&mca_pml_base_modules_available); - lam_list_get_end(&mca_pml_base_modules_available) != item; - item = lam_list_get_next(item)) { + OBJ_CONSTRUCT(&opened, ompi_list_t); + for (item = ompi_list_get_first(&mca_pml_base_modules_available); + ompi_list_get_end(&mca_pml_base_modules_available) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = (mca_pml_base_module_t *) mli->mli_module; - lam_output_verbose(10, mca_pml_base_output, + ompi_output_verbose(10, mca_pml_base_output, "select: initializing %s module %s", module->pmlm_version.mca_type_name, module->pmlm_version.mca_module_name); if (NULL == module->pmlm_init) { - lam_output_verbose(10, mca_pml_base_output, + ompi_output_verbose(10, mca_pml_base_output, "select: no init function; ignoring module"); } else { actions = module->pmlm_init(&priority, &user_threads, &hidden_threads); if (NULL == actions) { - lam_output_verbose(10, mca_pml_base_output, + ompi_output_verbose(10, mca_pml_base_output, "select: init returned failure"); } else { - lam_output_verbose(10, mca_pml_base_output, + ompi_output_verbose(10, mca_pml_base_output, "select: init returned priority %d", priority); if (priority > best_priority) { best_priority = priority; @@ -79,11 +79,11 @@ int mca_pml_base_select(mca_pml_t *selected, bool *allow_multi_user_threads, om = malloc(sizeof(opened_module_t)); if (NULL == om) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(om, lam_list_item_t); + OBJ_CONSTRUCT(om, ompi_list_item_t); om->om_module = module; - lam_list_append(&opened, (lam_list_item_t*) om); + ompi_list_append(&opened, (ompi_list_item_t*) om); } } } @@ -92,14 +92,14 @@ int mca_pml_base_select(mca_pml_t *selected, bool *allow_multi_user_threads, if (NULL == best_module) { /* JMS Replace with show_help */ - lam_abort(1, "No pml module available. This shouldn't happen."); + ompi_abort(1, "No pml module available. This shouldn't happen."); } /* Finalize all non-selected modules */ - for (item = lam_list_remove_first(&opened); + for (item = ompi_list_remove_first(&opened); NULL != item; - item = lam_list_remove_first(&opened)) { + item = ompi_list_remove_first(&opened)) { om = (opened_module_t *) item; if (om->om_module != best_module) { @@ -112,7 +112,7 @@ int mca_pml_base_select(mca_pml_t *selected, bool *allow_multi_user_threads, don't matter anymore) */ om->om_module->pmlm_finalize(); - lam_output_verbose(10, mca_pml_base_output, + ompi_output_verbose(10, mca_pml_base_output, "select: module %s not selected / finalized", module->pmlm_version.mca_module_name); } @@ -134,11 +134,11 @@ int mca_pml_base_select(mca_pml_t *selected, bool *allow_multi_user_threads, *selected = *actions; *allow_multi_user_threads = best_user_threads; *have_hidden_threads = best_hidden_threads; - lam_output_verbose(10, mca_pml_base_output, + ompi_output_verbose(10, mca_pml_base_output, "select: module %s selected", module->pmlm_version.mca_module_name); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/pml.h b/src/mca/pml/pml.h index 8d92a3cb28..c049bdd74c 100644 --- a/src/mca/pml/pml.h +++ b/src/mca/pml/pml.h @@ -31,11 +31,11 @@ * * After all of the MCA components are initialized, the MPI/RTE will make * downcalls into the PML to provide the initial list of processes - * (lam_proc_t instances), and notification of changes (add/delete). + * (ompi_proc_t instances), and notification of changes (add/delete). * * The PML module must select the set of PTL modules that are to be used * to reach a given destination. These should be cached on a PML specific - * data structure that is hung off the lam_proc_t. + * data structure that is hung off the ompi_proc_t. * * The PML should then apply a scheduling algorithm (round-robin, * weighted distribution, etc), to schedule the delivery of messages @@ -46,9 +46,9 @@ #ifndef MCA_PML_H #define MCA_PML_H -#include "lam_config.h" -#include "include/lam.h" -#include "lfc/lam_list.h" +#include "ompi_config.h" +#include "include/ompi.h" +#include "class/ompi_list.h" #include "communicator/communicator.h" #include "datatype/datatype.h" #include "request/request.h" @@ -72,9 +72,9 @@ typedef enum { } mca_pml_base_send_mode_t; /* renamed MPI constants */ -#define LAM_ANY_TAG MPI_ANY_TAG -#define LAM_ANY_SOURCE MPI_ANY_SOURCE -#define LAM_PROC_NULL MPI_PROC_NULL +#define OMPI_ANY_TAG MPI_ANY_TAG +#define OMPI_ANY_SOURCE MPI_ANY_SOURCE +#define OMPI_PROC_NULL MPI_PROC_NULL /** * MCA->PML Called by MCA framework to initialize the module. @@ -119,13 +119,13 @@ typedef mca_pml_base_module_1_0_0_t mca_pml_base_module_t; * * @param procs Array of new processes * @param nprocs Size of process array - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * Provides a notification to the PML that new processes have been * created, and provides the PML the opportunity to cache data - * (e.g. list of PTLs to use) on the lam_proc_t data structure. + * (e.g. list of PTLs to use) on the ompi_proc_t data structure. */ -typedef int (*mca_pml_base_add_procs_fn_t)(struct lam_proc_t **procs, size_t nprocs); +typedef int (*mca_pml_base_add_procs_fn_t)(struct ompi_proc_t **procs, size_t nprocs); /** @@ -133,26 +133,26 @@ typedef int (*mca_pml_base_add_procs_fn_t)(struct lam_proc_t **procs, size_t npr * * @param procs Array of processes * @param nprocs Size of process array - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * Provides a notification to the PML that processes have * gone away, and provides the PML the opportunity to cleanup - * any data cached on the lam_proc_t data structure. + * any data cached on the ompi_proc_t data structure. */ -typedef int (*mca_pml_base_del_procs_fn_t)(struct lam_proc_t **procs, size_t nprocs); +typedef int (*mca_pml_base_del_procs_fn_t)(struct ompi_proc_t **procs, size_t nprocs); /** * Downcall from MCA layer after all PTLs have been loaded/selected. * * @param ptls List of selected PTLs - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * Provides a notification to the PML that processes have * gone away, and provides the PML the opportunity to cleanup - * any data cached on the lam_proc_t data structure. + * any data cached on the ompi_proc_t data structure. */ -typedef int (*mca_pml_base_add_ptls_fn_t)(lam_list_t *ptls); +typedef int (*mca_pml_base_add_ptls_fn_t)(ompi_list_t *ptls); /** @@ -161,7 +161,7 @@ typedef int (*mca_pml_base_add_ptls_fn_t)(lam_list_t *ptls); * @param param parameter to change * @param value optional value * @param size size of value - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_control_fn_t)( int param, @@ -174,7 +174,7 @@ typedef int (*mca_pml_base_control_fn_t)( * For non-threaded case, provides MCA the opportunity to * progress outstanding requests on all ptls. * - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_progress_fn_t)(void); @@ -187,24 +187,24 @@ typedef int (*mca_pml_base_progress_fn_t)(void); * Downcall from MPI layer when a new communicator is created. * * @param comm Communicator - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * Provides the PML the opportunity to initialize/cache a data structure * on the communicator. */ -typedef int (*mca_pml_base_add_comm_fn_t)(struct lam_communicator_t* comm); +typedef int (*mca_pml_base_add_comm_fn_t)(struct ompi_communicator_t* comm); /** * Downcall from MPI layer when a communicator is destroyed. * * @param comm Communicator - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * Provides the PML the opportunity to cleanup any datastructures * associated with the communicator. */ -typedef int (*mca_pml_base_del_comm_fn_t)(struct lam_communicator_t* comm); +typedef int (*mca_pml_base_del_comm_fn_t)(struct ompi_communicator_t* comm); /** * Initialize a persistent receive request. @@ -216,16 +216,16 @@ typedef int (*mca_pml_base_del_comm_fn_t)(struct lam_communicator_t* comm); * @param tag (IN) User defined tag. * @param comm (IN) Communicator. * @param request (OUT) Request handle. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_irecv_init_fn_t)( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); /** @@ -238,16 +238,16 @@ typedef int (*mca_pml_base_irecv_init_fn_t)( * @param tag (IN) User defined tag. * @param comm (IN) Communicator. * @param request (OUT) Request handle. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_irecv_fn_t)( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); /** @@ -260,16 +260,16 @@ typedef int (*mca_pml_base_irecv_fn_t)( * @param tag (IN) User defined tag * @param comm (IN) Communicator * @param status (OUT) Completion status - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_recv_fn_t)( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - lam_status_public_t* status + struct ompi_communicator_t* comm, + ompi_status_public_t* status ); /** @@ -283,17 +283,17 @@ typedef int (*mca_pml_base_recv_fn_t)( * @param mode (IN) Send mode (STANDARD,BUFFERED,SYNCHRONOUS,READY) * @param comm (IN) Communicator. * @param request (OUT) Request handle. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_isend_init_fn_t)( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); @@ -308,17 +308,17 @@ typedef int (*mca_pml_base_isend_init_fn_t)( * @param mode (IN) Send mode (STANDARD,BUFFERED,SYNCHRONOUS,READY) * @param comm (IN) Communicator. * @param request (OUT) Request handle. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_isend_fn_t)( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); @@ -332,16 +332,16 @@ typedef int (*mca_pml_base_isend_fn_t)( * @param tag (IN) User defined tag. * @param mode (IN) Send mode (STANDARD,BUFFERED,SYNCHRONOUS,READY) * @param comm (IN) Communicator. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_send_fn_t)( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct lam_communicator_t* comm + struct ompi_communicator_t* comm ); /** @@ -349,11 +349,11 @@ typedef int (*mca_pml_base_send_fn_t)( * * @param count Number of requests * @param request Array of persistent requests - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_start_fn_t)( size_t count, - lam_request_t** requests + ompi_request_t** requests ); /** @@ -364,17 +364,17 @@ typedef int (*mca_pml_base_start_fn_t)( * @param index (OUT) Index of first completed request. * @param complete (OUT) Flag indicating if index is valid (a request completed). * @param status (OUT) Status of completed request. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * Note that upon completion, the request is freed, and the * request handle at index set to NULL. */ typedef int (*mca_pml_base_test_fn_t)( size_t count, - lam_request_t** requests, + ompi_request_t** requests, int *index, int *completed, - lam_status_public_t* status + ompi_status_public_t* status ); @@ -385,7 +385,7 @@ typedef int (*mca_pml_base_test_fn_t)( * @param requests (IN) Array of requests * @param completed (OUT) Flag indicating wether all requests completed. * @param statuses (OUT) Array of completion statuses. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * * This routine returns completed==true if all requests have completed. * The statuses parameter is only updated if all requests completed. Likewise, @@ -394,9 +394,9 @@ typedef int (*mca_pml_base_test_fn_t)( */ typedef int (*mca_pml_base_test_all_fn_t)( size_t count, - lam_request_t** requests, + ompi_request_t** requests, int *completed, - lam_status_public_t* statuses + ompi_status_public_t* statuses ); @@ -407,14 +407,14 @@ typedef int (*mca_pml_base_test_all_fn_t)( * @param requests (IN) Array of requests * @param index (OUT) Index into request array of completed request. * @param status (OUT) Status of completed request. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * */ typedef int (*mca_pml_base_wait_fn_t)( size_t count, - lam_request_t** request, + ompi_request_t** request, int *index, - lam_status_public_t* status + ompi_status_public_t* status ); @@ -424,13 +424,13 @@ typedef int (*mca_pml_base_wait_fn_t)( * @param count (IN) Number of requests * @param requests (IN) Array of requests * @param statuses (OUT) Array of completion statuses. - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * */ typedef int (*mca_pml_base_wait_all_fn_t)( size_t count, - lam_request_t** request, - lam_status_public_t *status + ompi_request_t** request, + ompi_status_public_t *status ); @@ -438,11 +438,11 @@ typedef int (*mca_pml_base_wait_all_fn_t)( * Release resources held by a persistent mode request. * * @param request (IN) Request - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * */ typedef int (*mca_pml_base_free_fn_t)( - lam_request_t** request + ompi_request_t** request ); @@ -450,11 +450,11 @@ typedef int (*mca_pml_base_free_fn_t)( * A special NULL request handle. * * @param request (OUT) Request - * @return LAM_SUCCESS or failure status. + * @return OMPI_SUCCESS or failure status. * */ typedef int (*mca_pml_base_null_fn_t)( - lam_request_t** request + ompi_request_t** request ); diff --git a/src/mca/pml/teg/Makefile.am b/src/mca/pml/teg/Makefile.am index 65174100d9..339823f66c 100644 --- a/src/mca/pml/teg/Makefile.am +++ b/src/mca/pml/teg/Makefile.am @@ -2,9 +2,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -12,9 +12,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_pml_teg_LOADABLE_MODULE +if OMPI_BUILD_pml_teg_LOADABLE_MODULE module_noinst = module_install = mca_pml_teg.la else @@ -22,12 +22,12 @@ module_noinst = libmca_pml_teg.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_pml_teg_la_SOURCES = mca_pml_teg_la_LIBADD = \ src/libmca_pml_teg.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_pml_teg_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/pml/teg/src/Makefile.am b/src/mca/pml/teg/src/Makefile.am index 8275e744d5..c757edd30b 100644 --- a/src/mca/pml/teg/src/Makefile.am +++ b/src/mca/pml/teg/src/Makefile.am @@ -3,12 +3,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_pml_teg.la libmca_pml_teg_la_SOURCES = \ diff --git a/src/mca/pml/teg/src/pml_ptl_array.c b/src/mca/pml/teg/src/pml_ptl_array.c index c206329688..12fd7fb65c 100644 --- a/src/mca/pml/teg/src/pml_ptl_array.c +++ b/src/mca/pml/teg/src/pml_ptl_array.c @@ -23,7 +23,7 @@ static void mca_ptl_array_destruct(mca_ptl_array_t* array) OBJ_CLASS_INSTANCE( mca_pml_teg_ptl_array_t, - lam_object_t, + ompi_object_t, mca_ptl_array_construct, mca_ptl_array_destruct ); @@ -32,14 +32,14 @@ int mca_ptl_array_reserve(mca_ptl_array_t* array, size_t size) { mca_ptl_proc_t *procs; if(array->ptl_reserve >= size) - return LAM_SUCCESS; + return OMPI_SUCCESS; procs = realloc(array->ptl_procs, sizeof(mca_ptl_proc_t)*size); if(NULL == procs) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; array->ptl_procs = procs; array->ptl_reserve = size; memset(array->ptl_procs+array->ptl_size, 0, (size-array->ptl_size)*sizeof(mca_ptl_proc_t)); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_ptl_array.h b/src/mca/pml/teg/src/pml_ptl_array.h index c87c02517c..5c6a237114 100644 --- a/src/mca/pml/teg/src/pml_ptl_array.h +++ b/src/mca/pml/teg/src/pml_ptl_array.h @@ -4,16 +4,16 @@ /** * @file */ -#ifndef LAM_PTL_ARRAY_H -#define LAM_PTL_ARRAY_H +#ifndef OMPI_PTL_ARRAY_H +#define OMPI_PTL_ARRAY_H #include "util/output.h" #include "mca/ptl/ptl.h" -extern lam_class_t mca_pml_teg_ptl_array_t_class; +extern ompi_class_t mca_pml_teg_ptl_array_t_class; /** - * A data structure associated with a lam_proc_t that caches + * A data structure associated with a ompi_proc_t that caches * addressing/scheduling attributes for a specific PTL instance * that can be used to reach the process. */ @@ -30,7 +30,7 @@ typedef struct mca_ptl_proc_t mca_ptl_proc_t; * scheduling across contents. */ struct mca_ptl_array_t { - lam_object_t super; + ompi_object_t super; mca_ptl_proc_t* ptl_procs; /**< array of ptl procs */ size_t ptl_size; /**< number available */ size_t ptl_reserve; /**< size of allocated ptl_proc array */ @@ -73,9 +73,9 @@ static inline void mca_ptl_array_set_size(mca_ptl_array_t* array, size_t size) */ static inline mca_ptl_proc_t* mca_ptl_array_insert(mca_ptl_array_t* array) { -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(array->ptl_size >= array->ptl_reserve) { - lam_output(0, "mca_ptl_array_insert: invalid array index %d >= %d", + ompi_output(0, "mca_ptl_array_insert: invalid array index %d >= %d", array->ptl_size, array->ptl_reserve); return 0; } @@ -91,9 +91,9 @@ static inline mca_ptl_proc_t* mca_ptl_array_insert(mca_ptl_array_t* array) */ static inline mca_ptl_proc_t* mca_ptl_array_get_index(mca_ptl_array_t* array, size_t index) { -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(index >= array->ptl_size) { - lam_output(0, "mca_ptl_array_get_index: invalid array index %d >= %d", + ompi_output(0, "mca_ptl_array_get_index: invalid array index %d >= %d", index, array->ptl_size); return 0; } @@ -110,9 +110,9 @@ static inline mca_ptl_proc_t* mca_ptl_array_get_index(mca_ptl_array_t* array, si static inline mca_ptl_proc_t* mca_ptl_array_get_next(mca_ptl_array_t* array) { mca_ptl_proc_t* ptl_proc; -#if LAM_ENABLE_DEBUG +#if OMPI_ENABLE_DEBUG if(array->ptl_size == 0) { - lam_output(0, "mca_ptl_array_get_next: invalid array size"); + ompi_output(0, "mca_ptl_array_get_next: invalid array size"); return 0; } #endif diff --git a/src/mca/pml/teg/src/pml_teg.c b/src/mca/pml/teg/src/pml_teg.c index b4e2087e31..6cd2e025fa 100644 --- a/src/mca/pml/teg/src/pml_teg.c +++ b/src/mca/pml/teg/src/pml_teg.c @@ -43,23 +43,23 @@ mca_pml_teg_t mca_pml_teg = { }; -int mca_pml_teg_add_comm(lam_communicator_t* comm) +int mca_pml_teg_add_comm(ompi_communicator_t* comm) { /* allocate pml specific comm data */ mca_pml_ptl_comm_t* pml_comm = OBJ_NEW(mca_pml_ptl_comm_t); if (NULL == pml_comm) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } mca_pml_ptl_comm_init_size(pml_comm, comm->c_remote_group->grp_proc_count); comm->c_pml_comm = pml_comm; - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int mca_pml_teg_del_comm(lam_communicator_t* comm) +int mca_pml_teg_del_comm(ompi_communicator_t* comm) { OBJ_RELEASE(comm->c_pml_comm); comm->c_pml_comm = 0; - return LAM_SUCCESS; + return OMPI_SUCCESS; } static int ptl_exclusivity_compare(const void* arg1, const void* arg2) @@ -75,21 +75,21 @@ static int ptl_exclusivity_compare(const void* arg1, const void* arg2) } -int mca_pml_teg_add_ptls(lam_list_t *ptls) +int mca_pml_teg_add_ptls(ompi_list_t *ptls) { /* build an array of ptls and ptl modules */ mca_ptl_base_selected_module_t* selected_ptl; - size_t num_ptls = lam_list_get_size(ptls); + size_t num_ptls = ompi_list_get_size(ptls); mca_pml_teg.teg_num_ptls = 0; mca_pml_teg.teg_num_ptl_modules = 0; mca_pml_teg.teg_ptls = malloc(sizeof(mca_ptl_t*) * num_ptls); mca_pml_teg.teg_ptl_modules = malloc(sizeof(mca_ptl_base_module_t*) * num_ptls); if (NULL == mca_pml_teg.teg_ptls || NULL == mca_pml_teg.teg_ptl_modules) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; - for(selected_ptl = (mca_ptl_base_selected_module_t*)lam_list_get_first(ptls); - selected_ptl != (mca_ptl_base_selected_module_t*)lam_list_get_end(ptls); - selected_ptl = (mca_ptl_base_selected_module_t*)lam_list_get_next(selected_ptl)) { + for(selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_first(ptls); + selected_ptl != (mca_ptl_base_selected_module_t*)ompi_list_get_end(ptls); + selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_next(selected_ptl)) { mca_ptl_t *ptl = selected_ptl->pbsm_actions; size_t i; @@ -108,7 +108,7 @@ int mca_pml_teg_add_ptls(lam_list_t *ptls) /* sort ptl list by exclusivity */ qsort(mca_pml_teg.teg_ptls, mca_pml_teg.teg_num_ptls, sizeof(struct mca_ptl_t*), ptl_exclusivity_compare); - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* @@ -120,10 +120,10 @@ int mca_pml_teg_control(int param, void* value, size_t size) size_t i=0; for(i=0; iptlm_control(param,value,size); - if(rc != LAM_SUCCESS) + if(rc != OMPI_SUCCESS) return rc; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* @@ -132,19 +132,19 @@ int mca_pml_teg_control(int param, void* value, size_t size) * */ -int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs) +int mca_pml_teg_add_procs(ompi_proc_t** procs, size_t nprocs) { size_t p; - lam_bitmap_t reachable; + ompi_bitmap_t reachable; int rc; - OBJ_CONSTRUCT(&reachable, lam_bitmap_t); - rc = lam_bitmap_init(&reachable, 1); - if(LAM_SUCCESS != rc) + OBJ_CONSTRUCT(&reachable, ompi_bitmap_t); + rc = ompi_bitmap_init(&reachable, 1); + if(OMPI_SUCCESS != rc) return rc; for(p=0; pproc_ptl_first, mca_pml_teg.teg_num_ptls); mca_ptl_array_reserve(&proc_pml->proc_ptl_next, mca_pml_teg.teg_num_ptls); - proc_pml->proc_lam = proc; + proc_pml->proc_ompi = proc; proc->proc_pml = proc_pml; } @@ -173,17 +173,17 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs) mca_ptl_t* ptl = mca_pml_teg.teg_ptls[p_index]; struct mca_ptl_base_peer_t* ptl_peer; - lam_bitmap_clear_all_bits(&reachable); + ompi_bitmap_clear_all_bits(&reachable); /* if the ptl can reach the destination proc it will return * addressing information that will be cached on the proc, if it * cannot reach the proc - but another peer */ rc = ptl->ptl_add_procs(ptl, 1, &proc, &ptl_peer, &reachable); - if(LAM_SUCCESS != rc) + if(OMPI_SUCCESS != rc) return rc; - if(lam_bitmap_is_set_bit(&reachable, 0)) { + if(ompi_bitmap_is_set_bit(&reachable, 0)) { /* cache the ptl on the proc */ mca_ptl_proc_t* ptl_proc = mca_ptl_array_insert(&proc_pml->proc_ptl_next); @@ -250,7 +250,7 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs) } } } - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* @@ -258,12 +258,12 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs) * with the proc that it is/has gone away */ -int mca_pml_teg_del_procs(lam_proc_t** procs, size_t nprocs) +int mca_pml_teg_del_procs(ompi_proc_t** procs, size_t nprocs) { size_t p; int rc; for(p = 0; p < nprocs; p++) { - lam_proc_t *proc = procs[p]; + ompi_proc_t *proc = procs[p]; mca_pml_proc_t* proc_pml = proc->proc_pml; size_t f_index, f_size; size_t n_index, n_size; @@ -275,7 +275,7 @@ int mca_pml_teg_del_procs(lam_proc_t** procs, size_t nprocs) mca_ptl_t* ptl = ptl_proc->ptl; rc = ptl->ptl_del_procs(ptl,1,&proc,&ptl_proc->ptl_peer); - if(LAM_SUCCESS != rc) + if(OMPI_SUCCESS != rc) return rc; /* remove this from next array so that we dont call it twice w/ @@ -298,7 +298,7 @@ int mca_pml_teg_del_procs(lam_proc_t** procs, size_t nprocs) mca_ptl_t* ptl = ptl_proc->ptl; if (ptl != 0) { rc = ptl->ptl_del_procs(ptl,1,&proc,&ptl_proc->ptl_peer); - if(LAM_SUCCESS != rc) + if(OMPI_SUCCESS != rc) return rc; } } @@ -307,19 +307,19 @@ int mca_pml_teg_del_procs(lam_proc_t** procs, size_t nprocs) OBJ_RELEASE(proc_pml); proc->proc_pml = NULL; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_pml_teg_module_fini(void) { /* FIX */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int mca_pml_teg_null(lam_request_t** request) +int mca_pml_teg_null(ompi_request_t** request) { - *request = (lam_request_t*)&mca_pml_teg.teg_request_null; - return LAM_SUCCESS; + *request = (ompi_request_t*)&mca_pml_teg.teg_request_null; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_teg.h b/src/mca/pml/teg/src/pml_teg.h index d4a3cfda0f..b7ae721c2d 100644 --- a/src/mca/pml/teg/src/pml_teg.h +++ b/src/mca/pml/teg/src/pml_teg.h @@ -33,8 +33,8 @@ struct mca_pml_teg_t { mca_ptl_t** teg_ptls; size_t teg_num_ptls; - lam_list_t teg_procs; - lam_mutex_t teg_lock; + ompi_list_t teg_procs; + ompi_mutex_t teg_lock; int teg_free_list_num; /* initial size of free list */ int teg_free_list_max; /* maximum size of free list */ @@ -42,7 +42,7 @@ struct mca_pml_teg_t { int teg_poll_iterations; /* number of iterations to poll for completion */ /* free list of recv requests */ - lam_free_list_t teg_recv_requests; + ompi_free_list_t teg_recv_requests; #if MCA_PML_TEG_STATISTICS long teg_isends; @@ -55,8 +55,8 @@ struct mca_pml_teg_t { #endif /* request completion */ - lam_mutex_t teg_request_lock; - lam_condition_t teg_request_cond; + ompi_mutex_t teg_request_lock; + ompi_condition_t teg_request_cond; volatile int teg_request_waiting; mca_pml_base_request_t teg_request_null; }; @@ -90,25 +90,25 @@ extern int mca_pml_teg_module_fini(void); */ extern int mca_pml_teg_add_comm( - struct lam_communicator_t* comm + struct ompi_communicator_t* comm ); extern int mca_pml_teg_del_comm( - struct lam_communicator_t* comm + struct ompi_communicator_t* comm ); extern int mca_pml_teg_add_procs( - struct lam_proc_t **procs, + struct ompi_proc_t **procs, size_t nprocs ); extern int mca_pml_teg_del_procs( - struct lam_proc_t **procs, + struct ompi_proc_t **procs, size_t nprocs ); extern int mca_pml_teg_add_ptls( - lam_list_t *ptls + ompi_list_t *ptls ); extern int mca_pml_teg_control( @@ -122,106 +122,106 @@ extern int mca_pml_teg_progress(void); extern int mca_pml_teg_isend_init( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); extern int mca_pml_teg_isend( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); extern int mca_pml_teg_send( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct lam_communicator_t* comm + struct ompi_communicator_t* comm ); extern int mca_pml_teg_irecv_init( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); extern int mca_pml_teg_irecv( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - struct lam_request_t **request + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); extern int mca_pml_teg_recv( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - lam_status_public_t* status + struct ompi_communicator_t* comm, + ompi_status_public_t* status ); extern int mca_pml_teg_progress(void); extern int mca_pml_teg_start( size_t count, - lam_request_t** requests + ompi_request_t** requests ); extern int mca_pml_teg_test( size_t count, - lam_request_t** request, + ompi_request_t** request, int *index, int *completed, - lam_status_public_t* status + ompi_status_public_t* status ); extern int mca_pml_teg_test_all( size_t count, - lam_request_t** request, + ompi_request_t** request, int *completed, - lam_status_public_t* status + ompi_status_public_t* status ); extern int mca_pml_teg_wait( size_t count, - lam_request_t** request, + ompi_request_t** request, int *index, - lam_status_public_t* status + ompi_status_public_t* status ); extern int mca_pml_teg_wait_all( size_t count, - lam_request_t** request, - lam_status_public_t* status + ompi_request_t** request, + ompi_status_public_t* status ); extern int mca_pml_teg_null( - lam_request_t** request + ompi_request_t** request ); extern int mca_pml_teg_free( - lam_request_t** request + ompi_request_t** request ); #define MCA_PML_TEG_FREE(request) \ @@ -240,7 +240,7 @@ extern int mca_pml_teg_free( } \ case MCA_PML_REQUEST_RECV: \ { \ - LAM_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (lam_list_item_t*)pml_request); \ + OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (ompi_list_item_t*)pml_request); \ break; \ } \ default: \ diff --git a/src/mca/pml/teg/src/pml_teg_free.c b/src/mca/pml/teg/src/pml_teg_free.c index 9b4df2691b..6637d6ba9a 100644 --- a/src/mca/pml/teg/src/pml_teg_free.c +++ b/src/mca/pml/teg/src/pml_teg_free.c @@ -4,9 +4,9 @@ #include "mca/ptl/base/ptl_base_sendreq.h" -int mca_pml_teg_free(lam_request_t** request) +int mca_pml_teg_free(ompi_request_t** request) { MCA_PML_TEG_FREE(request); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_teg_irecv.c b/src/mca/pml/teg/src/pml_teg_irecv.c index eda798b2a2..72aaaa4acb 100644 --- a/src/mca/pml/teg/src/pml_teg_irecv.c +++ b/src/mca/pml/teg/src/pml_teg_irecv.c @@ -4,11 +4,11 @@ int mca_pml_teg_irecv_init( void *addr, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - struct lam_request_t **request) + struct ompi_communicator_t* comm, + struct ompi_request_t **request) { int rc; mca_ptl_base_recv_request_t *recvreq; @@ -26,18 +26,18 @@ int mca_pml_teg_irecv_init( comm, true); - *request = (lam_request_t*)recvreq; - return LAM_SUCCESS; + *request = (ompi_request_t*)recvreq; + return OMPI_SUCCESS; } int mca_pml_teg_irecv( void *addr, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - struct lam_request_t **request) + struct ompi_communicator_t* comm, + struct ompi_request_t **request) { int rc; @@ -59,23 +59,23 @@ int mca_pml_teg_irecv( comm, false); - if((rc = mca_pml_teg_recv_request_start(recvreq)) != LAM_SUCCESS) { + if((rc = mca_pml_teg_recv_request_start(recvreq)) != OMPI_SUCCESS) { MCA_PML_TEG_RECV_REQUEST_RETURN(recvreq); return rc; } - *request = (lam_request_t*)recvreq; - return LAM_SUCCESS; + *request = (ompi_request_t*)recvreq; + return OMPI_SUCCESS; } int mca_pml_teg_recv( void *addr, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int src, int tag, - struct lam_communicator_t* comm, - lam_status_public_t* status) + struct ompi_communicator_t* comm, + ompi_status_public_t* status) { int rc; mca_ptl_base_recv_request_t *recvreq; @@ -96,28 +96,28 @@ int mca_pml_teg_recv( comm, false); - if((rc = mca_pml_teg_recv_request_start(recvreq)) != LAM_SUCCESS) { + if((rc = mca_pml_teg_recv_request_start(recvreq)) != OMPI_SUCCESS) { MCA_PML_TEG_RECV_REQUEST_RETURN(recvreq); return rc; } if(recvreq->super.req_mpi_done == false) { /* give up and sleep until completion */ - if(lam_using_threads()) { - lam_mutex_lock(&mca_pml_teg.teg_request_lock); + if(ompi_using_threads()) { + ompi_mutex_lock(&mca_pml_teg.teg_request_lock); mca_pml_teg.teg_request_waiting++; while(recvreq->super.req_mpi_done == false) - lam_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); + ompi_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); mca_pml_teg.teg_request_waiting--; - lam_mutex_unlock(&mca_pml_teg.teg_request_lock); + ompi_mutex_unlock(&mca_pml_teg.teg_request_lock); } else { mca_pml_teg.teg_request_waiting++; while(recvreq->super.req_mpi_done == false) - lam_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); + ompi_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); mca_pml_teg.teg_request_waiting--; } } MCA_PML_TEG_RECV_REQUEST_RETURN(recvreq); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_teg_isend.c b/src/mca/pml/teg/src/pml_teg_isend.c index 650e0ef135..859c170dea 100644 --- a/src/mca/pml/teg/src/pml_teg_isend.c +++ b/src/mca/pml/teg/src/pml_teg_isend.c @@ -10,18 +10,18 @@ int mca_pml_teg_isend_init( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t sendmode, - lam_communicator_t* comm, - lam_request_t **request) + ompi_communicator_t* comm, + ompi_request_t **request) { int rc; mca_ptl_base_send_request_t* sendreq; MCA_PML_TEG_SEND_REQUEST_ALLOC(comm,dst,sendreq,rc); - if(rc != LAM_SUCCESS) + if(rc != OMPI_SUCCESS) return rc; MCA_PTL_BASE_SEND_REQUEST_INIT( @@ -36,20 +36,20 @@ int mca_pml_teg_isend_init( true ); - *request = (lam_request_t*)sendreq; - return LAM_SUCCESS; + *request = (ompi_request_t*)sendreq; + return OMPI_SUCCESS; } int mca_pml_teg_isend( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t sendmode, - lam_communicator_t* comm, - lam_request_t **request) + ompi_communicator_t* comm, + ompi_request_t **request) { int rc; mca_ptl_base_send_request_t* sendreq; @@ -57,7 +57,7 @@ int mca_pml_teg_isend( #if MCA_PML_TEG_STATISTICS mca_pml_teg.teg_isends++; #endif - if(rc != LAM_SUCCESS) + if(rc != OMPI_SUCCESS) return rc; MCA_PTL_BASE_SEND_REQUEST_INIT( sendreq, @@ -71,21 +71,21 @@ int mca_pml_teg_isend( false ); - if((rc = mca_pml_teg_send_request_start(sendreq)) != LAM_SUCCESS) + if((rc = mca_pml_teg_send_request_start(sendreq)) != OMPI_SUCCESS) return rc; - *request = (lam_request_t*)sendreq; - return LAM_SUCCESS; + *request = (ompi_request_t*)sendreq; + return OMPI_SUCCESS; } int mca_pml_teg_send( void *buf, size_t count, - lam_datatype_t *datatype, + ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t sendmode, - lam_communicator_t* comm) + ompi_communicator_t* comm) { int rc; mca_ptl_base_send_request_t* sendreq; @@ -93,7 +93,7 @@ int mca_pml_teg_send( #if MCA_PML_TEG_STATISTICS mca_pml_teg.teg_sends++; #endif - if(rc != LAM_SUCCESS) + if(rc != OMPI_SUCCESS) return rc; MCA_PTL_BASE_SEND_REQUEST_INIT( @@ -108,30 +108,30 @@ int mca_pml_teg_send( false ); - if((rc = mca_pml_teg_send_request_start(sendreq)) != LAM_SUCCESS) { - MCA_PML_TEG_FREE((lam_request_t**)&sendreq); + if((rc = mca_pml_teg_send_request_start(sendreq)) != OMPI_SUCCESS) { + MCA_PML_TEG_FREE((ompi_request_t**)&sendreq); return rc; } if(sendreq->super.req_mpi_done == false) { /* give up and sleep until completion */ - if(lam_using_threads()) { - lam_mutex_lock(&mca_pml_teg.teg_request_lock); + if(ompi_using_threads()) { + ompi_mutex_lock(&mca_pml_teg.teg_request_lock); mca_pml_teg.teg_request_waiting++; while(sendreq->super.req_mpi_done == false) - lam_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); + ompi_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); mca_pml_teg.teg_request_waiting--; - lam_mutex_unlock(&mca_pml_teg.teg_request_lock); + ompi_mutex_unlock(&mca_pml_teg.teg_request_lock); } else { mca_pml_teg.teg_request_waiting++; while(sendreq->super.req_mpi_done == false) - lam_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); + ompi_condition_wait(&mca_pml_teg.teg_request_cond, &mca_pml_teg.teg_request_lock); mca_pml_teg.teg_request_waiting--; } } /* return request to pool */ - MCA_PML_TEG_FREE((lam_request_t**)&sendreq); - return LAM_SUCCESS; + MCA_PML_TEG_FREE((ompi_request_t**)&sendreq); + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_teg_module.c b/src/mca/pml/teg/src/pml_teg_module.c index c3c510e7f2..29bf2eb41f 100644 --- a/src/mca/pml/teg/src/pml_teg_module.c +++ b/src/mca/pml/teg/src/pml_teg_module.c @@ -60,15 +60,15 @@ static inline int mca_pml_teg_param_register_int( int mca_pml_teg_module_open(void) { mca_pml_base_request_t* teg_null = &mca_pml_teg.teg_request_null; - OBJ_CONSTRUCT(&mca_pml_teg.teg_lock, lam_mutex_t); - OBJ_CONSTRUCT(&mca_pml_teg.teg_recv_requests, lam_free_list_t); - OBJ_CONSTRUCT(&mca_pml_teg.teg_procs, lam_list_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_lock, ompi_mutex_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_recv_requests, ompi_free_list_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_procs, ompi_list_t); OBJ_CONSTRUCT(teg_null, mca_pml_base_request_t); teg_null->req_type = MCA_PML_REQUEST_NULL; - teg_null->req_status.MPI_SOURCE = LAM_PROC_NULL; - teg_null->req_status.MPI_TAG = LAM_ANY_TAG; - teg_null->req_status.MPI_ERROR = LAM_SUCCESS; + teg_null->req_status.MPI_SOURCE = OMPI_PROC_NULL; + teg_null->req_status.MPI_TAG = OMPI_ANY_TAG; + teg_null->req_status.MPI_ERROR = OMPI_SUCCESS; teg_null->req_status._count = 0; #if MCA_PML_TEG_STATISTICS @@ -89,34 +89,34 @@ int mca_pml_teg_module_open(void) mca_pml_teg_param_register_int("free_list_inc", 256); mca_pml_teg.teg_poll_iterations = mca_pml_teg_param_register_int("poll_iterations", 100000); - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_pml_teg_module_close(void) { -#if MCA_PML_TEG_STATISTICS && LAM_ENABLE_DEBUG - lam_output(0, "mca_pml_teg.teg_waits = %d\n", +#if MCA_PML_TEG_STATISTICS && OMPI_ENABLE_DEBUG + ompi_output(0, "mca_pml_teg.teg_waits = %d\n", mca_pml_teg.teg_waits); - lam_output(0, "mca_pml_teg.teg_sends = %d\n", + ompi_output(0, "mca_pml_teg.teg_sends = %d\n", mca_pml_teg.teg_sends); - lam_output(0, "mca_pml_teg.teg_recvs = %d\n", + ompi_output(0, "mca_pml_teg.teg_recvs = %d\n", mca_pml_teg.teg_recvs); - lam_output(0, "mca_pml_teg.teg_isends = %d\n", + ompi_output(0, "mca_pml_teg.teg_isends = %d\n", mca_pml_teg.teg_isends); - lam_output(0, "mca_pml_teg.teg_irecvs = %d\n", + ompi_output(0, "mca_pml_teg.teg_irecvs = %d\n", mca_pml_teg.teg_irecvs); - lam_output(0, "mca_pml_teg.teg_condition_waits = %d\n", + ompi_output(0, "mca_pml_teg.teg_condition_waits = %d\n", mca_pml_teg.teg_condition_waits); - lam_output(0, "mca_pml_teg.teg_condition_broadcast = %d\n", + ompi_output(0, "mca_pml_teg.teg_condition_broadcast = %d\n", mca_pml_teg.teg_condition_broadcasts); #endif if (mca_pml_teg.teg_recv_requests.fl_num_allocated != - mca_pml_teg.teg_recv_requests.super.lam_list_length) { - lam_output(0, "teg recv requests: %d allocated %d returned\n", + mca_pml_teg.teg_recv_requests.super.ompi_list_length) { + ompi_output(0, "teg recv requests: %d allocated %d returned\n", mca_pml_teg.teg_recv_requests.fl_num_allocated, - mca_pml_teg.teg_recv_requests.super.lam_list_length); + mca_pml_teg.teg_recv_requests.super.ompi_list_length); } if(NULL != mca_pml_teg.teg_ptl_modules) @@ -126,7 +126,7 @@ int mca_pml_teg_module_close(void) OBJ_DESTRUCT(&mca_pml_teg.teg_recv_requests); OBJ_DESTRUCT(&mca_pml_teg.teg_procs); OBJ_DESTRUCT(&mca_pml_teg.teg_lock); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -138,14 +138,14 @@ mca_pml_t* mca_pml_teg_module_init(int* priority, *allow_multi_user_threads = true; *have_hidden_threads = false; - OBJ_CONSTRUCT(&mca_pml_teg.teg_lock, lam_mutex_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_lock, ompi_mutex_t); mca_pml_teg.teg_ptl_modules = NULL; mca_pml_teg.teg_num_ptl_modules = 0; mca_pml_teg.teg_ptls = NULL; mca_pml_teg.teg_num_ptls = 0; /* recv requests */ - lam_free_list_init( + ompi_free_list_init( &mca_pml_teg.teg_recv_requests, sizeof(mca_ptl_base_recv_request_t), OBJ_CLASS(mca_ptl_base_recv_request_t), @@ -155,8 +155,8 @@ mca_pml_t* mca_pml_teg_module_init(int* priority, NULL); /* request completion */ - OBJ_CONSTRUCT(&mca_pml_teg.teg_request_lock, lam_mutex_t); - OBJ_CONSTRUCT(&mca_pml_teg.teg_request_cond, lam_condition_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_request_lock, ompi_mutex_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_request_cond, ompi_condition_t); mca_pml_teg.teg_request_waiting = 0; return &mca_pml_teg.super; } diff --git a/src/mca/pml/teg/src/pml_teg_proc.c b/src/mca/pml/teg/src/pml_teg_proc.c index 7eb5d85088..f74bd3e9db 100644 --- a/src/mca/pml/teg/src/pml_teg_proc.c +++ b/src/mca/pml/teg/src/pml_teg_proc.c @@ -10,14 +10,14 @@ static void mca_pml_teg_proc_construct(mca_pml_proc_t* proc) { - proc->proc_lam = NULL; + proc->proc_ompi = NULL; proc->proc_ptl_flags = 0; - OBJ_CONSTRUCT(&proc->proc_lock, lam_mutex_t); + OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t); OBJ_CONSTRUCT(&proc->proc_ptl_first, mca_pml_teg_ptl_array_t); OBJ_CONSTRUCT(&proc->proc_ptl_next, mca_pml_teg_ptl_array_t); THREAD_LOCK(&mca_pml_teg.teg_lock); - lam_list_append(&mca_pml_teg.teg_procs, (lam_list_item_t*)proc); + ompi_list_append(&mca_pml_teg.teg_procs, (ompi_list_item_t*)proc); THREAD_UNLOCK(&mca_pml_teg.teg_lock); } @@ -25,7 +25,7 @@ static void mca_pml_teg_proc_construct(mca_pml_proc_t* proc) static void mca_pml_teg_proc_destruct(mca_pml_proc_t* proc) { THREAD_LOCK(&mca_pml_teg.teg_lock); - lam_list_remove_item(&mca_pml_teg.teg_procs, (lam_list_item_t*)proc); + ompi_list_remove_item(&mca_pml_teg.teg_procs, (ompi_list_item_t*)proc); THREAD_UNLOCK(&mca_pml_teg.teg_lock); OBJ_DESTRUCT(&proc->proc_lock); @@ -35,7 +35,7 @@ static void mca_pml_teg_proc_destruct(mca_pml_proc_t* proc) OBJ_CLASS_INSTANCE( mca_pml_teg_proc_t, - lam_list_item_t, + ompi_list_item_t, mca_pml_teg_proc_construct, mca_pml_teg_proc_destruct ); diff --git a/src/mca/pml/teg/src/pml_teg_proc.h b/src/mca/pml/teg/src/pml_teg_proc.h index 64b42a19f7..d8042e9352 100644 --- a/src/mca/pml/teg/src/pml_teg_proc.h +++ b/src/mca/pml/teg/src/pml_teg_proc.h @@ -14,13 +14,13 @@ #include "pml_ptl_array.h" /** - * Structure associated w/ lam_proc_t that contains data specific + * Structure associated w/ ompi_proc_t that contains data specific * to the PML. Note that this name is not PML specific. */ struct mca_pml_proc_t { - lam_list_item_t super; - lam_proc_t *proc_lam; /**< back-pointer to lam_proc_t */ - lam_mutex_t proc_lock; /**< lock to protect against concurrent access */ + ompi_list_item_t super; + ompi_proc_t *proc_ompi; /**< back-pointer to ompi_proc_t */ + ompi_mutex_t proc_lock; /**< lock to protect against concurrent access */ mca_ptl_array_t proc_ptl_first; /**< array of ptls to use for first fragments */ mca_ptl_array_t proc_ptl_next; /**< array of ptls to use for remaining fragments */ uint32_t proc_ptl_flags; /**< aggregate ptl flags */ @@ -28,7 +28,7 @@ struct mca_pml_proc_t { typedef struct mca_pml_proc_t mca_pml_proc_t; -extern lam_class_t mca_pml_teg_proc_t_class; +extern ompi_class_t mca_pml_teg_proc_t_class; typedef struct mca_pml_proc_t mca_pml_teg_proc_t; /** @@ -39,9 +39,9 @@ typedef struct mca_pml_proc_t mca_pml_teg_proc_t; * @return mca_pml_proc_t instance */ -static inline mca_pml_proc_t* mca_pml_teg_proc_lookup_local(lam_communicator_t* comm, int rank) +static inline mca_pml_proc_t* mca_pml_teg_proc_lookup_local(ompi_communicator_t* comm, int rank) { - lam_proc_t* proc = comm->c_local_group->grp_proc_pointers[rank]; + ompi_proc_t* proc = comm->c_local_group->grp_proc_pointers[rank]; return proc->proc_pml; } @@ -53,9 +53,9 @@ static inline mca_pml_proc_t* mca_pml_teg_proc_lookup_local(lam_communicator_t* * @return mca_pml_proc_t instance */ -static inline mca_pml_proc_t* mca_pml_teg_proc_lookup_remote(lam_communicator_t* comm, int rank) +static inline mca_pml_proc_t* mca_pml_teg_proc_lookup_remote(ompi_communicator_t* comm, int rank) { - lam_proc_t* proc = comm->c_remote_group->grp_proc_pointers[rank]; + ompi_proc_t* proc = comm->c_remote_group->grp_proc_pointers[rank]; return proc->proc_pml; } diff --git a/src/mca/pml/teg/src/pml_teg_progress.c b/src/mca/pml/teg/src/pml_teg_progress.c index 32a41bc817..266ad80e46 100644 --- a/src/mca/pml/teg/src/pml_teg_progress.c +++ b/src/mca/pml/teg/src/pml_teg_progress.c @@ -12,6 +12,6 @@ int mca_pml_teg_progress(void) */ for(i=0; iptlm_progress(tstamp); - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_teg_recvreq.c b/src/mca/pml/teg/src/pml_teg_recvreq.c index 6f5a8d7624..35a71ed259 100644 --- a/src/mca/pml/teg/src/pml_teg_recvreq.c +++ b/src/mca/pml/teg/src/pml_teg_recvreq.c @@ -13,7 +13,7 @@ void mca_pml_teg_recv_request_progress( /* initialize request status */ req->super.req_status.MPI_SOURCE = req->super.req_peer; req->super.req_status.MPI_TAG = req->super.req_tag; - req->super.req_status.MPI_ERROR = LAM_SUCCESS; + req->super.req_status.MPI_ERROR = OMPI_SUCCESS; req->super.req_status._count = req->req_bytes_delivered; req->super.req_pml_done = true; req->super.req_mpi_done = true; @@ -21,7 +21,7 @@ void mca_pml_teg_recv_request_progress( #if MCA_PML_TEG_STATISTICS mca_pml_teg.teg_condition_broadcasts++; #endif - lam_condition_broadcast(&mca_pml_teg.teg_request_cond); + ompi_condition_broadcast(&mca_pml_teg.teg_request_cond); } } THREAD_UNLOCK(&mca_pml_teg.teg_request_lock); diff --git a/src/mca/pml/teg/src/pml_teg_recvreq.h b/src/mca/pml/teg/src/pml_teg_recvreq.h index 4b70fab99c..a837cc30ca 100644 --- a/src/mca/pml/teg/src/pml_teg_recvreq.h +++ b/src/mca/pml/teg/src/pml_teg_recvreq.h @@ -4,8 +4,8 @@ /** * @file */ -#ifndef LAM_PML_TEG_RECV_REQUEST_H -#define LAM_PML_TEG_RECV_REQUEST_H +#ifndef OMPI_PML_TEG_RECV_REQUEST_H +#define OMPI_PML_TEG_RECV_REQUEST_H #include "pml_teg.h" #include "pml_teg_proc.h" @@ -16,13 +16,13 @@ /** * Allocate a recv request from the modules free list. * - * @param rc (OUT) LAM_SUCCESS or error status on failure. + * @param rc (OUT) OMPI_SUCCESS or error status on failure. * @return Receive request. */ #define MCA_PML_TEG_RECV_REQUEST_ALLOC(recvreq, rc) \ { \ - lam_list_item_t* item; \ - LAM_FREE_LIST_GET(&mca_pml_teg.teg_recv_requests, item, rc); \ + ompi_list_item_t* item; \ + OMPI_FREE_LIST_GET(&mca_pml_teg.teg_recv_requests, item, rc); \ recvreq = (mca_ptl_base_recv_request_t*)item; \ } @@ -32,22 +32,22 @@ * @param request (IN) Receive request. */ #define MCA_PML_TEG_RECV_REQUEST_RETURN(request) \ - LAM_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (lam_list_item_t*)request); + OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (ompi_list_item_t*)request); /** * Start an initialized request. * * @param request Receive request. - * @return LAM_SUCESS or error status on failure. + * @return OMPI_SUCESS or error status on failure. */ static inline int mca_pml_teg_recv_request_start(mca_ptl_base_recv_request_t* request) { - if(request->super.req_peer == LAM_ANY_SOURCE) { + if(request->super.req_peer == OMPI_ANY_SOURCE) { mca_ptl_base_recv_request_match_wild(request); } else { mca_ptl_base_recv_request_match_specific(request); } - return LAM_SUCCESS; + return OMPI_SUCCESS; } /** diff --git a/src/mca/pml/teg/src/pml_teg_sendreq.c b/src/mca/pml/teg/src/pml_teg_sendreq.c index a03bebf358..92045a9ea0 100644 --- a/src/mca/pml/teg/src/pml_teg_sendreq.c +++ b/src/mca/pml/teg/src/pml_teg_sendreq.c @@ -21,7 +21,7 @@ void mca_pml_teg_send_request_schedule(mca_ptl_base_send_request_t* req) { - lam_proc_t *proc = lam_comm_peer_lookup(req->super.req_comm, req->super.req_peer); + ompi_proc_t *proc = ompi_comm_peer_lookup(req->super.req_comm, req->super.req_peer); mca_pml_proc_t* proc_pml = proc->proc_pml; /* allocate remaining bytes to PTLs */ @@ -51,7 +51,7 @@ void mca_pml_teg_send_request_schedule(mca_ptl_base_send_request_t* req) } rc = ptl->ptl_put(ptl, ptl_proc->ptl_peer, req, req->req_offset, &bytes_to_frag, 0); - if(rc == LAM_SUCCESS) { + if(rc == OMPI_SUCCESS) { req->req_offset += bytes_to_frag; bytes_remaining = req->req_bytes_packed - req->req_offset; } @@ -63,7 +63,7 @@ void mca_pml_teg_send_request_schedule(mca_ptl_base_send_request_t* req) req->super.req_mpi_done = true; /* FIX - set status correctly */ if(mca_pml_teg.teg_request_waiting) - lam_condition_broadcast(&mca_pml_teg.teg_request_cond); + ompi_condition_broadcast(&mca_pml_teg.teg_request_cond); THREAD_UNLOCK(&mca_pml_teg.teg_request_lock); } } @@ -82,14 +82,14 @@ void mca_pml_teg_send_request_progress( if (req->super.req_mpi_done == false) { req->super.req_status.MPI_SOURCE = req->super.req_comm->c_my_rank; req->super.req_status.MPI_TAG = req->super.req_tag; - req->super.req_status.MPI_ERROR = LAM_SUCCESS; + req->super.req_status.MPI_ERROR = OMPI_SUCCESS; req->super.req_status._count = req->req_bytes_sent; req->super.req_mpi_done = true; if(mca_pml_teg.teg_request_waiting) { - lam_condition_broadcast(&mca_pml_teg.teg_request_cond); + ompi_condition_broadcast(&mca_pml_teg.teg_request_cond); } } else if (req->super.req_free_called) - MCA_PML_TEG_FREE((lam_request_t**)&req); + MCA_PML_TEG_FREE((ompi_request_t**)&req); THREAD_UNLOCK(&mca_pml_teg.teg_request_lock); return; } diff --git a/src/mca/pml/teg/src/pml_teg_sendreq.h b/src/mca/pml/teg/src/pml_teg_sendreq.h index 776116e329..fcf5988dd4 100644 --- a/src/mca/pml/teg/src/pml_teg_sendreq.h +++ b/src/mca/pml/teg/src/pml_teg_sendreq.h @@ -4,8 +4,8 @@ /** * @file */ -#ifndef LAM_PML_TEG_SEND_REQUEST_H -#define LAM_PML_TEG_SEND_REQUEST_H +#ifndef OMPI_PML_TEG_SEND_REQUEST_H +#define OMPI_PML_TEG_SEND_REQUEST_H #include "pml_teg_proc.h" #include "mca/ptl/ptl.h" @@ -56,9 +56,9 @@ static inline int mca_pml_teg_send_request_start( } rc = ptl->ptl_put(ptl, req->req_peer, req, offset, first_fragment_size, flags); - if(rc != LAM_SUCCESS) + if(rc != OMPI_SUCCESS) return rc; - return LAM_SUCCESS; + return OMPI_SUCCESS; } void mca_pml_teg_send_request_progress( diff --git a/src/mca/pml/teg/src/pml_teg_start.c b/src/mca/pml/teg/src/pml_teg_start.c index b97d738af2..2628df3054 100644 --- a/src/mca/pml/teg/src/pml_teg_start.c +++ b/src/mca/pml/teg/src/pml_teg_start.c @@ -3,7 +3,7 @@ #include "pml_teg_sendreq.h" -int mca_pml_teg_start(size_t count, lam_request_t** requests) +int mca_pml_teg_start(size_t count, ompi_request_t** requests) { int rc; size_t i; @@ -15,18 +15,18 @@ int mca_pml_teg_start(size_t count, lam_request_t** requests) switch(pml_request->req_type) { case MCA_PML_REQUEST_SEND: if((rc = mca_pml_teg_send_request_start((mca_ptl_base_send_request_t*)pml_request)) - != LAM_SUCCESS) + != OMPI_SUCCESS) return rc; break; case MCA_PML_REQUEST_RECV: if((rc = mca_pml_teg_recv_request_start((mca_ptl_base_recv_request_t*)pml_request)) - != LAM_SUCCESS) + != OMPI_SUCCESS) return rc; break; default: - return LAM_ERROR; + return OMPI_ERROR; } } - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/pml/teg/src/pml_teg_test.c b/src/mca/pml/teg/src/pml_teg_test.c index 9331a0946f..583f4f1cf1 100644 --- a/src/mca/pml/teg/src/pml_teg_test.c +++ b/src/mca/pml/teg/src/pml_teg_test.c @@ -3,10 +3,10 @@ int mca_pml_teg_test( size_t count, - lam_request_t** requests, + ompi_request_t** requests, int *index, int *completed, - lam_status_public_t* status) + ompi_status_public_t* status) { size_t i; for(i=0; ireq_status; } *index = completed; - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_pml_teg_wait_all( size_t count, - lam_request_t** requests, - lam_status_public_t* statuses) + ompi_request_t** requests, + ompi_status_public_t* statuses) { int completed = 0, i; for(i=0; i @@ -15,14 +15,14 @@ int mca_ptl_base_close(void) { - lam_list_item_t *item; + ompi_list_item_t *item; mca_ptl_base_selected_module_t *sm; /* Finalize all the ptl modules and free their list items */ - for (item = lam_list_remove_first(&mca_ptl_base_modules_initialized); + for (item = ompi_list_remove_first(&mca_ptl_base_modules_initialized); NULL != item; - item = lam_list_remove_first(&mca_ptl_base_modules_initialized)) { + item = ompi_list_remove_first(&mca_ptl_base_modules_initialized)) { sm = (mca_ptl_base_selected_module_t *) item; /* Blatently ignore the return code (what would we do to recover, @@ -34,12 +34,12 @@ int mca_ptl_base_close(void) } /* Close all remaining available modules (may be one if this is a - LAM RTE program, or [possibly] multiple if this is laminfo) */ + OMPI RTE program, or [possibly] multiple if this is ompi_info) */ mca_base_modules_close(mca_ptl_base_output, &mca_ptl_base_modules_available, NULL); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/ptl/base/ptl_base_comm.c b/src/mca/ptl/base/ptl_base_comm.c index cdddb3ea6e..77ac7f80a0 100644 --- a/src/mca/ptl/base/ptl_base_comm.c +++ b/src/mca/ptl/base/ptl_base_comm.c @@ -9,18 +9,18 @@ static void mca_pml_ptl_comm_construct(mca_pml_ptl_comm_t* comm); static void mca_pml_ptl_comm_destruct(mca_pml_ptl_comm_t* comm); -lam_class_t mca_pml_ptl_comm_t_class = { +ompi_class_t mca_pml_ptl_comm_t_class = { "mca_pml_ptl_comm_t", - OBJ_CLASS(lam_object_t), - (lam_construct_t)mca_pml_ptl_comm_construct, - (lam_destruct_t)mca_pml_ptl_comm_destruct + OBJ_CLASS(ompi_object_t), + (ompi_construct_t)mca_pml_ptl_comm_construct, + (ompi_destruct_t)mca_pml_ptl_comm_destruct }; static void mca_pml_ptl_comm_construct(mca_pml_ptl_comm_t* comm) { - OBJ_CONSTRUCT(&comm->c_wild_receives, lam_list_t); - OBJ_CONSTRUCT(&comm->c_matching_lock, lam_mutex_t); + OBJ_CONSTRUCT(&comm->c_wild_receives, ompi_list_t); + OBJ_CONSTRUCT(&comm->c_matching_lock, ompi_mutex_t); comm->c_recv_seq = 0; } @@ -44,42 +44,42 @@ int mca_pml_ptl_comm_init_size(mca_pml_ptl_comm_t* comm, size_t size) /* send message sequence-number support - sender side */ comm->c_msg_seq = malloc(sizeof(mca_ptl_sequence_t) * size); if(NULL == comm->c_msg_seq) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; memset(comm->c_msg_seq, 0, sizeof(mca_ptl_sequence_t) * size); /* send message sequence-number support - receiver side */ comm->c_next_msg_seq = malloc(sizeof(mca_ptl_sequence_t) * size); if(NULL == comm->c_next_msg_seq) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; memset(comm->c_next_msg_seq, 0, sizeof(mca_ptl_sequence_t) * size); /* unexpected fragments queues */ - comm->c_unexpected_frags = malloc(sizeof(lam_list_t) * size); + comm->c_unexpected_frags = malloc(sizeof(ompi_list_t) * size); if(NULL == comm->c_unexpected_frags) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; for(i=0; ic_unexpected_frags+i; - OBJ_CONSTRUCT(object, lam_list_t); + ompi_list_t* object = comm->c_unexpected_frags+i; + OBJ_CONSTRUCT(object, ompi_list_t); } /* out-of-order fragments queues */ - comm->c_frags_cant_match = malloc(sizeof(lam_list_t) * size); + comm->c_frags_cant_match = malloc(sizeof(ompi_list_t) * size); if(NULL == comm->c_frags_cant_match) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; for(i=0; ic_frags_cant_match+i; - OBJ_CONSTRUCT(object, lam_list_t); + ompi_list_t* object = comm->c_frags_cant_match+i; + OBJ_CONSTRUCT(object, ompi_list_t); } /* queues of unmatched specific (source process specified) receives */ - comm->c_specific_receives = malloc(sizeof(lam_list_t) * size); + comm->c_specific_receives = malloc(sizeof(ompi_list_t) * size); if(NULL == comm->c_specific_receives) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; for(i=0; ic_specific_receives+i; - OBJ_CONSTRUCT(object, lam_list_t); + ompi_list_t *object = comm->c_specific_receives+i; + OBJ_CONSTRUCT(object, ompi_list_t); } - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/ptl/base/ptl_base_comm.h b/src/mca/ptl/base/ptl_base_comm.h index 73076d31e8..6fe4266701 100644 --- a/src/mca/ptl/base/ptl_base_comm.h +++ b/src/mca/ptl/base/ptl_base_comm.h @@ -10,24 +10,24 @@ #include "threads/mutex.h" #include "threads/condition.h" #include "mca/ptl/ptl.h" -#include "lfc/lam_list.h" +#include "class/ompi_list.h" -extern lam_class_t mca_pml_ptl_comm_t_class; +extern ompi_class_t mca_pml_ptl_comm_t_class; /** - * Cached on lam_communicator_t to hold queues/state + * Cached on ompi_communicator_t to hold queues/state * used by the PML<->PTL interface for matching logic. */ struct mca_pml_comm_t { - lam_object_t super; + ompi_object_t super; mca_ptl_sequence_t *c_msg_seq; /**< send message sequence number - sender side */ mca_ptl_sequence_t *c_next_msg_seq; /**< send message sequence number - receiver side */ mca_ptl_sequence_t c_recv_seq; /**< recv request sequence number - receiver side */ - lam_mutex_t c_matching_lock; /**< matching lock */ - lam_list_t *c_unexpected_frags; /**< unexpected fragment queues */ - lam_list_t *c_frags_cant_match; /**< out-of-order fragment queues */ - lam_list_t *c_specific_receives; /**< queues of unmatched specific (source process specified) receives */ - lam_list_t c_wild_receives; /**< queue of unmatched wild (source process not specified) receives */ + ompi_mutex_t c_matching_lock; /**< matching lock */ + ompi_list_t *c_unexpected_frags; /**< unexpected fragment queues */ + ompi_list_t *c_frags_cant_match; /**< out-of-order fragment queues */ + ompi_list_t *c_specific_receives; /**< queues of unmatched specific (source process specified) receives */ + ompi_list_t c_wild_receives; /**< queue of unmatched wild (source process not specified) receives */ }; typedef struct mca_pml_comm_t mca_pml_ptl_comm_t; @@ -37,7 +37,7 @@ typedef struct mca_pml_comm_t mca_pml_ptl_comm_t; * * @param comm Instance of mca_pml_ptl_comm_t * @param size Size of communicator - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. */ extern int mca_pml_ptl_comm_init_size(mca_pml_ptl_comm_t* comm, size_t size); diff --git a/src/mca/ptl/base/ptl_base_fragment.c b/src/mca/ptl/base/ptl_base_fragment.c index f86422b7e8..00167b6daf 100644 --- a/src/mca/ptl/base/ptl_base_fragment.c +++ b/src/mca/ptl/base/ptl_base_fragment.c @@ -3,23 +3,23 @@ */ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/ptl/base/ptl_base_fragment.h" static void mca_ptl_base_frag_construct(mca_ptl_base_frag_t* frag); static void mca_ptl_base_frag_destruct(mca_ptl_base_frag_t* frag); -lam_class_t mca_ptl_base_frag_t_class = { +ompi_class_t mca_ptl_base_frag_t_class = { "mca_ptl_base_frag_t", - OBJ_CLASS(lam_list_item_t), - (lam_construct_t) mca_ptl_base_frag_construct, - (lam_destruct_t) mca_ptl_base_frag_destruct + OBJ_CLASS(ompi_list_item_t), + (ompi_construct_t) mca_ptl_base_frag_construct, + (ompi_destruct_t) mca_ptl_base_frag_destruct }; static void mca_ptl_base_frag_construct(mca_ptl_base_frag_t* frag) { - OBJ_CONSTRUCT(&frag->frag_convertor, lam_convertor_t); + OBJ_CONSTRUCT(&frag->frag_convertor, ompi_convertor_t); } static void mca_ptl_base_frag_destruct(mca_ptl_base_frag_t* frag) diff --git a/src/mca/ptl/base/ptl_base_fragment.h b/src/mca/ptl/base/ptl_base_fragment.h index f903c1f488..0576fd6cc2 100644 --- a/src/mca/ptl/base/ptl_base_fragment.h +++ b/src/mca/ptl/base/ptl_base_fragment.h @@ -7,24 +7,24 @@ #ifndef MCA_PML_BASE_FRAGMENT_H #define MCA_PML_BASE_FRAGMENT_H -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "mca/ptl/ptl.h" #include "datatype/datatype.h" #include "mca/ptl/base/ptl_base_header.h" -extern lam_class_t mca_ptl_base_frag_t_class; +extern ompi_class_t mca_ptl_base_frag_t_class; /** * Base type for fragment descriptors. */ struct mca_ptl_base_frag_t { - lam_list_item_t super; /**< allow the fragment to be placed on a list */ + ompi_list_item_t super; /**< allow the fragment to be placed on a list */ mca_ptl_base_header_t frag_header; /**< header used for fragment matching */ struct mca_ptl_t* frag_owner; /**< PTL that allocated this fragment */ struct mca_ptl_base_peer_t* frag_peer; /**< PTL specific addressing info */ void *frag_addr; /**< pointer into request buffer at fragment offset */ size_t frag_size; /**< number of bytes available in request buffer */ - lam_convertor_t frag_convertor; /**< datatype convertor for fragment packing/unpacking */ + ompi_convertor_t frag_convertor; /**< datatype convertor for fragment packing/unpacking */ }; typedef struct mca_ptl_base_frag_t mca_ptl_base_frag_t; diff --git a/src/mca/ptl/base/ptl_base_header.h b/src/mca/ptl/base/ptl_base_header.h index 4f2d24f6c8..2d62fc13af 100644 --- a/src/mca/ptl/base/ptl_base_header.h +++ b/src/mca/ptl/base/ptl_base_header.h @@ -39,8 +39,8 @@ struct mca_ptl_base_frag_header_t { uint32_t hdr_frag_length; /**< fragment length */ uint32_t hdr_frag_offset; /**< offset into message */ mca_ptl_sequence_t hdr_frag_seq; /**< fragment sequence number */ - lam_ptr_t hdr_src_ptr; /**< pointer to source fragment */ - lam_ptr_t hdr_dst_ptr; /**< pointer to matched receive */ + ompi_ptr_t hdr_src_ptr; /**< pointer to source fragment */ + ompi_ptr_t hdr_dst_ptr; /**< pointer to matched receive */ }; typedef struct mca_ptl_base_frag_header_t mca_ptl_base_frag_header_t; @@ -66,9 +66,9 @@ typedef struct mca_ptl_base_match_header_t mca_ptl_base_match_header_t; */ struct mca_ptl_base_ack_header_t { mca_ptl_base_common_header_t hdr_common; /**< common attributes */ - lam_ptr_t hdr_src_ptr; /**< source fragment */ - lam_ptr_t hdr_dst_match; /**< matched receive request */ - lam_ptr_t hdr_dst_addr; /**< posted receive buffer */ + ompi_ptr_t hdr_src_ptr; /**< source fragment */ + ompi_ptr_t hdr_dst_match; /**< matched receive request */ + ompi_ptr_t hdr_dst_addr; /**< posted receive buffer */ uint32_t hdr_dst_size; /**< size of posted buffer */ /* sequence range? */ }; diff --git a/src/mca/ptl/base/ptl_base_match.c b/src/mca/ptl/base/ptl_base_match.c index f455ef9e90..4385e13ff4 100644 --- a/src/mca/ptl/base/ptl_base_match.c +++ b/src/mca/ptl/base/ptl_base_match.c @@ -6,7 +6,7 @@ #include -#include "lfc/lam_list.h" +#include "class/ompi_list.h" #include "threads/mutex.h" #include "include/constants.h" #include "communicator/communicator.h" @@ -39,7 +39,7 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive mca_pml_ptl_comm_t *ptl_comm); static void mca_ptl_base_check_cantmatch_for_match( - lam_list_t *additional_matches, + ompi_list_t *additional_matches, mca_pml_ptl_comm_t *pml_comm, int frag_src); @@ -61,7 +61,7 @@ static void mca_ptl_base_check_cantmatch_for_match( * case, the associated fragment descriptors are * put on this list for further processing. (OUT) * - * @return LAM error code + * @return OMPI error code * * This routine is used to try and match a newly arrived message fragment * to pre-posted receives. The following assumptions are made @@ -76,18 +76,18 @@ static void mca_ptl_base_check_cantmatch_for_match( bool mca_ptl_base_match( mca_ptl_base_match_header_t *frag_header, mca_ptl_base_recv_frag_t *frag_desc, - lam_list_t *additional_matches) + ompi_list_t *additional_matches) { /* local variables */ mca_ptl_sequence_t frag_msg_seq,next_msg_seq_expected; - lam_communicator_t *comm_ptr; + ompi_communicator_t *comm_ptr; mca_ptl_base_recv_request_t *matched_receive; mca_pml_ptl_comm_t *pml_comm; int frag_src; bool match_made=false; /* communicator pointer */ - comm_ptr=lam_comm_lookup(frag_header->hdr_contextid); + comm_ptr=ompi_comm_lookup(frag_header->hdr_contextid); pml_comm=(mca_pml_ptl_comm_t *)comm_ptr->c_pml_comm; /* source sequence number */ @@ -139,8 +139,8 @@ bool mca_ptl_base_match( } else { /* if no match found, place on unexpected queue */ - lam_list_append( ((pml_comm->c_unexpected_frags)+frag_src), - (lam_list_item_t *)frag_desc); + ompi_list_append( ((pml_comm->c_unexpected_frags)+frag_src), + (ompi_list_item_t *)frag_desc); } @@ -149,7 +149,7 @@ bool mca_ptl_base_match( * any fragments on the c_c_frags_cant_match list * may now be used to form new matchs */ - if (0 < lam_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) { + if (0 < ompi_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) { mca_ptl_base_check_cantmatch_for_match(additional_matches,pml_comm,frag_src); @@ -160,8 +160,8 @@ bool mca_ptl_base_match( * This message comes after the next expected, so it * is ahead of sequence. Save it for later. */ - lam_list_append( ((pml_comm->c_frags_cant_match)+frag_src), - (lam_list_item_t *)frag_desc); + ompi_list_append( ((pml_comm->c_frags_cant_match)+frag_src), + (ompi_list_item_t *)frag_desc); } THREAD_UNLOCK(&pml_comm->c_matching_lock); @@ -202,13 +202,13 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_receives_for_match */ frag_src = frag_header->hdr_src; - if (lam_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ){ + if (ompi_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ){ /* * There are only wild irecvs, so specialize the algorithm. */ return_match = mca_ptl_base_check_wild_receives_for_match(frag_header, pml_comm); - } else if (lam_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { + } else if (ompi_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { /* * There are only specific irecvs, so specialize the algorithm. */ @@ -258,20 +258,20 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_wild_receives_for_match( * change this list. */ for(wild_recv = (mca_ptl_base_recv_request_t *) - lam_list_get_first(&(pml_comm->c_wild_receives)); + ompi_list_get_first(&(pml_comm->c_wild_receives)); wild_recv != (mca_ptl_base_recv_request_t *) - lam_list_get_end(&(pml_comm->c_wild_receives)); + ompi_list_get_end(&(pml_comm->c_wild_receives)); wild_recv = (mca_ptl_base_recv_request_t *) - ((lam_list_item_t *)wild_recv)->lam_list_next) { + ((ompi_list_item_t *)wild_recv)->ompi_list_next) { recv_tag = wild_recv->super.req_tag; if ( /* exact tag match */ (frag_tag == recv_tag) || /* wild tag match - negative tags (except for - * LAM_ANY_TAG) are reserved for internal use, and will - * not be matched with LAM_ANY_TAG */ - ( (recv_tag == LAM_ANY_TAG) && (0 <= frag_tag) ) ) + * OMPI_ANY_TAG) are reserved for internal use, and will + * not be matched with OMPI_ANY_TAG */ + ( (recv_tag == OMPI_ANY_TAG) && (0 <= frag_tag) ) ) { /* @@ -280,8 +280,8 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_wild_receives_for_match( return_match = wild_recv; /* remove this irecv from the postd wild ireceive list */ - lam_list_remove_item(&(pml_comm->c_wild_receives), - (lam_list_item_t *)wild_recv); + ompi_list_remove_item(&(pml_comm->c_wild_receives), + (ompi_list_item_t *)wild_recv); /* found match - no need to continue */ break; @@ -324,17 +324,17 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_receives_for_mat * Loop over the specific irecvs. */ for(specific_recv = (mca_ptl_base_recv_request_t *) - lam_list_get_first((pml_comm->c_specific_receives)+frag_src); + ompi_list_get_first((pml_comm->c_specific_receives)+frag_src); specific_recv != (mca_ptl_base_recv_request_t *) - lam_list_get_end((pml_comm->c_specific_receives)+frag_src); + ompi_list_get_end((pml_comm->c_specific_receives)+frag_src); specific_recv = (mca_ptl_base_recv_request_t *) - ((lam_list_item_t *)specific_recv)->lam_list_next) { + ((ompi_list_item_t *)specific_recv)->ompi_list_next) { /* * Check for a match */ recv_tag = specific_recv->super.req_tag; if ( (frag_tag == recv_tag) || - ( (recv_tag == LAM_ANY_TAG) && (0 <= frag_tag) ) ) { + ( (recv_tag == OMPI_ANY_TAG) && (0 <= frag_tag) ) ) { /* * Match made @@ -342,8 +342,8 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_receives_for_mat return_match = specific_recv; /* remove descriptor from posted specific ireceive list */ - lam_list_remove_item((pml_comm->c_specific_receives)+frag_src, - (lam_list_item_t *)specific_recv); + ompi_list_remove_item((pml_comm->c_specific_receives)+frag_src, + (ompi_list_item_t *)specific_recv); break; } @@ -387,9 +387,9 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive * have been posted. */ specific_recv = (mca_ptl_base_recv_request_t *) - lam_list_get_first((pml_comm->c_specific_receives)+frag_src); + ompi_list_get_first((pml_comm->c_specific_receives)+frag_src); wild_recv = (mca_ptl_base_recv_request_t *) - lam_list_get_first(&(pml_comm->c_wild_receives)); + ompi_list_get_first(&(pml_comm->c_wild_receives)); specific_recv_seq = specific_recv->super.req_sequence; wild_recv_seq = wild_recv->super.req_sequence; @@ -404,7 +404,7 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive */ wild_recv_tag = wild_recv->super.req_tag; if ( (frag_tag == wild_recv_tag) || - ( (wild_recv_tag == LAM_ANY_TAG) && (0 <= frag_tag) ) ) { + ( (wild_recv_tag == OMPI_ANY_TAG) && (0 <= frag_tag) ) ) { /* * Match made @@ -412,8 +412,8 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive return_match=wild_recv; /* remove this recv from the wild receive queue */ - lam_list_remove_item(&(pml_comm->c_wild_receives), - (lam_list_item_t *)wild_recv); + ompi_list_remove_item(&(pml_comm->c_wild_receives), + (ompi_list_item_t *)wild_recv); return return_match; } @@ -422,14 +422,14 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive * No match, go to the next. */ wild_recv=(mca_ptl_base_recv_request_t *) - ((lam_list_item_t *)wild_recv)->lam_list_next; + ((ompi_list_item_t *)wild_recv)->ompi_list_next; /* * If that was the last wild one, just look at the * rest of the specific ones. */ if (wild_recv == (mca_ptl_base_recv_request_t *) - lam_list_get_end(&(pml_comm->c_wild_receives)) ) + ompi_list_get_end(&(pml_comm->c_wild_receives)) ) { return_match = mca_ptl_base_check_specific_receives_for_match(frag_header, pml_comm); @@ -449,7 +449,7 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive */ specific_recv_tag=specific_recv->super.req_tag; if ( (frag_tag == specific_recv_tag) || - ( (specific_recv_tag == LAM_ANY_TAG) && (0<=frag_tag)) ) + ( (specific_recv_tag == OMPI_ANY_TAG) && (0<=frag_tag)) ) { /* @@ -458,8 +458,8 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive return_match = specific_recv; /* remove descriptor from specific receive list */ - lam_list_remove_item((pml_comm->c_specific_receives)+frag_src, - (lam_list_item_t *)specific_recv); + ompi_list_remove_item((pml_comm->c_specific_receives)+frag_src, + (ompi_list_item_t *)specific_recv); return return_match; } @@ -468,14 +468,14 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive * No match, go on to the next specific irecv. */ specific_recv = (mca_ptl_base_recv_request_t *) - ((lam_list_item_t *)specific_recv)->lam_list_next; + ((ompi_list_item_t *)specific_recv)->ompi_list_next; /* * If that was the last specific irecv, process the * rest of the wild ones. */ if (specific_recv == (mca_ptl_base_recv_request_t *) - lam_list_get_end((pml_comm->c_specific_receives)+frag_src) ) + ompi_list_get_end((pml_comm->c_specific_receives)+frag_src) ) { return_match = mca_ptl_base_check_wild_receives_for_match(frag_header, pml_comm); @@ -508,7 +508,7 @@ static mca_ptl_base_recv_request_t *mca_ptl_base_check_specific_and_wild_receive * set by the upper level routine. */ -static void mca_ptl_base_check_cantmatch_for_match(lam_list_t *additional_matches, +static void mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_matches, mca_pml_ptl_comm_t *pml_comm, int frag_src) { /* local parameters */ @@ -523,7 +523,7 @@ static void mca_ptl_base_check_cantmatch_for_match(lam_list_t *additional_matche */ match_found = 1; - while ((0 < lam_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) && + while ((0 < ompi_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) && match_found) { /* initialize match flag for this search */ @@ -536,11 +536,11 @@ static void mca_ptl_base_check_cantmatch_for_match(lam_list_t *additional_matche * number next_msg_seq_expected */ for(frag_desc = (mca_ptl_base_recv_frag_t *) - lam_list_get_first((pml_comm->c_frags_cant_match)+frag_src); + ompi_list_get_first((pml_comm->c_frags_cant_match)+frag_src); frag_desc != (mca_ptl_base_recv_frag_t *) - lam_list_get_end((pml_comm->c_frags_cant_match)+frag_src); + ompi_list_get_end((pml_comm->c_frags_cant_match)+frag_src); frag_desc = (mca_ptl_base_recv_frag_t *) - lam_list_get_next(frag_desc)) + ompi_list_get_next(frag_desc)) { /* * If the message has the next expected seq from that proc... @@ -557,8 +557,8 @@ static void mca_ptl_base_check_cantmatch_for_match(lam_list_t *additional_matche /* * remove frag_desc from list */ - lam_list_remove_item((pml_comm->c_frags_cant_match)+frag_src, - (lam_list_item_t *)frag_desc); + ompi_list_remove_item((pml_comm->c_frags_cant_match)+frag_src, + (ompi_list_item_t *)frag_desc); /* * check to see if this frag matches a posted message @@ -576,14 +576,14 @@ static void mca_ptl_base_check_cantmatch_for_match(lam_list_t *additional_matche /* add this fragment descriptor to the list of * descriptors to be processed later */ - lam_list_append(additional_matches, - (lam_list_item_t *)frag_desc); + ompi_list_append(additional_matches, + (ompi_list_item_t *)frag_desc); } else { /* if no match found, place on unexpected queue */ - lam_list_append( ((pml_comm->c_unexpected_frags)+frag_src), - (lam_list_item_t *)frag_desc); + ompi_list_append( ((pml_comm->c_unexpected_frags)+frag_src), + (ompi_list_item_t *)frag_desc); } diff --git a/src/mca/ptl/base/ptl_base_match.h b/src/mca/ptl/base/ptl_base_match.h index c826cb482a..35df0f9b5e 100644 --- a/src/mca/ptl/base/ptl_base_match.h +++ b/src/mca/ptl/base/ptl_base_match.h @@ -16,10 +16,10 @@ struct mca_ptl_base_recv_frag_t; * @param frag_desc (IN) Received fragment descriptor. * @param match_made (OUT) Flag indicating wether a match was made. * @param additional_matches (OUT) List of additional matches - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. */ bool mca_ptl_base_match(mca_ptl_base_match_header_t *frag_header, - struct mca_ptl_base_recv_frag_t *frag_desc, lam_list_t *additional_matches); + struct mca_ptl_base_recv_frag_t *frag_desc, ompi_list_t *additional_matches); #endif /* MCA_PTL_BASE_MATCH_H */ diff --git a/src/mca/ptl/base/ptl_base_open.c b/src/mca/ptl/base/ptl_base_open.c index b5a6527767..e1310bc21b 100644 --- a/src/mca/ptl/base/ptl_base_open.c +++ b/src/mca/ptl/base/ptl_base_open.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include @@ -25,8 +25,8 @@ * Global variables */ int mca_ptl_base_output = -1; -lam_list_t mca_ptl_base_modules_available; -lam_list_t mca_ptl_base_modules_initialized; +ompi_list_t mca_ptl_base_modules_available; +ompi_list_t mca_ptl_base_modules_initialized; /** @@ -37,19 +37,19 @@ int mca_ptl_base_open(void) { /* Open up all available modules */ - if (LAM_SUCCESS != + if (OMPI_SUCCESS != mca_base_modules_open("ptl", 0, mca_ptl_base_static_modules, &mca_ptl_base_modules_available)) { - return LAM_ERROR; + return OMPI_ERROR; } /* Initialize the list so that in mca_ptl_base_close(), we can iterate over it (even if it's empty, as in the case of - laminfo) */ + ompi_info) */ - OBJ_CONSTRUCT(&mca_ptl_base_modules_initialized, lam_list_t); + OBJ_CONSTRUCT(&mca_ptl_base_modules_initialized, ompi_list_t); /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/ptl/base/ptl_base_recvfrag.c b/src/mca/ptl/base/ptl_base_recvfrag.c index 6fa070bcdb..280f1892e1 100644 --- a/src/mca/ptl/base/ptl_base_recvfrag.c +++ b/src/mca/ptl/base/ptl_base_recvfrag.c @@ -11,11 +11,11 @@ static void mca_ptl_base_recv_frag_construct(mca_ptl_base_recv_frag_t* frag); static void mca_ptl_base_recv_frag_destruct(mca_ptl_base_recv_frag_t* frag); -lam_class_t mca_ptl_base_recv_frag_t_class = { +ompi_class_t mca_ptl_base_recv_frag_t_class = { "mca_ptl_base_recv_frag_t", OBJ_CLASS(mca_ptl_base_frag_t), - (lam_construct_t) mca_ptl_base_recv_frag_construct, - (lam_destruct_t) mca_ptl_base_recv_frag_destruct + (ompi_construct_t) mca_ptl_base_recv_frag_construct, + (ompi_destruct_t) mca_ptl_base_recv_frag_destruct }; diff --git a/src/mca/ptl/base/ptl_base_recvfrag.h b/src/mca/ptl/base/ptl_base_recvfrag.h index a8034dd15b..4e81434a9f 100644 --- a/src/mca/ptl/base/ptl_base_recvfrag.h +++ b/src/mca/ptl/base/ptl_base_recvfrag.h @@ -12,7 +12,7 @@ #include "mca/ptl/base/ptl_base_recvreq.h" #include "mca/ptl/base/ptl_base_match.h" -extern lam_class_t mca_ptl_base_recv_frag_t_class; +extern ompi_class_t mca_ptl_base_recv_frag_t_class; /** * Base type for receive fragment descriptors. @@ -30,17 +30,17 @@ typedef struct mca_ptl_base_recv_frag_t mca_ptl_base_recv_frag_t; * * @param frag (IN) Receive fragment descriptor. * @param header (IN) Header corresponding to the receive fragment. - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. */ static inline bool mca_ptl_base_recv_frag_match( mca_ptl_base_recv_frag_t* frag, mca_ptl_base_match_header_t* header) { bool matched; - lam_list_t matched_frags; - OBJ_CONSTRUCT(&matched_frags, lam_list_t); + ompi_list_t matched_frags; + OBJ_CONSTRUCT(&matched_frags, ompi_list_t); if((matched = mca_ptl_base_match(header, frag, &matched_frags)) == false) - frag = (mca_ptl_base_recv_frag_t*)lam_list_remove_first(&matched_frags); + frag = (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags); while(NULL != frag) { mca_ptl_t* ptl = frag->super.frag_owner; @@ -58,7 +58,7 @@ static inline bool mca_ptl_base_recv_frag_match( ptl->ptl_matched(ptl, frag); /* process any additional fragments that arrived out of order */ - frag = (mca_ptl_base_recv_frag_t*)lam_list_remove_first(&matched_frags); + frag = (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags); }; return matched; } diff --git a/src/mca/ptl/base/ptl_base_recvreq.c b/src/mca/ptl/base/ptl_base_recvreq.c index 2d0b7d9e17..fe8b6b56e1 100644 --- a/src/mca/ptl/base/ptl_base_recvreq.c +++ b/src/mca/ptl/base/ptl_base_recvreq.c @@ -14,11 +14,11 @@ static void mca_ptl_base_recv_request_destruct(mca_ptl_base_recv_request_t*); static mca_ptl_base_recv_frag_t* mca_ptl_base_recv_request_match_specific_proc(mca_ptl_base_recv_request_t*, int); -lam_class_t mca_ptl_base_recv_request_t_class = { +ompi_class_t mca_ptl_base_recv_request_t_class = { "mca_ptl_base_recv_request_t", OBJ_CLASS(mca_pml_base_request_t), - (lam_construct_t) mca_ptl_base_recv_request_construct, - (lam_destruct_t) mca_ptl_base_recv_request_destruct + (ompi_construct_t) mca_ptl_base_recv_request_construct, + (ompi_destruct_t) mca_ptl_base_recv_request_destruct }; @@ -41,7 +41,7 @@ static void mca_ptl_base_recv_request_destruct(mca_ptl_base_recv_request_t* requ void mca_ptl_base_recv_request_match_specific(mca_ptl_base_recv_request_t* request) { - lam_communicator_t *comm = request->super.req_comm; + ompi_communicator_t *comm = request->super.req_comm; mca_pml_ptl_comm_t* pml_comm = comm->c_pml_comm; int req_peer = request->super.req_peer; mca_ptl_base_recv_frag_t* frag; @@ -52,7 +52,7 @@ void mca_ptl_base_recv_request_match_specific(mca_ptl_base_recv_request_t* reque /* assign sequence number */ request->super.req_sequence = pml_comm->c_recv_seq++; - if (lam_list_get_size(&pml_comm->c_unexpected_frags[req_peer]) > 0 && + if (ompi_list_get_size(&pml_comm->c_unexpected_frags[req_peer]) > 0 && (frag = mca_ptl_base_recv_request_match_specific_proc(request, req_peer)) != NULL) { mca_ptl_t* ptl = frag->super.frag_owner; THREAD_UNLOCK(&pml_comm->c_matching_lock); @@ -63,7 +63,7 @@ void mca_ptl_base_recv_request_match_specific(mca_ptl_base_recv_request_t* reque /* We didn't find any matches. Record this irecv so we can match * it when the message comes in. */ - lam_list_append(pml_comm->c_specific_receives+req_peer, (lam_list_item_t*)request); + ompi_list_append(pml_comm->c_specific_receives+req_peer, (ompi_list_item_t*)request); THREAD_UNLOCK(&pml_comm->c_matching_lock); } @@ -75,7 +75,7 @@ void mca_ptl_base_recv_request_match_specific(mca_ptl_base_recv_request_t* reque void mca_ptl_base_recv_request_match_wild(mca_ptl_base_recv_request_t* request) { - lam_communicator_t *comm = request->super.req_comm; + ompi_communicator_t *comm = request->super.req_comm; mca_pml_ptl_comm_t* pml_comm = comm->c_pml_comm; int proc_count = comm->c_remote_group->grp_proc_count; int proc; @@ -95,7 +95,7 @@ void mca_ptl_base_recv_request_match_wild(mca_ptl_base_recv_request_t* request) mca_ptl_base_recv_frag_t* frag; /* continue if no frags to match */ - if (lam_list_get_size(&pml_comm->c_unexpected_frags[proc]) == 0) + if (ompi_list_get_size(&pml_comm->c_unexpected_frags[proc]) == 0) continue; /* loop over messages from the current proc */ @@ -111,7 +111,7 @@ void mca_ptl_base_recv_request_match_wild(mca_ptl_base_recv_request_t* request) * it when the message comes in. */ - lam_list_append(&pml_comm->c_wild_receives, (lam_list_item_t*)request); + ompi_list_append(&pml_comm->c_wild_receives, (ompi_list_item_t*)request); THREAD_UNLOCK(&pml_comm->c_matching_lock); } @@ -125,22 +125,22 @@ static mca_ptl_base_recv_frag_t* mca_ptl_base_recv_request_match_specific_proc( mca_ptl_base_recv_request_t* request, int proc) { mca_pml_ptl_comm_t *pml_comm = request->super.req_comm->c_pml_comm; - lam_list_t* unexpected_frags = pml_comm->c_unexpected_frags+proc; + ompi_list_t* unexpected_frags = pml_comm->c_unexpected_frags+proc; mca_ptl_base_recv_frag_t* frag; int tag = request->super.req_tag; - for (frag = (mca_ptl_base_recv_frag_t*)lam_list_get_first(unexpected_frags); - frag != (mca_ptl_base_recv_frag_t*)lam_list_get_end(unexpected_frags); - frag = (mca_ptl_base_recv_frag_t*)lam_list_get_next(frag)) { + for (frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_first(unexpected_frags); + frag != (mca_ptl_base_recv_frag_t*)ompi_list_get_end(unexpected_frags); + frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_next(frag)) { mca_ptl_base_match_header_t* header = &frag->super.frag_header.hdr_match; /* check first frag - we assume that process matching has been done already */ - if (((tag == LAM_ANY_TAG) || (tag == header->hdr_tag))) { + if (((tag == OMPI_ANY_TAG) || (tag == header->hdr_tag))) { - if (tag == LAM_ANY_TAG && header->hdr_tag < 0) { + if (tag == OMPI_ANY_TAG && header->hdr_tag < 0) { continue; } - lam_list_remove_item(unexpected_frags, (lam_list_item_t*)frag); + ompi_list_remove_item(unexpected_frags, (ompi_list_item_t*)frag); request->req_bytes_packed = header->hdr_msg_length; request->super.req_tag = header->hdr_tag; request->super.req_peer = header->hdr_src; diff --git a/src/mca/ptl/base/ptl_base_recvreq.h b/src/mca/ptl/base/ptl_base_recvreq.h index c88898dbcd..cacb163c18 100644 --- a/src/mca/ptl/base/ptl_base_recvreq.h +++ b/src/mca/ptl/base/ptl_base_recvreq.h @@ -10,7 +10,7 @@ #include "mca/ptl/ptl.h" #include "mca/pml/base/pml_base_request.h" -extern lam_class_t mca_ptl_base_recv_request_t_class; +extern ompi_class_t mca_ptl_base_recv_request_t_class; struct mca_ptl_base_recv_frag_t; /** diff --git a/src/mca/ptl/base/ptl_base_select.c b/src/mca/ptl/base/ptl_base_select.c index d3ebe4fd9e..840915e527 100644 --- a/src/mca/ptl/base/ptl_base_select.c +++ b/src/mca/ptl/base/ptl_base_select.c @@ -2,7 +2,7 @@ * $HEADER$ */ -#include "lam_config.h" +#include "ompi_config.h" #include "runtime/runtime.h" #include "mca/mca.h" @@ -17,14 +17,14 @@ * Call the init function on all available modules to find out if they * want to run. Select all modules that don't fail. Failing modules * will be closed and unloaded. The selected modules will be returned - * to the caller in a lam_list_t. + * to the caller in a ompi_list_t. */ int mca_ptl_base_select(bool *allow_multi_user_threads, bool *have_hidden_threads) { int i, num_ptls; bool user_threads, hidden_threads; - lam_list_item_t *item; + ompi_list_item_t *item; mca_base_module_list_item_t *mli; mca_ptl_base_module_t *module; mca_ptl_t **actions; @@ -33,18 +33,18 @@ int mca_ptl_base_select(bool *allow_multi_user_threads, /* Traverse the list of available modules; call their init functions. */ - for (item = lam_list_get_first(&mca_ptl_base_modules_available); - lam_list_get_end(&mca_ptl_base_modules_available) != item; - item = lam_list_get_next(item)) { + for (item = ompi_list_get_first(&mca_ptl_base_modules_available); + ompi_list_get_end(&mca_ptl_base_modules_available) != item; + item = ompi_list_get_next(item)) { mli = (mca_base_module_list_item_t *) item; module = (mca_ptl_base_module_t *) mli->mli_module; - lam_output_verbose(10, mca_ptl_base_output, + ompi_output_verbose(10, mca_ptl_base_output, "select: initializing %s module %s", module->ptlm_version.mca_type_name, module->ptlm_version.mca_module_name); if (NULL == module->ptlm_init) { - lam_output_verbose(10, mca_ptl_base_output, + ompi_output_verbose(10, mca_ptl_base_output, "select: no init function; ignoring module"); } else { actions = module->ptlm_init(&num_ptls, &user_threads, @@ -53,11 +53,11 @@ int mca_ptl_base_select(bool *allow_multi_user_threads, /* If the module didn't initialize, unload it */ if (NULL == actions) { - lam_output_verbose(10, mca_ptl_base_output, + ompi_output_verbose(10, mca_ptl_base_output, "select: init returned failure"); mca_base_module_repository_release((mca_base_module_t *) module); - lam_output_verbose(10, mca_ptl_base_output, + ompi_output_verbose(10, mca_ptl_base_output, "select: module %s unloaded", module->ptlm_version.mca_module_name); } @@ -68,19 +68,19 @@ int mca_ptl_base_select(bool *allow_multi_user_threads, *allow_multi_user_threads |= user_threads; *have_hidden_threads |= hidden_threads; - lam_output_verbose(10, mca_ptl_base_output, + ompi_output_verbose(10, mca_ptl_base_output, "select: init returned success"); for (i = 0; i < num_ptls; ++i) { sm = malloc(sizeof(mca_ptl_base_selected_module_t)); if (NULL == sm) { - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(sm, lam_list_item_t); + OBJ_CONSTRUCT(sm, ompi_list_item_t); sm->pbsm_module = module; sm->pbsm_actions = actions[i]; - lam_list_append(&mca_ptl_base_modules_initialized, - (lam_list_item_t*) sm); + ompi_list_append(&mca_ptl_base_modules_initialized, + (ompi_list_item_t*) sm); } free(actions); } @@ -89,12 +89,12 @@ int mca_ptl_base_select(bool *allow_multi_user_threads, /* Finished querying all modules. Check for the bozo case. */ - if (0 == lam_list_get_size(&mca_ptl_base_modules_initialized)) { + if (0 == ompi_list_get_size(&mca_ptl_base_modules_initialized)) { /* JMS Replace with show_help */ - lam_abort(1, "No ptl module available. This shouldn't happen."); + ompi_abort(1, "No ptl module available. This shouldn't happen."); } /* All done */ - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/ptl/base/ptl_base_sendfrag.c b/src/mca/ptl/base/ptl_base_sendfrag.c index 1395bd57de..22cfb1661e 100644 --- a/src/mca/ptl/base/ptl_base_sendfrag.c +++ b/src/mca/ptl/base/ptl_base_sendfrag.c @@ -8,11 +8,11 @@ static void mca_ptl_base_send_frag_construct(mca_ptl_base_send_frag_t* frag); static void mca_ptl_base_send_frag_destruct(mca_ptl_base_send_frag_t* frag); -lam_class_t mca_ptl_base_send_frag_t_class = { +ompi_class_t mca_ptl_base_send_frag_t_class = { "mca_ptl_base_send_frag_t", OBJ_CLASS(mca_ptl_base_frag_t), - (lam_construct_t) mca_ptl_base_send_frag_construct, - (lam_destruct_t) mca_ptl_base_send_frag_destruct + (ompi_construct_t) mca_ptl_base_send_frag_construct, + (ompi_destruct_t) mca_ptl_base_send_frag_destruct }; diff --git a/src/mca/ptl/base/ptl_base_sendfrag.h b/src/mca/ptl/base/ptl_base_sendfrag.h index ef9305d62a..06224ee995 100644 --- a/src/mca/ptl/base/ptl_base_sendfrag.h +++ b/src/mca/ptl/base/ptl_base_sendfrag.h @@ -10,7 +10,7 @@ #include "mca/ptl/ptl.h" #include "mca/ptl/base/ptl_base_fragment.h" -extern lam_class_t mca_ptl_base_send_frag_t_class; +extern ompi_class_t mca_ptl_base_send_frag_t_class; /** * Base type for send fragment descriptors diff --git a/src/mca/ptl/base/ptl_base_sendreq.c b/src/mca/ptl/base/ptl_base_sendreq.c index 69cd66173c..61431e6a9f 100644 --- a/src/mca/ptl/base/ptl_base_sendreq.c +++ b/src/mca/ptl/base/ptl_base_sendreq.c @@ -9,11 +9,11 @@ static void mca_ptl_base_send_request_construct(mca_ptl_base_send_request_t* req static void mca_ptl_base_send_request_destruct(mca_ptl_base_send_request_t* req); -lam_class_t mca_ptl_base_send_request_t_class = { +ompi_class_t mca_ptl_base_send_request_t_class = { "mca_ptl_base_send_request_t", OBJ_CLASS(mca_pml_base_request_t), - (lam_construct_t) mca_ptl_base_send_request_construct, - (lam_destruct_t) mca_ptl_base_send_request_destruct + (ompi_construct_t) mca_ptl_base_send_request_construct, + (ompi_destruct_t) mca_ptl_base_send_request_destruct }; @@ -21,7 +21,7 @@ static void mca_ptl_base_send_request_construct(mca_ptl_base_send_request_t* req { /* no need to reinit for every send -- never changes */ request->super.req_type = MCA_PML_REQUEST_SEND; - OBJ_CONSTRUCT(&request->req_convertor, lam_convertor_t); + OBJ_CONSTRUCT(&request->req_convertor, ompi_convertor_t); } static void mca_ptl_base_send_request_destruct(mca_ptl_base_send_request_t* req) diff --git a/src/mca/ptl/base/ptl_base_sendreq.h b/src/mca/ptl/base/ptl_base_sendreq.h index 9fbe69292e..bfc7834c29 100644 --- a/src/mca/ptl/base/ptl_base_sendreq.h +++ b/src/mca/ptl/base/ptl_base_sendreq.h @@ -7,14 +7,14 @@ #ifndef MCA_PML_BASE_SEND_REQUEST_H #define MCA_PML_BASE_SEND_REQUEST_H -#include "lam_config.h" +#include "ompi_config.h" #include "datatype/datatype.h" #include "mca/ptl/ptl.h" #include "mca/pml/base/pml_base_request.h" #include "mca/ptl/base/ptl_base_comm.h" -extern lam_class_t mca_ptl_base_send_request_t_class; +extern ompi_class_t mca_ptl_base_send_request_t_class; struct mca_ptl_base_send_frag_t; @@ -29,10 +29,10 @@ struct mca_ptl_base_send_request_t { mca_pml_base_send_mode_t req_send_mode; /**< type of send */ struct mca_ptl_t* req_owner; /**< PTL that allocated this descriptor */ struct mca_ptl_base_peer_t* req_peer; /**< PTL peer instance that will be used for first fragment */ - lam_ptr_t req_peer_match; /**< matched receive at peer */ - lam_ptr_t req_peer_addr; + ompi_ptr_t req_peer_match; /**< matched receive at peer */ + ompi_ptr_t req_peer_addr; size_t req_peer_size; - lam_convertor_t req_convertor; /**< convertor that describes this datatype */ + ompi_convertor_t req_convertor; /**< convertor that describes this datatype */ }; typedef struct mca_ptl_base_send_request_t mca_ptl_base_send_request_t; @@ -75,7 +75,7 @@ typedef struct mca_ptl_base_send_request_t mca_ptl_base_send_request_t; request->super.req_peer = peer; \ request->super.req_tag = tag; \ request->super.req_comm = comm; \ - request->super.req_proc = lam_comm_peer_lookup(comm,peer); \ + request->super.req_proc = ompi_comm_peer_lookup(comm,peer); \ request->super.req_persistent = persistent; \ request->super.req_mpi_done = false; \ request->super.req_pml_done = false; \ @@ -84,15 +84,15 @@ typedef struct mca_ptl_base_send_request_t mca_ptl_base_send_request_t; /* initialize datatype convertor for this request */ \ if(count > 0) { \ int packed_size; \ - lam_convertor_copy(request->super.req_proc->proc_convertor, &request->req_convertor); \ - lam_convertor_init_for_send( \ + ompi_convertor_copy(request->super.req_proc->proc_convertor, &request->req_convertor); \ + ompi_convertor_init_for_send( \ &request->req_convertor, \ 0, \ request->super.req_datatype, \ request->super.req_count, \ request->super.req_addr, \ 0); \ - lam_convertor_get_packed_size(&request->req_convertor, &packed_size); \ + ompi_convertor_get_packed_size(&request->req_convertor, &packed_size); \ request->req_bytes_packed = packed_size; \ } else { \ request->req_bytes_packed = 0; \ diff --git a/src/mca/ptl/ptl.h b/src/mca/ptl/ptl.h index 66a0e536ca..2d982d2e76 100644 --- a/src/mca/ptl/ptl.h +++ b/src/mca/ptl/ptl.h @@ -126,8 +126,8 @@ #define MCA_PTL_H #include "mca/mca.h" -#include "include/lam.h" -#include "lfc/lam_list.h" +#include "include/ompi.h" +#include "class/ompi_list.h" #include "proc/proc.h" #include "mca/pml/pml.h" @@ -146,7 +146,7 @@ struct mca_ptl_base_match_header_t; typedef uint64_t mca_ptl_sequence_t; typedef uint64_t mca_ptl_tstamp_t; -typedef lam_list_t mca_ptl_queue_t; +typedef ompi_list_t mca_ptl_queue_t; typedef enum { MCA_PTL_ENABLE @@ -196,7 +196,7 @@ typedef struct mca_ptl_t** (*mca_ptl_base_module_init_fn_t)( * @param flag (IN) Parameter to change. * @param value (IN) Optional parameter value. * - * @return LAM_SUCCESS or error code on failure. + * @return OMPI_SUCCESS or error code on failure. */ typedef int (*mca_ptl_base_module_control_fn_t)( int param, @@ -210,7 +210,7 @@ typedef int (*mca_ptl_base_module_control_fn_t)( * non-threaded polling environments. * * @param tstamp Current time. - * @return LAM_SUCCESS or error code on failure. + * @return OMPI_SUCCESS or error code on failure. */ typedef int (*mca_ptl_base_module_progress_fn_t)( mca_ptl_tstamp_t tstamp @@ -260,11 +260,11 @@ typedef int (*mca_ptl_base_finalize_fn_t)( * @param procs (IN) Set of processes * @param peer (OUT) Set of (optional) mca_ptl_base_peer_t instances returned by PTL. * @param reachable (IN/OUT) Bitmask indicating set of peer processes that are reachable by this PTL. - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. * * The mca_ptl_base_add_procs_fn_t() is called by the PML to determine * the set of PTLs that should be used to reach the specified process. - * A return value of LAM_SUCCESS indicates the PTL should be added to the + * A return value of OMPI_SUCCESS indicates the PTL should be added to the * set used to reach the proc. The peers addressing information may be * obtained by the PTL via the mca_base_modex_recv() function if required. * The PTL may optionally return a pointer to a mca_ptl_base_peer_t data @@ -273,9 +273,9 @@ typedef int (*mca_ptl_base_finalize_fn_t)( typedef int (*mca_ptl_base_add_procs_fn_t)( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t** procs, + struct ompi_proc_t** procs, struct mca_ptl_base_peer_t** peer, - lam_bitmap_t* reachable + ompi_bitmap_t* reachable ); /** @@ -294,7 +294,7 @@ typedef int (*mca_ptl_base_add_procs_fn_t)( typedef int (*mca_ptl_base_del_procs_fn_t)( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t** procs, + struct ompi_proc_t** procs, struct mca_ptl_base_peer_t** ); @@ -340,7 +340,7 @@ typedef void (*mca_ptl_base_request_return_fn_t)( * @param size (IN/OUT) Number of bytes PML is requesting PTL to deliver, * PTL returns number of bytes sucessfully fragmented * @param flags (IN) Flags that should be passed to the peer via the message header. - * @param request (OUT) LAM_SUCCESS if the PTL was able to queue one or more fragments + * @param request (OUT) OMPI_SUCCESS if the PTL was able to queue one or more fragments * * The PML implements a rendevouz protocol, with up to the PTL defined threshold * bytes of the message sent in eager send mode. On receipt of an acknowledgment @@ -370,7 +370,7 @@ typedef int (*mca_ptl_base_put_fn_t)( * @param size (IN/OUT) Number of bytes PML is requesting PTL to pull from peer, * PTL returns number of bytes sucessfully fragmented. * @param flags (IN) - * @param request (OUT) LAM_SUCCESS if the PTL was able to queue one or more fragments + * @param request (OUT) OMPI_SUCCESS if the PTL was able to queue one or more fragments * * Initiate an RDMA get request to pull data from the peer. This is initiated * at the receiver side when a request is matched if the PTL indicates that it @@ -489,4 +489,4 @@ typedef struct mca_ptl_t mca_ptl_t; /* ptl v1.0 */ \ "ptl", 1, 0, 0 -#endif /* LAM_MCA_PTL_H */ +#endif /* OMPI_MCA_PTL_H */ diff --git a/src/mca/ptl/sm/Makefile.am b/src/mca/ptl/sm/Makefile.am index 2864421089..1bb3a77d87 100644 --- a/src/mca/ptl/sm/Makefile.am +++ b/src/mca/ptl/sm/Makefile.am @@ -2,9 +2,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -12,9 +12,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_ptl_sm_LOADABLE_MODULE +if OMPI_BUILD_ptl_sm_LOADABLE_MODULE module_noinst = module_install = mca_ptl_sm.la else @@ -22,12 +22,12 @@ module_noinst = libmca_ptl_sm.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_ptl_sm_la_SOURCES = mca_ptl_sm_la_LIBADD = \ src/libmca_ptl_sm.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_ptl_sm_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/ptl/sm/src/Makefile.am b/src/mca/ptl/sm/src/Makefile.am index 043491ceba..de80265322 100644 --- a/src/mca/ptl/sm/src/Makefile.am +++ b/src/mca/ptl/sm/src/Makefile.am @@ -3,12 +3,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_ptl_sm.la libmca_ptl_sm_la_SOURCES = \ diff --git a/src/mca/ptl/sm/src/ptl_sm.c b/src/mca/ptl/sm/src/ptl_sm.c index abfd6ec33b..a8730fb93d 100644 --- a/src/mca/ptl/sm/src/ptl_sm.c +++ b/src/mca/ptl/sm/src/ptl_sm.c @@ -41,33 +41,33 @@ mca_ptl_sm_t mca_ptl_sm = { int mca_ptl_sm_add_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **procs, + struct ompi_proc_t **procs, struct mca_ptl_base_peer_t **peers, - lam_bitmap_t* reachability) + ompi_bitmap_t* reachability) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_ptl_sm_del_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **procs, + struct ompi_proc_t **procs, struct mca_ptl_base_peer_t **peers) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_ptl_sm_finalize(struct mca_ptl_t* ptl) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } int mca_ptl_sm_request_alloc(struct mca_ptl_t* ptl, struct mca_ptl_base_send_request_t** request) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -91,7 +91,7 @@ int mca_ptl_sm_send( size_t *size, int flags) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/ptl/sm/src/ptl_sm.h b/src/mca/ptl/sm/src/ptl_sm.h index 936b25833a..c65bac80a3 100644 --- a/src/mca/ptl/sm/src/ptl_sm.h +++ b/src/mca/ptl/sm/src/ptl_sm.h @@ -28,13 +28,13 @@ struct mca_ptl_sm_module_1_0_0_t { int sm_free_list_max; /**< maximum size of free lists */ int sm_free_list_inc; /**< number of elements to alloc when growing free lists */ void* sm_base_addr; /**< base address of mmaped region */ - lam_free_list_t sm_send_requests; /**< free list of sm send requests -- sendreq + sendfrag */ - lam_free_list_t sm_send_frags; /**< free list of sm send fragments */ - lam_free_list_t sm_recv_frags; /**< free list of sm recv fragments */ - lam_allocator_t sm_allocator; /**< shared memory allocator */ + ompi_free_list_t sm_send_requests; /**< free list of sm send requests -- sendreq + sendfrag */ + ompi_free_list_t sm_send_frags; /**< free list of sm send fragments */ + ompi_free_list_t sm_recv_frags; /**< free list of sm recv fragments */ + ompi_allocator_t sm_allocator; /**< shared memory allocator */ char sm_mmap_file[PATH_MAX]; /**< full path to backing file */ mca_ptl_sm_mmap_t *sm_mmap; - lam_mutex_t sm_lock; + ompi_mutex_t sm_lock; }; typedef struct mca_ptl_sm_module_1_0_0_t mca_ptl_sm_module_1_0_0_t; typedef struct mca_ptl_sm_module_1_0_0_t mca_ptl_sm_module_t; @@ -95,7 +95,7 @@ extern mca_ptl_sm_t mca_ptl_sm; * Cleanup any resources held by the PTL. * * @param ptl PTL instance. - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. */ extern int mca_ptl_sm_finalize( @@ -109,16 +109,16 @@ extern int mca_ptl_sm_finalize( * @param ptl (IN) * @param proc (IN) * @param peer (OUT) - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. * */ extern int mca_ptl_sm_add_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **procs, + struct ompi_proc_t **procs, struct mca_ptl_base_peer_t** peers, - lam_bitmap_t* reachability + ompi_bitmap_t* reachability ); @@ -134,7 +134,7 @@ extern int mca_ptl_sm_add_procs( extern int mca_ptl_sm_del_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **procs, + struct ompi_proc_t **procs, struct mca_ptl_base_peer_t **peers ); @@ -183,7 +183,7 @@ extern void mca_ptl_sm_matched( * @param send_request (IN/OUT) Send request (allocated by PML via mca_ptl_base_request_alloc_fn_t) * @param size (IN) Number of bytes PML is requesting PTL to deliver * @param flags (IN) Flags that should be passed to the peer via the message header. - * @param request (OUT) LAM_SUCCESS if the PTL was able to queue one or more fragments + * @param request (OUT) OMPI_SUCCESS if the PTL was able to queue one or more fragments */ extern int mca_ptl_sm_send( struct mca_ptl_t* ptl, diff --git a/src/mca/ptl/sm/src/ptl_sm_mmap.c b/src/mca/ptl/sm/src/ptl_sm_mmap.c index 2443f55085..a70faacbd4 100644 --- a/src/mca/ptl/sm/src/ptl_sm_mmap.c +++ b/src/mca/ptl/sm/src/ptl_sm_mmap.c @@ -16,7 +16,7 @@ OBJ_CLASS_INSTANCE( mca_ptl_sm_mmap_t, - lam_object_t, + ompi_object_t, NULL, NULL ); @@ -32,7 +32,7 @@ static mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_open(size_t size) struct timespec ts; fd = shm_open(mca_ptl_sm_module.sm_mmap_file, O_CREAT|O_RDWR, 0000); if(fd < 0 && errno != EACCES) { - lam_output(0, "mca_ptl_sm_mmap_open: open failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_sm_mmap_open: open failed with errno=%d\n", errno); return NULL; } ts.tv_sec = 0; @@ -43,7 +43,7 @@ static mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_open(size_t size) /* map the file and initialize segment state */ seg = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if(NULL == seg) { - lam_output(0, "mca_ptl_sm_module_mmap: mmap failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_sm_module_mmap: mmap failed with errno=%d\n", errno); return NULL; } close(fd); @@ -61,7 +61,7 @@ mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_init(size_t size) { static int segnum = 0; - lam_job_handle_t job_handle = mca_pcm.pcm_handle_get(); + ompi_job_handle_t job_handle = mca_pcm.pcm_handle_get(); char hostname[64]; int fd; mca_ptl_sm_segment_t* seg; @@ -73,20 +73,20 @@ mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_init(size_t size) if(fd < 0) { if(errno == EACCES) return mca_ptl_sm_mmap_open(size); - lam_output(0, "mca_ptl_sm_module_mmap: open failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_sm_module_mmap: open failed with errno=%d\n", errno); return NULL; } /* truncate the file to the requested size */ if(ftruncate(fd, size) != 0) { - lam_output(0, "mca_ptl_sm_module_mmap: ftruncate failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_sm_module_mmap: ftruncate failed with errno=%d\n", errno); return NULL; } /* map the file and initialize segment state */ seg = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if(NULL == seg) { - lam_output(0, "mca_ptl_sm_module_mmap: mmap failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_sm_module_mmap: mmap failed with errno=%d\n", errno); return NULL; } fprintf(stderr, "mapped at %08x", (unsigned int)seg); @@ -102,7 +102,7 @@ mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_init(size_t size) /* enable access by other processes on this host */ if(fchmod(fd, 0600) != 0) { - lam_output(0, "mca_ptl_sm_module_mmap: fchmod failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_sm_module_mmap: fchmod failed with errno=%d\n", errno); OBJ_RELEASE(map); close(fd); return NULL; @@ -112,7 +112,7 @@ mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_init(size_t size) } -void* mca_ptl_sm_mmap_alloc(lam_allocator_t* allocator, size_t size) +void* mca_ptl_sm_mmap_alloc(ompi_allocator_t* allocator, size_t size) { mca_ptl_sm_mmap_t* map = mca_ptl_sm_module.sm_mmap; mca_ptl_sm_segment_t* seg = map->sm_segment; @@ -126,7 +126,7 @@ void* mca_ptl_sm_mmap_alloc(lam_allocator_t* allocator, size_t size) } -void mca_ptl_sm_mmap_free(lam_allocator_t* allocator, void* ptr) +void mca_ptl_sm_mmap_free(ompi_allocator_t* allocator, void* ptr) { /* empty for now */ } diff --git a/src/mca/ptl/sm/src/ptl_sm_mmap.h b/src/mca/ptl/sm/src/ptl_sm_mmap.h index 9af272d18b..24cfeeff36 100644 --- a/src/mca/ptl/sm/src/ptl_sm_mmap.h +++ b/src/mca/ptl/sm/src/ptl_sm_mmap.h @@ -1,13 +1,13 @@ #ifndef _PTL_SM_MMAP_H_ #define _PTL_SM_MMAP_H_ -#include "lfc/lam_object.h" +#include "class/ompi_object.h" #include "mem/allocator.h" #include "os/atomic.h" struct mca_ptl_sm_segment { - lam_lock_data_t seg_lock; + ompi_lock_data_t seg_lock; size_t seg_offset; size_t seg_size; }; @@ -15,7 +15,7 @@ typedef struct mca_ptl_sm_segment mca_ptl_sm_segment_t; struct mca_ptl_sm_mmap { - lam_object_t sm_base; + ompi_object_t sm_base; mca_ptl_sm_segment_t* sm_segment; unsigned char* sm_addr; size_t sm_size; @@ -27,8 +27,8 @@ OBJ_CLASS_DECLARATION(mca_ptl_sm_mmap_t); mca_ptl_sm_mmap_t* mca_ptl_sm_mmap_init(size_t size); -void* mca_ptl_sm_mmap_alloc(lam_allocator_t*, size_t size); -void mca_ptl_sm_mmap_free(lam_allocator_t*, void* alloc); +void* mca_ptl_sm_mmap_alloc(ompi_allocator_t*, size_t size); +void mca_ptl_sm_mmap_free(ompi_allocator_t*, void* alloc); #endif diff --git a/src/mca/ptl/sm/src/ptl_sm_module.c b/src/mca/ptl/sm/src/ptl_sm_module.c index bbbd33cbc1..33169afb72 100644 --- a/src/mca/ptl/sm/src/ptl_sm_module.c +++ b/src/mca/ptl/sm/src/ptl_sm_module.c @@ -116,18 +116,18 @@ int mca_ptl_sm_module_open(void) mca_ptl_sm_param_register_int("free_list_inc", 256); /* initialize objects */ - OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_lock, lam_mutex_t); - OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_allocator, lam_allocator_t); - OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_send_requests, lam_free_list_t); - OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_send_frags, lam_free_list_t); - OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_recv_frags, lam_free_list_t); + OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_lock, ompi_mutex_t); + OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_allocator, ompi_allocator_t); + OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_send_requests, ompi_free_list_t); + OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_send_frags, ompi_free_list_t); + OBJ_CONSTRUCT(&mca_ptl_sm_module.sm_recv_frags, ompi_free_list_t); mca_ptl_sm_module.sm_allocator.alc_alloc_fn = mca_ptl_sm_mmap_alloc; mca_ptl_sm_module.sm_allocator.alc_free_fn = mca_ptl_sm_mmap_free; /* initialize state */ mca_ptl_sm_module.sm_mmap = NULL; - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -141,7 +141,7 @@ int mca_ptl_sm_module_close(void) OBJ_DESTRUCT(&mca_ptl_sm_module.sm_send_requests); OBJ_DESTRUCT(&mca_ptl_sm_module.sm_send_frags); OBJ_DESTRUCT(&mca_ptl_sm_module.sm_recv_frags); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -157,7 +157,7 @@ mca_ptl_t** mca_ptl_sm_module_init( *num_ptls = 0; *allow_multi_user_threads = true; - *have_hidden_threads = LAM_HAVE_THREADS; + *have_hidden_threads = OMPI_HAVE_THREADS; /* allocate a block of shared memory */ mca_ptl_sm_module.sm_mmap = mca_ptl_sm_mmap_init(mca_ptl_sm_module.sm_min_alloc); @@ -165,7 +165,7 @@ mca_ptl_t** mca_ptl_sm_module_init( return NULL; /* initialize free lists */ - lam_free_list_init(&mca_ptl_sm_module.sm_send_requests, + ompi_free_list_init(&mca_ptl_sm_module.sm_send_requests, sizeof(mca_ptl_sm_send_request_t), OBJ_CLASS(mca_ptl_sm_send_request_t), mca_ptl_sm_module.sm_free_list_num, @@ -173,7 +173,7 @@ mca_ptl_t** mca_ptl_sm_module_init( mca_ptl_sm_module.sm_free_list_inc, &mca_ptl_sm_module.sm_allocator); /* use shared-memory allocator */ - lam_free_list_init(&mca_ptl_sm_module.sm_recv_frags, + ompi_free_list_init(&mca_ptl_sm_module.sm_recv_frags, sizeof(mca_ptl_sm_recv_frag_t), OBJ_CLASS(mca_ptl_sm_recv_frag_t), mca_ptl_sm_module.sm_free_list_num, @@ -182,7 +182,7 @@ mca_ptl_t** mca_ptl_sm_module_init( &mca_ptl_sm_module.sm_allocator); /* use default allocator */ /* publish shared memory parameters with the MCA framework */ - if(mca_ptl_sm_module_exchange() != LAM_SUCCESS) + if(mca_ptl_sm_module_exchange() != OMPI_SUCCESS) return 0; ptls = malloc(sizeof(mca_ptl_t*)); @@ -206,7 +206,7 @@ int mca_ptl_sm_module_control(int param, void* value, size_t size) default: break; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -216,7 +216,7 @@ int mca_ptl_sm_module_control(int param, void* value, size_t size) int mca_ptl_sm_module_progress(mca_ptl_tstamp_t tstamp) { - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -226,7 +226,7 @@ int mca_ptl_sm_module_progress(mca_ptl_tstamp_t tstamp) static int mca_ptl_sm_module_exchange() { - return LAM_SUCCESS; + return OMPI_SUCCESS; } diff --git a/src/mca/ptl/sm/src/ptl_sm_sendfrag.h b/src/mca/ptl/sm/src/ptl_sm_sendfrag.h index fad1d8c314..b8b6aed657 100644 --- a/src/mca/ptl/sm/src/ptl_sm_sendfrag.h +++ b/src/mca/ptl/sm/src/ptl_sm_sendfrag.h @@ -8,7 +8,7 @@ #define MCA_PTL_SM_SEND_FRAG_H #include -#include "lam_config.h" +#include "ompi_config.h" #include "mca/ptl/base/ptl_base_sendreq.h" #include "mca/ptl/base/ptl_base_sendfrag.h" #include "ptl_sm.h" @@ -27,7 +27,7 @@ typedef struct mca_ptl_sm_send_frag_t mca_ptl_sm_send_frag_t; #define MCA_PTL_SM_SEND_FRAG_ALLOC(item, rc) \ - LAM_FREE_LIST_GET(&mca_ptl_sm_module.sm_send_frags, item, rc); + OMPI_FREE_LIST_GET(&mca_ptl_sm_module.sm_send_frags, item, rc); /** diff --git a/src/mca/ptl/sm/src/ptl_sm_sendreq.h b/src/mca/ptl/sm/src/ptl_sm_sendreq.h index a859ebf44b..9212380c09 100644 --- a/src/mca/ptl/sm/src/ptl_sm_sendreq.h +++ b/src/mca/ptl/sm/src/ptl_sm_sendreq.h @@ -9,7 +9,7 @@ #define MCA_PTL_SM_SEND_REQUEST_H #include -#include "lam_config.h" +#include "ompi_config.h" #include "mca/ptl/base/ptl_base_sendreq.h" #include "ptl_sm_sendfrag.h" diff --git a/src/mca/ptl/tcp/Makefile.am b/src/mca/ptl/tcp/Makefile.am index 742050d785..3fdc962ba2 100644 --- a/src/mca/ptl/tcp/Makefile.am +++ b/src/mca/ptl/tcp/Makefile.am @@ -2,9 +2,9 @@ # $HEADER$ # -# Use the top-level LAM Makefile.options +# Use the top-level OMPI Makefile.options -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options SUBDIRS = src @@ -12,9 +12,9 @@ EXTRA_DIST = VERSION # According to the MCA spec, we have to make the output library here # in the top-level directory, and it has to be named -# liblam_ssi_coll_lam_basic.la +# libompi_ssi_coll_ompi_basic.la -if LAM_BUILD_ptl_tcp_LOADABLE_MODULE +if OMPI_BUILD_ptl_tcp_LOADABLE_MODULE module_noinst = module_install = mca_ptl_tcp.la else @@ -22,12 +22,12 @@ module_noinst = libmca_ptl_tcp.la module_install = endif -mcamoduledir = $(libdir)/lam +mcamoduledir = $(libdir)/ompi mcamodule_LTLIBRARIES = $(module_install) mca_ptl_tcp_la_SOURCES = mca_ptl_tcp_la_LIBADD = \ src/libmca_ptl_tcp.la \ - $(LIBLAM_LA) + $(LIBOMPI_LA) mca_ptl_tcp_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/ptl/tcp/src/Makefile.am b/src/mca/ptl/tcp/src/Makefile.am index f332fcc13a..8bae94d6e3 100644 --- a/src/mca/ptl/tcp/src/Makefile.am +++ b/src/mca/ptl/tcp/src/Makefile.am @@ -3,12 +3,12 @@ # $HEADER$ # -include $(top_lam_srcdir)/config/Makefile.options +include $(top_ompi_srcdir)/config/Makefile.options AM_CPPFLAGS = \ - -I$(top_lam_builddir)/src/include \ - -I$(top_lam_srcdir)/src \ - -I$(top_lam_srcdir)/src/include + -I$(top_ompi_builddir)/src/include \ + -I$(top_ompi_srcdir)/src \ + -I$(top_ompi_srcdir)/src/include noinst_LTLIBRARIES = libmca_ptl_tcp.la libmca_ptl_tcp_la_SOURCES = \ diff --git a/src/mca/ptl/tcp/src/ptl_tcp.c b/src/mca/ptl/tcp/src/ptl_tcp.c index 47e150e5bf..b038651d4e 100644 --- a/src/mca/ptl/tcp/src/ptl_tcp.c +++ b/src/mca/ptl/tcp/src/ptl_tcp.c @@ -46,19 +46,19 @@ mca_ptl_tcp_t mca_ptl_tcp = { int mca_ptl_tcp_add_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **lam_procs, + struct ompi_proc_t **ompi_procs, struct mca_ptl_base_peer_t** peers, - lam_bitmap_t* reachable) + ompi_bitmap_t* reachable) { size_t i; for(i=0; iproc_lock); if(ptl_proc->proc_addr_count == ptl_proc->proc_peer_count) { THREAD_UNLOCK(&ptl_proc->proc_lock); - return LAM_ERR_UNREACH; + return OMPI_ERR_UNREACH; } /* The ptl_proc datastructure is shared by all TCP PTL instances that are trying @@ -77,43 +77,43 @@ int mca_ptl_tcp_add_procs( ptl_peer = OBJ_NEW(mca_ptl_tcp_peer_t); if(NULL == ptl_peer) { THREAD_UNLOCK(&ptl_proc->proc_lock); - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } ptl_peer->peer_ptl = (mca_ptl_tcp_t*)ptl; rc = mca_ptl_tcp_proc_insert(ptl_proc, ptl_peer); - if(rc != LAM_SUCCESS) { + if(rc != OMPI_SUCCESS) { OBJ_RELEASE(ptl_peer); THREAD_UNLOCK(&ptl_proc->proc_lock); return rc; } - lam_bitmap_set_bit(reachable, i); + ompi_bitmap_set_bit(reachable, i); THREAD_UNLOCK(&ptl_proc->proc_lock); peers[i] = ptl_peer; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } -int mca_ptl_tcp_del_procs(struct mca_ptl_t* ptl, size_t nprocs, struct lam_proc_t **procs, struct mca_ptl_base_peer_t ** peers) +int mca_ptl_tcp_del_procs(struct mca_ptl_t* ptl, size_t nprocs, struct ompi_proc_t **procs, struct mca_ptl_base_peer_t ** peers) { size_t i; for(i=0; ireq_owner = ptl; *request = sendreq; @@ -124,7 +124,7 @@ int mca_ptl_tcp_request_alloc(struct mca_ptl_t* ptl, struct mca_ptl_base_send_re void mca_ptl_tcp_request_return(struct mca_ptl_t* ptl, struct mca_ptl_base_send_request_t* request) { /* OBJ_DESTRUCT(&request->req_convertor); */ - LAM_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_send_requests, (lam_list_item_t*)request); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_send_requests, (ompi_list_item_t*)request); } @@ -133,19 +133,19 @@ void mca_ptl_tcp_recv_frag_return(struct mca_ptl_t* ptl, struct mca_ptl_tcp_recv if(frag->super.frag_is_buffered) free(frag->super.super.frag_addr); /* OBJ_DESTRUCT(&frag->super.super.frag_convertor); */ - LAM_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_recv_frags, (lam_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_recv_frags, (ompi_list_item_t*)frag); } void mca_ptl_tcp_send_frag_return(struct mca_ptl_t* ptl, struct mca_ptl_tcp_send_frag_t* frag) { - if(lam_list_get_size(&mca_ptl_tcp_module.tcp_pending_acks)) { + if(ompi_list_get_size(&mca_ptl_tcp_module.tcp_pending_acks)) { mca_ptl_tcp_recv_frag_t* pending; THREAD_LOCK(&mca_ptl_tcp_module.tcp_lock); - pending = (mca_ptl_tcp_recv_frag_t*)lam_list_remove_first(&mca_ptl_tcp_module.tcp_pending_acks); + pending = (mca_ptl_tcp_recv_frag_t*)ompi_list_remove_first(&mca_ptl_tcp_module.tcp_pending_acks); if(NULL == pending) { THREAD_UNLOCK(&mca_ptl_tcp_module.tcp_lock); - LAM_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_send_frags, (lam_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_send_frags, (ompi_list_item_t*)frag); return; } THREAD_UNLOCK(&mca_ptl_tcp_module.tcp_lock); @@ -153,7 +153,7 @@ void mca_ptl_tcp_send_frag_return(struct mca_ptl_t* ptl, struct mca_ptl_tcp_send mca_ptl_tcp_peer_send(pending->super.super.frag_peer, frag); mca_ptl_tcp_recv_frag_return(ptl, pending); } else { - LAM_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_send_frags, (lam_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_module.tcp_send_frags, (ompi_list_item_t*)frag); } } @@ -177,13 +177,13 @@ int mca_ptl_tcp_send( if (offset == 0) { sendfrag = &((mca_ptl_tcp_send_request_t*)sendreq)->req_frag; } else { - lam_list_item_t* item; - LAM_FREE_LIST_GET(&mca_ptl_tcp_module.tcp_send_frags, item, rc); + ompi_list_item_t* item; + OMPI_FREE_LIST_GET(&mca_ptl_tcp_module.tcp_send_frags, item, rc); if(NULL == (sendfrag = (mca_ptl_tcp_send_frag_t*)item)) return rc; } rc = mca_ptl_tcp_send_frag_init(sendfrag, ptl_peer, sendreq, offset, &size, flags); - if(rc != LAM_SUCCESS) + if(rc != OMPI_SUCCESS) return rc; /* must update the offset after actual fragment size is determined -- and very important -- * before attempting to send the fragment @@ -208,14 +208,14 @@ void mca_ptl_tcp_matched( int rc; mca_ptl_tcp_send_frag_t* ack; mca_ptl_tcp_recv_frag_t* recv_frag = (mca_ptl_tcp_recv_frag_t*)frag; - lam_list_item_t* item; + ompi_list_item_t* item; MCA_PTL_TCP_SEND_FRAG_ALLOC(item, rc); ack = (mca_ptl_tcp_send_frag_t*)item; if(NULL == ack) { THREAD_LOCK(&mca_ptl_tcp_module.tcp_lock); recv_frag->frag_ack_pending = true; - lam_list_append(&mca_ptl_tcp_module.tcp_pending_acks, (lam_list_item_t*)frag); + ompi_list_append(&mca_ptl_tcp_module.tcp_pending_acks, (ompi_list_item_t*)frag); THREAD_UNLOCK(&mca_ptl_tcp_module.tcp_lock); } else { mca_ptl_tcp_send_frag_init_ack(ack, ptl, recv_frag->super.super.frag_peer, recv_frag); diff --git a/src/mca/ptl/tcp/src/ptl_tcp.h b/src/mca/ptl/tcp/src/ptl_tcp.h index 1c55663994..79d1713599 100644 --- a/src/mca/ptl/tcp/src/ptl_tcp.h +++ b/src/mca/ptl/tcp/src/ptl_tcp.h @@ -34,15 +34,15 @@ struct mca_ptl_tcp_module_1_0_0_t { int tcp_free_list_inc; /**< number of elements to alloc when growing free lists */ int tcp_sndbuf; /**< socket sndbuf size */ int tcp_rcvbuf; /**< socket rcvbuf size */ - lam_free_list_t tcp_send_requests; /**< free list of tcp send requests -- sendreq + sendfrag */ - lam_free_list_t tcp_send_frags; /**< free list of tcp send fragments */ - lam_free_list_t tcp_recv_frags; /**< free list of tcp recv fragments */ - lam_list_t tcp_procs; /**< list of tcp proc structures */ - lam_list_t tcp_pending_acks; /**< list of pending acks - retry as sends complete */ + ompi_free_list_t tcp_send_requests; /**< free list of tcp send requests -- sendreq + sendfrag */ + ompi_free_list_t tcp_send_frags; /**< free list of tcp send fragments */ + ompi_free_list_t tcp_recv_frags; /**< free list of tcp recv fragments */ + ompi_list_t tcp_procs; /**< list of tcp proc structures */ + ompi_list_t tcp_pending_acks; /**< list of pending acks - retry as sends complete */ struct mca_ptl_tcp_proc_t* tcp_local; /**< the tcp proc instance corresponding to the local process */ - lam_event_t tcp_send_event; /**< event structure for sends */ - lam_event_t tcp_recv_event; /**< event structure for recvs */ - lam_mutex_t tcp_lock; /**< lock for accessing module state */ + ompi_event_t tcp_send_event; /**< event structure for sends */ + ompi_event_t tcp_recv_event; /**< event structure for recvs */ + ompi_mutex_t tcp_lock; /**< lock for accessing module state */ }; typedef struct mca_ptl_tcp_module_1_0_0_t mca_ptl_tcp_module_1_0_0_t; typedef struct mca_ptl_tcp_module_1_0_0_t mca_ptl_tcp_module_t; @@ -119,7 +119,7 @@ extern mca_ptl_tcp_t mca_ptl_tcp; * Cleanup any resources held by the PTL. * * @param ptl PTL instance. - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. */ extern int mca_ptl_tcp_finalize( @@ -135,16 +135,16 @@ extern int mca_ptl_tcp_finalize( * @param procs (IN) Set of processes * @param peers (OUT) Set of (optional) peer addressing info. * @param peers (IN/OUT) Set of processes that are reachable via this PTL. - * @return LAM_SUCCESS or error status on failure. + * @return OMPI_SUCCESS or error status on failure. * */ extern int mca_ptl_tcp_add_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **procs, + struct ompi_proc_t **procs, struct mca_ptl_base_peer_t** peers, - lam_bitmap_t* reachable + ompi_bitmap_t* reachable ); @@ -161,7 +161,7 @@ extern int mca_ptl_tcp_add_procs( extern int mca_ptl_tcp_del_procs( struct mca_ptl_t* ptl, size_t nprocs, - struct lam_proc_t **procs, + struct ompi_proc_t **procs, struct mca_ptl_base_peer_t** peers ); @@ -210,7 +210,7 @@ extern void mca_ptl_tcp_matched( * @param send_request (IN/OUT) Send request (allocated by PML via mca_ptl_base_request_alloc_fn_t) * @param size (IN) Number of bytes PML is requesting PTL to deliver * @param flags (IN) Flags that should be passed to the peer via the message header. - * @param request (OUT) LAM_SUCCESS if the PTL was able to queue one or more fragments + * @param request (OUT) OMPI_SUCCESS if the PTL was able to queue one or more fragments */ extern int mca_ptl_tcp_send( struct mca_ptl_t* ptl, diff --git a/src/mca/ptl/tcp/src/ptl_tcp_module.c b/src/mca/ptl/tcp/src/ptl_tcp_module.c index e14f548052..0fab8563a3 100644 --- a/src/mca/ptl/tcp/src/ptl_tcp_module.c +++ b/src/mca/ptl/tcp/src/ptl_tcp_module.c @@ -105,12 +105,12 @@ int mca_ptl_tcp_module_open(void) mca_ptl_tcp_module.tcp_num_ptls = 0; /* initialize objects */ - OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_lock, lam_mutex_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_procs, lam_list_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_pending_acks, lam_list_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_send_requests, lam_free_list_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_send_frags, lam_free_list_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_recv_frags, lam_free_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_lock, ompi_mutex_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_procs, ompi_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_pending_acks, ompi_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_send_requests, ompi_free_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_send_frags, ompi_free_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_module.tcp_recv_frags, ompi_free_list_t); /* register TCP module parameters */ mca_ptl_tcp_module.tcp_if_include = @@ -136,7 +136,7 @@ int mca_ptl_tcp_module_open(void) mca_ptl_tcp.super.ptl_max_frag_size = mca_ptl_tcp_param_register_int("max_frag_size", -1); - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* @@ -146,22 +146,22 @@ int mca_ptl_tcp_module_open(void) int mca_ptl_tcp_module_close(void) { if (mca_ptl_tcp_module.tcp_send_requests.fl_num_allocated != - mca_ptl_tcp_module.tcp_send_requests.super.lam_list_length) { - lam_output(0, "tcp send requests: %d allocated %d returned\n", + mca_ptl_tcp_module.tcp_send_requests.super.ompi_list_length) { + ompi_output(0, "tcp send requests: %d allocated %d returned\n", mca_ptl_tcp_module.tcp_send_requests.fl_num_allocated, - mca_ptl_tcp_module.tcp_send_requests.super.lam_list_length); + mca_ptl_tcp_module.tcp_send_requests.super.ompi_list_length); } if (mca_ptl_tcp_module.tcp_send_frags.fl_num_allocated != - mca_ptl_tcp_module.tcp_send_frags.super.lam_list_length) { - lam_output(0, "tcp send frags: %d allocated %d returned\n", + mca_ptl_tcp_module.tcp_send_frags.super.ompi_list_length) { + ompi_output(0, "tcp send frags: %d allocated %d returned\n", mca_ptl_tcp_module.tcp_send_frags.fl_num_allocated, - mca_ptl_tcp_module.tcp_send_frags.super.lam_list_length); + mca_ptl_tcp_module.tcp_send_frags.super.ompi_list_length); } if (mca_ptl_tcp_module.tcp_recv_frags.fl_num_allocated != - mca_ptl_tcp_module.tcp_recv_frags.super.lam_list_length) { - lam_output(0, "tcp recv frags: %d allocated %d returned\n", + mca_ptl_tcp_module.tcp_recv_frags.super.ompi_list_length) { + ompi_output(0, "tcp recv frags: %d allocated %d returned\n", mca_ptl_tcp_module.tcp_recv_frags.fl_num_allocated, - mca_ptl_tcp_module.tcp_recv_frags.super.lam_list_length); + mca_ptl_tcp_module.tcp_recv_frags.super.ompi_list_length); } free(mca_ptl_tcp_module.tcp_if_include); @@ -174,7 +174,7 @@ int mca_ptl_tcp_module_close(void) OBJ_DESTRUCT(&mca_ptl_tcp_module.tcp_send_frags); OBJ_DESTRUCT(&mca_ptl_tcp_module.tcp_recv_frags); OBJ_DESTRUCT(&mca_ptl_tcp_module.tcp_lock); - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -187,7 +187,7 @@ static int mca_ptl_tcp_create(int if_index, const char* if_name) mca_ptl_tcp_t* ptl = malloc(sizeof(mca_ptl_tcp_t)); char param[256]; if(NULL == ptl) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; memcpy(ptl, &mca_ptl_tcp, sizeof(mca_ptl_tcp)); mca_ptl_tcp_module.tcp_ptls[mca_ptl_tcp_module.tcp_num_ptls++] = ptl; @@ -198,8 +198,8 @@ static int mca_ptl_tcp_create(int if_index, const char* if_name) ptl->ptl_bytes_sent = 0; ptl->ptl_send_handler = 0; #endif - lam_ifindextoaddr(if_index, (struct sockaddr*)&ptl->ptl_ifaddr, sizeof(ptl->ptl_ifaddr)); - lam_ifindextomask(if_index, (struct sockaddr*)&ptl->ptl_ifmask, sizeof(ptl->ptl_ifmask)); + ompi_ifindextoaddr(if_index, (struct sockaddr*)&ptl->ptl_ifaddr, sizeof(ptl->ptl_ifaddr)); + ompi_ifindextomask(if_index, (struct sockaddr*)&ptl->ptl_ifmask, sizeof(ptl->ptl_ifmask)); /* allow user to specify interface bandwidth */ sprintf(param, "bandwidth_%s", if_name); @@ -209,11 +209,11 @@ static int mca_ptl_tcp_create(int if_index, const char* if_name) sprintf(param, "latency_%s", if_name); ptl->super.ptl_latency = mca_ptl_tcp_param_register_int(param, 0); -#if LAM_ENABLE_DEBUG - lam_output(0,"interface: %s bandwidth %d latency %d\n", +#if OMPI_ENABLE_DEBUG + ompi_output(0,"interface: %s bandwidth %d latency %d\n", if_name, ptl->super.ptl_bandwidth, ptl->super.ptl_latency); #endif - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* @@ -225,44 +225,44 @@ static int mca_ptl_tcp_create(int if_index, const char* if_name) static int mca_ptl_tcp_module_create_instances(void) { - int if_count = lam_ifcount(); + int if_count = ompi_ifcount(); int if_index; char **include; char **exclude; char **argv; if(if_count <= 0) - return LAM_ERROR; + return OMPI_ERROR; /* allocate memory for ptls */ mca_ptl_tcp_module.tcp_max_ptls = if_count; mca_ptl_tcp_module.tcp_ptls = malloc(if_count * sizeof(mca_ptl_tcp_t*)); if(NULL == mca_ptl_tcp_module.tcp_ptls) - return LAM_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; /* if the user specified an interface list - use these exclusively */ - argv = include = lam_argv_split(mca_ptl_tcp_module.tcp_if_include,','); + argv = include = ompi_argv_split(mca_ptl_tcp_module.tcp_if_include,','); while(argv && *argv) { char* if_name = *argv; - int if_index = lam_ifnametoindex(if_name); + int if_index = ompi_ifnametoindex(if_name); if(if_index < 0) { - lam_output(0,"mca_ptl_tcp_module_init: invalid interface \"%s\"", if_name); + ompi_output(0,"mca_ptl_tcp_module_init: invalid interface \"%s\"", if_name); } else { mca_ptl_tcp_create(if_index, if_name); } argv++; } - lam_argv_free(include); + ompi_argv_free(include); if(mca_ptl_tcp_module.tcp_num_ptls) - return LAM_SUCCESS; + return OMPI_SUCCESS; /* if the interface list was not specified by the user, create * a PTL for each interface that was not excluded. */ - exclude = lam_argv_split(mca_ptl_tcp_module.tcp_if_exclude,','); - for(if_index = lam_ifbegin(); if_index >= 0; if_index = lam_ifnext(if_index)) { + exclude = ompi_argv_split(mca_ptl_tcp_module.tcp_if_exclude,','); + for(if_index = ompi_ifbegin(); if_index >= 0; if_index = ompi_ifnext(if_index)) { char if_name[32]; - lam_ifindextoname(if_index, if_name, sizeof(if_name)); + ompi_ifindextoname(if_index, if_name, sizeof(if_name)); /* check to see if this interface exists in the exclude list */ argv = exclude; @@ -276,8 +276,8 @@ static int mca_ptl_tcp_module_create_instances(void) mca_ptl_tcp_create(if_index, if_name); } } - lam_argv_free(exclude); - return LAM_SUCCESS; + ompi_argv_free(exclude); + return OMPI_SUCCESS; } /* @@ -288,13 +288,13 @@ static int mca_ptl_tcp_module_create_listen(void) { int flags; struct sockaddr_in inaddr; - lam_socklen_t addrlen; + ompi_socklen_t addrlen; /* create a listen socket for incoming connections */ mca_ptl_tcp_module.tcp_listen_sd = socket(AF_INET, SOCK_STREAM, 0); if(mca_ptl_tcp_module.tcp_listen_sd < 0) { - lam_output(0,"mca_ptl_tcp_module_init: socket() failed with errno=%d", errno); - return LAM_ERROR; + ompi_output(0,"mca_ptl_tcp_module_init: socket() failed with errno=%d", errno); + return OMPI_ERROR; } mca_ptl_tcp_set_socket_options(mca_ptl_tcp_module.tcp_listen_sd); @@ -305,44 +305,44 @@ static int mca_ptl_tcp_module_create_listen(void) inaddr.sin_port = 0; if(bind(mca_ptl_tcp_module.tcp_listen_sd, (struct sockaddr*)&inaddr, sizeof(inaddr)) < 0) { - lam_output(0,"mca_ptl_tcp_module_init: bind() failed with errno=%d", errno); - return LAM_ERROR; + ompi_output(0,"mca_ptl_tcp_module_init: bind() failed with errno=%d", errno); + return OMPI_ERROR; } /* resolve system assignend port */ addrlen = sizeof(struct sockaddr_in); if(getsockname(mca_ptl_tcp_module.tcp_listen_sd, (struct sockaddr*)&inaddr, &addrlen) < 0) { - lam_output(0, "mca_ptl_tcp_module_init: getsockname() failed with errno=%d", errno); - return LAM_ERROR; + ompi_output(0, "mca_ptl_tcp_module_init: getsockname() failed with errno=%d", errno); + return OMPI_ERROR; } mca_ptl_tcp_module.tcp_listen_port = inaddr.sin_port; /* setup listen backlog to maximum allowed by kernel */ if(listen(mca_ptl_tcp_module.tcp_listen_sd, SOMAXCONN) < 0) { - lam_output(0, "mca_ptl_tcp_module_init: listen() failed with errno=%d", errno); - return LAM_ERROR; + ompi_output(0, "mca_ptl_tcp_module_init: listen() failed with errno=%d", errno); + return OMPI_ERROR; } /* set socket up to be non-blocking, otherwise accept could block */ if((flags = fcntl(mca_ptl_tcp_module.tcp_listen_sd, F_GETFL, 0)) < 0) { - lam_output(0, "mca_ptl_tcp_module_init: fcntl(F_GETFL) failed with errno=%d", errno); - return LAM_ERROR; + ompi_output(0, "mca_ptl_tcp_module_init: fcntl(F_GETFL) failed with errno=%d", errno); + return OMPI_ERROR; } else { flags |= O_NONBLOCK; if(fcntl(mca_ptl_tcp_module.tcp_listen_sd, F_SETFL, flags) < 0) { - lam_output(0, "mca_ptl_tcp_module_init: fcntl(F_SETFL) failed with errno=%d", errno); - return LAM_ERROR; + ompi_output(0, "mca_ptl_tcp_module_init: fcntl(F_SETFL) failed with errno=%d", errno); + return OMPI_ERROR; } } /* register listen port */ - lam_event_set( + ompi_event_set( &mca_ptl_tcp_module.tcp_recv_event, mca_ptl_tcp_module.tcp_listen_sd, - LAM_EV_READ|LAM_EV_PERSIST, + OMPI_EV_READ|OMPI_EV_PERSIST, mca_ptl_tcp_module_recv_handler, 0); - return LAM_SUCCESS; + return OMPI_SUCCESS; } /* @@ -383,19 +383,19 @@ mca_ptl_t** mca_ptl_tcp_module_init(int *num_ptls, *num_ptls = 0; *allow_multi_user_threads = true; - *have_hidden_threads = LAM_HAVE_THREADS; + *have_hidden_threads = OMPI_HAVE_THREADS; - /* need to set lam_using_threads() as lam_event_init() will spawn a thread if supported */ - if(LAM_HAVE_THREADS) - lam_set_using_threads(true); + /* need to set ompi_using_threads() as ompi_event_init() will spawn a thread if supported */ + if(OMPI_HAVE_THREADS) + ompi_set_using_threads(true); - if((rc = lam_event_init()) != LAM_SUCCESS) { - lam_output(0, "mca_ptl_tcp_module_init: unable to initialize event dispatch thread: %d\n", rc); + if((rc = ompi_event_init()) != OMPI_SUCCESS) { + ompi_output(0, "mca_ptl_tcp_module_init: unable to initialize event dispatch thread: %d\n", rc); return NULL; } /* initialize free lists */ - lam_free_list_init(&mca_ptl_tcp_module.tcp_send_requests, + ompi_free_list_init(&mca_ptl_tcp_module.tcp_send_requests, sizeof(mca_ptl_tcp_send_request_t), OBJ_CLASS(mca_ptl_tcp_send_request_t), mca_ptl_tcp_module.tcp_free_list_num, @@ -403,7 +403,7 @@ mca_ptl_t** mca_ptl_tcp_module_init(int *num_ptls, mca_ptl_tcp_module.tcp_free_list_inc, NULL); /* use default allocator */ - lam_free_list_init(&mca_ptl_tcp_module.tcp_send_frags, + ompi_free_list_init(&mca_ptl_tcp_module.tcp_send_frags, sizeof(mca_ptl_tcp_send_frag_t), OBJ_CLASS(mca_ptl_tcp_send_frag_t), mca_ptl_tcp_module.tcp_free_list_num, @@ -411,7 +411,7 @@ mca_ptl_t** mca_ptl_tcp_module_init(int *num_ptls, mca_ptl_tcp_module.tcp_free_list_inc, NULL); /* use default allocator */ - lam_free_list_init(&mca_ptl_tcp_module.tcp_recv_frags, + ompi_free_list_init(&mca_ptl_tcp_module.tcp_recv_frags, sizeof(mca_ptl_tcp_recv_frag_t), OBJ_CLASS(mca_ptl_tcp_recv_frag_t), mca_ptl_tcp_module.tcp_free_list_num, @@ -420,15 +420,15 @@ mca_ptl_t** mca_ptl_tcp_module_init(int *num_ptls, NULL); /* use default allocator */ /* create a PTL TCP module for selected interfaces */ - if(mca_ptl_tcp_module_create_instances() != LAM_SUCCESS) + if(mca_ptl_tcp_module_create_instances() != OMPI_SUCCESS) return 0; /* create a TCP listen socket for incoming connection attempts */ - if(mca_ptl_tcp_module_create_listen() != LAM_SUCCESS) + if(mca_ptl_tcp_module_create_listen() != OMPI_SUCCESS) return 0; /* publish TCP parameters with the MCA framework */ - if(mca_ptl_tcp_module_exchange() != LAM_SUCCESS) + if(mca_ptl_tcp_module_exchange() != OMPI_SUCCESS) return 0; ptls = malloc(mca_ptl_tcp_module.tcp_num_ptls * sizeof(mca_ptl_t*)); @@ -449,14 +449,14 @@ int mca_ptl_tcp_module_control(int param, void* value, size_t size) switch(param) { case MCA_PTL_ENABLE: if(*(int*)value) - lam_event_add(&mca_ptl_tcp_module.tcp_recv_event, 0); + ompi_event_add(&mca_ptl_tcp_module.tcp_recv_event, 0); else - lam_event_del(&mca_ptl_tcp_module.tcp_recv_event); + ompi_event_del(&mca_ptl_tcp_module.tcp_recv_event); break; default: break; } - return LAM_SUCCESS; + return OMPI_SUCCESS; } @@ -466,8 +466,8 @@ int mca_ptl_tcp_module_control(int param, void* value, size_t size) int mca_ptl_tcp_module_progress(mca_ptl_tstamp_t tstamp) { - lam_event_loop(LAM_EVLOOP_ONCE); - return LAM_SUCCESS; + ompi_event_loop(OMPI_EVLOOP_ONCE); + return OMPI_SUCCESS; } @@ -480,23 +480,23 @@ int mca_ptl_tcp_module_progress(mca_ptl_tstamp_t tstamp) static void mca_ptl_tcp_module_accept(void) { while(true) { - lam_socklen_t addrlen = sizeof(struct sockaddr_in); + ompi_socklen_t addrlen = sizeof(struct sockaddr_in); struct sockaddr_in addr; - lam_event_t* event; + ompi_event_t* event; int sd = accept(mca_ptl_tcp_module.tcp_listen_sd, (struct sockaddr*)&addr, &addrlen); if(sd < 0) { if(errno == EINTR) continue; if(errno != EAGAIN || errno != EWOULDBLOCK) - lam_output(0, "mca_ptl_tcp_module_accept: accept() failed with errno %d.", errno); + ompi_output(0, "mca_ptl_tcp_module_accept: accept() failed with errno %d.", errno); return; } mca_ptl_tcp_set_socket_options(sd); /* wait for receipt of peers process identifier to complete this connection */ - event = malloc(sizeof(lam_event_t)); - lam_event_set(event, sd, LAM_EV_READ|LAM_EV_PERSIST, mca_ptl_tcp_module_recv_handler, event); - lam_event_add(event, 0); + event = malloc(sizeof(ompi_event_t)); + ompi_event_set(event, sd, OMPI_EV_READ|OMPI_EV_PERSIST, mca_ptl_tcp_module_recv_handler, event); + ompi_event_add(event, 0); } } @@ -512,14 +512,14 @@ static void mca_ptl_tcp_module_recv_handler(int sd, short flags, void* user) struct sockaddr_in addr; int retval; mca_ptl_tcp_proc_t* ptl_proc; - lam_socklen_t addr_len = sizeof(addr); + ompi_socklen_t addr_len = sizeof(addr); /* accept new connections on the listen socket */ if(mca_ptl_tcp_module.tcp_listen_sd == sd) { mca_ptl_tcp_module_accept(); return; } - lam_event_del((lam_event_t*)user); + ompi_event_del((ompi_event_t*)user); free(user); /* recv the size of the process identifier */ @@ -529,7 +529,7 @@ static void mca_ptl_tcp_module_recv_handler(int sd, short flags, void* user) return; } if(retval != sizeof(size)) { - lam_output(0, "mca_ptl_tcp_module_recv_handler: recv() return value %d != %d, errno = %d", + ompi_output(0, "mca_ptl_tcp_module_recv_handler: recv() return value %d != %d, errno = %d", retval, sizeof(size), errno); close(sd); return; @@ -544,7 +544,7 @@ static void mca_ptl_tcp_module_recv_handler(int sd, short flags, void* user) } retval = recv(sd, guid, size, 0); if(retval != size) { - lam_output(0, "mca_ptl_tcp_module_recv_handler: recv() return value %d != %d, errno = %d", + ompi_output(0, "mca_ptl_tcp_module_recv_handler: recv() return value %d != %d, errno = %d", retval, sizeof(size), errno); close(sd); return; @@ -552,25 +552,25 @@ static void mca_ptl_tcp_module_recv_handler(int sd, short flags, void* user) /* now set socket up to be non-blocking */ if((flags = fcntl(sd, F_GETFL, 0)) < 0) { - lam_output(0, "mca_ptl_tcp_module_recv_handler: fcntl(F_GETFL) failed with errno=%d", errno); + ompi_output(0, "mca_ptl_tcp_module_recv_handler: fcntl(F_GETFL) failed with errno=%d", errno); } else { flags |= O_NONBLOCK; if(fcntl(sd, F_SETFL, flags) < 0) { - lam_output(0, "mca_ptl_tcp_module_recv_handler: fcntl(F_SETFL) failed with errno=%d", errno); + ompi_output(0, "mca_ptl_tcp_module_recv_handler: fcntl(F_SETFL) failed with errno=%d", errno); } } /* lookup the corresponding process */ ptl_proc = mca_ptl_tcp_proc_lookup(guid, size); if(NULL == ptl_proc) { - lam_output(0, "mca_ptl_tcp_module_recv_handler: unable to locate process"); + ompi_output(0, "mca_ptl_tcp_module_recv_handler: unable to locate process"); close(sd); return; } /* lookup peer address */ if(getpeername(sd, (struct sockaddr*)&addr, &addr_len) != 0) { - lam_output(0, "mca_ptl_tcp_module_recv_handler: getpeername() failed with errno=%d", errno); + ompi_output(0, "mca_ptl_tcp_module_recv_handler: getpeername() failed with errno=%d", errno); close(sd); return; } diff --git a/src/mca/ptl/tcp/src/ptl_tcp_peer.c b/src/mca/ptl/tcp/src/ptl_tcp_peer.c index fa33b06e10..3ba9e41ad8 100644 --- a/src/mca/ptl/tcp/src/ptl_tcp_peer.c +++ b/src/mca/ptl/tcp/src/ptl_tcp_peer.c @@ -28,11 +28,11 @@ static void mca_ptl_tcp_peer_send_handler(int sd, short flags, void* user); -lam_class_t mca_ptl_tcp_peer_t_class = { +ompi_class_t mca_ptl_tcp_peer_t_class = { "mca_tcp_ptl_peer_t", - OBJ_CLASS(lam_list_item_t), - (lam_construct_t)mca_ptl_tcp_peer_construct, - (lam_destruct_t)mca_ptl_tcp_peer_destruct + OBJ_CLASS(ompi_list_item_t), + (ompi_construct_t)mca_ptl_tcp_peer_construct, + (ompi_destruct_t)mca_ptl_tcp_peer_destruct }; /* @@ -51,9 +51,9 @@ static void mca_ptl_tcp_peer_construct(mca_ptl_base_peer_t* ptl_peer) ptl_peer->peer_recv_event.ev_flags = 0; ptl_peer->peer_state = MCA_PTL_TCP_CLOSED; ptl_peer->peer_retries = 0; - OBJ_CONSTRUCT(&ptl_peer->peer_frags, lam_list_t); - OBJ_CONSTRUCT(&ptl_peer->peer_send_lock, lam_mutex_t); - OBJ_CONSTRUCT(&ptl_peer->peer_recv_lock, lam_mutex_t); + OBJ_CONSTRUCT(&ptl_peer->peer_frags, ompi_list_t); + OBJ_CONSTRUCT(&ptl_peer->peer_send_lock, ompi_mutex_t); + OBJ_CONSTRUCT(&ptl_peer->peer_recv_lock, ompi_mutex_t); } @@ -68,8 +68,8 @@ static void mca_ptl_tcp_peer_dump(mca_ptl_base_peer_t* ptl_peer, const char* msg char buff[255]; int sndbuf,rcvbuf,nodelay,flags; struct sockaddr_in inaddr; - lam_socklen_t optlen; - lam_socklen_t addrlen = sizeof(struct sockaddr_in); + ompi_socklen_t optlen; + ompi_socklen_t addrlen = sizeof(struct sockaddr_in); getsockname(ptl_peer->peer_sd, (struct sockaddr*)&inaddr, &addrlen); sprintf(src, "%s", inet_ntoa(inaddr.sin_addr)); @@ -77,13 +77,13 @@ static void mca_ptl_tcp_peer_dump(mca_ptl_base_peer_t* ptl_peer, const char* msg sprintf(dst, "%s", inet_ntoa(inaddr.sin_addr)); if((flags = fcntl(ptl_peer->peer_sd, F_GETFL, 0)) < 0) { - lam_output(0, "mca_ptl_tcp_peer_connect: fcntl(F_GETFL) failed with errno=%d\n", errno); + ompi_output(0, "mca_ptl_tcp_peer_connect: fcntl(F_GETFL) failed with errno=%d\n", errno); } #if defined(SO_SNDBUF) optlen = sizeof(sndbuf); if(getsockopt(ptl_peer->peer_sd, SOL_SOCKET, SO_SNDBUF, (char *)&sndbuf, &optlen) < 0) { - lam_output(0, "mca_ptl_tcp_peer_dump: SO_SNDBUF option: errno %d\n", errno); + ompi_output(0, "mca_ptl_tcp_peer_dump: SO_SNDBUF option: errno %d\n", errno); } #else sndbuf = -1; @@ -91,7 +91,7 @@ static void mca_ptl_tcp_peer_dump(mca_ptl_base_peer_t* ptl_peer, const char* msg #if defined(SO_RCVBUF) optlen = sizeof(rcvbuf); if(getsockopt(ptl_peer->peer_sd, SOL_SOCKET, SO_RCVBUF, (char *)&rcvbuf, &optlen) < 0) { - lam_output(0, "mca_ptl_tcp_peer_dump: SO_RCVBUF option: errno %d\n", errno); + ompi_output(0, "mca_ptl_tcp_peer_dump: SO_RCVBUF option: errno %d\n", errno); } #else rcvbuf = -1; @@ -99,7 +99,7 @@ static void mca_ptl_tcp_peer_dump(mca_ptl_base_peer_t* ptl_peer, const char* msg #if defined(TCP_NODELAY) optlen = sizeof(nodelay); if(getsockopt(ptl_peer->peer_sd, IPPROTO_TCP, TCP_NODELAY, &nodelay, &optlen) < 0) { - lam_output(0, "mca_ptl_tcp_peer_dump: TCP_NODELAY option: errno %d\n", errno); + ompi_output(0, "mca_ptl_tcp_peer_dump: TCP_NODELAY option: errno %d\n", errno); } #else nodelay = 0; @@ -107,7 +107,7 @@ static void mca_ptl_tcp_peer_dump(mca_ptl_base_peer_t* ptl_peer, const char* msg sprintf(buff, "%s: %s - %s nodelay %d sndbuf %d rcvbuf %d flags %08x\n", msg, src, dst, nodelay, sndbuf, rcvbuf, flags); - lam_output(0, buff); + ompi_output(0, buff); } /* @@ -116,16 +116,16 @@ static void mca_ptl_tcp_peer_dump(mca_ptl_base_peer_t* ptl_peer, const char* msg static inline void mca_ptl_tcp_peer_event_init(mca_ptl_base_peer_t* ptl_peer, int sd) { - lam_event_set( + ompi_event_set( &ptl_peer->peer_recv_event, ptl_peer->peer_sd, - LAM_EV_READ|LAM_EV_PERSIST, + OMPI_EV_READ|OMPI_EV_PERSIST, mca_ptl_tcp_peer_recv_handler, ptl_peer); - lam_event_set( + ompi_event_set( &ptl_peer->peer_send_event, ptl_peer->peer_sd, - LAM_EV_WRITE|LAM_EV_PERSIST, + OMPI_EV_WRITE|OMPI_EV_PERSIST, mca_ptl_tcp_peer_send_handler, ptl_peer); } @@ -148,22 +148,22 @@ static void mca_ptl_tcp_peer_destruct(mca_ptl_base_peer_t* ptl_peer) int mca_ptl_tcp_peer_send(mca_ptl_base_peer_t* ptl_peer, mca_ptl_tcp_send_frag_t* frag) { - int rc = LAM_SUCCESS; + int rc = OMPI_SUCCESS; THREAD_LOCK(&ptl_peer->peer_send_lock); switch(ptl_peer->peer_state) { case MCA_PTL_TCP_CONNECTING: case MCA_PTL_TCP_CONNECT_ACK: case MCA_PTL_TCP_CLOSED: - lam_list_append(&ptl_peer->peer_frags, (lam_list_item_t*)frag); + ompi_list_append(&ptl_peer->peer_frags, (ompi_list_item_t*)frag); if(ptl_peer->peer_state == MCA_PTL_TCP_CLOSED) rc = mca_ptl_tcp_peer_start_connect(ptl_peer); break; case MCA_PTL_TCP_FAILED: - rc = LAM_ERR_UNREACH; + rc = OMPI_ERR_UNREACH; break; case MCA_PTL_TCP_CONNECTED: if (NULL != ptl_peer->peer_send_frag) { - lam_list_append(&ptl_peer->peer_frags, (lam_list_item_t*)frag); + ompi_list_append(&ptl_peer->peer_frags, (ompi_list_item_t*)frag); } else { if(mca_ptl_tcp_send_frag_handler(frag, ptl_peer->peer_sd)) { THREAD_UNLOCK(&ptl_peer->peer_send_lock); @@ -171,7 +171,7 @@ int mca_ptl_tcp_peer_send(mca_ptl_base_peer_t* ptl_peer, mca_ptl_tcp_send_frag_t return rc; } else { ptl_peer->peer_send_frag = fra