1
1

Fix the Panasas support in ROMIO so it builds without complaints. Required a patch from Brian, plus a few edits by me to remove warnings.

NOTE: the code provided by PANASAS includes a "switch" that they left incomplete - it doesn't cover all possibilities. Since the value being switched is an enum, this causes problems for the compiler. I added the missing values, but - since Panasas felt they could be ignored - had the switch generate an error if those cases ever occurred.

This commit was SVN r17543.
Этот коммит содержится в:
Ralph Castain 2008-02-21 20:35:34 +00:00
родитель fe51084d8e
Коммит b4ec81a9fd
2 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -6,13 +6,13 @@
* See COPYRIGHT notice in top-level directory.
*/
#include "opal/mca/base/mca_base_param.h"
#include "ad_panfs.h"
#include <pan_fs_client_cw_mode.h>
#include "opal/mca/base/mca_base_param.h"
void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
{
static char myname[] = "ADIOI_PANFS_SETINFO";
/* static char myname[] = "ADIOI_PANFS_SETINFO"; */
char* value;
int flag, tmp_val = -1;
unsigned long int concurrent_write = 0;
@ -48,7 +48,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
concurrent_write = strtoul(value,NULL,10);
tmp_val = concurrent_write;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != concurrent_write) {
if (tmp_val != (int)concurrent_write) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_concurrent_write\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
@ -67,7 +67,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
layout_type = strtoul(value,NULL,10);
tmp_val = layout_type;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != layout_type) {
if (tmp_val != (int)layout_type) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_type\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
@ -80,7 +80,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
layout_stripe_unit = strtoul(value,NULL,10);
tmp_val = layout_stripe_unit;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != layout_stripe_unit) {
if (tmp_val != (int)layout_stripe_unit) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_stripe_unit\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
@ -93,7 +93,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
layout_parity_stripe_width = strtoul(value,NULL,10);
tmp_val = layout_parity_stripe_width;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != layout_parity_stripe_width) {
if (tmp_val != (int)layout_parity_stripe_width) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_parity_stripe_width\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
@ -106,7 +106,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
layout_parity_stripe_depth = strtoul(value,NULL,10);
tmp_val = layout_parity_stripe_depth;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != layout_parity_stripe_depth) {
if (tmp_val != (int)layout_parity_stripe_depth) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_parity_stripe_depth\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
@ -119,7 +119,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
layout_total_num_comps = strtoul(value,NULL,10);
tmp_val = layout_total_num_comps;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != layout_total_num_comps) {
if (tmp_val != (int)layout_total_num_comps) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_total_num_comps\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
@ -132,7 +132,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
layout_visit_policy = strtoul(value,NULL,10);
tmp_val = layout_visit_policy;
MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
if (tmp_val != layout_visit_policy) {
if (tmp_val != (int)layout_visit_policy) {
FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_visit_policy\" must be the same on all processes\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}

Просмотреть файл

@ -133,7 +133,8 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code)
char* slash;
struct stat stat_buf;
int err;
char *value, *path, *file_name_ptr;
/* char *value, *path, *file_name_ptr; */
char *path;
/* Check that the file does not exist before
* trying to create it. The ioctl itself should
@ -279,6 +280,11 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code)
ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.layout_visit_policy);
MPI_Info_set(fd->info, "panfs_layout_visit_policy", temp_buffer);
break;
case PAN_FS_CLIENT_LAYOUT_TYPE__INVALID:
case PAN_FS_CLIENT_LAYOUT_TYPE__DEFAULT:
case PAN_FS_CLIENT_LAYOUT_TYPE__RAID10:
MPI_Info_set(fd->info, "panfs_layout_type", "PAN_FS_CLIENT_LAYOUT_TYPE__INVALID");
break;
}
}
}