PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Batch processing of files
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Batch processing of files  (Read 789 times)

Jiri

  • Contributor
  • Posts: 3
Batch processing of files
« on: October 21, 2019, 09:40:19 AM »
I have about 50 files that I need to run several times. Is possible some kind of batch processing of files in PHREEQC/NOTEPAD++? I am not aware about such function/option. I would like to process all 50 files within single run.
George
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: Batch processing of files
« Reply #1 on: October 21, 2019, 03:12:48 PM »
You can use the INCLUDE$ keyword to include an input file, so a file with a series

INCLUDE$ file1
INCLUDE$ file 2
...

would run a series of files as a single run.

Alternatively, you can use a batch script for your operating system to make 50 runs.
Logged

Jiri

  • Contributor
  • Posts: 3
Re: Batch processing of files
« Reply #2 on: October 21, 2019, 11:04:23 PM »
I have tried following script:

INCLUDE$ FILE1.phr
INCLUDE$ FILE2.phr
INCLUDE$ FILE3.phr
END

Each file should do some calculations and generate about 35 output files. However, only the FILE1.phr was successfully processed and the processing did not proceed with FILE2 and FILE3.

George
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: Batch processing of files
« Reply #3 on: October 22, 2019, 03:33:51 AM »
It works. There should be a statement like this for each file:

Reading data from FILE1.phr ...

If it fails, there should be an ERROR statement in the output file.

Perhaps there is a DATABASE definition in FILE2.phr, which would cause an error because DATABASE can only be used as the first line in the first file.
« Last Edit: October 22, 2019, 03:57:11 AM by dlparkhurst »
Logged

Jiri

  • Contributor
  • Posts: 3
Re: Batch processing of files
« Reply #4 on: October 22, 2019, 07:58:27 AM »
You are right. Deleting database reference line from all files, except the first one, was the solution.
Thanks,
George
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Batch processing of files
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2