1
1

fix the streams used in opal_output in the sharedfp components.

This commit was SVN r29726.
Этот коммит содержится в:
Edgar Gabriel 2013-11-21 16:11:49 +00:00
родитель 4a311ae9fd
Коммит 4f425872be
31 изменённых файлов: 141 добавлений и 137 удалений

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

@ -24,7 +24,7 @@ void nodeDelete(node **front, node **rear)
{
node *delNode;
if ((*front) == NULL && (*rear)==NULL) {
opal_output(1,"The queue is empty\n");
printf("The queue is empty\n");
}
else {
delNode = *front;
@ -53,7 +53,7 @@ void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr)
*front = newNode;
*rear = newNode;
#if 0
opal_output(1,"Front and rear both NULL\n");
printf("Front and rear both NULL\n");
#endif
fflush(stdout);
}
@ -61,7 +61,7 @@ void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr)
(*rear)->Next = newNode;
*rear=newNode;
#if 0
opal_output(1,"Front and rear both not NULL\n");
printf("Front and rear both not NULL\n");
#endif
fflush(stdout);
}
@ -72,12 +72,12 @@ void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr)
int Check_Request_Offset(int tag_received)
{
#if 0
opal_output(1,"Tag received %d\n",tag_received);
printf("Tag received %d\n",tag_received);
#endif
if (tag_received == REQUEST_TAG) {
#if 0
opal_output(1,"Return from Check_Request_Offset\n");
printf("Return from Check_Request_Offset\n");
#endif
return 1;
}
@ -124,12 +124,12 @@ int main(int argc, char **argv)
rear = front = NULL;
#if 0
opal_output(1,"addproc_control: MPI_INIT\n"); fflush(stdout);
printf("addproc_control: MPI_INIT\n"); fflush(stdout);
#endif
MPI_Init(&argc,&argv);
#if 0
opal_output(1,"addproc_control: MPI_Comm_size\n"); fflush(stdout);
printf("addproc_control: MPI_Comm_size\n"); fflush(stdout);
#endif
MPI_Comm_size(MPI_COMM_WORLD,&size);
@ -137,7 +137,7 @@ int main(int argc, char **argv)
endoffile = 0;
#if 0
opal_output(1,"addproc_control: start listening\n"); fflush(stdout);
printf("addproc_control: start listening\n"); fflush(stdout);
#endif
while(!END_FLAG) {
@ -152,14 +152,14 @@ int main(int argc, char **argv)
case REQUEST_TAG:
#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
/* Insert the node into the linked list */
nodeInsert(&front,&rear,status.MPI_SOURCE,recvBuff);
break;
case END_TAG:
#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
END_FLAG = 1;
break;
@ -167,12 +167,12 @@ int main(int argc, char **argv)
offset = recvBuff;
MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,SEEK_SET_TAG,parentComm);
#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
break;
case SEEK_CUR_TAG:
#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
/*set the pointer to the offset*/
offset += recvBuff;
@ -180,7 +180,7 @@ int main(int argc, char **argv)
break;
case SEEK_END_TAG:
#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
offset = endoffile;
offset += recvBuff;
@ -188,13 +188,13 @@ int main(int argc, char **argv)
break;
case GET_POSITION_TAG:
#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
/*Send the offset as requested*/
MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,GET_POSITION_TAG,parentComm);
break;
default:
opal_output(1,"addproc_control: Unknown tag received\n"); fflush(stdout);
printf("addproc_control: Unknown tag received\n"); fflush(stdout);
break;
}
@ -220,12 +220,12 @@ int main(int argc, char **argv)
} /* End of while(1) loop */
#if 0
opal_output(1,"addproc_control: finalizing mpi...\n"); fflush(stdout);
printf("addproc_control: finalizing mpi...\n"); fflush(stdout);
#endif
MPI_Finalize();
#if 0
opal_output(1,"addproc_control: Exiting...\n");
printf("addproc_control: Exiting...\n");
#endif
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;
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;
}
@ -69,7 +69,7 @@ int mca_sharedfp_addproc_read_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -79,7 +79,7 @@ int mca_sharedfp_addproc_read_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -38,7 +38,7 @@ int mca_sharedfp_addproc_iwrite(mca_io_ompio_file_t *fh,
struct mca_sharedfp_base_data_t *sh = NULL;
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;
}
@ -70,7 +70,7 @@ int mca_sharedfp_addproc_write_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -79,6 +79,6 @@ int mca_sharedfp_addproc_write_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -47,7 +47,7 @@ int mca_sharedfp_addproc_read ( mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -103,7 +103,7 @@ int mca_sharedfp_addproc_read_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}

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

@ -59,7 +59,7 @@ int mca_sharedfp_addproc_get_position(mca_io_ompio_file_t *fh,
struct mca_sharedfp_base_data_t *sh = NULL;
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;
}

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

@ -38,7 +38,7 @@ mca_sharedfp_addproc_seek (mca_io_ompio_file_t *fh,
long buff = 0;
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;
}

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

