Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Merge incomplete run

Merge incomplete run 6 years 11 months ago #28282

  • Schmirre
  • Schmirre's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 1
Hi again!

telemac3d.py does not work very well, since it adds a /telemac3d to the directory specification. This command always works for while the computation is running. Isn't the code specified by runcode.py --merge -w ....cas_2017-11-29-16h28min41s telemac3d t3dcas -c win7gforp?
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28283

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Yes, I did not notice. I specify the code right after 'runcode.py'. I have never come across this type of error. Probably dumb question, but is there enough storage for the recollection to complete? I could try to recollect with my installation (trunk) but the files are huge to upload...

Maybe the developers can share their thoughts?
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28284

  • Schmirre
  • Schmirre's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 1
I have come across it several times, either after a crash or a too short data-file. Would be really smooth to be able to merge from the time step of failure istead of running it all through again.. I have enough space so it's not that.

Thanks for offering, really kind of you but the files are really to large ;)
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28285

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
As it seems the problem occur at the last time step we could imagine there is a problem in one of the file which cause the gretel crash...
As a potential solution, you could try to erase the last time step of all the partitioned file and run the merge again...

Hope this helps
Christophe
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28286

  • Schmirre
  • Schmirre's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 1
Hi!

How is this done practically? In a post-processor? Fudaa?

Thanks!
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28287

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
I might be able to help you with that:
Here is a python script I use to keep only the last timestep:
    from parsers.parserFortran import cleanQuotes
    from runSELAFIN import alterSELAFIN
    
    slf    = SELAFIN(spefile)
    names  = slf.VARNAMES
    frames = slf.tags['times']
    tmax   = max(frames)
    
        for i,var in enumerate(names):
        i += 1
        #print i,var,tmax
        vars = cleanQuotes(var.replace('_',' '))
        #~~> times = (tfrom,tstep,tstop)
        slf1 = alterSELAFIN( spefile, times = (tmax,0,tmax), vars  = vars, root=None )
        #~~> Reset time to 0
        slf1.alterTIMES(pT=-tmax)
    
        # write *.slf file
        name, ext    = os.path.splitext(spefile)
        new_filename = '{}_{}{}'.format(name,i,ext)
        slf1.putContent( new_filename )
        
        del slf1
In alterSELAFIN "times = (tmax,0,tmax)", the arguments are (start_step, step, last_step) so you can adjust accordingly...

You should also add a loop for all selafin file in a directory matching a pattern like it is done here:
def PurgeOld(dir):
    '''
    Deletes files in given directory that contain *old*
    '''
    import os,re
    pattern = '[_]old\d{1,}\.(slf|spe|glob)$'
    try:
        for f in os.listdir(dir):
            if re.search(pattern, f):
                os.remove(os.path.join(dir, f))
    except:
        pass
    return
Regards,
Costas
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28288

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Possible with Fudaa but maybe easier with python scripts (crop_sel.py from PPutils tool for example)

Regards
Christophe
The administrator has disabled public write access.

Merge incomplete run 6 years 11 months ago #28305

  • Schmirre
  • Schmirre's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 1
Thank you!

I'll try and dig into it!

/Schmirre
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.