Problems in Running OpenBUGS Script in Stata on CentOS

Issues related to applications and software problems
Post Reply
t27026t
Posts: 2
Joined: 2024/03/10 14:30:51

Problems in Running OpenBUGS Script in Stata on CentOS

Post by t27026t » 2024/03/10 15:21:28

Code: Select all

Cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
Problem: I am trying to parallelize statistical analyses in Stata and OpenBUGS, both statistical packages.

I'm encountering some difficulties running a shell command within Stata on CentOS that works perfectly fine on Ubuntu and Debian distributions. The command is intended to execute multiple instances of OpenBUGS in parallel, but it doesn't seem to function as expected on CentOS.

Here's the specific command I'm using within Stata:

Code: Select all

shell "/usr/local/bin/OpenBUGS" "/path/script1.txt" & "/usr/local/bin/OpenBUGS" "/path/script2.txt" & "/usr/local/bin/OpenBUGS" "/path/script3.txt" & wait
This command executes three instances of OpenBUGS in parallel, each with a different script - specified by the general file paths. However, on CentOS, it doesn't seem to execute the commands properly. Although all three scripts are launched simultaneously, I've noticed that sometimes script 2 fails to complete execution while scripts 1 and 3 do. Conversely, there are instances where only script 1 finishes successfully, leaving scripts 2 and 3 incomplete.

If possible, could someone please advise on why this might be happening and how I could troubleshoot or modify the command to make it work on CentOS?

User avatar
TrevorH
Site Admin
Posts: 33224
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems in Running OpenBUGS Script in Stata on CentOS

Post by TrevorH » 2024/03/11 14:05:48

Change your scripts so they log what they do and any errors they get. Without that, any answers will just be guesswork.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

t27026t
Posts: 2
Joined: 2024/03/10 14:30:51

Re: Problems in Running OpenBUGS Script in Stata on CentOS

Post by t27026t » 2024/03/11 19:31:29

Thank you.

When I run the scripts separately, such as:

Code: Select all

shell "/usr/local/bin/OpenBUGS" "/path/script1.txt" 
shell "/usr/local/bin/OpenBUGS" "/path/script2.txt" 
shell  "/usr/local/bin/OpenBUGS" "/path/script3.txt" 
There is no error at all.

When I run

Code: Select all

shell "/usr/local/bin/OpenBUGS" "/path/script1.txt" & "/usr/local/bin/OpenBUGS" "/path/script2.txt" & "/usr/local/bin/OpenBUGS" "/path/script3.txt" & wait
The error happens randomly (it is not predictable). There is no message. Just that the output (results from the analysis) was not generated. It is a .txt file (the scripts should output a .txt containing results. These are not generated.

User avatar
TrevorH
Site Admin
Posts: 33224
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems in Running OpenBUGS Script in Stata on CentOS

Post by TrevorH » 2024/03/11 19:45:16

You'll need to _add_ logging to it so that it tells you what it is doing.

Also check in /var/log/messages for errors.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply