{"id":164577,"date":"2023-03-17T08:58:06","date_gmt":"2023-03-17T08:58:06","guid":{"rendered":"\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/"},"modified":"2023-07-31T12:25:51","modified_gmt":"2023-07-31T12:25:51","slug":"what-are-some-methods-to-debug-my-own-user-fortran-code","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/","title":{"rendered":"What are some methods to debug my own User Fortran Code?"},"content":{"rendered":"<p>On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code:  1) Set current version of development debug solver as system environment variables      &#8211; setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe     &#8211; setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc   2) Compile your own code with the option     &#8211; cfx5mkext -name xxx *.F -g -Wimplicit   3) In the lib directory, e.g. linux-amd64, create a subfolder named gnufort; in that subfolder, create symbolic links of all libs that are in the above lib directory     &#8211; ln -s ..\/libptm_injection.so .      (The debugger&#8217;s standard search path for libs is in this subfolder gnufort)   4) In the cfx launch directory, let cfx5solve create a working directory starting the standard solver with option -norun:     &#8211; cfx5solve -def <my deffile>.def -norun   5) Change to this working directory *.dir, start the debugger there:     &#8211; ddd -gdb $SOLVER &#038;   The DDD console is started.  Upper window: Current code that is run by the solver. Lower window: Input console   6) In the DDD input console, set a breakpoint when the libs are read by the solver:     &#8211; b cfxdlrun_     Let the debug solver run up to this breakpoint:     &#8211; run   7) In the header line of DDD, enter the name of the respective lib you want to debug, e.g.:     &#8211; ptm_injection__     -> The source code appears in the DDD code window.     There you can have the solver run single program code lines, check values of variables, set further breakpoints and thus debug your code. Right mouse click is always helpful in DDD, or just enter in the DDD input window     &#8211; call help()      The following naming conventions have to be obeyed when calling libs in the DDD header line:      &#8211; If the name is without &#8220;_&#8221;, add a &#8220;_&#8221; at the end, e.g. routine: myroutine -> myroutine_      &#8211; If the name contains one or more &#8220;_&#8221;, add two &#8220;__&#8221; at the end, e.g. routine: my_routine -> my_routine__<\/p>\n","protected":false},"template":"","class_list":["post-164577","topic","type-topic","status-publish","hentry","topic-tag-4653","topic-tag-cfx-solver","topic-tag-fluid-dynamics","topic-tag-general"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Knowledge | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"What are some methods to debug my own User Fortran Code? | Ansys Knowledge\" \/>\n\t\t<meta property=\"og:description\" content=\"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-03-17T08:58:06+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-07-31T12:25:51+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"What are some methods to debug my own User Fortran Code? | Ansys Knowledge\" \/>\n\t\t<meta name=\"twitter:description\" content=\"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/what-are-some-methods-to-debug-my-own-user-fortran-code\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluid-dynamics\\\/#listItem\",\"name\":\"fluid-dynamics\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluid-dynamics\\\/#listItem\",\"position\":3,\"name\":\"fluid-dynamics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluid-dynamics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/what-are-some-methods-to-debug-my-own-user-fortran-code\\\/#listItem\",\"name\":\"What are some methods to debug my own User Fortran Code?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/what-are-some-methods-to-debug-my-own-user-fortran-code\\\/#listItem\",\"position\":4,\"name\":\"What are some methods to debug my own User Fortran Code?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluid-dynamics\\\/#listItem\",\"name\":\"fluid-dynamics\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/what-are-some-methods-to-debug-my-own-user-fortran-code\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/what-are-some-methods-to-debug-my-own-user-fortran-code\\\/\",\"name\":\"What are some methods to debug my own User Fortran Code? | Ansys Knowledge\",\"description\":\"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \\\/otthome1\\\/develop\\\/Projects\\\/CFX-11.0_SP1-build\\\/bin\\\/linux-amd64_debug\\\/gnufort\\\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\\\/Projects\\\/CFX-11.0_SP1-build\\\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/what-are-some-methods-to-debug-my-own-user-fortran-code\\\/#breadcrumblist\"},\"datePublished\":\"2023-03-17T08:58:06+00:00\",\"dateModified\":\"2023-07-31T12:25:51+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"What are some methods to debug my own User Fortran Code? | Ansys Knowledge","description":"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit","canonical_url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/knowledge","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluid-dynamics\/#listItem","name":"fluid-dynamics"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluid-dynamics\/#listItem","position":3,"name":"fluid-dynamics","item":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluid-dynamics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/#listItem","name":"What are some methods to debug my own User Fortran Code?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/#listItem","position":4,"name":"What are some methods to debug my own User Fortran Code?","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluid-dynamics\/#listItem","name":"fluid-dynamics"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization","name":"Ansys Knowledge","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/knowledge\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/#webpage","url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/","name":"What are some methods to debug my own User Fortran Code? | Ansys Knowledge","description":"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/#breadcrumblist"},"datePublished":"2023-03-17T08:58:06+00:00","dateModified":"2023-07-31T12:25:51+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website","url":"https:\/\/innovationspace.ansys.com\/knowledge\/","name":"Ansys Knowledge","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Knowledge | Ansys Innovation Space","og:type":"article","og:title":"What are some methods to debug my own User Fortran Code? | Ansys Knowledge","og:description":"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit","og:url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/","article:published_time":"2023-03-17T08:58:06+00:00","article:modified_time":"2023-07-31T12:25:51+00:00","twitter:card":"summary_large_image","twitter:title":"What are some methods to debug my own User Fortran Code? | Ansys Knowledge","twitter:description":"On Linux, there is a debugger named ddd available. The following steps should be performed for debugging your own code: 1) Set current version of development debug solver as system environment variables - setenv SOLVER \/otthome1\/develop\/Projects\/CFX-11.0_SP1-build\/bin\/linux-amd64_debug\/gnufort\/solver-pvm.exe - setenv CFX_DATA_DIR ~develop\/Projects\/CFX-11.0_SP1-build\/etc 2) Compile your own code with the option - cfx5mkext -name xxx *.F -g -Wimplicit"},"aioseo_meta_data":{"post_id":"164577","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2025-10-17 21:27:23","updated":"2026-07-29 14:13:14","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluid-dynamics\/\" title=\"fluid-dynamics\">fluid-dynamics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tWhat are some methods to debug my own User Fortran Code?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/knowledge"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/"},{"label":"fluid-dynamics","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluid-dynamics\/"},{"label":"What are some methods to debug my own User Fortran Code?","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/what-are-some-methods-to-debug-my-own-user-fortran-code\/"}],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["3-15-2023  20:20:24"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["23.56.168.180"],"_btv_view_count":["734"],"siebel_km_number":["637752"],"product_version":["11"],"km_published_date":["2007-06-28T00:00:00.000Z"],"family":["Fluid Dynamics"],"application_name":["CFX-Solver"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164577\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=164577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}