Welcome, Guest
Username: Password: Remember me

TOPIC: Gretel and STDIN

Gretel and STDIN 10 years 6 months ago #12834

  • olslewfoot
  • olslewfoot's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 132
  • Thank you received: 3
Dear all

I have a curious problem that when recombining files from a parallel simulation gretel cannot read the GEO file, RES file or NPROC from STDIN.
The model runs and ends perfectly but the reconstruction of the results file fails.

For example gretel_autop.f uses:

LI=5
LU=6
WRITE (LU,ADVANCE='NO',FMT='(/,'' NUMBER OF PROCESSORS: '')')
READ (LI,*) NPROC
WRITE(LU,*)
This should read NPROC from file handle 5 (STDIN) and write to file handle 6 (STDOUT)

However I am not reading these data and the process halts with the following error:

At line 160 of file /gpfs/env/e088/opentelemac_mascaret/v6p3r2/sources/utils/gretel/gretel_autop.f (unit = 5, file = 'stdin')
Fortran runtime error: End of file

It seems that the connection to stdin is being lost during the run.

Can anyone tell me where in the TELEMAC system the file handles are assigned and variables like PARALLEL PROCESSORS are read from the steering file? This would help me to debug this problem.

Thanks
John
The administrator has disabled public write access.

Gretel and STDIN 10 years 5 months ago #13320

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

Are you using the Python or the Perl environment. If you use the Python, the option --merge will merge your results after your simulation has completed. I recommend you also use the option -w (to create a fixed temporary directory, so you do not have to run PARTEL all the time).

This is not an answer to your question but I hope this helps nonetheless,
Sébastien.
The administrator has disabled public write access.

Gretel and STDIN 10 years 5 months ago #13404

  • olslewfoot
  • olslewfoot's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 132
  • Thank you received: 3
Hi Sebastien
Thanks for the reply. I am using python for this install.

The python code is working as it should through-out the process.

I have isolated the problem to gretel_autop.f where the file handles 5 and 6 should read and write from and to stdin and stdout respectively. Whilst partel splits the domain perfectly and the model runs and completes, the recollection fails because the small domain files are not found because variables NPROC, RES and GEO are not read from stdin.

I worked round this by hard coding NPROC, RES and GEO in gretel_autop.f

This isn't a common problem and only occurs on a cluster I am using to support a student - so sure it is an OS related problem, but I haven't found the remedy yet.

Thanks
JOhn
The administrator has disabled public write access.

Gretel and STDIN 9 years 9 months ago #15791

  • vmarieu
  • vmarieu's Avatar
Hello,

I had the same problem on a cluster with v6p3r2. The problem was actually due to a carriage return that was missing at the end of the gretel_autop parameter file gretel_T3DRES.par. I changed the python file runcode.py as following:
- line 652:
putFileContent('gretel_'+file+'.par',[geom,file,str(ncsize),''])
instead of putFileContent('gretel_'+file+'.par',[geom,file,str(ncsize)])
- line 669:
putFileContent('gretel_'+file+'.par',[geom,file,str(ncsize),''])
instead of putFileContent('gretel_'+file+'.par',[geom,file,str(ncsize)])

Now it works fine.

Bye,

Vincent.
The administrator has disabled public write access.
Moderators: borisb

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