PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
199 stars 230 forks source link

[Bug fix] : Fixed `gsub` issue in `write.config.SIPNET` #3275

Closed meetagrawal09 closed 1 month ago

meetagrawal09 commented 3 months ago

Description

Fixed issues with local deployment for SIPNET model.

The variables cpruncmd and cpoutcmd were added to write.config.SIPNET to extend it for cloud based PEcAn deployment. On a local deployment setup the workflow for SIPNET model was breaking with the below error :

Error in gsub("@CPRUNCMD@", cpruncmd, jobsh) :
  invalid 'replacement' argument
Calls: <Anonymous> ... <Anonymous> -> do.call -> write.config.SIPNET -> gsub
> proc.time()
   user  system elapsed
  7.132   3.362   7.877

The error arises since local pecan.xml does not contain settings$host$rabbitmq$cpfcmd and settings$host$rabbitmq$cpfcmd which is used to set cpruncmd and cpoutcmd in the write.config.SIPNET file.

Review Time Estimate

Types of changes

Checklist: