fix the streams used in opal_output in the sharedfp components.
This commit was SVN r29726.
Этот коммит содержится в:
родитель
4a311ae9fd
Коммит
4f425872be
@ -24,7 +24,7 @@ void nodeDelete(node **front, node **rear)
|
|||||||
{
|
{
|
||||||
node *delNode;
|
node *delNode;
|
||||||
if ((*front) == NULL && (*rear)==NULL) {
|
if ((*front) == NULL && (*rear)==NULL) {
|
||||||
opal_output(1,"The queue is empty\n");
|
printf("The queue is empty\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delNode = *front;
|
delNode = *front;
|
||||||
@ -53,7 +53,7 @@ void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr)
|
|||||||
*front = newNode;
|
*front = newNode;
|
||||||
*rear = newNode;
|
*rear = newNode;
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"Front and rear both NULL\n");
|
printf("Front and rear both NULL\n");
|
||||||
#endif
|
#endif
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr)
|
|||||||
(*rear)->Next = newNode;
|
(*rear)->Next = newNode;
|
||||||
*rear=newNode;
|
*rear=newNode;
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"Front and rear both not NULL\n");
|
printf("Front and rear both not NULL\n");
|
||||||
#endif
|
#endif
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
@ -72,12 +72,12 @@ void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr)
|
|||||||
int Check_Request_Offset(int tag_received)
|
int Check_Request_Offset(int tag_received)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"Tag received %d\n",tag_received);
|
printf("Tag received %d\n",tag_received);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tag_received == REQUEST_TAG) {
|
if (tag_received == REQUEST_TAG) {
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"Return from Check_Request_Offset\n");
|
printf("Return from Check_Request_Offset\n");
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -124,12 +124,12 @@ int main(int argc, char **argv)
|
|||||||
rear = front = NULL;
|
rear = front = NULL;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: MPI_INIT\n"); fflush(stdout);
|
printf("addproc_control: MPI_INIT\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
MPI_Init(&argc,&argv);
|
MPI_Init(&argc,&argv);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: MPI_Comm_size\n"); fflush(stdout);
|
printf("addproc_control: MPI_Comm_size\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
MPI_Comm_size(MPI_COMM_WORLD,&size);
|
MPI_Comm_size(MPI_COMM_WORLD,&size);
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ int main(int argc, char **argv)
|
|||||||
endoffile = 0;
|
endoffile = 0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: start listening\n"); fflush(stdout);
|
printf("addproc_control: start listening\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
while(!END_FLAG) {
|
while(!END_FLAG) {
|
||||||
|
|
||||||
@ -152,14 +152,14 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
case REQUEST_TAG:
|
case REQUEST_TAG:
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: Offset requested by the process %d\n",status.MPI_SOURCE); fflush(stdout);
|
printf("addproc_control: Offset requested by the process %d\n",status.MPI_SOURCE); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
/* Insert the node into the linked list */
|
/* Insert the node into the linked list */
|
||||||
nodeInsert(&front,&rear,status.MPI_SOURCE,recvBuff);
|
nodeInsert(&front,&rear,status.MPI_SOURCE,recvBuff);
|
||||||
break;
|
break;
|
||||||
case END_TAG:
|
case END_TAG:
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: End Control tag received\n"); fflush(stdout);
|
printf("addproc_control: End Control tag received\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
END_FLAG = 1;
|
END_FLAG = 1;
|
||||||
break;
|
break;
|
||||||
@ -167,12 +167,12 @@ int main(int argc, char **argv)
|
|||||||
offset = recvBuff;
|
offset = recvBuff;
|
||||||
MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,SEEK_SET_TAG,parentComm);
|
MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,SEEK_SET_TAG,parentComm);
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: Seek set tag received\n"); fflush(stdout);
|
printf("addproc_control: Seek set tag received\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case SEEK_CUR_TAG:
|
case SEEK_CUR_TAG:
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: Seek CUR Tag received\n"); fflush(stdout);
|
printf("addproc_control: Seek CUR Tag received\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
/*set the pointer to the offset*/
|
/*set the pointer to the offset*/
|
||||||
offset += recvBuff;
|
offset += recvBuff;
|
||||||
@ -180,7 +180,7 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case SEEK_END_TAG:
|
case SEEK_END_TAG:
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: Seek END TAG received\n"); fflush(stdout);
|
printf("addproc_control: Seek END TAG received\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
offset = endoffile;
|
offset = endoffile;
|
||||||
offset += recvBuff;
|
offset += recvBuff;
|
||||||
@ -188,13 +188,13 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case GET_POSITION_TAG:
|
case GET_POSITION_TAG:
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"\naddproc_control: Get Position tag received\n"); fflush(stdout);
|
printf("\naddproc_control: Get Position tag received\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
/*Send the offset as requested*/
|
/*Send the offset as requested*/
|
||||||
MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,GET_POSITION_TAG,parentComm);
|
MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,GET_POSITION_TAG,parentComm);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
opal_output(1,"addproc_control: Unknown tag received\n"); fflush(stdout);
|
printf("addproc_control: Unknown tag received\n"); fflush(stdout);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,12 +220,12 @@ int main(int argc, char **argv)
|
|||||||
} /* End of while(1) loop */
|
} /* End of while(1) loop */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: finalizing mpi...\n"); fflush(stdout);
|
printf("addproc_control: finalizing mpi...\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
opal_output(1,"addproc_control: Exiting...\n");
|
printf("addproc_control: Exiting...\n");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ int mca_sharedfp_addproc_iread(mca_io_ompio_file_t *fh,
|
|||||||
struct mca_sharedfp_base_data_t *sh = NULL;
|
struct mca_sharedfp_base_data_t *sh = NULL;
|
||||||
|
|
||||||
if(NULL == fh->f_sharedfp_data){
|
if(NULL == fh->f_sharedfp_data){
|
||||||
opal_output(1, "sharedfp_addproc_iread - shared file pointer structure not initialized correctly\n");
|
opal_output(0, "sharedfp_addproc_iread - shared file pointer structure not initialized correctly\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ int mca_sharedfp_addproc_read_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_addproc_read_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_addproc_read_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ int mca_sharedfp_addproc_read_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_addproc_read_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_addproc_read_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ int mca_sharedfp_addproc_iwrite(mca_io_ompio_file_t *fh,
|
|||||||
struct mca_sharedfp_base_data_t *sh = NULL;
|
struct mca_sharedfp_base_data_t *sh = NULL;
|
||||||
|
|
||||||
if(NULL == fh->f_sharedfp_data){
|
if(NULL == fh->f_sharedfp_data){
|
||||||
opal_output(1, "sharedfp_addproc_iwrite: shared file pointer structure not initialized correctly\n");
|
opal_output(0, "sharedfp_addproc_iwrite: shared file pointer structure not initialized correctly\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ int mca_sharedfp_addproc_write_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_addproc_write_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_addproc_write_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +79,6 @@ int mca_sharedfp_addproc_write_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_addproc_write_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_addproc_write_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ int mca_sharedfp_addproc_read ( mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_addproc_read - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_addproc_read - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ int mca_sharedfp_addproc_read_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_addproc_read_ordered - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_addproc_read_ordered - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ int mca_sharedfp_addproc_get_position(mca_io_ompio_file_t *fh,
|
|||||||
struct mca_sharedfp_base_data_t *sh = NULL;
|
struct mca_sharedfp_base_data_t *sh = NULL;
|
||||||
|
|
||||||
if(NULL == fh->f_sharedfp_data){
|
if(NULL == fh->f_sharedfp_data){
|
||||||
opal_output(1, "sharedfp_addproc_get_position - shared file pointer structure not initialized correctly\n");
|
opal_output(0, "sharedfp_addproc_get_position - shared file pointer structure not initialized correctly\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ mca_sharedfp_addproc_seek (mca_io_ompio_file_t *fh,
|
|||||||
long buff = 0;
|
long buff = 0;
|
||||||
|
|
||||||
if(NULL == fh->f_sharedfp_data){
|
if(NULL == fh->f_sharedfp_data){
|
||||||
opal_output(1, "sharedfp_addproc_write_ordered - shared file pointer structure not initialized correctly\n");
|
opal_output(0, "sharedfp_addproc_write_ordered - shared file pointer structure not initialized correctly\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_addproc_write (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_addproc_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_addproc_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ int mca_sharedfp_addproc_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_addproc_write_ordered - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_addproc_write_ordered - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh
|
|||||||
|
|
||||||
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
||||||
if ( NULL == headnode) {
|
if ( NULL == headnode) {
|
||||||
opal_output (1, "sharedfp_individual_collaborate_data: headnode is NULL but file is open\n");
|
opal_output(0, "sharedfp_individual_collaborate_data: headnode is NULL but file is open\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,13 +51,13 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm,
|
|||||||
shfileHandle = (mca_io_ompio_file_t *) malloc ( sizeof(mca_io_ompio_file_t));
|
shfileHandle = (mca_io_ompio_file_t *) malloc ( sizeof(mca_io_ompio_file_t));
|
||||||
err = ompio_io_ompio_file_open ( comm, filename, amode, info, shfileHandle, false);
|
err = ompio_io_ompio_file_open ( comm, filename, amode, info, shfileHandle, false);
|
||||||
if ( OMPI_SUCCESS != err ) {
|
if ( OMPI_SUCCESS != err ) {
|
||||||
opal_output(1, "mca_sharedfp_individual_file_open: Error during file open\n");
|
opal_output(0, "mca_sharedfp_individual_file_open: Error during file open\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
sh = (struct mca_sharedfp_base_data_t*) malloc ( sizeof(struct mca_sharedfp_base_data_t));
|
sh = (struct mca_sharedfp_base_data_t*) malloc ( sizeof(struct mca_sharedfp_base_data_t));
|
||||||
if ( NULL == sh ){
|
if ( NULL == sh ){
|
||||||
opal_output(1, "mca_sharedfp_individual_file_open: Error, unable to malloc "
|
opal_output(0, "mca_sharedfp_individual_file_open: Error, unable to malloc "
|
||||||
"f_sharedfp_ptr struct\n");
|
"f_sharedfp_ptr struct\n");
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm,
|
|||||||
MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE,
|
MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE,
|
||||||
MPI_INFO_NULL, datafilehandle, false);
|
MPI_INFO_NULL, datafilehandle, false);
|
||||||
if ( OMPI_SUCCESS != err) {
|
if ( OMPI_SUCCESS != err) {
|
||||||
opal_output(1, "mca_sharedfp_individual_file_open: Error during datafile file open\n");
|
opal_output(0, "mca_sharedfp_individual_file_open: Error during datafile file open\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm,
|
|||||||
MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE,
|
MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE,
|
||||||
MPI_INFO_NULL, metadatafilehandle, false);
|
MPI_INFO_NULL, metadatafilehandle, false);
|
||||||
if ( OMPI_SUCCESS != err) {
|
if ( OMPI_SUCCESS != err) {
|
||||||
opal_output(1, "mca_sharedfp_individual_file_open: Error during metadatafile file open\n");
|
opal_output(0, "mca_sharedfp_individual_file_open: Error during metadatafile file open\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,6 @@ int
|
|||||||
mca_sharedfp_individual_get_position(mca_io_ompio_file_t *fh,
|
mca_sharedfp_individual_get_position(mca_io_ompio_file_t *fh,
|
||||||
OMPI_MPI_OFFSET_TYPE * offset)
|
OMPI_MPI_OFFSET_TYPE * offset)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_get_position: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_individual_get_position: NOT IMPLEMENTED\n");
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ int mca_sharedfp_individual_insert_metadata(int functype,long recordlength,struc
|
|||||||
|
|
||||||
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
||||||
if ( NULL == headnode) {
|
if ( NULL == headnode) {
|
||||||
opal_output (1, "sharedfp_individual_insert_metadat: headnode is NULL but file is open\n");
|
opal_output (0, "sharedfp_individual_insert_metadat: headnode is NULL but file is open\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ int mca_sharedfp_individual_insert_metadata(int functype,long recordlength,struc
|
|||||||
/* Allocate a new Node */
|
/* Allocate a new Node */
|
||||||
newnode = (mca_sharedfp_individual_metadata_node*)malloc(sizeof(mca_sharedfp_individual_metadata_node));
|
newnode = (mca_sharedfp_individual_metadata_node*)malloc(sizeof(mca_sharedfp_individual_metadata_node));
|
||||||
if (NULL == newnode) {
|
if (NULL == newnode) {
|
||||||
opal_output(1,"mca_sharedfp_individual_insert_metadata:Error while allocating new node\n");
|
opal_output(0,"mca_sharedfp_individual_insert_metadata:Error while allocating new node\n");
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
opal_output(1,"mca_sharedfp_individual_iwrite - error opening the shared file pointer\n");
|
opal_output(0,"mca_sharedfp_individual_iwrite - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh,
|
|||||||
|
|
||||||
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
||||||
if ( NULL == headnode) {
|
if ( NULL == headnode) {
|
||||||
opal_output (1, "sharedfp_individual_iwrite: headnode is NULL but file is open\n");
|
opal_output (0, "sharedfp_individual_iwrite: headnode is NULL but file is open\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh,
|
|||||||
ret = ompio_io_ompio_file_iwrite_at ( headnode->datafilehandle, headnode->datafile_offset,
|
ret = ompio_io_ompio_file_iwrite_at ( headnode->datafilehandle, headnode->datafile_offset,
|
||||||
buf, count, datatype, request);
|
buf, count, datatype, request);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_individual_iwrite: Error while iwriting the datafile \n");
|
opal_output(0,"sharedfp_individual_iwrite: Error while iwriting the datafile \n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ int mca_sharedfp_individual_write_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_write_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_individual_write_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,6 +98,6 @@ int mca_sharedfp_individual_write_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_write_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_individual_write_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -28,14 +28,14 @@
|
|||||||
int mca_sharedfp_individual_read ( mca_io_ompio_file_t *fh,
|
int mca_sharedfp_individual_read ( mca_io_ompio_file_t *fh,
|
||||||
void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
|
void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_read: NOT SUPPORTED by this component\n");
|
opal_output(0,"mca_sharedfp_individual_read: NOT SUPPORTED by this component\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mca_sharedfp_individual_read_ordered ( mca_io_ompio_file_t *fh,
|
int mca_sharedfp_individual_read_ordered ( mca_io_ompio_file_t *fh,
|
||||||
void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
|
void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_read_ordered: NOT SUPPORTED by this component\n");
|
opal_output(0,"mca_sharedfp_individual_read_ordered: NOT SUPPORTED by this component\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ int mca_sharedfp_individual_iread(mca_io_ompio_file_t *fh,
|
|||||||
ompi_datatype_t *datatype,
|
ompi_datatype_t *datatype,
|
||||||
MPI_Request * request)
|
MPI_Request * request)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_iread: NOT SUPPORTED by this component\n");
|
opal_output(0,"mca_sharedfp_individual_iread: NOT SUPPORTED by this component\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ int mca_sharedfp_individual_read_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_read_ordered_begin: NOT SUPPORTED by this component\n");
|
opal_output(0,"mca_sharedfp_individual_read_ordered_begin: NOT SUPPORTED by this component\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,6 +62,6 @@ int mca_sharedfp_individual_read_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_read_ordered_end: NOT SUPPORTED by this component\n");
|
opal_output(0,"mca_sharedfp_individual_read_ordered_end: NOT SUPPORTED by this component\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@
|
|||||||
int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh,
|
int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh,
|
||||||
OMPI_MPI_OFFSET_TYPE offset, int whence)
|
OMPI_MPI_OFFSET_TYPE offset, int whence)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_individual_seek: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_individual_seek: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
opal_output(1,"sharedfp_individual_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_individual_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh,
|
|||||||
headnode->datafile_offset,
|
headnode->datafile_offset,
|
||||||
buf, count, datatype, status);
|
buf, count, datatype, status);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"mca_sharedfp_individual_write: Error while writing the datafile \n");
|
opal_output(0,"mca_sharedfp_individual_write: Error while writing the datafile \n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_individual_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_individual_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
|
|
||||||
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data;
|
||||||
if ( NULL == headnode) {
|
if ( NULL == headnode) {
|
||||||
opal_output (1, "sharedfp_individual_write_ordered: headnode is NULL but file is open\n");
|
opal_output (0, "sharedfp_individual_write_ordered: headnode is NULL but file is open\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,14 +176,14 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
&offset, 1, OMPI_OFFSET_DATATYPE, 0,
|
&offset, 1, OMPI_OFFSET_DATATYPE, 0,
|
||||||
sh->comm, sh->comm->c_coll.coll_scatter_module );
|
sh->comm, sh->comm->c_coll.coll_scatter_module );
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_individual_write_ordered: Error in scattering offsets \n");
|
opal_output(0,"sharedfp_individual_write_ordered: Error in scattering offsets \n");
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sh->comm->c_coll.coll_bcast ( &global_offset, 1, OMPI_OFFSET_DATATYPE,
|
ret = sh->comm->c_coll.coll_bcast ( &global_offset, 1, OMPI_OFFSET_DATATYPE,
|
||||||
0, sh->comm, sh->comm->c_coll.coll_bcast_module );
|
0, sh->comm, sh->comm->c_coll.coll_bcast_module );
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_individual_write_ordered: Error while bcasting global offset \n");
|
opal_output(0,"sharedfp_individual_write_ordered: Error while bcasting global offset \n");
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
/*use file_write_at_all to ensure the order*/
|
/*use file_write_at_all to ensure the order*/
|
||||||
ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset, buf,count,datatype,status);
|
ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset, buf,count,datatype,status);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_individual_write_ordered: Error while writing the datafile \n");
|
opal_output(0,"sharedfp_individual_write_ordered: Error while writing the datafile \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "ompi/mca/sharedfp/sharedfp.h"
|
#include "ompi/mca/sharedfp/sharedfp.h"
|
||||||
|
#include "ompi/mca/sharedfp/base/base.h"
|
||||||
#include "ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h"
|
#include "ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h"
|
||||||
|
|
||||||
/* included so that we can test file locking availability */
|
/* included so that we can test file locking availability */
|
||||||
@ -123,31 +124,31 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file
|
|||||||
fd = open(filename, O_RDWR | O_CREAT, 0644);
|
fd = open(filename, O_RDWR | O_CREAT, 0644);
|
||||||
|
|
||||||
if ( -1 == fd ){
|
if ( -1 == fd ){
|
||||||
opal_output(1,"mca_sharedfp_lockedfile_component_file_query: error opening file %s", filename);
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
opal_output(1,"%s\n", strerror(errno));
|
"mca_sharedfp_lockedfile_component_file_query: error opening file %s %s", filename, strerror(errno));
|
||||||
has_file_lock_support=false;
|
has_file_lock_support=false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
err = fcntl(fd, F_SETLKW, &lock);
|
err = fcntl(fd, F_SETLKW, &lock);
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf("mca_sharedfp_lockedfile_component_file_query: returned err=%d, for fd=%d\n",err,fd);
|
"mca_sharedfp_lockedfile_component_file_query: returned err=%d, for fd=%d\n",err,fd);
|
||||||
}
|
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
opal_output(1, "mca_sharedfp_lockedfile_component_file_query: Failed to set a file lock on %s\n", filename );
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
opal_output(1, "err=%d, errno=%d, EOPNOTSUPP=%d, EINVAL=%d, ENOSYS=%d, EACCES=%d, EAGAIN=%d, EBADF=%d\n",
|
"mca_sharedfp_lockedfile_component_file_query: Failed to set a file lock on %s %s\n", filename, strerror(errno) );
|
||||||
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"err=%d, errno=%d, EOPNOTSUPP=%d, EINVAL=%d, ENOSYS=%d, EACCES=%d, EAGAIN=%d, EBADF=%d\n",
|
||||||
err, errno, EOPNOTSUPP, EINVAL, ENOSYS, EACCES, EAGAIN, EBADF);
|
err, errno, EOPNOTSUPP, EINVAL, ENOSYS, EACCES, EAGAIN, EBADF);
|
||||||
opal_output(1,"%s\n", strerror(errno));
|
|
||||||
|
|
||||||
if (errno == EACCES || errno == EAGAIN) {
|
if (errno == EACCES || errno == EAGAIN) {
|
||||||
opal_output(1,"errno=EACCES || EAGAIN, Already locked by another process\n");
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"errno=EACCES || EAGAIN, Already locked by another process\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf( "mca_sharedfp_lockedfile_component_file_query: fcntl claims success in setting a file lock on %s\n", filename );
|
"mca_sharedfp_lockedfile_component_file_query: fcntl claims success in setting a file lock on %s\n", filename );
|
||||||
}
|
|
||||||
|
|
||||||
has_file_lock_support=true;
|
has_file_lock_support=true;
|
||||||
}
|
}
|
||||||
@ -163,7 +164,8 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file
|
|||||||
*priority = 0;
|
*priority = 0;
|
||||||
/*module can not run!, return NULL to indicate that we are unable to run*/
|
/*module can not run!, return NULL to indicate that we are unable to run*/
|
||||||
|
|
||||||
opal_output(1,"mca_sharedfp_lockedfile_component_file_query: Can not run!, file locking not supported\n");
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"mca_sharedfp_lockedfile_component_file_query: Can not run!, file locking not supported\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,14 +50,14 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm,
|
|||||||
shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t));
|
shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t));
|
||||||
err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false);
|
err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false);
|
||||||
if ( OMPI_SUCCESS != err) {
|
if ( OMPI_SUCCESS != err) {
|
||||||
opal_output(1, "mca_sharedfp_lockedfile_file_open: Error during file open\n");
|
opal_output(0, "mca_sharedfp_lockedfile_file_open: Error during file open\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Memory is allocated here for the sh structure*/
|
/*Memory is allocated here for the sh structure*/
|
||||||
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));
|
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));
|
||||||
if ( NULL == sh){
|
if ( NULL == sh){
|
||||||
opal_output(1, "mca_sharedfp_lockedfile_file_open: Error, unable to malloc f_sharedfp_ptr struct\n");
|
opal_output(0, "mca_sharedfp_lockedfile_file_open: Error, unable to malloc f_sharedfp_ptr struct\n");
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
/*Populate the sh file structure based on the implementation*/
|
/*Populate the sh file structure based on the implementation*/
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2008 University of Houston. All rights reserved.
|
* Copyright (c) 2008-2013 University of Houston. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -24,6 +24,7 @@
|
|||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "ompi/constants.h"
|
#include "ompi/constants.h"
|
||||||
#include "ompi/mca/sharedfp/sharedfp.h"
|
#include "ompi/mca/sharedfp/sharedfp.h"
|
||||||
|
#include "ompi/mca/sharedfp/base/base.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
mca_sharedfp_lockedfile_get_position(mca_io_ompio_file_t *fh,
|
mca_sharedfp_lockedfile_get_position(mca_io_ompio_file_t *fh,
|
||||||
@ -32,11 +33,10 @@ mca_sharedfp_lockedfile_get_position(mca_io_ompio_file_t *fh,
|
|||||||
int ret = OMPI_SUCCESS;
|
int ret = OMPI_SUCCESS;
|
||||||
mca_sharedfp_base_module_t * shared_fp_base_module;
|
mca_sharedfp_base_module_t * shared_fp_base_module;
|
||||||
struct mca_sharedfp_base_data_t *sh = NULL;
|
struct mca_sharedfp_base_data_t *sh = NULL;
|
||||||
opal_output(1,"sharedfp_lockedfile_get_position\n");
|
|
||||||
|
|
||||||
|
|
||||||
if(fh->f_sharedfp_data==NULL){
|
if(fh->f_sharedfp_data==NULL){
|
||||||
opal_output(1,"sharedfp_lockedfile_get_position - opening the shared file pointer\n");
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"sharedfp_lockedfile_get_position - opening the shared file pointer\n");
|
||||||
shared_fp_base_module = fh->f_sharedfp;
|
shared_fp_base_module = fh->f_sharedfp;
|
||||||
|
|
||||||
ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
|
ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
|
||||||
@ -45,7 +45,7 @@ mca_sharedfp_lockedfile_get_position(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
opal_output(1,"sharedfp_lockedfile_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_lockedfile_iread - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_iread - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_lockedfile_write_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_lockedfile_write_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +96,6 @@ int mca_sharedfp_lockedfile_read_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_lockedfile_write_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_lockedfile_write_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_lockedfile_iwrite - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_iwrite - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_lockedfile_write_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_lockedfile_write_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +95,6 @@ int mca_sharedfp_lockedfile_write_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_lockedfile_write_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_lockedfile_write_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_lockedfile_read - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_read - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_lockedfile_read_ordered - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_read_ordered - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "ompi/constants.h"
|
#include "ompi/constants.h"
|
||||||
#include "ompi/mca/sharedfp/sharedfp.h"
|
#include "ompi/mca/sharedfp/sharedfp.h"
|
||||||
|
#include "ompi/mca/sharedfp/base/base.h"
|
||||||
|
|
||||||
/*Use fcntl to lock the file which stores the current position*/
|
/*Use fcntl to lock the file which stores the current position*/
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -42,9 +43,8 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
struct flock fl;
|
struct flock fl;
|
||||||
|
|
||||||
if(fh->f_sharedfp_data==NULL){
|
if(fh->f_sharedfp_data==NULL){
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf("sharedfp_lockedfile_seek - opening the shared file pointer\n");
|
"sharedfp_lockedfile_seek - opening the shared file pointer\n");
|
||||||
}
|
|
||||||
shared_fp_base_module = fh->f_sharedfp;
|
shared_fp_base_module = fh->f_sharedfp;
|
||||||
|
|
||||||
ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
|
ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
|
||||||
@ -53,7 +53,7 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
opal_output(1,"sharedfp_lockedfile_seek - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_seek - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65,22 +65,24 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
if ( MPI_SEEK_SET == whence ){
|
if ( MPI_SEEK_SET == whence ){
|
||||||
/*don't need to read current value*/
|
/*don't need to read current value*/
|
||||||
if(offset < 0){
|
if(offset < 0){
|
||||||
opal_output(1,"sharedfp_lockedfile_seek - MPI_SEEK_SET, offset must be > 0, got offset=%lld.\n",offset);
|
opal_output(0,"sharedfp_lockedfile_seek - MPI_SEEK_SET, offset must be > 0, got offset=%lld.\n",offset);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
opal_output(1,"MPI_SEEK_SET: new_offset=%lld\n",offset);
|
opal_output(ompi_sharedfp_base_framework.framework_output,"MPI_SEEK_SET: new_offset=%lld\n",offset);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
else if ( MPI_SEEK_CUR == whence){
|
else if ( MPI_SEEK_CUR == whence){
|
||||||
OMPI_MPI_OFFSET_TYPE current_position;
|
OMPI_MPI_OFFSET_TYPE current_position;
|
||||||
int status = mca_sharedfp_lockedfile_get_position(fh,¤t_position);
|
int status = mca_sharedfp_lockedfile_get_position(fh,¤t_position);
|
||||||
opal_output(1,"MPI_SEEK_CUR: curr=%lld, offset=%lld, call status=%d\n",current_position,offset,status);
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"MPI_SEEK_CUR: curr=%lld, offset=%lld, call status=%d\n",current_position,offset,status);
|
||||||
|
|
||||||
offset = current_position + offset;
|
offset = current_position + offset;
|
||||||
opal_output(1,"MPI_SEEK_CUR: new_offset=%lld\n",offset);
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"MPI_SEEK_CUR: new_offset=%lld\n",offset);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
if(offset < 0){
|
if(offset < 0){
|
||||||
opal_output(1,"sharedfp_lockedfile_seek - MPI_SEEK_CURE, offset must be > 0, got offset=%lld.\n",offset);
|
opal_output(0,"sharedfp_lockedfile_seek - MPI_SEEK_CURE, offset must be > 0, got offset=%lld.\n",offset);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,16 +90,15 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
OMPI_MPI_OFFSET_TYPE end_position=0;
|
OMPI_MPI_OFFSET_TYPE end_position=0;
|
||||||
ompio_io_ompio_file_get_size(sh->sharedfh,&end_position);
|
ompio_io_ompio_file_get_size(sh->sharedfh,&end_position);
|
||||||
offset = end_position + offset;
|
offset = end_position + offset;
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf("MPI_SEEK_END: file_get_size=%lld\n",end_position);
|
"MPI_SEEK_END: file_get_size=%lld\n",end_position);
|
||||||
}
|
|
||||||
|
|
||||||
if ( offset < 0){
|
if ( offset < 0){
|
||||||
opal_output(1,"sharedfp_lockedfile_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset);
|
opal_output(0,"sharedfp_lockedfile_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
opal_output(1,"sharedfp_lockedfile_seek - whence=%i is not supported\n",whence);
|
opal_output(0,"sharedfp_lockedfile_seek - whence=%i is not supported\n",whence);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,9 +107,8 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
lockedfile_data = sh->selected_module_data;
|
lockedfile_data = sh->selected_module_data;
|
||||||
fd_lockedfilehandle = lockedfile_data->handle;
|
fd_lockedfilehandle = lockedfile_data->handle;
|
||||||
|
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf("sharedfp_lockedfile_seek: Aquiring lock...");
|
"sharedfp_lockedfile_seek: Aquiring lock...");
|
||||||
}
|
|
||||||
|
|
||||||
/* set up the flock structure */
|
/* set up the flock structure */
|
||||||
fl.l_type = F_WRLCK;
|
fl.l_type = F_WRLCK;
|
||||||
@ -119,14 +119,13 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
|
|
||||||
/* Aquire an exclusive lock */
|
/* Aquire an exclusive lock */
|
||||||
if ( fcntl(fd_lockedfilehandle, F_SETLKW, &fl) == -1) {
|
if ( fcntl(fd_lockedfilehandle, F_SETLKW, &fl) == -1) {
|
||||||
opal_output(1, "#####erorr acquiring lock: fcntl(%d,F_SETLKW,&fl)\n",fd_lockedfilehandle);
|
opal_output(0, "Erorr acquiring lock: fcntl(%d,F_SETLKW,&fl)\n",fd_lockedfilehandle);
|
||||||
opal_output(1,"error(%i): %s", errno, strerror(errno));
|
opal_output(0,"error(%i): %s", errno, strerror(errno));
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf("sharedfp_lockedfile_seek: Success! acquired lock.for fd: %d\n",fd_lockedfilehandle);
|
"sharedfp_lockedfile_seek: Success! acquired lock.for fd: %d\n",fd_lockedfilehandle);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-- -----------------
|
/*-- -----------------
|
||||||
@ -150,14 +149,13 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
|
|||||||
fl.l_pid = getpid();
|
fl.l_pid = getpid();
|
||||||
|
|
||||||
if (fcntl(fd_lockedfilehandle, F_SETLK, &fl) == -1) {
|
if (fcntl(fd_lockedfilehandle, F_SETLK, &fl) == -1) {
|
||||||
opal_output(1,"####failed to release lock for fd: %d\n",fd_lockedfilehandle);
|
opal_output(0,"Failed to release lock for fd: %d\n",fd_lockedfilehandle);
|
||||||
opal_output(1,"error(%i): %s", errno, strerror(errno));
|
opal_output(0,"error(%i): %s", errno, strerror(errno));
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if ( mca_sharedfp_lockedfile_verbose ) {
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
printf("sharedfp_lockedfile_seek: released lock.for fd: %d\n",fd_lockedfilehandle);
|
"sharedfp_lockedfile_seek: released lock.for fd: %d\n",fd_lockedfilehandle);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
opal_output(1,"sharedfp_lockedfile_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_lockedfile_write_ordered - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_lockedfile_write_ordered - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2008 University of Houston. All rights reserved.
|
* Copyright (c) 2008-2013 University of Houston. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -26,6 +26,7 @@
|
|||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "ompi/mca/sharedfp/sharedfp.h"
|
#include "ompi/mca/sharedfp/sharedfp.h"
|
||||||
|
#include "ompi/mca/sharedfp/base/base.h"
|
||||||
#include "ompi/mca/sharedfp/sm/sharedfp_sm.h"
|
#include "ompi/mca/sharedfp/sm/sharedfp_sm.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -84,7 +85,8 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(m
|
|||||||
for (i = 0; i < size; ++i) {
|
for (i = 0; i < size; ++i) {
|
||||||
proc = ompi_group_peer_lookup(group,i);
|
proc = ompi_group_peer_lookup(group,i);
|
||||||
if (!OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)){
|
if (!OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)){
|
||||||
opal_output(1,"mca_sharedfp_sm_component_file_query: Disqualifying myself: (%d/%s) "
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"mca_sharedfp_sm_component_file_query: Disqualifying myself: (%d/%s) "
|
||||||
"not all processes are on the same node.",
|
"not all processes are on the same node.",
|
||||||
comm->c_contextid, comm->c_name);
|
comm->c_contextid, comm->c_name);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -60,7 +60,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
|
|||||||
shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t));
|
shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t));
|
||||||
err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false);
|
err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false);
|
||||||
if ( OMPI_SUCCESS != err) {
|
if ( OMPI_SUCCESS != err) {
|
||||||
opal_output(1, "mca_sharedfp_sm_file_open: Error during file open\n");
|
opal_output(0, "mca_sharedfp_sm_file_open: Error during file open\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
|
|||||||
|
|
||||||
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));
|
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));
|
||||||
if ( NULL == sh ) {
|
if ( NULL == sh ) {
|
||||||
opal_output(1, "mca_sharedfp_sm_file_open: Error, unable to malloc f_sharedfp_ptr struct\n");
|
opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to malloc f_sharedfp_ptr struct\n");
|
||||||
free(shfileHandle);
|
free(shfileHandle);
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
|
|||||||
|
|
||||||
sm_data = (struct mca_sharedfp_sm_data*) malloc ( sizeof(struct mca_sharedfp_sm_data));
|
sm_data = (struct mca_sharedfp_sm_data*) malloc ( sizeof(struct mca_sharedfp_sm_data));
|
||||||
if ( NULL == sm_data ){
|
if ( NULL == sm_data ){
|
||||||
opal_output(1, "mca_sharedfp_sm_file_open: Error, unable to malloc sm_data struct\n");
|
opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to malloc sm_data struct\n");
|
||||||
free(sh);
|
free(sh);
|
||||||
free(shfileHandle);
|
free(shfileHandle);
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "ompi/constants.h"
|
#include "ompi/constants.h"
|
||||||
#include "ompi/mca/sharedfp/sharedfp.h"
|
#include "ompi/mca/sharedfp/sharedfp.h"
|
||||||
|
#include "ompi/mca/sharedfp/base/base.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh,
|
mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh,
|
||||||
@ -35,7 +36,8 @@ mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh,
|
|||||||
mca_sharedfp_base_module_t * shared_fp_base_module = NULL;
|
mca_sharedfp_base_module_t * shared_fp_base_module = NULL;
|
||||||
|
|
||||||
if(fh->f_sharedfp_data==NULL){
|
if(fh->f_sharedfp_data==NULL){
|
||||||
opal_output(1,"sharedfp_sm_write - opening the shared file pointer\n");
|
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||||
|
"sharedfp_sm_write - opening the shared file pointer\n");
|
||||||
shared_fp_base_module = fh->f_sharedfp;
|
shared_fp_base_module = fh->f_sharedfp;
|
||||||
|
|
||||||
ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
|
ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
|
||||||
@ -44,7 +46,7 @@ mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
opal_output(1,"sharedfp_sm_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_iread - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_iread - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_sm_read_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_sm_read_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +93,6 @@ int mca_sharedfp_sm_read_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_sm_read_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_sm_read_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_iwrite - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_iwrite - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh,
|
|||||||
int count,
|
int count,
|
||||||
struct ompi_datatype_t *datatype)
|
struct ompi_datatype_t *datatype)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_sm_write_ordered_begin: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_sm_write_ordered_begin: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +94,6 @@ int mca_sharedfp_sm_write_ordered_end(mca_io_ompio_file_t *fh,
|
|||||||
void *buf,
|
void *buf,
|
||||||
ompi_status_public_t *status)
|
ompi_status_public_t *status)
|
||||||
{
|
{
|
||||||
opal_output(1,"mca_sharedfp_sm_write_ordered_end: NOT IMPLEMENTED\n");
|
opal_output(0,"mca_sharedfp_sm_write_ordered_end: NOT IMPLEMENTED\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_read - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_read - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_read_ordered - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_read_ordered - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_seek - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_seek - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh,
|
|||||||
if ( MPI_SEEK_SET == whence){
|
if ( MPI_SEEK_SET == whence){
|
||||||
/*no nothing*/
|
/*no nothing*/
|
||||||
if ( offset < 0){
|
if ( offset < 0){
|
||||||
opal_output(1,"sharedfp_sm_seek - MPI_SEEK_SET, offset must be > 0, got offset=%lld.\n",offset);
|
opal_output(0,"sharedfp_sm_seek - MPI_SEEK_SET, offset must be > 0, got offset=%lld.\n",offset);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
if ( mca_sharedfp_sm_verbose ) {
|
if ( mca_sharedfp_sm_verbose ) {
|
||||||
@ -83,7 +83,7 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh,
|
|||||||
printf("sharedfp_sm_seek: MPI_SEEK_CUR: new_offset=%lld\n",offset);
|
printf("sharedfp_sm_seek: MPI_SEEK_CUR: new_offset=%lld\n",offset);
|
||||||
}
|
}
|
||||||
if(offset < 0){
|
if(offset < 0){
|
||||||
opal_output(1,"sharedfp_sm_seek - MPI_SEEK_CURE, offset must be > 0, got offset=%lld.\n",offset);
|
opal_output(0,"sharedfp_sm_seek - MPI_SEEK_CURE, offset must be > 0, got offset=%lld.\n",offset);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,12 +96,12 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh,
|
|||||||
printf("sharedfp_sm_seek: MPI_SEEK_END: file_get_size=%lld\n",end_position);
|
printf("sharedfp_sm_seek: MPI_SEEK_END: file_get_size=%lld\n",end_position);
|
||||||
}
|
}
|
||||||
if(offset < 0){
|
if(offset < 0){
|
||||||
opal_output(1,"sharedfp_sm_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset);
|
opal_output(0,"sharedfp_sm_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
opal_output(1,"sharedfp_sm_seek - whence=%i is not supported\n",whence);
|
opal_output(0,"sharedfp_sm_seek - whence=%i is not supported\n",whence);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_write - error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_write - error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh,
|
|||||||
fh->f_info,
|
fh->f_info,
|
||||||
fh);
|
fh);
|
||||||
if ( OMPI_SUCCESS != ret ) {
|
if ( OMPI_SUCCESS != ret ) {
|
||||||
opal_output(1,"sharedfp_sm_write_ordered: error opening the shared file pointer\n");
|
opal_output(0,"sharedfp_sm_write_ordered: error opening the shared file pointer\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user