File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ def _init_worker(segy_file_kwargs: SegyFileArguments) -> None:
4242
4343    from  segy  import  SegyFile 
4444
45-     # Setting the zarr config to 1 thread to ensure we honor the `MDIO__IMPORT__MAX_WORKERS` environment variable. 
46-     # The Zarr 3 engine utilizes multiple threads. This can lead to resource contention and unpredictable memory usage. 
47-     zarr_config .set ({"threading.max_workers" : 1 })
48- 
4945    # Open the SEG-Y file once per worker 
5046    _worker_segy_file  =  SegyFile (** segy_file_kwargs )
5147
@@ -114,6 +110,9 @@ def trace_worker(  # noqa: PLR0913
114110        SummaryStatistics object containing statistics about the written traces. 
115111    """ 
116112    global  _worker_segy_file 
113+     # Setting the zarr config to 1 thread to ensure we honor the `MDIO__IMPORT__CPU_COUNT` environment variable. 
114+     # The Zarr 3 engine utilizes multiple threads. This can lead to resource contention and unpredictable memory usage. 
115+     zarr_config .set ({"threading.max_workers" : 1 })
117116
118117    # Use the pre-opened segy file from worker initialization 
119118    segy_file  =  _worker_segy_file 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments