


{"id":286424,"date":"2023-05-30T20:25:54","date_gmt":"2023-05-30T20:25:54","guid":{"rendered":"\/forum\/forums\/topic\/udf-error-message\/"},"modified":"2023-05-30T20:28:15","modified_gmt":"2023-05-30T20:28:15","slug":"udf-error-message","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-message\/","title":{"rendered":"UDF Error Message"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I am trying to compile and execute this UDF code to initialize an array, but I am receving the following error message: <em><strong>Chip: invalid opcode 0: pc=21<\/strong><\/em><\/p>\n<p>My UDF code is below:<\/p>\n<pre class=\"c-mrkdwn__pre\" data-stringify-type=\"pre\">#include \"udf.h\"\n\nint grid[2][2][10];\n\nDEFINE_ON_DEMAND(ini_all) {\n     int i, j, m;\n     for (i = 0; i &lt; 2; i ++) {\n           for (j = 0; j &lt; 2; j ++) {\n                for (m = 0; m &lt; 10; m ++) {\n\t\t\t\t\t\tprintf(\"At index %d %d %d \\n\", i, j, m);\n\t\t\t\t\t\tgrid[i][j][m] = 3;\n                }\n           }\n     }\n} <\/pre>\n<p>What does this error message mean, and how can I resolve it? I can easily execute the same for loop structure using gcc compilers, but it just does not seem to work in ANSYS.<\/p>\n<p>Thank you!<\/p>\n","protected":false},"template":"","class_list":["post-286424","topic","type-topic","status-closed","hentry","topic-tag-fluent","topic-tag-udf","topic-tag-udf-error"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["2216","199"],"_bbp_author_ip":["23.217.200.7"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["514"],"_edit_lock":["1685478483:136489"],"_bbp_likes_count":["2"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["286424"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","2216"],"_bbp_voice_count":["2"],"_bbp_reply_count":["7"],"_bbp_last_reply_id":["287238"],"_bbp_last_active_id":["287238"],"_bbp_last_active_time":["2023-06-05 20:35:29"]},"test":"mtom3097g-ucla-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/286424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/286424\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=286424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}