-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplication and improve reuse of MiniTensor code in Trilinos #609
Comments
Below is an email thread that I had with @amota about options for dealing with MiniTensor. The next step will be to call a short meeting of interested Intrepid and Intrepid2 developers and stakeholders for decide how to deal with the duplication of MiniTensor (and perhaps other duplicated code?). @amota, given that this is your code and you know these developers and stakeholders the best, could you call this meeting and add me to the attendee's list? From: Mota, Alejandro Hi Ross, Given that MiniTensor cannot go into Teuchos because it depends on Sacado, it I agree then that the intrepid/intrepid2 developers should be involved in the Yes, feel free to open the issue on the Trilinos GitHub site. Thanks, Alejandro From: Bartlett, Roscoe A Alejandro, Having MiniTenosr depending on Sacado would prevent it from being added to That takes us back to the Intrepid subpackage solution. I just realized a way to The idea is that we could just create a new top-level TriBITS package for
We would then list the new IntrepidMiniTensor library in the
and then the Intrepid, Intrepid2, and ROL Dependencies.cmake files would list That would have all the correct behaviors w.r.t. to the checkin-test.py and CI But this is technically still created a new top-level Trilinos package and having To avoid those problems, we come back to the idea of officially breaking However, the best solution from a clarity and dependency-management [...] It might be good to get the Intrepid and Intrepid2 developers and stakeholders Do mind if we create a Trilinos GitHub issue for "Remove duplication and Cheers, -Ross From: Mota, Alejandro Hi Ross, Thanks for the info you provided at the telecon. I just remembered that MiniTensor also depends on Sacado for automatic Not sure if that would prevent it from moving into Teuchos. Alejandro |
Alejandro, Please add me to the meeting too. Roger |
The decision was to try to make MiniTensor its own Trilinos/TriBITS package. See below email just sent out.
|
Today there was a telecon about MiniTensor. In attendance Ross Bartlett, Mauro Perego, Mike Heroux, Dave Littlewood, Brent Perschbacher, and I. Here are the conclusions from that meeting:
So I'm closing this issue and then there will be a new one once the copyright moves forward, which will take a while. |
Putting back in progress since this has the right scope and background already. |
As we discussed, please:
Then I can pull the branch and give it a try and help fix issues. |
@bartlettroscoe pushed initial sources to minitensor-pkg-609 branch. |
@lxmota, thanks. I will have a look and get back to you. |
@lxmota, I pulled the branch If you look at: you will see that a TriBITS package does not have a PackagesList.cmake, TPLsList.cmake, or ProjectName.cmake file. It is only if you are building MiniTensor as its own TriBITS CMake project that you would define those things. But since MiniTensor has required dependencies on several Trilinos packages, that is not really a viable approach for any use case (at least not until we can do TriBITSPub/TriBITS#63). I will go ahead and try to fix this up and if I run into problems, I will contact you. At the very least, I will push commits to the |
Much cleaner and more clear this way (IMHO).
A TriBITS package does not use a ProjectName.cmake, PackagesList.cmake, or TPLsList.cmake file. ProjectName.cmake is for a TriBITS Project (i.e. a CMake project you directly configure). PackagesList.cmake and TPLsList.cmake are for a TriBITS Repository (which MiniTensor is not). With this, MiniTenor configures correctly under Trilinos.
This is a trick to give a fully templated package a library. TriBITS does not yet support packages with header files but no library (see TriBITSPub/TriBITS#51). Now MiniTensor builds and runs the tests.
If fixed up MiniTensor on the
and this passed showing:
A couple of comments/suggestions: In order to create a linkage with this GitHub issue #609, you have to put
Then you can "edit" the your earlier commits on the branch to change, for example:
to
(if you are not comfortable with that, I can do this for you.) Another thing I noticed is that MiniTensor generates a lot of warnings (even with GCC 4.7.2) with three unique warnings:
I would be good to get these cleaned up since they clutter up the build output. Also, I think that Sierra is still using Other than that, I would say this is ready to push to the 'develop' branch. To get this onto your local 'develop' branch on your local machine, just do:
That will give a nice clean linear history (no need for this to be on a topic branch I don't think). Then, if you don't mind, could you try following: and pushing this from my machine Then after that pushes, when you pull the updated 'develop' branch on your local machine, just remember to use Please let me know if you have any questions about any of this or any of the commits I made. Thanks, -Ross |
I'll fix the warnings. The complaint about the array bounds is a compiler bug, as I have dealt with it before and found it on gcc's bugzilla. I need to look for a workaround to eliminate the warning. I'll go ahead and push from your machine. |
Much cleaner and more clear this way (IMHO).
This is a trick to give a fully templated package a library. TriBITS does not yet support packages with header files but no library (see TriBITSPub/TriBITS#51). Now MiniTensor builds and runs the tests.
Much cleaner and more clear this way (IMHO).
A TriBITS package does not use a ProjectName.cmake, PackagesList.cmake, or TPLsList.cmake file. ProjectName.cmake is for a TriBITS Project (i.e. a CMake project you directly configure). PackagesList.cmake and TPLsList.cmake are for a TriBITS Repository (which MiniTensor is not). With this, MiniTenor configures correctly under Trilinos.
This is a trick to give a fully templated package a library. TriBITS does not yet support packages with header files but no library (see TriBITSPub/TriBITS#51). Now MiniTensor builds and runs the tests.
@bartlettroscoe I merged the minitensor-pkg-609 branch into develop and tested and pushed from crf450. I wanted to start to fix the warnings, but when I compile in my local machine using checkin-test.py, it fails to configure because it can't find ParMETIS, which is not required by MiniTensor (or TeuchosCore, KokkosCore or Sacado, I think). Not sure why ParMETIS is required, or how to disable it. This doesn't happen on crf450 (maybe because ParMETIS is available there?). |
Confirmed. MiniTenor is showing up as its own Trilinos package in the CI build:
ParMETIS is one of the TPLs that must be present for the new Trilinos checkin-test.py default builds. That is what #410 and #482 are about. Even if fully testing MiniTensor currently does not require ParMETIS, it will once it gets used in ROL because ROL indirectly enables Zoltan which optionally depends on ParMETIS. See: which shows:
You have to explicitly enable optional TPLs or they will not get enabled. That is why ParMETIS and the other new set of Primary Tested (PT) TPLs get default enabled for the new PT CI build (see #410).
You can't disable ParMETIS for the --default-builds. The fact that you configure fails says that your env can't sufficiently test Trilinos for pushes. But on a machine with the SEMS env properly loaded, it is found. Therefore, it is good that the configure failed. However, if you still want to use the chekcin-test.py script locally for your own testing and development work, you can define any --extra-builds you want and turn off the --default-builds with the checkin-test.py script. For example, you can write a checkin-test.py wrapper script like:
This way, you can skip the --default-builds that require ParMETIS (or any other TPL) and define any builds you want to enable or disable anything you want. For local testing you can do:
But don't ever use this type of script to push to Trilinos. Only use the Make sense? Would it help to start writing an FAQ for the checkin-test.py and checkin-test-sems.sh scripts for Trilinos to answers questions like these? |
Ok, thanks for the explanation. Perhaps the easiest solution is to compile and install ParMETIS in our own local machines, so I can also test locally. Still, I promise that I'll only push from crf450. And yes, I believe a FAQ for questions like these would be helpful, as I'm sure there will be other libraries that are needed that would seem like unexpected requirements for some new Trilinos developers. |
@bartlettroscoe I'm trying to convert a version of Albany to MiniTensor. There is a file MiniTensor_config.h that gets generated in the build process and placed in the Trilinos build directory under packages/minitensor/src. But that header does not get copied to the Trilinos install directory, so the Albany build fails. I compared with Intrepid2 and found a corresponding Intrepid2_config.h, but theirs gets copied to the install directory. I have compared CMakeList.txt files and I can't figure out what command or instruction to use to copy the MiniTensor_config.h header to the install directory. |
My bad. You need to add that header file https://github.com/trilinos/Trilinos/blob/master/packages/epetra/src/CMakeLists.txt#L39 That will result in that file getting installed. Let me know if you have problems with this. |
@bartlettroscoe Thanks, trying it as we speak. |
Sierra/SM from Intrepid_MiniTensor to MiniTensor (#609). Build/Test Cases Summary Enabled Packages: MiniTensor Disabled Packages: PyTrilinos,Claps,TriKota Enabled all Forward Packages 0) MPI_RELEASE_DEBUG_SHARED_PT => passed: passed=256,notpassed=0 (21.36 min)
now that Sierra/SM has finally been transitioned to the MiniTensor package. [#609] Build/Test Cases Summary Enabled Packages: Intrepid Disabled Packages: PyTrilinos,Claps,TriKota Enabled all Forward Packages 0) MPI_RELEASE_DEBUG_SHARED_PT => passed: passed=465,notpassed=0 (33.07 min)
Tasks 7 & 8 have been completed: |
now that Sierra/SM has finally been transitioned to the MiniTensor package. [trilinos#609] Build/Test Cases Summary Enabled Packages: Intrepid Disabled Packages: PyTrilinos,Claps,TriKota Enabled all Forward Packages 0) MPI_RELEASE_DEBUG_SHARED_PT => passed: passed=465,notpassed=0 (33.07 min)
CC: @amota, @trilinos/intrepid2
Description:
When Intrepid2 was created, it duplicated the MiniTensor code and created a maintenance problem.
This Story is to examine ways to eliminate the duplication of the MiniTensor code and improve its reuse in Trilinos and other projects.
Tasks:
The text was updated successfully, but these errors were encountered: