{"action":"created","issue":{"url":"https://api.github.com/repos/ESMCI/cime/issues/724","repository_url":"https://api.github.com/repos/ESMCI/cime","labels_url":"https://api.github.com/repos/ESMCI/cime/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/ESMCI/cime/issues/724/comments","events_url":"https://api.github.com/repos/ESMCI/cime/issues/724/events","html_url":"https://github.com/ESMCI/cime/issues/724","id":185512051,"number":724,"title":"driver_cpl: With some PE layouts, on a restart, fractions_ax is accessed without being allocated","user":{"login":"billsacks","id":6266741,"avatar_url":"https://avatars.githubusercontent.com/u/6266741?v=3","gravatar_id":"","url":"https://api.github.com/users/billsacks","html_url":"https://github.com/billsacks","followers_url":"https://api.github.com/users/billsacks/followers","following_url":"https://api.github.com/users/billsacks/following{/other_user}","gists_url":"https://api.github.com/users/billsacks/gists{/gist_id}","starred_url":"https://api.github.com/users/billsacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billsacks/subscriptions","organizations_url":"https://api.github.com/users/billsacks/orgs","repos_url":"https://api.github.com/users/billsacks/repos","events_url":"https://api.github.com/users/billsacks/events{/privacy}","received_events_url":"https://api.github.com/users/billsacks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ESMCI/cime/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ESMCI/cime/labels/coupler","name":"coupler","color":"d4c5f9"},{"url":"https://api.github.com/repos/ESMCI/cime/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"jedwards4b","id":6126104,"avatar_url":"https://avatars.githubusercontent.com/u/6126104?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards4b","html_url":"https://github.com/jedwards4b","followers_url":"https://api.github.com/users/jedwards4b/followers","following_url":"https://api.github.com/users/jedwards4b/following{/other_user}","gists_url":"https://api.github.com/users/jedwards4b/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards4b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards4b/subscriptions","organizations_url":"https://api.github.com/users/jedwards4b/orgs","repos_url":"https://api.github.com/users/jedwards4b/repos","events_url":"https://api.github.com/users/jedwards4b/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards4b/received_events","type":"User","site_admin":false},"assignees":[{"login":"jedwards4b","id":6126104,"avatar_url":"https://avatars.githubusercontent.com/u/6126104?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards4b","html_url":"https://github.com/jedwards4b","followers_url":"https://api.github.com/users/jedwards4b/followers","following_url":"https://api.github.com/users/jedwards4b/following{/other_user}","gists_url":"https://api.github.com/users/jedwards4b/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards4b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards4b/subscriptions","organizations_url":"https://api.github.com/users/jedwards4b/orgs","repos_url":"https://api.github.com/users/jedwards4b/repos","events_url":"https://api.github.com/users/jedwards4b/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards4b/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-10-26T21:14:19Z","updated_at":"2016-10-26T23:31:47Z","closed_at":null,"body":"Testing the CLM trunk with cime5.2.0-alpha.5 (but I don't see any driver_cpl updates to cime since that tag), I'm getting failures in all ERP debug tests with hobart-nag: e.g., from `ERP_D_Ld5_P24x1.f10_f10.I1850CLM45BGC.hobart_nag.clm-ciso.GC.1025-0639.45.n`\r\n\r\n```\r\nRuntime Error: /home/sacks/cesm_code/cime_update_cesm2_0_beta03_ish/cime/driver_cpl/driver/cesm_comp_mod.F90, line 1955: Reference to undefined POINTER FRACTIONS_AX\r\n```\r\n\r\nI think there might actually be two problems contributing to this error:\r\n\r\n(1) Due to #723 ESP is running on 24 tasks while the rest of the system is running on 12 tasks\r\n\r\n(2) This issue at hand: It appears that fractions_ax is only allocated on the coupler PEs, but is accessed on all PEs when doing a restart: In cesm_comp_mod.F90:\r\n\r\nLine 1744:\r\n\r\n```fortran\r\n   if (iamin_CPLID) then\r\n      call t_startf ('CPL:init_fracs')\r\n      call t_adj_detailf(+2)\r\n\r\n      allocate(fractions_ax(num_inst_frc))\r\n      allocate(fractions_lx(num_inst_frc))\r\n      allocate(fractions_ox(num_inst_frc))\r\n      allocate(fractions_ix(num_inst_frc))\r\n      allocate(fractions_gx(num_inst_frc))\r\n      allocate(fractions_rx(num_inst_frc))\r\n      allocate(fractions_wx(num_inst_frc))\r\n```\r\n\r\nLine 1954:\r\n\r\n```fortran\r\n   if (read_restart) then\r\n      call seq_rest_read(rest_file, infodata, &\r\n           atm, lnd, ice, ocn, rof, glc, wav, esp, &\r\n           fractions_ax, fractions_lx, fractions_ix, fractions_ox, &\r\n           fractions_rx, fractions_gx, fractions_wx)\r\n   endif\r\n```\r\n\r\nIt looks to me like this has been a long-standing issue: the relevant code looks the same back to at least March, 2015 (pre-cime1). It seems like this would be a problem whenever you do a restart with a PE layout where the coupler is on a subset of the PEs. I'm not sure why this hasn't triggered an error before - maybe it's only picked up by nag in debug mode, and we don't typically run with these PE layouts there?\r\n\r\ncc @fischer-ncar @jedwards4b @apcraig "},"comment":{"url":"https://api.github.com/repos/ESMCI/cime/issues/comments/256506833","html_url":"https://github.com/ESMCI/cime/issues/724#issuecomment-256506833","issue_url":"https://api.github.com/repos/ESMCI/cime/issues/724","id":256506833,"user":{"login":"apcraig","id":8182814,"avatar_url":"https://avatars.githubusercontent.com/u/8182814?v=3","gravatar_id":"","url":"https://api.github.com/users/apcraig","html_url":"https://github.com/apcraig","followers_url":"https://api.github.com/users/apcraig/followers","following_url":"https://api.github.com/users/apcraig/following{/other_user}","gists_url":"https://api.github.com/users/apcraig/gists{/gist_id}","starred_url":"https://api.github.com/users/apcraig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcraig/subscriptions","organizations_url":"https://api.github.com/users/apcraig/orgs","repos_url":"https://api.github.com/users/apcraig/repos","events_url":"https://api.github.com/users/apcraig/events{/privacy}","received_events_url":"https://api.github.com/users/apcraig/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T23:31:46Z","updated_at":"2016-10-26T23:31:46Z","body":"\ni think it's better to add the extra if CPLID in the driver around the \nrestart call\nrather than allocate the arrays on all pes.  Maybe we should remove the if\nCPLID in the restart code at the same time, but i guess that's not critical.\nOnly a problem if the \"if CPLID\" is ever changed in the driver to another\nset of pes and then old \"if CPLID\" is still in the restart code.\n\ntony....\n\nOn 10/26/16 3:44 PM, Bill Sacks wrote:\n>\n> @apcraig <https://github.com/apcraig> - good point. So I think this \n> wouldn't cause any problems in practice. Yes, this is an instance of \n> nag being picky: If I remember correctly, it doesn't like unallocated \n> pointers passed through an interface, unless the dummy arguments are \n> declared as pointers (which they are not here).\n>\n> So another solution would be to move these allocate statements:\n>\n>        allocate(fractions_ax(num_inst_frc))\n>        allocate(fractions_lx(num_inst_frc))\n>        allocate(fractions_ox(num_inst_frc))\n>        allocate(fractions_ix(num_inst_frc))\n>        allocate(fractions_gx(num_inst_frc))\n>        allocate(fractions_rx(num_inst_frc))\n>        allocate(fractions_wx(num_inst_frc))\n>\n> to outside the CPLID conditional - if you think it would be more \n> robust to keep the call to seq_rest_read happening on all PEs.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub \n> <https://github.com/ESMCI/cime/issues/724#issuecomment-256499039>, or \n> mute the thread \n> <https://github.com/notifications/unsubscribe-auth/AHzcHkkvndGMV58ls1abNdgk1elYPG4oks5q39fFgaJpZM4KhrWD>.\n>\n\n"}}
{"actor":{"display_login":"apcraig"}}