{"action":"created","issue":{"url":"https://api.github.com/repos/solomonik/ctf/issues/27","repository_url":"https://api.github.com/repos/solomonik/ctf","labels_url":"https://api.github.com/repos/solomonik/ctf/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/solomonik/ctf/issues/27/comments","events_url":"https://api.github.com/repos/solomonik/ctf/issues/27/events","html_url":"https://github.com/solomonik/ctf/issues/27","id":180914936,"number":27,"title":"Order of including omp.h matters for compilation","user":{"login":"kannon92","id":3780425,"avatar_url":"https://avatars.githubusercontent.com/u/3780425?v=3","gravatar_id":"","url":"https://api.github.com/users/kannon92","html_url":"https://github.com/kannon92","followers_url":"https://api.github.com/users/kannon92/followers","following_url":"https://api.github.com/users/kannon92/following{/other_user}","gists_url":"https://api.github.com/users/kannon92/gists{/gist_id}","starred_url":"https://api.github.com/users/kannon92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kannon92/subscriptions","organizations_url":"https://api.github.com/users/kannon92/orgs","repos_url":"https://api.github.com/users/kannon92/repos","events_url":"https://api.github.com/users/kannon92/events{/privacy}","received_events_url":"https://api.github.com/users/kannon92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-04T14:49:49Z","updated_at":"2016-10-04T14:59:48Z","closed_at":null,"body":"Hello,  \r\n\r\nI found an annoying compilation error if I include omp.h after ctf.hpp.  I am running with gcc-4.9, MVAPICH2, and cyclops.  Here is a simple program to reproduce the problem.  This problem goes away if omp.h is included before ctf.hpp.  \r\n\r\n    #include <stdio.h>\r\n    #include <stdlib.h>\r\n    #include <mpi.h>\r\n    #include <ctf.hpp>\r\n    #include <omp.h>\r\n    //using namespace CTF;\r\n    int main (int argc, char **argv)\r\n    {\r\n     int rank, size;\r\n     MPI_Init (&argc, &argv);\r\n     long n = 400 * 400; \r\n     long m = 333;\r\n     int nthread = omp_get_max_threads();\r\n     CTF::World dw(MPI_COMM_WORLD);\r\n     CTF::Matrix<double> A_MN(m, n, dw);\r\n     CTF::Matrix<double> J_12(m, m, dw);\r\n     CTF::Matrix<double> Q_MN(m, n, dw);\r\n     A_MN.fill_random(0, 1);\r\n     J_12.fill_random(0, 1);\r\n     Q_MN[\"Qij\"] = A_MN[\"Aij\"] * J_12[\"AQ\"];\r\n      printf(\"\\n Q_NORM: %8.8f\", Q_MN.norm2());\r\n      //  long m = 333;\r\n         MPI_Finalize();\r\n       return 0;\r\n     }"},"comment":{"url":"https://api.github.com/repos/solomonik/ctf/issues/comments/251414017","html_url":"https://github.com/solomonik/ctf/issues/27#issuecomment-251414017","issue_url":"https://api.github.com/repos/solomonik/ctf/issues/27","id":251414017,"user":{"login":"devinamatthews","id":5246113,"avatar_url":"https://avatars.githubusercontent.com/u/5246113?v=3","gravatar_id":"","url":"https://api.github.com/users/devinamatthews","html_url":"https://github.com/devinamatthews","followers_url":"https://api.github.com/users/devinamatthews/followers","following_url":"https://api.github.com/users/devinamatthews/following{/other_user}","gists_url":"https://api.github.com/users/devinamatthews/gists{/gist_id}","starred_url":"https://api.github.com/users/devinamatthews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinamatthews/subscriptions","organizations_url":"https://api.github.com/users/devinamatthews/orgs","repos_url":"https://api.github.com/users/devinamatthews/repos","events_url":"https://api.github.com/users/devinamatthews/events{/privacy}","received_events_url":"https://api.github.com/users/devinamatthews/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T14:59:47Z","updated_at":"2016-10-04T14:59:47Z","body":"Could you please post the compiler message(s)? I have a feeling it might \nhave to do with a conflicting implicit declaration.\n\nOn 10/4/16 9:57 AM, Kevin Hannon wrote:\n>\n> So I have no idea if this breaks anything, but if you include omp.h in \n> ctf.hpp before any ctf specific headers, the compilation bug goes away.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub \n> <https://github.com/solomonik/ctf/issues/27#issuecomment-251413355>, \n> or mute the thread \n> <https://github.com/notifications/unsubscribe-auth/AFAMoXBDg4TEEyjrpuHczfcPqfC4yrH1ks5qwmlhgaJpZM4KNxSK>.\n>\n\n"}}
{"actor":{"display_login":"devinamatthews"}}