mpich icon indicating copy to clipboard operation
mpich copied to clipboard

build romio tests with mpich?

Open brianjmurrell opened this issue 6 years ago • 15 comments

Is it possible to build the romio tests (src/mpi/romio/test) with the build of mpich? I notice that in my source tree the substs have been done but none of the .c files have been built into objects or executables:

-rw-r--r--. 1 brian brian  7125 Aug  1 07:07 aggregation1.c
-rw-r--r--. 1 brian brian  2518 Aug  1 07:07 aggregation2.c
-rw-r--r--. 1 brian brian  4261 Aug  1 07:07 async.c
-rw-r--r--. 1 brian brian  4601 Aug  1 07:07 async-multiple.c
-rw-r--r--. 1 brian brian  7813 Aug  1 07:07 atomicity.c
-rw-r--r--. 1 brian brian  5773 Aug  1 07:07 big_extents.c
-rw-r--r--. 1 brian brian  5803 Aug  1 07:07 coll_perf.c
-rw-r--r--. 1 brian brian  7012 Aug  1 07:07 coll_test.c
-rw-r--r--. 1 brian brian  4199 Aug  1 07:07 creat_excl.c
-rw-r--r--. 1 brian brian  3736 Aug  1 07:07 darray_read.c
-rw-r--r--. 1 brian brian  3584 Aug  1 07:07 error.c
-rw-r--r--. 1 brian brian  2690 Aug  1 07:07 excl.c
-rw-r--r--. 1 brian brian  3288 Aug  1 07:07 external32.c
-rw-r--r--. 1 brian brian  5305 Aug  4 10:19 fcoll_test.f
-rw-r--r--. 1 brian brian  5323 Aug  1 07:07 fcoll_test.f.in
-rw-r--r--. 1 brian brian 15965 Aug  1 07:07 file_info.c
-rw-r--r--. 1 brian brian  6467 Aug  4 10:19 fmisc.f
-rw-r--r--. 1 brian brian  6485 Aug  1 07:07 fmisc.f.in
-rw-r--r--. 1 brian brian  5966 Aug  4 10:19 fperf.f
-rw-r--r--. 1 brian brian  5984 Aug  1 07:07 fperf.f.in
-rw-r--r--. 1 brian brian  9703 Aug  1 07:07 hindexed.c
-rw-r--r--. 1 brian brian  7972 Aug  1 07:07 i_noncontig.c
-rw-r--r--. 1 brian brian  5683 Aug  1 07:07 large_array.c
-rw-r--r--. 1 brian brian  3699 Aug  4 10:19 large_file.c
-rw-r--r--. 1 brian brian  3702 Aug  1 07:07 large_file.c.in
-rw-r--r--. 1 brian brian 42000 Aug  4 10:19 Makefile
-rw-r--r--. 1 brian brian  1245 Aug  1 07:07 Makefile.am
-rw-r--r--. 1 brian brian 42432 Aug  4 10:16 Makefile.in
-rw-r--r--. 1 brian brian  2248 Aug  1 07:07 Mfile.in
-rw-r--r--. 1 brian brian  8111 Aug  4 10:19 misc.c
-rw-r--r--. 1 brian brian  8117 Aug  1 07:07 misc.c.in
-rw-r--r--. 1 brian brian  9048 Aug  1 07:07 noncontig.c
-rw-r--r--. 1 brian brian 18141 Aug  1 07:07 noncontig_coll2.c
-rw-r--r--. 1 brian brian  7541 Aug  1 07:07 noncontig_coll.c
-rw-r--r--. 1 brian brian  4026 Aug  1 07:07 ordered_fp.c
-rw-r--r--. 1 brian brian  5800 Aug  1 07:07 perf.c
-rw-r--r--. 1 brian brian  5411 Aug  4 10:19 pfcoll_test.f
-rw-r--r--. 1 brian brian  5429 Aug  1 07:07 pfcoll_test.f.in
-rw-r--r--. 1 brian brian  3506 Aug  1 07:07 psimple.c
-rw-r--r--. 1 brian brian  3335 Aug  1 07:07 README
-rw-r--r--. 1 brian brian  3141 Aug  1 07:07 rtest.in
-rwxr-xr-x. 1 brian brian 12440 Aug  4 10:19 runtests
-rw-r--r--. 1 brian brian 12379 Aug  1 07:07 runtests.in
-rw-r--r--. 1 brian brian  3444 Aug  1 07:07 shared_fp.c
-rw-r--r--. 1 brian brian  3750 Aug  1 07:07 simple.c
-rw-r--r--. 1 brian brian  5565 Aug  1 07:07 split_coll.c
-rw-r--r--. 1 brian brian  2968 Aug  1 07:07 status.c
-rwxr-xr-x. 1 brian brian  1718 Aug  1 07:07 syshints.c
-rw-r--r--. 1 brian brian   183 Aug  1 07:07 test_hintfile
-rw-r--r--. 1 brian brian  4828 Aug  1 07:07 types_with_zeros.c

I couldn't find a configure option that seemed to relate to building those tests, but I wonder if I just wasn't seeing the right one.

Further, if I simply cd src/mpi/romio/test/ && make I get:

$ make
  CC       simple.o
make: /usr/lib64/mpich/bin/mpicc: Command not found

Which seems to indicate that the Makefile there is not using the already built tools in the current tree but is expecting a make install to have been done first. That makes me wonder if the Makefile there is even capable of building those tests in-tree. And then if this is really the desired behaviour or if the Makefile there really should be able to build the tests in-tree without having to do a make install first.

