comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to run a program for datasets located in different folders at a single stretch
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to run a program for datasets located in different folders at a single stretch [message #71940] Wed, 28 July 2010 06:31
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

> I think that in general 'data' files should not be in the IDL search
> path and that this problem is best solved primarily (but not entirely)
> outside of IDL.

Well, I was describing the actual situation, not the
theoretical best practice. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to run a program for datasets located in different folders at a single stretch [message #71946 is a reply to message #71940] Wed, 28 July 2010 05:49 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.26b9cefcafda2ee39897ad@news.giganews.com>,
David Fanning <news@dfanning.com> wrote:

> I have the problem of writing IDL programs that not only
> run on the three different machines that I juggle on a
> daily basis, but run on scientists and collaborators
> machines, too. It is almost impossible to specify
> a data file name that works everywhere.

I think that in general 'data' files should not be in the IDL search
path and that this problem is best solved primarily (but not entirely)
outside of IDL.

We have a great variety of machines in my group (desktops and servers),
but data volumes (mostly on RAID devices) are accessed via the same
paths on all of the machines. This requires a one-time effort setting up
NFS mount points and aliases on each machine. (I don't know if the
equivalent operation is easy to do on Windows machines.)

To access the data, users need to define an IDL system variable in their
startup.pro file that points to the top level directory of the data
set. As long as the data is in its normal location, users should
be able to access it transparently.

If someone wants to use data in an alternative location, all they have
to do is override the value of the system variable.

Ken
Re: How to run a program for datasets located in different folders at a single stretch [message #71949 is a reply to message #71946] Wed, 28 July 2010 05:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sid writes:

> I have a program which I need to run for several data sets (which
> are in different different folders), Since the number of folders in
> which the data sets present are huge in number, it is very difficult
> to go to that folder in which the dataset is and then copy the program
> to that particular folder and run it(orelse i need to copy the
> location of the dataset in the program, which is also a difficult
> task). So please give some ideas to run the program for all the
> datasets in different folder at a single stretch.

I have the problem of writing IDL programs that not only
run on the three different machines that I juggle on a
daily basis, but run on scientists and collaborators
machines, too. It is almost impossible to specify
a data file name that works everywhere.

Since the files I am looking for are often mixed in with
IDL programs somewhere on the end-users IDL path, I use
the Coyote Library routine FIND_RESOURCE_FILE to locate
them:

dataFile = Find_Resource_File('theFileForJob.dat')

It is kind of like IDL's search for *.pro files, only
for data files.

It can often be slow (if the user has a large IDL path),
but it almost always does the job!

http://www.dfanning.com/programs/find_resource_file.pro

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Using contour procedure to extract specific regions
Next Topic: Re: How to run a program for datasets located in different folders at a single stretch

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:53:18 PDT 2025

Total time taken to generate the page: 0.96072 seconds