{"action":"created","issue":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/5529","repository_url":"https://api.github.com/repos/open-mpi/ompi","labels_url":"https://api.github.com/repos/open-mpi/ompi/issues/5529/labels{/name}","comments_url":"https://api.github.com/repos/open-mpi/ompi/issues/5529/comments","events_url":"https://api.github.com/repos/open-mpi/ompi/issues/5529/events","html_url":"https://github.com/open-mpi/ompi/issues/5529","id":349320094,"node_id":"MDU6SXNzdWUzNDkzMjAwOTQ=","number":5529,"title":"incorrect logic in opal_config_asm.m4 for 128-wide atomic ops","user":{"login":"flang-cavium","id":38327387,"node_id":"MDQ6VXNlcjM4MzI3Mzg3","avatar_url":"https://avatars1.githubusercontent.com/u/38327387?v=4","gravatar_id":"","url":"https://api.github.com/users/flang-cavium","html_url":"https://github.com/flang-cavium","followers_url":"https://api.github.com/users/flang-cavium/followers","following_url":"https://api.github.com/users/flang-cavium/following{/other_user}","gists_url":"https://api.github.com/users/flang-cavium/gists{/gist_id}","starred_url":"https://api.github.com/users/flang-cavium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flang-cavium/subscriptions","organizations_url":"https://api.github.com/users/flang-cavium/orgs","repos_url":"https://api.github.com/users/flang-cavium/repos","events_url":"https://api.github.com/users/flang-cavium/events{/privacy}","received_events_url":"https://api.github.com/users/flang-cavium/received_events","type":"User","site_admin":false},"labels":[{"id":129984011,"node_id":"MDU6TGFiZWwxMjk5ODQwMTE=","url":"https://api.github.com/repos/open-mpi/ompi/labels/invalid","name":"invalid","color":"e6e6e6","default":true},{"id":226887794,"node_id":"MDU6TGFiZWwyMjY4ODc3OTQ=","url":"https://api.github.com/repos/open-mpi/ompi/labels/question","name":"question","color":"d4c5f9","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2018-08-09T22:59:04Z","updated_at":"2018-08-15T20:52:13Z","closed_at":null,"author_association":"NONE","body":"Thank you for taking the time to submit an issue!\r\n\r\nPatch is based on OpenMPI 3.1.1 - released tarball.\r\n\r\nCompiled and installed from source.\r\n\r\nOperating system: Ubuntu 16.04 AArch64 (ARM64).\r\nCompilers:\r\n- GCC 7.3 and 8.1\r\n- clang/LLVM 6.0.1\r\n\r\nProblem description:\r\n\r\nThe logic for discovering and enabling 128-bit wide atomic ops at ./configure time is incorrect. Essentially, 128-wide atomic ops are enabled regardless of whether or not the Target actually supports them. \r\n\r\nThe file  opal_config_asm.m4 contains the following:\r\n\r\n```\r\nif test ! \"$enable_cross_cmpset128\" = \"yes\" ; then\r\n### enable 128-wide atomic cmpset\r\nfi\r\n```\r\n\r\nThe logical test \r\n\r\n`if test ! \"$enable_cross_cmpset128\" = \"yes\" ; then`\r\n\r\nis equivalent to\r\n\r\n`if test \"$enable_cross_cmpset128\" = \"no\" ; then`\r\n\r\nwhich means, cmpset128 will be enabled even though ./configure was told \r\n\r\n`--enable-cross-cmpset128=no`\r\n\r\nFurther down, there is another test for $enable_cross_cmpset128:\r\n\r\n```\r\nif test ! \"$enable_cross_cmpset128\" = \"yes\" ; then\r\n\r\n### enable 128-wide atomic CAS\r\n\r\nelse\r\n\r\n### enable 128-wide atomic CAS\r\n\r\nfi\r\n```\r\n\r\n`if test ! \"$enable_cross_cmpset128\" = \"yes\" ; then`\r\n\r\nis the equivalent of saying\r\n\r\n`if test \"$enable_cross_cmpset128\" = \"no\" ; then`\r\n\r\nAgain, same logic problem, but this time around making certain 128-wide CAS really gets enable no matter what ./configure says.\r\n\r\nAlso: trying to attach a patch named opal_config_asm.m4.patch results in the following error:\r\n\r\n**We don't support that file type. Try again with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP.**\r\n\r\nI seriously doubt anyone would ever submit a GIF, JPEG, JPG or PNG patch. I had to rename the patch file from opal_config_asm.m4.patch to opal_config_asm.m4.patch.txt.\r\n[opal_config_asm.m4.patch.txt](https://github.com/open-mpi/ompi/files/2276111/opal_config_asm.m4.patch.txt)"},"comment":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/comments/413332399","html_url":"https://github.com/open-mpi/ompi/issues/5529#issuecomment-413332399","issue_url":"https://api.github.com/repos/open-mpi/ompi/issues/5529","id":413332399,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzMzMjM5OQ==","user":{"login":"flang-cavium","id":38327387,"node_id":"MDQ6VXNlcjM4MzI3Mzg3","avatar_url":"https://avatars1.githubusercontent.com/u/38327387?v=4","gravatar_id":"","url":"https://api.github.com/users/flang-cavium","html_url":"https://github.com/flang-cavium","followers_url":"https://api.github.com/users/flang-cavium/followers","following_url":"https://api.github.com/users/flang-cavium/following{/other_user}","gists_url":"https://api.github.com/users/flang-cavium/gists{/gist_id}","starred_url":"https://api.github.com/users/flang-cavium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flang-cavium/subscriptions","organizations_url":"https://api.github.com/users/flang-cavium/orgs","repos_url":"https://api.github.com/users/flang-cavium/repos","events_url":"https://api.github.com/users/flang-cavium/events{/privacy}","received_events_url":"https://api.github.com/users/flang-cavium/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T20:52:13Z","updated_at":"2018-08-15T20:52:13Z","author_association":"NONE","body":"```\r\n%> cat ./int128.c\r\nint main()\r\n{\r\n  __int128 x = 0, y = 0;\r\n  __int128 r = __atomic_compare_exchange_n (&x, &y, 1, 0, __ATOMIC_RELAXED,\r\n                                            __ATOMIC_RELAXED);\r\n  (void) fprintf(stderr, \"x=%llu y=%llu r=%llu\\n\", x, y, r);\r\n  return 0;\r\n}\r\n\r\n%> /opt/cavium/bin/clang -D_GNU_SOURCE -O3 -std=c99 -mcpu=thunderx2t99 -march=armv8.1-a+lse -ffast-math -ffp-contract=fast -funroll-loops -finline-functions -fslp-vectorize -fvectorize -Wl,-rpath -Wl,/opt/cavium/lib int128.c -o int128-clang\r\nint128.c:8:52: warning: format specifies type 'unsigned long long' but the\r\n      argument has type '__int128' [-Wformat]\r\n  (void) fprintf(stderr, \"x=%llu y=%llu r=%llu\\n\", x, y, r);\r\n                            ~~~~                   ^\r\nint128.c:8:55: warning: format specifies type 'unsigned long long' but the\r\n      argument has type '__int128' [-Wformat]\r\n  (void) fprintf(stderr, \"x=%llu y=%llu r=%llu\\n\", x, y, r);\r\n                                   ~~~~               ^\r\nint128.c:8:58: warning: format specifies type 'unsigned long long' but the\r\n      argument has type '__int128' [-Wformat]\r\n  (void) fprintf(stderr, \"x=%llu y=%llu r=%llu\\n\", x, y, r);\r\n                                          ~~~~           ^\r\n3 warnings generated.\r\n%> echo $status\r\n0\r\n%> ./int128-clang\r\nx=1 y=0 r=0\r\n%> echo $status\r\n0\r\n%>\r\n```\r\n\r\nThere is no format specifier available for __int128.\r\n\r\n"}}
{"actor":{"display_login":"flang-cavium"}}