Author Topic: Restart in ParFEAP  (Read 9396 times)

tzuss

  • New Member
  • *
  • Posts: 2
Restart in ParFEAP
« on: September 11, 2018, 09:32:28 PM »
Hi, I'm trying to figure out how to use the restart function in FEAP. I'm working with an example input of a square with a crack in it, and I managed to successfully generate the restart files and restart the analysis using serial FEAP. However, when I partition the square into 4 parts and run it on 4 processors, in each time step it generates 4 restart files, one for each partition.

The issue is, FEAP will only let me input one file to read the restart data from. When I tried doing that, one partition (the one whose restart file I selected) was ahead of the others, since the other three partitions started from time 0 (photos below of analysis after restart at time 0 and 1).

Is there any way to create a unified restart file for all four partitions, or have FEAP read a restart file for each partition, or some other way to successfully restart the analysis for the whole object? Thanks!

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: Restart in ParFEAP
« Reply #1 on: September 12, 2018, 06:48:50 AM »
This should work just like in the serial case.  Please describe the steps you took in your analysis, step-by-step.

tzuss

  • New Member
  • *
  • Posts: 2
Re: Restart in ParFEAP
« Reply #2 on: September 29, 2018, 06:22:49 PM »
I met with the PhD student I'm working with, and we tried a few more things but we still couldn't figure it out. Here is the analysis I've been running:

BATCh
  PROPortional,,1
END
 1,0,0.0,tt,0.0,tr,0.0,0.0    ! linearly increasing

BATCh
  PVEW,AUTO
END
"Displacements"
"Stresses"
"Strain"
"Phase_Field"

BATCh
  RESTart test ! Commented out when generating restart files
  PETSc,ON
  DT,,dt
  TRANsient,NEWMark,0.5,1.0
  STRE,NODE
  PVEW,NEWSM
  LOOP,,ni
    LOOP,,np
      TIME,,tt
      LOOP,,150
        UTAN,,1
      NEXT
    NEXT
    STRE,NODE
    PVEW
    SAVE test ! Commented out when restarting
  NEXT
END

STOP


We tried running it both with and without the extension option, and every possible file name combination we could think of, but it either did what I described in the previous post, or didn't restart the analysis at all and started from time zero.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: Restart in ParFEAP
« Reply #3 on: September 30, 2018, 12:52:43 AM »
Two thoughts:

1.  What happens if you put the restart after the petsc,on command?

2.  Can you create a small problem, create and edited version of program/restrt.f that writes out some of the data in plain text to the screen or some files while in the save and load states.  This may help with seeing what is incorrect in the files, should thought 1 above solve the problem.

shenrilin

  • Full Member
  • ***
  • Posts: 67
Re: Restart in ParFEAP
« Reply #4 on: October 01, 2018, 05:09:38 PM »
Dear Feap_Admin,

I've tried to place restart after petsc,on command, but it still couldn't work. I looked through the output file and find the error.

(1) I'm running a model with two processors, where one can get two output files named Ofile.0001 and Ofile.0002.

(2) When saving restart file, it will create restart files  Rfile_0001010 and Rfile_0002010 for time step 10, where 0001 and 0002 indicate the rank.

(3) When running restart analysis, one needs to specify the name of the restart files.  I set it as Rfile_0001010 but only the restart file of the first processor is recognized.  the results are same as previous post.

Within the first output file Ofile.0001, it says
Code: [Select]
   Restart from : RZ1L4_0001010                                                                                                                       
   R e s t a r t   I n p u t   D a t a
          Time step number  =      10
          Time at restart   = 1.00000E+00
          Time increment    = 1.00000E-01
          Displacements input
          Proportional load = 1.00000E-01
          Arc-length   load = 1.00000E+00
          Transient states input (noi = 1)
          Force vector input
          Prop load data input
          History data input
Within second output file Ofile.0002, it says
Code: [Select]
   Restart from : RZ1L4_0002                                                                                                                         
 *ERROR* Restart file RZ1L4_0002        does not exist

(4) When I changed the filename from Rfile_0001010 and Rfile_0002010 to Rfile_0001 and Rfile_0002, it works.

So my question is how can I let feap read it correctly if I don't modify the restart name?

Best,

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: Restart in ParFEAP
« Reply #5 on: October 01, 2018, 05:51:56 PM »
It looks like the file names are getting confused.  We'll have a look to see what is going on.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Restart in ParFEAP
« Reply #6 on: October 03, 2018, 01:00:04 PM »
Can you try one thing for us.  In pmacr3.f (serial version) the restart command does a file test with a call to 'addext' (around line 771) with the statement:
       call addext(fint,lct(l),128,4)

Try changing the '128' to '15' (which is the maximum length of lct(l))!

Please let us know if this works.  This also implies that the name of your basic input file cannot be longer than 7 characters since the restart files are written as: Ifile_000n00s, where 'n' is the processor and 's' the step [here indicated being only 1 to 9]. 

shenrilin

  • Full Member
  • ***
  • Posts: 67
Re: Restart in ParFEAP
« Reply #7 on: October 03, 2018, 03:07:42 PM »
Dear Prof. Taylor,

I've tried what you suggested but it couldn't work.

By changing the '128' to '15', I get an error, that is "File names too long. Require :  **".

In my opinion, subroutine "addext" just tried to add an extension to the filename if the argument "EXTE" is specified.  We've tried both cases, with or without extension, none of them works if we don't rename the restart files.

Following your idea, I read the restart code before call subroutine "add text", I found how to make it work. When restarting an analysis, one needs to specify the time step, like "RESTart,,kk", where kk indicates the time step one wanna restart an analysis. And then run parallel Feap with the restart name Rfile_0001. I've tested it, it works as expected.

This is supposed to be very clear but I couldn't find any related text about kk in Feap Manual 8.5.  An updated Feap Manual would be appreciated.

Dear Professor, thank you again for your suggestions.

Best,

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Restart in ParFEAP
« Reply #8 on: October 03, 2018, 07:48:37 PM »
I checked some runs :) and the manual :(

As you note one needs to give the restart file number for parFEAP to get it correct.  With the SAVE command you can manually set the restart file number with SAVE,,k where k is an integer, or you can let parFEAP determine the next available number from the files already in your directory.  To load the file however in parFEAP you always need to give the restart number you are interested in, so you have to use RESTart,,k where k is the number of interest.

The same holds true in the serial version.  The manual appears to need updating; sorry about that.

shenrilin

  • Full Member
  • ***
  • Posts: 67
Re: Restart in ParFEAP
« Reply #9 on: October 04, 2018, 06:31:53 AM »
Dear Professor Govindjee,

Thank you so much for replying me.  Now everything works very well.

Best,