Issue 55 in pencil-code: parallel_open assumes access to /tmp

1 view
Skip to first unread message

penci...@googlecode.com

unread,
Jun 16, 2010, 8:07:50 AM6/16/10
to pencil-co...@googlegroups.com
Status: Accepted
Owner: Bourdin.KIS
Labels: Type-Defect Priority-Critical

New issue 55 by ajo...@strw.leidenuniv.nl: parallel_open assumes access to
/tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

In the parallel_open subroutine in mpicomm.f90 the following file is opened:

write(filename,'(A,A,A,I0)') '/tmp/', file, '-', iproc

However, if the user does not have access to /tmp/ this will cause the code
to stop.

We need to find a better place to put this file. I suggest the data
directory.

I have given this bug critical priority because it can scare off new users
to encounter such structural bugs.

penci...@googlecode.com

unread,
Jul 21, 2010, 9:45:30 AM7/21/10
to pencil-co...@googlegroups.com

Comment #1 on issue 55 by AxelBrandenburg: parallel_open assumes access to
/tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

Philippe, did you notice this report of 16 June.
Axel

penci...@googlecode.com

unread,
Jul 21, 2010, 11:05:04 AM7/21/10
to pencil-co...@googlegroups.com
Updates:
Labels: -Type-Defect -Priority-Critical Type-Other Priority-Low

Comment #2 on issue 55 by Bourdin.KIS: parallel_open assumes access to /tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

Sorry, I did not notice this!
Thanks to Anders for telling me via eMail.

Well, is there any case, where a /tmp directory is not available and
accessible?
I really strongly believe, that it should always be there on any Unix-ish
system.
(Most probably even for cygwin and MacOS X.)

Priority=Low because it has no known impact (not even for new users).

penci...@googlecode.com

unread,
Jul 21, 2010, 11:26:53 AM7/21/10
to pencil-co...@googlegroups.com
Updates:
Labels: -Priority-Low Priority-Critical

Comment #3 on issue 55 by and...@astro.lu.se: parallel_open assumes access
to /tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

This happened to people at LTH who came to visit me. They simulate at
Lunarc in Lund. They did not have access to /tmp.

Changed priority to critical.

We can write temporary files to the data directory.

penci...@googlecode.com

unread,
Aug 3, 2010, 6:13:04 PM8/3/10
to pencil-co...@googlegroups.com
Updates:
Labels: -Type-Other -Priority-Critical Type-Enhancement Priority-Medium

Comment #4 on issue 55 by Bourdin.KIS: parallel_open assumes access to /tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

This should be fixed 'on site', please report to the Lunarc admins.
/tmp must be there and acessible, it is Unix standard (see FHS):
http://en.wikipedia.org/wiki/Unix_directory_structure

Writing to /data is a bad idea, because this produces exactly the load on a
remote filesystem, which should be prevented with parallel_open, making it
useless.
We need a *local* directory on the compute node, where we can write at.
Ideally it should be located in a (volatile) RAM disk (which is /tmp).

I don't see a reason, why only Lunarc want to have /tmp closed for users...
Many software packages rely on it. The Lunarc-admins should resolve this
issue.

If no other solution is possible, the LTH people could still change it
locally in their checkout of the code, but I can not accept to check this
in, because this change would crash Lustre filesystems for large runs (256
cores or more).

One could still make a 'mpicomm_notemp' module (copy, paste, and replace
/tmp) and use this as replacement module for the default one.

=> Changed to "Enhancement" of average priority

penci...@googlecode.com

unread,
Aug 4, 2010, 2:34:20 AM8/4/10
to pencil-co...@googlegroups.com
Updates:
Labels: -Priority-Medium Priority-High

Comment #5 on issue 55 by and...@astro.lu.se: parallel_open assumes access
to /tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

In that case please do the following:

1. Test for existence of /tmp and give civilised error message if there is
no write access to /tmp

2. Allow users to choose another directory than /tmp

Change priority high, because the Pencil Code should work for all users, no
matter how their file system is set up.

penci...@googlecode.com

unread,
Aug 4, 2010, 2:11:39 PM8/4/10
to pencil-co...@googlegroups.com
Updates:
Status: Fixed

Comment #6 on issue 55 by Bourdin.KIS: parallel_open assumes access to /tmp
http://code.google.com/p/pencil-code/issues/detail?id=55

Added an error message, if opening the temporary file fails (before, only
errors during writing have been catched).

Added 'get_tmp_prefix' routine to allow to check for environment variables
like 'TMP_DIR' or 'PBS_...'.

In the worst case, if /tmp is not available and usual environment variables
(see syscalls.f90/get_tmp_prefix for a valid list) are not present, one can
still manually 'export TMP_DIR="..."' before calling start.csh/run.csh.

Reply all
Reply to author
Forward
0 new messages