[Pvfs2-cvs] commit by slang in pvfs2/test/posix: io.c iox.c open.c
CVS commit program
cvs at parl.clemson.edu
Thu Oct 19 18:17:27 EDT 2006
Update of /projects/cvsroot/pvfs2/test/posix
In directory parlweb1:/tmp/cvs-serv5758/test/posix
Modified Files:
Tag: WALT3
io.c iox.c open.c
Log Message:
reverse merge of HEAD to WALT3 branch.
Index: io.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/posix/io.c,v
diff -p -u -r1.2.2.1 -r1.2.2.2
--- io.c 18 Sep 2006 15:07:29 -0000 1.2.2.1
+++ io.c 19 Oct 2006 22:17:27 -0000 1.2.2.2
@@ -98,15 +98,7 @@ int main(int argc, char **argv)
if (opt_write) {
/* open the file for writing */
- if (mynod == 0)
- {
- fd = open(opt_file, amode, 0644);
- MPI_Barrier(MPI_COMM_WORLD);
- }
- else {
- MPI_Barrier(MPI_COMM_WORLD);
- fd = open(opt_file, O_LARGEFILE | O_RDWR);
- }
+ fd = open(opt_file, amode, 0644);
if (fd < 0) {
fprintf(stderr, "node %d, open error: %s\n", mynod,
@@ -164,15 +156,8 @@ int main(int argc, char **argv)
if (opt_read) {
/* open the file to read the data back out */
- if (mynod == 0)
- {
- fd = open(opt_file, amode, 0644);
- MPI_Barrier(MPI_COMM_WORLD);
- }
- else {
- MPI_Barrier(MPI_COMM_WORLD);
- fd = open(opt_file, O_RDONLY | O_LARGEFILE);
- }
+ fd = open(opt_file, amode, 0644);
+
if (fd < 0) {
fprintf(stderr, "node %d, open error: %s\n", mynod,
strerror(errno));
Index: iox.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/posix/iox.c,v
diff -p -u -r1.2.2.1 -r1.2.2.2
--- iox.c 18 Sep 2006 15:07:29 -0000 1.2.2.1
+++ iox.c 19 Oct 2006 22:17:27 -0000 1.2.2.2
@@ -511,16 +511,7 @@ int main(int argc, char *argv[])
goto err;
}
- if (mynod == 0)
- {
- fd = open(fname, O_TRUNC | amode, 0644);
- MPI_Barrier(MPI_COMM_WORLD);
- }
- else
- {
- MPI_Barrier(MPI_COMM_WORLD);
- fd = open(fname, O_RDWR | O_LARGEFILE);
- }
+ fd = open(fname, O_TRUNC | amode, 0644);
if (fd < 0) {
fprintf(stderr, "node %d, open error: %s\n", mynod,
strerror(errno));
@@ -555,16 +546,8 @@ int main(int argc, char *argv[])
close(fd);
MPI_Barrier(MPI_COMM_WORLD);
- if (mynod == 0)
- {
- fd = open(fname, amode, 0644);
- MPI_Barrier(MPI_COMM_WORLD);
- }
- else
- {
- MPI_Barrier(MPI_COMM_WORLD);
- fd = open(fname, O_RDONLY | O_LARGEFILE);
- }
+ fd = open(fname, amode, 0644);
+
if (fd < 0) {
fprintf(stderr, "node %d, open error: %s\n", mynod,
strerror(errno));
Index: open.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/posix/open.c,v
diff -p -u -r1.2.2.1 -r1.2.2.2
--- open.c 18 Sep 2006 15:07:29 -0000 1.2.2.1
+++ open.c 19 Oct 2006 22:17:27 -0000 1.2.2.2
@@ -64,8 +64,7 @@ int main(int argc, char *argv[])
fname = optarg;
break;
case 'c':
- if (rank == 0)
- open_flags |= O_CREAT;
+ open_flags |= O_CREAT;
do_create = 1;
break;
case '?':
@@ -85,8 +84,6 @@ int main(int argc, char *argv[])
for (i = 0; i < niters; i++)
{
- if (do_create == 0)
- {
a = MPI_Barrier(MPI_COMM_WORLD);
open_flags |= O_RDONLY;
@@ -100,40 +97,8 @@ int main(int argc, char *argv[])
end = Wtime();
tdiff += (end - begin);
close(fd);
- }
- else
- {
- open_flags |= O_RDONLY;
- if (rank == 0)
- {
- begin = Wtime();
- fd = open(fname, open_flags, 0775);
- if (fd < 0) {
- perror("open(2) error:");
- MPI_Finalize();
- exit(1);
- }
- end = Wtime();
- tdiff += (end - begin);
- MPI_Barrier(MPI_COMM_WORLD);
- }
- else {
- MPI_Barrier(MPI_COMM_WORLD);
- begin = Wtime();
- fd = open(fname, open_flags, 0775);
- if (fd < 0) {
- perror("open(2) error:");
- MPI_Finalize();
- exit(1);
- }
- end = Wtime();
- tdiff += (end - begin);
- }
- MPI_Barrier(MPI_COMM_WORLD);
- close(fd);
if (rank == 0 && i < (niters - 1))
unlink(fname);
- }
}
tdiff = tdiff / niters;
MPI_Allreduce(&tdiff, &max_diff, 1,
More information about the Pvfs2-cvs
mailing list