Questions about using the parallel mode

2 views
Skip to first unread message

Taihsiang Ho

unread,
Dec 19, 2015, 10:15:38 PM12/19/15
to sol...@googlegroups.com
Hi,
I tried to run my driven script in parallel mode so I could study and development the parallel part of SOLVCON.
By reading the source code and the other driven script examples,
I suppose I could enable the parallel mode by passing a special attribute "domaintype" when creating simulation case.

For example, something like:

@gas.register_arrangement
def tube(casename, **kw):
    from solvcon.domain import Collective
    return tube_base(
        # Required positional argument for the name of the simulation case.
        casename,
        domaintype=Collective,
        # Arguments to the base configuration.
        gamma=1.4,
        ssteps=200, psteps=4, edgelength=0.02,
        rho1=1.0, p1=1.0,
        rho2=0.125, p2=0.1,
        # Arguments to GasCase.
        time_increment=7.e-4, steps_run=600, **kw)

but I was complained by SOLVCON when run this driven script:

Traceback (most recent call last):
  File "./go", line 254, in <module>
    sc.go()
  File "/home/tai271828/work-my-projects/solvcon/solvcon.installed/solvcon/cmdutil.py", line 187, in go
    cmd()
  File "/home/tai271828/work-my-projects/solvcon/solvcon.installed/solvcon/command.py", line 1091, in __call__
    func(submit=False, **funckw)
  File "/home/tai271828/work-my-projects/solvcon/solvcon.installed/solvcon/case.py", line 1077, in simu
    cse = func(*args, **kw)
  File "./go", line 250, in tube
    time_increment=7.e-4, steps_run=600, **kw)
TypeError: tube_base() got multiple values for keyword argument 'domaintype'

Questions:
1. where the argument 'domaintype' was given is the correct location?
2. was I in the right way to enable the parallel mode?

Thanks.

Cheers,
Taihsiang 

Yung-Yu Chen

unread,
Dec 20, 2015, 2:18:09 AM12/20/15
to sol...@googlegroups.com
On Dec 20, 2015, at 11:15 AM, Taihsiang Ho <tai2...@gmail.com> wrote:

Hi,
I tried to run my driven script in parallel mode so I could study and development the parallel part of SOLVCON.
By reading the source code and the other driven script examples,
I suppose I could enable the parallel mode by passing a special attribute "domaintype" when creating simulation case.


This is not exactly true.  In addition to a correct domaintype, you also need to tell solvcon.case.MeshCase a correct npart.  SOLVCON then needs to spawn new processes, either locally or remotely, to carry out parallel computing.  Most of the logic should be in solvcon.case.MeshCase or its predecessor solvcon.case_legacy.
domaintype should be Distributed instead of Collective.  I can’t remember why I have two classes of identical functions, but they have different uses.  The detail might be in MeshCase.

For parallel runs you can refer to $root/ftests/test_remote.py.  It’s not functioning now, but should provide hints.

yyc

Thanks.

Cheers,
Taihsiang 

--
You received this message because you are subscribed to the Google Groups "solvcon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solvcon+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at https://groups.google.com/group/solvcon.
To view this discussion on the web visit https://groups.google.com/d/msgid/solvcon/CAGpVV1hi1Eo9sA%3DNgttTTnya3TRcdp08uNLvKDYQ0AR%3Dv6wjqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
Yung-Yu Chen
http://yyc.solvcon.net/
+886 (99) 129 4763

Reply all
Reply to author
Forward
0 new messages