From 0917096d34762b93f13203bec928f9dd124e7bfa Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 30 Apr 2009 20:21:28 -0500 Subject: [svn-r16902] Description: Bring r16875:16901 from trunk to revise_chunks branch. Tested on: FreebSD/32 6.3 (duty) (h5committest not required for this branch) --- configure | 9 ++++++ configure.in | 13 ++++++++ hl/src/H5LTparse.c | 78 ++++++++++++++++++++++++++++-------------------- hl/src/H5LTparse.y | 27 ++++++++++++----- hl/test/test_lite.c | 14 +++++++++ release_docs/RELEASE.txt | 10 +++++++ 6 files changed, 111 insertions(+), 40 deletions(-) diff --git a/configure b/configure index b3a6c6e..dd447a5 100755 --- a/configure +++ b/configure @@ -48681,6 +48681,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then + for path in `echo $PATH | ${TR} ":" " "`; do + if test -x $path/aprun; then + RUNPARALLEL="aprun -q -n \$\${NPROCS:=3}" + break; + fi + done + fi + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpirun -np \$\${NPROCS:=3}" fi diff --git a/configure.in b/configure.in index 070f9ee..aee6bba 100644 --- a/configure.in +++ b/configure.in @@ -2468,6 +2468,19 @@ case "X-$enable_parallel" in fi dnl Set RUNPARALLEL to mpirun if not set yet. + dnl Check for building on Cray if RUNPARALLEL is not yet set by checking + dnl for 'aprun' command (which is the parallel job launcher, like mpirun). + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then + dnl Find the path where aprun is located. + for path in `echo $PATH | ${TR} ":" " "`; do + if test -x $path/aprun; then + RUNPARALLEL="aprun -q -n \$\${NPROCS:=3}" + break; + fi + done + fi + + dnl Set RUNPARALLEL to mpirun if not set yet. if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpirun -np \$\${NPROCS:=3}" fi diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index 6e5e08b..98dcbd5 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -14,11 +14,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file was generated by Yacc with the command "yacc -pH5LTyy -o H5LTparse.c -d H5LTparse.y" - * Do NOT modify it by hand. + * on jam. Do NOT modify it by hand. */ - #ifndef lint -static char const +static char const yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $"; #endif #include @@ -92,7 +91,7 @@ struct arr_info { }; /*stack for nested array type*/ struct arr_info arr_stack[STACK_SIZE]; -int asindex = -1; /*pointer to the top of array stack*/ +int asindex = -1; /*pointer to the top of array stack*/ hbool_t is_str_size = 0; /*flag to lexer for string size*/ hbool_t is_str_pad = 0; /*flag to lexer for string padding*/ @@ -100,7 +99,7 @@ H5T_pad_t str_pad; /*variable for string padding*/ H5T_cset_t str_cset; /*variable for string character set*/ hbool_t is_variable = 0; /*variable for variable-length string*/ size_t str_size; /*variable for string size*/ - + hid_t enum_id; /*type ID*/ hbool_t is_enum = 0; /*flag to lexer for enum type*/ hbool_t is_enum_memb = 0; /*flag to lexer for enum member*/ @@ -823,9 +822,9 @@ case 46: break; case 47: #line 156 "H5LTparse.y" -{ yyval.ival = cmpd_stack[csindex].id; +{ yyval.ival = cmpd_stack[csindex].id; cmpd_stack[csindex].id = 0; - cmpd_stack[csindex].first_memb = 1; + cmpd_stack[csindex].first_memb = 1; csindex--; } break; @@ -835,7 +834,7 @@ case 50: break; case 51: #line 167 "H5LTparse.y" -{ +{ size_t origin_size, new_size; hid_t dtype_id = cmpd_stack[csindex].id; @@ -849,7 +848,7 @@ case 51: cmpd_stack[csindex].first_memb = 0; } else { origin_size = H5Tget_size(dtype_id); - + if(yyvsp[-1].ival == 0) { new_size = origin_size + H5Tget_size(yyvsp[-6].ival); H5Tset_size(dtype_id, new_size); @@ -860,10 +859,10 @@ case 51: H5Tinsert(dtype_id, yyvsp[-3].sval, yyvsp[-1].ival, yyvsp[-6].ival); } } - + cmpd_stack[csindex].is_field = 0; H5Tclose(yyvsp[-6].ival); - + new_size = H5Tget_size(dtype_id); } break; @@ -887,7 +886,7 @@ case 56: break; case 57: #line 213 "H5LTparse.y" -{ +{ yyval.ival = H5Tarray_create2(yyvsp[-1].ival, arr_stack[asindex].ndims, arr_stack[asindex].dims); arr_stack[asindex].ndims = 0; asindex--; @@ -901,9 +900,9 @@ break; case 61: #line 224 "H5LTparse.y" { unsigned ndims = arr_stack[asindex].ndims; - arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival; + arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival; arr_stack[asindex].ndims++; - arr_stack[asindex].is_dim = 0; + arr_stack[asindex].is_dim = 0; } break; case 64: @@ -916,10 +915,10 @@ case 65: break; case 66: #line 241 "H5LTparse.y" -{ +{ size_t size = (size_t)yylval.ival; yyval.ival = H5Tcreate(H5T_OPAQUE, size); - is_opq_size = 0; + is_opq_size = 0; } break; case 67: @@ -928,7 +927,7 @@ case 67: break; case 68: #line 247 "H5LTparse.y" -{ +{ H5Tset_tag(yyvsp[-6].ival, yylval.sval); is_opq_tag = 0; } @@ -943,12 +942,12 @@ case 72: break; case 73: #line 260 "H5LTparse.y" -{ +{ if(yyvsp[-1].ival == H5T_VARIABLE_TOKEN) is_variable = 1; - else + else str_size = yylval.ival; - is_str_size = 0; + is_str_size = 0; } break; case 74: @@ -964,7 +963,7 @@ case 74: break; case 75: #line 277 "H5LTparse.y" -{ +{ if(yyvsp[-1].ival == H5T_CSET_ASCII_TOKEN) str_cset = H5T_CSET_ASCII; else if(yyvsp[-1].ival == H5T_CSET_UTF8_TOKEN) @@ -982,7 +981,7 @@ case 76: break; case 77: #line 291 "H5LTparse.y" -{ +{ hid_t str_id = yyvsp[-1].ival; /*set string size*/ @@ -991,12 +990,12 @@ case 77: is_variable = 0; } else H5Tset_size(str_id, str_size); - + /*set string padding and character set*/ H5Tset_strpad(str_id, str_pad); H5Tset_cset(str_id, str_cset); - yyval.ival = str_id; + yyval.ival = str_id; } break; case 78: @@ -1043,7 +1042,7 @@ case 91: #line 330 "H5LTparse.y" { is_enum_memb = 1; /*indicate member of enum*/ - enum_memb_symbol = strdup(yylval.sval); + enum_memb_symbol = strdup(yylval.sval); } break; case 92: @@ -1056,21 +1055,34 @@ case 92: long long llong_val=(long long)yylval.ival; hid_t super = H5Tget_super(enum_id); hid_t native = H5Tget_native_type(super, H5T_DIR_ASCEND); - + H5T_order_t super_order = H5Tget_order(super); + H5T_order_t native_order = H5Tget_order(native); + if(is_enum && is_enum_memb) { /*if it's an enum member*/ /*To handle machines of different endianness*/ - if(H5Tequal(native, H5T_NATIVE_SCHAR) || H5Tequal(native, H5T_NATIVE_UCHAR)) + if(H5Tequal(native, H5T_NATIVE_SCHAR) || H5Tequal(native, H5T_NATIVE_UCHAR)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &char_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &char_val); - else if(H5Tequal(native, H5T_NATIVE_SHORT) || H5Tequal(native, H5T_NATIVE_USHORT)) + } else if(H5Tequal(native, H5T_NATIVE_SHORT) || H5Tequal(native, H5T_NATIVE_USHORT)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &short_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &short_val); - else if(H5Tequal(native, H5T_NATIVE_INT) || H5Tequal(native, H5T_NATIVE_UINT)) + } else if(H5Tequal(native, H5T_NATIVE_INT) || H5Tequal(native, H5T_NATIVE_UINT)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &int_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &int_val); - else if(H5Tequal(native, H5T_NATIVE_LONG) || H5Tequal(native, H5T_NATIVE_ULONG)) + } else if(H5Tequal(native, H5T_NATIVE_LONG) || H5Tequal(native, H5T_NATIVE_ULONG)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &long_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &long_val); - else if(H5Tequal(native, H5T_NATIVE_LLONG) || H5Tequal(native, H5T_NATIVE_ULLONG)) + } else if(H5Tequal(native, H5T_NATIVE_LLONG) || H5Tequal(native, H5T_NATIVE_ULLONG)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &llong_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &llong_val); + } - is_enum_memb = 0; + is_enum_memb = 0; if(enum_memb_symbol) free(enum_memb_symbol); } @@ -1078,7 +1090,7 @@ case 92: H5Tclose(native); } break; -#line 1063 "H5LTparse.c" +#line 1076 "H5LTparse.c" } yyssp -= yym; yystate = *yyssp; diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y index 7866add..a021efc 100644 --- a/hl/src/H5LTparse.y +++ b/hl/src/H5LTparse.y @@ -337,22 +337,35 @@ enum_def : '"' enum_symbol '"' { short short_val=(short)yylval.ival; int int_val=(int)yylval.ival; long long_val=(long)yylval.ival; - long_long llong_val=(long_long)yylval.ival; + long long llong_val=(long long)yylval.ival; hid_t super = H5Tget_super(enum_id); hid_t native = H5Tget_native_type(super, H5T_DIR_ASCEND); - + H5T_order_t super_order = H5Tget_order(super); + H5T_order_t native_order = H5Tget_order(native); + if(is_enum && is_enum_memb) { /*if it's an enum member*/ /*To handle machines of different endianness*/ - if(H5Tequal(native, H5T_NATIVE_SCHAR) || H5Tequal(native, H5T_NATIVE_UCHAR)) + if(H5Tequal(native, H5T_NATIVE_SCHAR) || H5Tequal(native, H5T_NATIVE_UCHAR)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &char_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &char_val); - else if(H5Tequal(native, H5T_NATIVE_SHORT) || H5Tequal(native, H5T_NATIVE_USHORT)) + } else if(H5Tequal(native, H5T_NATIVE_SHORT) || H5Tequal(native, H5T_NATIVE_USHORT)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &short_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &short_val); - else if(H5Tequal(native, H5T_NATIVE_INT) || H5Tequal(native, H5T_NATIVE_UINT)) + } else if(H5Tequal(native, H5T_NATIVE_INT) || H5Tequal(native, H5T_NATIVE_UINT)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &int_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &int_val); - else if(H5Tequal(native, H5T_NATIVE_LONG) || H5Tequal(native, H5T_NATIVE_ULONG)) + } else if(H5Tequal(native, H5T_NATIVE_LONG) || H5Tequal(native, H5T_NATIVE_ULONG)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &long_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &long_val); - else if(H5Tequal(native, H5T_NATIVE_LLONG) || H5Tequal(native, H5T_NATIVE_ULLONG)) + } else if(H5Tequal(native, H5T_NATIVE_LLONG) || H5Tequal(native, H5T_NATIVE_ULLONG)) { + if(super_order != native_order) + H5Tconvert(native, super, 1, &llong_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &llong_val); + } is_enum_memb = 0; if(enum_memb_symbol) free(enum_memb_symbol); diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 8c9fb30..ad12fb2 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1291,6 +1291,7 @@ static int test_enums(void) H5T_class_t type_class; char* dt_str; size_t str_len; + H5T_order_t native_order = H5Tget_order(H5T_NATIVE_INT); TESTING3(" text for enum types"); @@ -1302,6 +1303,12 @@ static int test_enums(void) if(type_class != H5T_ENUM) goto out; + /* Convert the variable before using it */ + if(!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) { + if(H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value1, NULL, H5P_DEFAULT) < 0) + goto out; + } + if(H5Tenum_nameof(dtype, &value1, name1, size)<0) goto out; if(strcmp(name1, "BLUE")) @@ -1309,6 +1316,13 @@ static int test_enums(void) if(H5Tenum_valueof(dtype, name2, &value2)<0) goto out; + + /* Convert the variable before comparing it */ + if(!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) { + if(H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value2, NULL, H5P_DEFAULT) < 0) + goto out; + } + if(value2 != 8) goto out; diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 9ebaf0e..cb6ab32 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -80,6 +80,11 @@ New Features Parallel Library: ----------------- + - Modified parallel tests to run with arbitrary number of processes. The + modified tests are testphdf5 (parallel dataset access), t_chunk_alloc + (chunk allocation), and t_posix_compliant (posix compliance). The rest of + the parallel tests already use in the code the number of processes + available in the communicator. (CMC - 2009/04/28) Fortran Library: ---------------- @@ -529,6 +534,11 @@ SuSe Linux 2.6.5 Known Problems ============== +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. (CMC - 2009/04/28) + * We discovered two problems when running collective IO parallel HDF5 tests with chunking storage on ChaMPIon MPI compiler on tungsten, a linux cluster at NCSA. -- cgit v0.12