0 votes
in Programming by (400 points)

I am trying to launch a bash script from python using the following command:

cmd = ['./XXX.sh', f'{arg1}', f'{arg2}', f'{arg3}', f'{arg4}']

launch = subprocess.run(cmd)

The XXX.sh is supposed to compile some complex source code that includes a fortran90 part and then to run it.

The code crashes (numerical error in the fortran part) when it is compiled and launched from python but if I run the XXX.sh from a terminal, everything works fine.

Do you know if the subprocess.run implies some memory limitation ? Or a different setup for the shell that is launched ? Or any other reason that could explain such weird behaviour ?

Many thanks

Please log in or register to answer this question.