@ -50,7 +50,7 @@ int mca_sharedfp_addproc_write (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -109,7 +109,7 @@ int mca_sharedfp_addproc_write_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}

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

@ -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;
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;
}

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

@ -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));
err = ompio_io_ompio_file_open ( comm, filename, amode, info, shfileHandle, false);
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;
}
sh = (struct mca_sharedfp_base_data_t*) malloc ( sizeof(struct mca_sharedfp_base_data_t));
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");
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_INFO_NULL, datafilehandle, false);
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;
}
@ -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_INFO_NULL, metadatafilehandle, false);
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;
}

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

@ -29,6 +29,6 @@ int
mca_sharedfp_individual_get_position(mca_io_ompio_file_t *fh,
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;
}

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

@ -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;
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;
}
@ -57,7 +57,7 @@ int mca_sharedfp_individual_insert_metadata(int functype,long recordlength,struc
/* Allocate a new Node */
newnode = (mca_sharedfp_individual_metadata_node*)malloc(sizeof(mca_sharedfp_individual_metadata_node));
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;
}

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

@ -50,7 +50,7 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -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;
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;
}
@ -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,
buf, count, datatype, request);
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;
}
@ -90,7 +90,7 @@ int mca_sharedfp_individual_write_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -98,6 +98,6 @@ int mca_sharedfp_individual_write_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -28,14 +28,14 @@
int mca_sharedfp_individual_read ( mca_io_ompio_file_t *fh,
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;
}
int mca_sharedfp_individual_read_ordered ( mca_io_ompio_file_t *fh,
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;
}
@ -45,7 +45,7 @@ int mca_sharedfp_individual_iread(mca_io_ompio_file_t *fh,
ompi_datatype_t *datatype,
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;
}
@ -54,7 +54,7 @@ int mca_sharedfp_individual_read_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -62,6 +62,6 @@ int mca_sharedfp_individual_read_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -28,6 +28,6 @@
int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh,
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;
}

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

@ -50,7 +50,7 @@ int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -72,7 +72,7 @@ int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh,
headnode->datafile_offset,
buf, count, datatype, status);
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;
}
@ -114,7 +114,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -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;
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;
}
@ -176,14 +176,14 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh,
&offset, 1, OMPI_OFFSET_DATATYPE, 0,
sh->comm, sh->comm->c_coll.coll_scatter_module );
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;
}
ret = sh->comm->c_coll.coll_bcast ( &global_offset, 1, OMPI_OFFSET_DATATYPE,
0, sh->comm, sh->comm->c_coll.coll_bcast_module );
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;
}
@ -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*/
ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset, buf,count,datatype,status);
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:

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

@ -26,6 +26,7 @@
#include "ompi_config.h"
#include "mpi.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/sharedfp/base/base.h"
#include "ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h"
/* 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);
if ( -1 == fd ){
opal_output(1,"mca_sharedfp_lockedfile_component_file_query: error opening file %s", filename);
opal_output(1,"%s\n", strerror(errno));
opal_output(ompi_sharedfp_base_framework.framework_output,
"mca_sharedfp_lockedfile_component_file_query: error opening file %s %s", filename, strerror(errno));
has_file_lock_support=false;
}
else{
err = fcntl(fd, F_SETLKW, &lock);
if ( mca_sharedfp_lockedfile_verbose ) {
printf("mca_sharedfp_lockedfile_component_file_query: returned err=%d, for fd=%d\n",err,fd);
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"mca_sharedfp_lockedfile_component_file_query: returned err=%d, for fd=%d\n",err,fd);
if (err) {
opal_output(1, "mca_sharedfp_lockedfile_component_file_query: Failed to set a file lock on %s\n", filename );
opal_output(1, "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);
opal_output(1,"%s\n", strerror(errno));
opal_output(ompi_sharedfp_base_framework.framework_output,
"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);
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 {
if ( mca_sharedfp_lockedfile_verbose ) {
printf( "mca_sharedfp_lockedfile_component_file_query: fcntl claims success in setting a file lock on %s\n", filename );
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"mca_sharedfp_lockedfile_component_file_query: fcntl claims success in setting a file lock on %s\n", filename );
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;
/*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;
}

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

@ -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));
err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false);
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;
}
/*Memory is allocated here for the sh structure*/
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));
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;
}
/*Populate the sh file structure based on the implementation*/

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

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 University of Houston. All rights reserved.
* Copyright (c) 2008-2013 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -24,6 +24,7 @@
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/sharedfp/base/base.h"
int
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;
mca_sharedfp_base_module_t * shared_fp_base_module;
struct mca_sharedfp_base_data_t *sh = NULL;
opal_output(1,"sharedfp_lockedfile_get_position\n");
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;
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);
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;
}
}

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