brianjmurrell avatar Aug 06 '19 12:08 brianjmurrell

We currently only do integral tests that require make install. In fact, one of the goals of our test suite is to be independently used to test any MPI implementations. Some of the aspects of MPI, for example, running parallel programs across multiple nodes, are difficult to test without installations.

hzhou avatar Aug 07 '19 03:08 hzhou

Yes, I can understand those reasons, at least from a perspective of running the (multinode) tests, but from a packaging perspective, it would be nicer if make (perhaps after a configure option to build the romio tests as part of the overall build) would build those tests so that they could be included in a [sub-]package along with the other mpich built artefacts during, say, and rpmbuild operation.

Even built in tree, if the build dir were shared among the nodes under test, multinode tests could even be done, perhaps with the mpich built in the tree even, or perhaps with just having to run make install on the nodes to test on.

Either way, having it at least built in the tree would be useful I think.

As a goal of being independent of any MPI implementation, that seems like a good reason for it to be it's own independent project. After-all, if I am trying to use it to test another MPI stack, I shouldn't have to incur the overhead of having to download the whole mpich source tree and then figure out how to build just the romio tests buried in it.

brianjmurrell avatar Aug 07 '19 11:08 brianjmurrell

@brianjmurrell So the goal here is to make an rpm package for ROMIO tests?

hzhou avatar Aug 07 '19 14:08 hzhou

@hzhou Indeed, while making the RPM for mpich.

Of course I realise that I could create a separate specfile for just the ROMIO tests, using the mpich tarball by (hopefully) just building the ROMIO tests after I have created the mpich RPM and installed that. It just seems silly to be using the same big tarball and big configure for two different RPMs rather than the more usual methodology of building several RPM sub-packages from a single tarball and build/install procedure.

brianjmurrell avatar Aug 07 '19 15:08 brianjmurrell

For the tests, all it requires is a working mpicc, which implies a working libmpi.so. We use mpicc to cope with library dependency, which can be quite complex due to profiling interface and the diversity of platforms -- in particular, specially built HPC systems. In principle we could make a build-time mpicc script that will link with in-tree library. Currently, there isn't.

hzhou avatar Aug 07 '19 15:08 hzhou

@hzhou I believe @brianjmurrell is referring to the ROMIO tests (https://github.com/pmodels/mpich/tree/master/src/mpi/romio/test), not the MPICH test suite.

raffenet avatar Aug 07 '19 15:08 raffenet

Indeed, as @raffenet pointed out, it's the ROMIO tests I want to have built at build time which assumes mpicc is already installed in $prefix. So yes, an "in-tree" equivalent of mpicc that is then used to build the ROMIO tests with the already build MPICH stack all in-tree would be useful.

brianjmurrell avatar Aug 07 '19 16:08 brianjmurrell

FYI. I am working with @roblatham00 to revise ROMIO, so it can be built stand alone. Enabling "make check" to run those test programs is part of the plan. If you are interested, here is the branch of this work. https://github.com/wkliao/mpich/tree/romio_stand_alone

In particular, commit 6f19c586955f484887e589a8bdce03be5303e3d9 is related to this issue.

wkliao avatar Aug 08 '19 05:08 wkliao

@wkliao Can you summarise where you are on this work? Is it generally working or not yet? Percentage done, time to completion, etc.?

brianjmurrell avatar Aug 29 '19 18:08 brianjmurrell

PR #4008 has been created for enabling ROMIO to be built stand alone

wkliao avatar Aug 29 '19 19:08 wkliao

Unfortunately, as best as I have been able to determine, #4008 doesn't really solve anything for this issue. In terms of building ROMIO (tests) without first building MPICH, it's not even clear to me that it achieves that. As best as I can determine, it simply adds the ROMIO tests to "make check", and still requires "make install" to be done first.

brianjmurrell avatar Sep 03 '19 10:09 brianjmurrell

The direction has been moved toward always build testsuite after installing mpich. In fact, we have made the testsuite a stand-alone package (https://github.com/pmodels/mpich/pull/5067, https://www.mpich.org/downloads/).

There is a separate make check target that is intended for simple verification for a build before the install stage. Currently, it is very basic -- it just runs the cpi example. We should expand the make check target into more thorough tests. Potentially we can re-structure the test suite so the code can work for both. Unfortunately, that will require significant effort and it is not a priority.

hzhou avatar May 24 '22 15:05 hzhou

@brianjmurrell I am still a bit unclear on the goal of this issue. Is the purpose to run verification (make check) during build, or is it to build package of the testing code? If it's the latter, why?

hzhou avatar May 24 '22 15:05 hzhou

Q: https://github.com/pmodels/mpich/issues/3957#issuecomment-519132400 A: https://github.com/pmodels/mpich/issues/3957#issuecomment-519145129

If it's the latter, why?

We want to use the tests to test the DAOS ROMIO driver.

brianjmurrell avatar May 24 '22 19:05 brianjmurrell

Q: #3957 (comment) A: #3957 (comment)

If it's the latter, why?

We want to use the tests to test the DAOS ROMIO driver.

I see. In that case, I think having a stand-alone testsuite will fit your goal nicely. You can just run the io tests from the testsuite. It remain a todo to port the entire ROMIO tests into testsuite. That is on my todo.

hzhou avatar May 24 '22 20:05 hzhou

We have made the mpich testsuite stand-alone already. I am going to close this issue and open new one for "porting the romio tests to testsuite".

hzhou avatar Aug 14 '22 23:08 hzhou