<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>This solved the problem, thank you!</p>
<p><br>
</p>
<p>By the way: Is is OK to load files from outside the current directory using the full path to the file?</p>
<p><br>
</p>
<p>Best,</p>
<p><br>
</p>
<p>Johan<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nek5000-users <nek5000-users-bounces@lists.mcs.anl.gov> on behalf of nek5000-users@lists.mcs.anl.gov <nek5000-users@lists.mcs.anl.gov><br>
<b>Sent:</b> Friday, October 20, 2017 5:06:43 PM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Error when loading file</font>
<div> </div>
</div>
<div>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p><br>
</p>
<p>Hi Johan,</p>
<p><br>
</p>
<p>There's also an example in navier5.f in the subroutine autoaverager().</p>
<p><br>
</p>
<p>Usage is (say):</p>
<p><br>
</p>
<p>ls -C1 case0.f* > list.in</p>
<p><br>
</p>
<p>then add this to a blank .usr file and run it</p>
<p><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt">c-----------------------------------------------------------------------</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">subroutine usrdat2</span><span style="font-size:10pt">
</span><span style="font-size:10pt">! This routine to modify mesh coordinates</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">include 'SIZE'</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">include 'TOTAL'</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">character*127 fname127</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier; min-height:25px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">call blank(fname127,127)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier; min-height:25px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">fname127='list.in'</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">call auto_averager(fname127) ! simple average of files</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">call outpost(vx,vy,vz,pr,t,'
</span><span style="font-size:10pt"> </span><span style="font-size:10pt">')</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">call exitti('quit after autoaverager$',nelv)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier; min-height:25px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">return</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt"> </span><span style="font-size:10pt">end</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier">
<span style="font-size:10pt">c-----------------------------------------------------------------------</span></p>
<p><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span><span style="font-size:10pt"></span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier; min-height:25px">
<span style="font-size:10pt"> </span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier; min-height:25px">
<span style="font-size:10pt; font-family:Arial,Helvetica,sans-serif">Paul</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:21px; line-height:normal; font-family:Courier; min-height:25px">
<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Nek5000-users <nek5000-users-bounces@lists.mcs.anl.gov> on behalf of nek5000-users@lists.mcs.anl.gov <nek5000-users@lists.mcs.anl.gov><br>
<b>Sent:</b> Friday, October 20, 2017 9:19:42 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Error when loading file</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">load_fld() expects a character*132 on input!<br>
<br>
Cheers,<br>
Stefan<br>
<br>
-----Original message-----<br>
> From:nek5000-users@lists.mcs.anl.gov <nek5000-users@lists.mcs.anl.gov><br>
> Sent: Friday 20th October 2017 16:11<br>
> To: nek5000-users@lists.mcs.anl.gov<br>
> Subject: [Nek5000-users] Error when loading file<br>
> <br>
> Hi,<br>
> <br>
> I load a file in userchk for postprocessing like this:<br>
> <br>
> subroutine userchk<br>
> include 'SIZE'<br>
> include 'TOTAL'<br>
> character(64)::filen<br>
> filen="cha0.f00027"<br>
> <br>
> call load_fld(trim(filen))<br>
> <br>
> return<br>
> end<br>
> <br>
> However, I the program crashes. This is how it looks in the logfile:<br>
> <br>
> nsteps=0 -> skip time loop<br>
> running solver in post processing mode<br>
> <br>
> call userchk<br>
> <br>
> set initial conditions<br>
> Checking restart options: cha0.f000274^@^@^@^@start<br>
> nekuic (1) for ifld 1<br>
> nekuic (1) for ifld 2<br>
> nekuic (1) for ifld 3<br>
> nekuic (1) for ifld 4<br>
> Reading checkpoint data<br>
> 0 0 OPEN: cha0.f000274^@^@^@^@start<br>
> cha0.f000274<br>
> byte_read() :: fopen failure2!<br>
> ERROR: Error reading restart header in mfi_prepare ierr= 1<br>
> <br>
> Why does this error appear, and how can Ifix it?<br>
> <br>
> Best,<br>
> <br>
> Johan<br>
> <br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Nek5000-users mailing list<br>
> Nek5000-users@lists.mcs.anl.gov<br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
_______________________________________________<br>
Nek5000-users mailing list<br>
Nek5000-users@lists.mcs.anl.gov<br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
</div>
</span></font></div>
</body>
</html>