reghdfe icon indicating copy to clipboard operation
reghdfe copied to clipboard

[BUG] Failure to generate parallel processes on remote server

Open zhengtxecon opened this issue 1 year ago • 3 comments

Before submitting the bug report

  1. Verify that you are using the latest versions of reghdfe and ftools (which reghdfe). Note that the latest version is usually on Github and not on SSC.
which reghdfe
*! version 6.12.4 12sep2023

which ftools
*! version 2.49.1 08aug2023
  1. Verify that your Stata is updated (update query).
update query

Update status
    Last check for updates:  22 Nov 2023
    New update available:    14 Nov 2023
    Current update level:    29 Aug 2023

Bug report

Please complete the following information:

  • Stata version: Stata 17.0 29aug2023
  • OS: MacOS through SSH

Behavior

  • Expected behavior: generating parallel processes to run simultaneously when using the parallel option.
  • Actual behavior: failure to create parallel processes when running code on remote server (MacOS/Unix) through ssh. The processes only run sequentially. The second task only starts after the first task is finished. The code works perfectly on my own laptop (Win11 Stata 18), but the same code doesn't work on my server. When running the code on Unix, I can see the detailed execution of built-in code, and it stops at the point to process task 1 data (shown as follows).
. // --------------------------------------------------------------------------
. // Main code
. // --------------------------------------------------------------------------
.
.         * Setup parallel instance
.         cap noi set processors 2
    The maximum number of processors or cores being used is 2.  It can be set to any number between 1 and 2.
............. (other processing steps)
.
.         ViewInfo `caller_id'
----------------------------------------------------------------
Date           : 22 Nov 2023 - 22:43:07
Stata          : 17 MP x64 (build 29 Aug 2023)
Processors     : 2/2
System         : Unix  Macintosh (Intel 64-bit)
Host           : .............
Caller ID      : 569808011
Task   ID      : 00000002

Folders:
 - Temp        : /var/folders/jq/s7pdf7f122g_xbmhk0vxhp740000gq/T/
 - Parallel    : /var/folders/jq/s7pdf7f122g_xbmhk0vxhp740000gq/T/PARALLEL_569808011
 - Working     : /Users/franklinqian
----------------------------------------------------------------

.
.         cap noi {
.         reghdfe, worker parallel_path("/var/folders/jq/s7pdf7f122g_xbmhk0vxhp740000gq/T/PARALLEL_569808011")
Files to load: /var/folders/jq/s7pdf7f122g_xbmhk0vxhp740000gq/T/PARALLEL_569808011/data0.tmp
Files to load: /var/folders/jq/s7pdf7f122g_xbmhk0vxhp740000gq/T/PARALLEL_569808011/data2.tmp

(The process stops here without creating the second task parallelly, waiting for task 1 to finish).

zhengtxecon avatar Nov 23 '23 04:11 zhengtxecon

Interesting... I tested parallel on both Windows and Linux but wasn't able to test on macOS. One question: does it fail on macOS through ssh, or also when running on a desktop?

sergiocorreia avatar Nov 23 '23 05:11 sergiocorreia

@sergiocorreia I can't access the desktop right now, but I suspect the issue might be due to SSH. I’ve tried running the same setup on a Linux server, but the problem persists.

I’m wondering if the parallel function has been tested via SSH, and if this could be affecting the interface operation. I'm not an expert in this, but I suppose those Programs and Main code should not be displayed when execution. It’s puzzling why these codes are displayed when running on the server but not locally. There must be a reason for this discrepancy. Could you help me understand this better?

zhengtxecon avatar Nov 23 '23 16:11 zhengtxecon

Tried batch mode the problem still exists.

zhengtxecon avatar Nov 24 '23 03:11 zhengtxecon