OpenMDAO / OpenMDAO/OpenMDAO

How to run SqliteRecorder in when running simpleGA in parallel

Open
#3,632 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
782
Forks
314
Avg merge
4d 21h
Merged PRs (30d)
4

Description

right now i have just like this

prob.driver = om.SimpleGADriver()
prob.driver.options['bits'] = {'xC': 8}
prob.driver.options['max_gen'] = 10
prob.driver.options['run_parallel'] = True
prob.driver.recording_options['includes'] = ['*']
prob.driver.recording_options['record_objectives'] = True
prob.driver.recording_options['record_constraints'] = True
prob.driver.recording_options['record_desvars'] = True
prob.driver.recording_options['record_inputs'] = True
prob.driver.recording_options['record_outputs'] = True
prob.driver.recording_options['record_residuals'] = False
prob.driver.add_recorder(om.SqliteRecorder("cases.sql"))

but then it creates 4 same copy of sql, another thing, it says all iteration are rank0

is the parallelization not running and how to record in a better way?

Note: SqliteRecorder is running on multiple processors. Cases from rank 1 are being written to /try_alpso_out/cases.sql_1.
Note: SqliteRecorder is running on multiple processors. Cases from rank 2 are being written to try_alpso_out/cases.sql_2.
Note: SqliteRecorder is running on multiple processors. Cases from rank 3 are being written to try_alpso_out/cases.sql_3.
Note: SqliteRecorder is running on multiple processors. Cases from rank 0 are being written to try_alpso_out/cases.sql_0.
Note: Metadata is being recorded separately as try_alpso_out/cases.sql_meta

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report uses SimpleGADriver with run_parallel and SqliteRecorder("cases.sql"); start by reproducing this configuration and read the recorder's rank-specific output notes. Confirm whether parallel execution is active and explain how cases.sql_0 through cases.sql_3 and cases.sql_meta are intended to be inspected or combined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
databases, distributed-systems
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.