gdb debugging

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Boone11
Posts: 20
Joined: Fri Jan 13, 2023 10:47 am

gdb debugging

Post by Boone11 »

Hi all,

I want to use gdb to debug a computation. I read the web pagethat explain how to use gdb but I do not manage to run a computation with gdb.

I tried to go in the SCRIPT file and run the command:

Code: Select all

gdb runcase
I get the following error message: not in executable format: file format not recognized

My runcase file is the following:

Code: Select all

#!/bin/bash

# Ensure the correct command is found:
export PATH=/home/david/Code_Saturne/5.3.4/code_saturne-5.3.4/arch/Linux_x86_64/bin:$PATH

# Run command:
\code_saturne run --param setup.xml
May you explain me how to run a computation Code_Saturne with gdb?

Thanks a lot,
Sincerely
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: gdb debugging

Post by Yvan Fournier »

Hello,

You need to run gdb on the cs_solver executable, not on the script.

Did you read the debugging page specific to code_saturne (https://www.code-saturne.org/documentat ... gging.html) ?

I do not remember whether this feature was available in version 5.3 though, and in any case it may be less mature. But 5.3 has been retired since September 2019, so I recommend upgrading to a more recent version (either 7.0, the current stable version, or 7.3, which is a preview of the upcoming v8.0).

Best regards,

Yvan
Post Reply