Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
74
Issues
74
List
Boards
Labels
Milestones
Merge Requests
9
Merge Requests
9
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
53fa81e8
Commit
53fa81e8
authored
Jul 07, 2015
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the remaining read/write wrappers to mpiio
parent
c572aa44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
313 additions
and
2 deletions
+313
-2
darshan-runtime/lib/darshan-mpiio.c
darshan-runtime/lib/darshan-mpiio.c
+313
-2
No files found.
darshan-runtime/lib/darshan-mpiio.c
View file @
53fa81e8
...
...
@@ -396,7 +396,319 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void * buf,
return
(
ret
);
}
/* TODO: reads and writes */
int
MPI_File_read_shared
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
MPI_Status
*
status
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_read_shared
)(
fh
,
buf
,
count
,
datatype
,
status
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_INDEP_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_write_shared
(
MPI_File
fh
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
MPI_Status
*
status
)
#else
int
MPI_File_write_shared
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
MPI_Status
*
status
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_write_shared
)(
fh
,
buf
,
count
,
datatype
,
status
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_INDEP_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_read_ordered
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
MPI_Status
*
status
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_read_ordered
)(
fh
,
buf
,
count
,
datatype
,
status
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_COLL_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_write_ordered
(
MPI_File
fh
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
MPI_Status
*
status
)
#else
int
MPI_File_write_ordered
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
MPI_Status
*
status
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_write_ordered
)(
fh
,
buf
,
count
,
datatype
,
status
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_COLL_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_read_all_begin
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_read_all_begin
)(
fh
,
buf
,
count
,
datatype
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_SPLIT_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_write_all_begin
(
MPI_File
fh
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
#else
int
MPI_File_write_all_begin
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_write_all_begin
)(
fh
,
buf
,
count
,
datatype
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_SPLIT_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_read_at_all_begin
(
MPI_File
fh
,
MPI_Offset
offset
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_read_at_all_begin
)(
fh
,
offset
,
buf
,
count
,
datatype
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_SPLIT_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_write_at_all_begin
(
MPI_File
fh
,
MPI_Offset
offset
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
#else
int
MPI_File_write_at_all_begin
(
MPI_File
fh
,
MPI_Offset
offset
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_write_at_all_begin
)(
fh
,
offset
,
buf
,
count
,
datatype
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_SPLIT_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_read_ordered_begin
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_read_ordered_begin
)(
fh
,
buf
,
count
,
datatype
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_SPLIT_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_write_ordered_begin
(
MPI_File
fh
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
#else
int
MPI_File_write_ordered_begin
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_write_ordered_begin
)(
fh
,
buf
,
count
,
datatype
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_SPLIT_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_iread
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_iread
)(
fh
,
buf
,
count
,
datatype
,
request
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_NB_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_iwrite
(
MPI_File
fh
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
#else
int
MPI_File_iwrite
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_iwrite
)(
fh
,
buf
,
count
,
datatype
,
request
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_NB_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_iread_at
(
MPI_File
fh
,
MPI_Offset
offset
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_iread_at
)(
fh
,
offset
,
buf
,
count
,
datatype
,
request
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_NB_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_iwrite_at
(
MPI_File
fh
,
MPI_Offset
offset
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
#else
int
MPI_File_iwrite_at
(
MPI_File
fh
,
MPI_Offset
offset
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_iwrite_at
)(
fh
,
offset
,
buf
,
count
,
datatype
,
request
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_NB_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_iread_shared
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_iread_shared
)(
fh
,
buf
,
count
,
datatype
,
request
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_READ
(
ret
,
fh
,
count
,
datatype
,
MPIIO_NB_READS
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
#ifdef HAVE_MPIIO_CONST
int
MPI_File_iwrite_shared
(
MPI_File
fh
,
const
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
#else
int
MPI_File_iwrite_shared
(
MPI_File
fh
,
void
*
buf
,
int
count
,
MPI_Datatype
datatype
,
__D_MPI_REQUEST
*
request
)
#endif
{
int
ret
;
double
tm1
,
tm2
;
tm1
=
darshan_core_wtime
();
ret
=
DARSHAN_MPI_CALL
(
PMPI_File_iwrite_shared
)(
fh
,
buf
,
count
,
datatype
,
request
);
tm2
=
darshan_core_wtime
();
MPIIO_LOCK
();
mpiio_runtime_initialize
();
MPIIO_RECORD_WRITE
(
ret
,
fh
,
count
,
datatype
,
MPIIO_NB_WRITES
,
tm1
,
tm2
);
MPIIO_UNLOCK
();
return
(
ret
);
}
int
MPI_File_sync
(
MPI_File
fh
)
{
...
...
@@ -425,7 +737,6 @@ int MPI_File_sync(MPI_File fh)
return
(
ret
);
}
/* TODO: test */
#ifdef HAVE_MPIIO_CONST
int
MPI_File_set_view
(
MPI_File
fh
,
MPI_Offset
disp
,
MPI_Datatype
etype
,
MPI_Datatype
filetype
,
const
char
*
datarep
,
MPI_Info
info
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment