{"action":"created","issue":{"url":"https://api.github.com/repos/trilinos/Trilinos/issues/152","repository_url":"https://api.github.com/repos/trilinos/Trilinos","labels_url":"https://api.github.com/repos/trilinos/Trilinos/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/trilinos/Trilinos/issues/152/comments","events_url":"https://api.github.com/repos/trilinos/Trilinos/issues/152/events","html_url":"https://github.com/trilinos/Trilinos/issues/152","id":135796586,"number":152,"title":"Intrepid2 ","user":{"login":"bathmatt","id":14926624,"avatar_url":"https://avatars.githubusercontent.com/u/14926624?v=3","gravatar_id":"","url":"https://api.github.com/users/bathmatt","html_url":"https://github.com/bathmatt","followers_url":"https://api.github.com/users/bathmatt/followers","following_url":"https://api.github.com/users/bathmatt/following{/other_user}","gists_url":"https://api.github.com/users/bathmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/bathmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bathmatt/subscriptions","organizations_url":"https://api.github.com/users/bathmatt/orgs","repos_url":"https://api.github.com/users/bathmatt/repos","events_url":"https://api.github.com/users/bathmatt/events{/privacy}","received_events_url":"https://api.github.com/users/bathmatt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trilinos/Trilinos/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/trilinos/Trilinos/labels/Intrepid2","name":"Intrepid2","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"mperego","id":5940580,"avatar_url":"https://avatars.githubusercontent.com/u/5940580?v=3","gravatar_id":"","url":"https://api.github.com/users/mperego","html_url":"https://github.com/mperego","followers_url":"https://api.github.com/users/mperego/followers","following_url":"https://api.github.com/users/mperego/following{/other_user}","gists_url":"https://api.github.com/users/mperego/gists{/gist_id}","starred_url":"https://api.github.com/users/mperego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mperego/subscriptions","organizations_url":"https://api.github.com/users/mperego/orgs","repos_url":"https://api.github.com/users/mperego/repos","events_url":"https://api.github.com/users/mperego/events{/privacy}","received_events_url":"https://api.github.com/users/mperego/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-02-23T16:57:56Z","updated_at":"2016-02-24T17:38:40Z","closed_at":null,"body":"I am adding a github issue for the intrepid2 work for more simplicity of tracking.  \r\n\r\nSummarizing the email below.  The initial step is to remove the two MD fields in intrepid2 and replace them with runtime rank kokkos views.  @etphipp has a prototype dimension structure which handles FAD objects.  \r\n\r\nI'm adding all the poeple who have be involved in this in the past like\r\n@eric-c-cyr @etphipp @crtrott @kyungjoo-kim @rppawlo \r\n\r\n\r\nHere are some facts which led us to where we are today.\r\n1: Intrepid2 has a lot of its functionality which uses run time ranked arrays.\r\n\r\n2: Intrepid2 has two different multi-dimensional arrays which are sort of interchangeable (The API between these two are not identical)\r\n2A: Intrepid_FieldContainer.  This uses an ArrayRCP to store data and tracks dimensions and ranks and provides a multi->1D array. This can't be use in Kokkos functions\r\n2B: Intrepid_FieldContainer_Kokkos, This uses a pointer and special code to allocate and reference data, but this does NOT use a kokkos::view under the hood.  This partially works with Kokkos, however, if you have a Intrepid_FC_K<Fad> this won't work on kokkos,\r\n\r\n3: Phalanx has a MDField which wraps a true kokkos view, this should work on both CPU/GPU and with kokkos functions.  It should work with Kokkos, however, if it is using Fads, you need to take care to define the size when you great the MDField.  If not you will get an empty MDField becuase the view length is based on the Fad derivative length.\r\n\r\n4: Intrepid2 uses arrays (field containers or some other MD array) of Fads for performing calculations like grads.  However, with either Kokkos:View, I_FC, or MDFields, this code will need to be modified so one defines the Fad length at decl.  The MDField could be used for this, however, the other FC won't perform on the GPU and can cause deadlocks due to allocations.\r\n\r\n5: The Intrepid FC types don't roll the FAD derivative lengths into the view dimension.  This can make things slow\r\n\r\n6:  ArrayWrappers.  These allow, in theory, one to send in a static sized array and use it in a dynamic sized array.  It often copies data to temps in/out of parallel regions.  These make it harder to debug and may not be needed.\r\n\r\n7: We use the kokkos execution space based on the (first) array type passed into the function memory space\r\n\r\nSo, where do we go from here?  Here is how I see things.  Please\r\n\r\n1: I still believe that we need to remove the Intrepid_FC classes and replace them with something like Phalanx::MDField, or better yet, Kokkos::MDView, which is a multi-dimensional array.\r\n\r\n2: I think we need to remove all the array wrappers, we need to default to Kokkos::DefaultSpace\r\n\r\n3: We need to make everything copy by value in Views,\r\n\r\n4: We need to go through the 100 of basis types and fix up the Fad classes to make sure the length is known when we allocate temps.\r\n\r\n\r\nThis is a big undertaking, thankfully Intrepid2 has good test coverage.  I k now there will be some pushback on someof this, but we need to do something IMHO.  We need to figure how to move forward.\r\n\r\nMatt"},"comment":{"url":"https://api.github.com/repos/trilinos/Trilinos/issues/comments/188371659","html_url":"https://github.com/trilinos/Trilinos/issues/152#issuecomment-188371659","issue_url":"https://api.github.com/repos/trilinos/Trilinos/issues/152","id":188371659,"user":{"login":"etphipp","id":9464144,"avatar_url":"https://avatars.githubusercontent.com/u/9464144?v=3","gravatar_id":"","url":"https://api.github.com/users/etphipp","html_url":"https://github.com/etphipp","followers_url":"https://api.github.com/users/etphipp/followers","following_url":"https://api.github.com/users/etphipp/following{/other_user}","gists_url":"https://api.github.com/users/etphipp/gists{/gist_id}","starred_url":"https://api.github.com/users/etphipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etphipp/subscriptions","organizations_url":"https://api.github.com/users/etphipp/orgs","repos_url":"https://api.github.com/users/etphipp/repos","events_url":"https://api.github.com/users/etphipp/events{/privacy}","received_events_url":"https://api.github.com/users/etphipp/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T17:38:40Z","updated_at":"2016-02-24T17:38:40Z","body":"Yes.\n\n-Eric\n\nOn Feb 24, 2016, at 10:35 AM, rppawlo <notifications@github.com<mailto:notifications@github.com>> wrote:\n\n\nI think we also need @etphipp<https://github.com/etphipp> to verify sacado/fad works correctly through runtime rank view?\n\n-\nReply to this email directly or view it on GitHub<https://github.com/trilinos/Trilinos/issues/152#issuecomment-188370255>.\n"}}