@ -51,7 +51,7 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -87,7 +87,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -96,6 +96,6 @@ int mca_sharedfp_lockedfile_read_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -51,7 +51,7 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -85,7 +85,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -95,6 +95,6 @@ int mca_sharedfp_lockedfile_write_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -47,7 +47,7 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -108,7 +108,7 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}

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

@ -24,6 +24,7 @@
#include "mpi.h"
#include "ompi/constants.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*/
#include <fcntl.h>
@ -42,9 +43,8 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
struct flock fl;
if(fh->f_sharedfp_data==NULL){
if ( mca_sharedfp_lockedfile_verbose ) {
printf("sharedfp_lockedfile_seek - opening the shared file pointer\n");
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"sharedfp_lockedfile_seek - opening the shared file pointer\n");
shared_fp_base_module = fh->f_sharedfp;
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);
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;
}
}
@ -65,22 +65,24 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
if ( MPI_SEEK_SET == whence ){
/*don't need to read current value*/
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;
}
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);
}
else if ( MPI_SEEK_CUR == whence){
OMPI_MPI_OFFSET_TYPE current_position;
int status = mca_sharedfp_lockedfile_get_position(fh,&current_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;
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);
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;
}
}
@ -88,16 +90,15 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE end_position=0;
ompio_io_ompio_file_get_size(sh->sharedfh,&end_position);
offset = end_position + offset;
if ( mca_sharedfp_lockedfile_verbose ) {
printf("MPI_SEEK_END: file_get_size=%lld\n",end_position);
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"MPI_SEEK_END: file_get_size=%lld\n",end_position);
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;
}
}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;
}
@ -106,9 +107,8 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
lockedfile_data = sh->selected_module_data;
fd_lockedfilehandle = lockedfile_data->handle;
if ( mca_sharedfp_lockedfile_verbose ) {
printf("sharedfp_lockedfile_seek: Aquiring lock...");
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"sharedfp_lockedfile_seek: Aquiring lock...");
/* set up the flock structure */
fl.l_type = F_WRLCK;
@ -119,14 +119,13 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh,
/* Aquire an exclusive lock */
if ( fcntl(fd_lockedfilehandle, F_SETLKW, &fl) == -1) {
opal_output(1, "#####erorr acquiring lock: fcntl(%d,F_SETLKW,&fl)\n",fd_lockedfilehandle);
opal_output(1,"error(%i): %s", errno, strerror(errno));
opal_output(0, "Erorr acquiring lock: fcntl(%d,F_SETLKW,&fl)\n",fd_lockedfilehandle);
opal_output(0,"error(%i): %s", errno, strerror(errno));
return OMPI_ERROR;
}
else{
if ( mca_sharedfp_lockedfile_verbose ) {
printf("sharedfp_lockedfile_seek: Success! acquired lock.for fd: %d\n",fd_lockedfilehandle);
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"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();
if (fcntl(fd_lockedfilehandle, F_SETLK, &fl) == -1) {
opal_output(1,"####failed to release lock for fd: %d\n",fd_lockedfilehandle);
opal_output(1,"error(%i): %s", errno, strerror(errno));
opal_output(0,"Failed to release lock for fd: %d\n",fd_lockedfilehandle);
opal_output(0,"error(%i): %s", errno, strerror(errno));
return OMPI_ERROR;
}
else{
if ( mca_sharedfp_lockedfile_verbose ) {
printf("sharedfp_lockedfile_seek: released lock.for fd: %d\n",fd_lockedfilehandle);
}
opal_output(ompi_sharedfp_base_framework.framework_output,
"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);
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;
}
}
@ -110,7 +110,7 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}

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

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 University of Houston. All rights reserved.
* Copyright (c) 2008-2013 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -26,6 +26,7 @@
#include "ompi_config.h"
#include "mpi.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/sharedfp/base/base.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) {
proc = ompi_group_peer_lookup(group,i);
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.",
comm->c_contextid, comm->c_name);
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));
err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false);
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;
}
@ -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));
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);
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));
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(shfileHandle);
return OMPI_ERR_OUT_OF_RESOURCE;

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

@ -24,6 +24,7 @@
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/sharedfp/base/base.h"
int
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;
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;
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);
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;
}
}

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

@ -50,7 +50,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -84,7 +84,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -93,6 +93,6 @@ int mca_sharedfp_sm_read_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -50,7 +50,7 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -85,7 +85,7 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh,
int count,
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;
}
@ -94,6 +94,6 @@ int mca_sharedfp_sm_write_ordered_end(mca_io_ompio_file_t *fh,
void *buf,
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;
}

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

@ -47,7 +47,7 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -109,7 +109,7 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}

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

@ -52,7 +52,7 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -64,7 +64,7 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh,
if ( MPI_SEEK_SET == whence){
/*no nothing*/
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;
}
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);
}
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;
}
}
@ -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);
}
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;
}
}
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;
}

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

@ -50,7 +50,7 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}
@ -113,7 +113,7 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh,
fh->f_info,
fh);
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;
}
}