{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/comments/347097357","pull_request_review_id":317977312,"id":347097357,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NzA5NzM1Nw==","diff_hunk":"@@ -100,43 +105,30 @@ end\n build_kpoints(basis::PlaneWaveBasis, kcoords) =\n     build_kpoints(basis.model, basis.fft_size, kcoords, basis.Ecut)\n \n-\"\"\"\n-Plan a FFT of type `T` and size `fft_size`, spending some time on finding an optimal algorithm\n-\"\"\"\n-function build_fft_plans(T, fft_size)\n-    tmp = Array{Complex{T}}(undef, fft_size...)\n-\n-    flags = FFTW.MEASURE\n-    if T == Float32\n-        flags |= FFTW.UNALIGNED\n-        # TODO For Float32 there are issues with aligned FFTW plans.\n-        #      Using unaligned FFTW plans is discouraged, but we do it anyways\n-        #      here as a quick fix. We should reconsider this in favour of using\n-        #      a parallel wisdom anyways in the future.\n-    end\n-    ipFFT = plan_fft!(tmp, flags=flags)\n-    opFFT = plan_fft(tmp, flags=flags)\n-    ipFFT, opFFT\n-end\n-\n \"\"\"\n TODO docme\n \n fft_size is now Fourier grid size\n kcoords is vector of Vec3\n \"\"\"\n function PlaneWaveBasis(model::Model{T}, Ecut::Number,\n-                        kcoords::AbstractVector, ksymops=nothing, kweights=nothing; fft_size=nothing) where {T <: Real}\n-    ## TODO this constructor is too low-level. Write a hierarchy of\n-    ## constructors starting at the high level\n-    ## `PlaneWaveBasis(model, Ecut, kgrid)`\n+                        kcoords::AbstractVector, ksymops=nothing, kweights=nothing;\n+                        fft_size=nothing) where {T <: Real}\n+    # TODO this constructor is too low-level. Write a hierarchy of\n+    # constructors starting at the high level\n+    # `PlaneWaveBasis(model, Ecut, kgrid)`\n \n     @assert Ecut > 0\n     if fft_size === nothing\n         fft_size = determine_grid_size(model, Ecut)\n     end\n-\n     fft_size = Tuple{Int, Int, Int}(fft_size)\n+\n+    # TODO generic FFT is kind of broken for some fft sizes\n+    if !(T in [Float32, Float64]) && !all(is_fft_size_ok_for_generic.(fft_size))\n+        fft_size = next_working_fft_size_for_generic.(fft_size)\n+        @info \"Changing fft size to $fft_size (smallest working size for generic FFTs)\"\n+    end","path":"src/core/PlaneWaveBasis.jl","position":90,"original_position":90,"commit_id":"eef5cb74f9c0c9aad2d67eea2c8a5f0afe8c37af","original_commit_id":"eef5cb74f9c0c9aad2d67eea2c8a5f0afe8c37af","user":{"login":"antoine-levitt","id":88065,"node_id":"MDQ6VXNlcjg4MDY1","avatar_url":"https://avatars2.githubusercontent.com/u/88065?v=4","gravatar_id":"","url":"https://api.github.com/users/antoine-levitt","html_url":"https://github.com/antoine-levitt","followers_url":"https://api.github.com/users/antoine-levitt/followers","following_url":"https://api.github.com/users/antoine-levitt/following{/other_user}","gists_url":"https://api.github.com/users/antoine-levitt/gists{/gist_id}","starred_url":"https://api.github.com/users/antoine-levitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoine-levitt/subscriptions","organizations_url":"https://api.github.com/users/antoine-levitt/orgs","repos_url":"https://api.github.com/users/antoine-levitt/repos","events_url":"https://api.github.com/users/antoine-levitt/events{/privacy}","received_events_url":"https://api.github.com/users/antoine-levitt/received_events","type":"User","site_admin":false},"body":"OK that makes sense. These kinds of ugly temporary workarounds are unfortunately unavoidable, but fine as long as they are explicitly marked as such and isolated as much as possible from \"real\" code.","created_at":"2019-11-16T16:13:43Z","updated_at":"2019-11-16T16:13:43Z","html_url":"https://github.com/JuliaMolSim/DFTK.jl/pull/59#discussion_r347097357","pull_request_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/comments/347097357"},"html":{"href":"https://github.com/JuliaMolSim/DFTK.jl/pull/59#discussion_r347097357"},"pull_request":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59"}},"in_reply_to_id":347096962},"pull_request":{"url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59","id":341096581,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQxMDk2NTgx","html_url":"https://github.com/JuliaMolSim/DFTK.jl/pull/59","diff_url":"https://github.com/JuliaMolSim/DFTK.jl/pull/59.diff","patch_url":"https://github.com/JuliaMolSim/DFTK.jl/pull/59.patch","issue_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/59","number":59,"state":"open","locked":false,"title":"[WIP] Get DFTK fully generic in the floating point type","user":{"login":"mfherbst","id":11157893,"node_id":"MDQ6VXNlcjExMTU3ODkz","avatar_url":"https://avatars0.githubusercontent.com/u/11157893?v=4","gravatar_id":"","url":"https://api.github.com/users/mfherbst","html_url":"https://github.com/mfherbst","followers_url":"https://api.github.com/users/mfherbst/followers","following_url":"https://api.github.com/users/mfherbst/following{/other_user}","gists_url":"https://api.github.com/users/mfherbst/gists{/gist_id}","starred_url":"https://api.github.com/users/mfherbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfherbst/subscriptions","organizations_url":"https://api.github.com/users/mfherbst/orgs","repos_url":"https://api.github.com/users/mfherbst/repos","events_url":"https://api.github.com/users/mfherbst/events{/privacy}","received_events_url":"https://api.github.com/users/mfherbst/received_events","type":"User","site_admin":false},"body":"This PR will get DFTK agnostic to the floating point type used.\r\n\r\n- [x] Get DoubleFloats to work\r\n- [x] Tests\r\n- [x] Merge magnesium examples","created_at":"2019-11-14T17:40:37Z","updated_at":"2019-11-16T16:13:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4eeab124ad1b4af5d241027a131171cfd57505bf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1322102196,"node_id":"MDU6TGFiZWwxMzIyMTAyMTk2","url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/labels/feature","name":"feature","color":"a2eeef","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59/commits","review_comments_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59/comments","review_comment_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/59/comments","statuses_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/statuses/eef5cb74f9c0c9aad2d67eea2c8a5f0afe8c37af","head":{"label":"JuliaMolSim:fully-generic","ref":"fully-generic","sha":"eef5cb74f9c0c9aad2d67eea2c8a5f0afe8c37af","user":{"login":"JuliaMolSim","id":57396615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3Mzk2NjE1","avatar_url":"https://avatars3.githubusercontent.com/u/57396615?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaMolSim","html_url":"https://github.com/JuliaMolSim","followers_url":"https://api.github.com/users/JuliaMolSim/followers","following_url":"https://api.github.com/users/JuliaMolSim/following{/other_user}","gists_url":"https://api.github.com/users/JuliaMolSim/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaMolSim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaMolSim/subscriptions","organizations_url":"https://api.github.com/users/JuliaMolSim/orgs","repos_url":"https://api.github.com/users/JuliaMolSim/repos","events_url":"https://api.github.com/users/JuliaMolSim/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaMolSim/received_events","type":"Organization","site_admin":false},"repo":{"id":181734238,"node_id":"MDEwOlJlcG9zaXRvcnkxODE3MzQyMzg=","name":"DFTK.jl","full_name":"JuliaMolSim/DFTK.jl","private":false,"owner":{"login":"JuliaMolSim","id":57396615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3Mzk2NjE1","avatar_url":"https://avatars3.githubusercontent.com/u/57396615?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaMolSim","html_url":"https://github.com/JuliaMolSim","followers_url":"https://api.github.com/users/JuliaMolSim/followers","following_url":"https://api.github.com/users/JuliaMolSim/following{/other_user}","gists_url":"https://api.github.com/users/JuliaMolSim/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaMolSim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaMolSim/subscriptions","organizations_url":"https://api.github.com/users/JuliaMolSim/orgs","repos_url":"https://api.github.com/users/JuliaMolSim/repos","events_url":"https://api.github.com/users/JuliaMolSim/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaMolSim/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaMolSim/DFTK.jl","description":"Density-functional toolkit","fork":false,"url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl","forks_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/forks","keys_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/teams","hooks_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/events","assignees_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/tags","blobs_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/subscription","commits_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/merges","archive_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/downloads","issues_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/deployments","created_at":"2019-04-16T17:15:53Z","updated_at":"2019-11-14T12:15:06Z","pushed_at":"2019-11-16T15:44:21Z","git_url":"git://github.com/JuliaMolSim/DFTK.jl.git","ssh_url":"git@github.com:JuliaMolSim/DFTK.jl.git","clone_url":"https://github.com/JuliaMolSim/DFTK.jl.git","svn_url":"https://github.com/JuliaMolSim/DFTK.jl","homepage":"","size":525,"stargazers_count":10,"watchers_count":10,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":19,"watchers":10,"default_branch":"master"}},"base":{"label":"JuliaMolSim:master","ref":"master","sha":"322d9caf9752e6504650847fc6c5be5bcf320d05","user":{"login":"JuliaMolSim","id":57396615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3Mzk2NjE1","avatar_url":"https://avatars3.githubusercontent.com/u/57396615?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaMolSim","html_url":"https://github.com/JuliaMolSim","followers_url":"https://api.github.com/users/JuliaMolSim/followers","following_url":"https://api.github.com/users/JuliaMolSim/following{/other_user}","gists_url":"https://api.github.com/users/JuliaMolSim/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaMolSim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaMolSim/subscriptions","organizations_url":"https://api.github.com/users/JuliaMolSim/orgs","repos_url":"https://api.github.com/users/JuliaMolSim/repos","events_url":"https://api.github.com/users/JuliaMolSim/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaMolSim/received_events","type":"Organization","site_admin":false},"repo":{"id":181734238,"node_id":"MDEwOlJlcG9zaXRvcnkxODE3MzQyMzg=","name":"DFTK.jl","full_name":"JuliaMolSim/DFTK.jl","private":false,"owner":{"login":"JuliaMolSim","id":57396615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3Mzk2NjE1","avatar_url":"https://avatars3.githubusercontent.com/u/57396615?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaMolSim","html_url":"https://github.com/JuliaMolSim","followers_url":"https://api.github.com/users/JuliaMolSim/followers","following_url":"https://api.github.com/users/JuliaMolSim/following{/other_user}","gists_url":"https://api.github.com/users/JuliaMolSim/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaMolSim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaMolSim/subscriptions","organizations_url":"https://api.github.com/users/JuliaMolSim/orgs","repos_url":"https://api.github.com/users/JuliaMolSim/repos","events_url":"https://api.github.com/users/JuliaMolSim/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaMolSim/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaMolSim/DFTK.jl","description":"Density-functional toolkit","fork":false,"url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl","forks_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/forks","keys_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/teams","hooks_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/events","assignees_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/tags","blobs_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/subscription","commits_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/merges","archive_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/downloads","issues_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/deployments","created_at":"2019-04-16T17:15:53Z","updated_at":"2019-11-14T12:15:06Z","pushed_at":"2019-11-16T15:44:21Z","git_url":"git://github.com/JuliaMolSim/DFTK.jl.git","ssh_url":"git@github.com:JuliaMolSim/DFTK.jl.git","clone_url":"https://github.com/JuliaMolSim/DFTK.jl.git","svn_url":"https://github.com/JuliaMolSim/DFTK.jl","homepage":"","size":525,"stargazers_count":10,"watchers_count":10,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":19,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59"},"html":{"href":"https://github.com/JuliaMolSim/DFTK.jl/pull/59"},"issue":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/59"},"comments":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaMolSim/DFTK.jl/statuses/eef5cb74f9c0c9aad2d67eea2c8a5f0afe8c37af"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"antoine-levitt"}}