[Swift-user] run exe from the same dir as staged data
Michael Wilde
wilde at mcs.anl.gov
Fri Nov 30 11:00:54 CST 2012
Hi Ketan,
> I am trying to swiftify an application whose executable expects the
> input data (4 files) to be in the directory from where the call is
> made. The said executable (vasp), looks for these files in the pwd and
> runs if the files are found.
The 4 files are symlinked by swift from the workdir shared/ directory into the current working directory (which swift calls the "job directory"). This is explained in the Swift User Guide:
http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html#_how_swift_implements_the_site_execution_model
However, in your swift script you mapped the input files to fully qualified pathnames, so they show up under your shared/ directory:
$ pwd
/Users/wilde/Downloads/vaspswiftlog/swiftwork/vasp-20121130-1006-v9x90821
$ find * -type f
3
info/y/vasp-yt8l7p1l-info
shared/_swiftseq
shared/_swiftwrap
shared/home/kcm92/vasp-work/fullpipeline_small_scale/encut_variations/300/INCAR
shared/home/kcm92/vasp-work/fullpipeline_small_scale/encut_variations/300/KPOINTS
shared/home/kcm92/vasp-work/fullpipeline_small_scale/encut_variations/300/POSCAR
shared/home/kcm92/vasp-work/fullpipeline_small_scale/encut_variations/300/POTCAR
shared/stdouts/f.0000.out
wrapper.log
$
These will be linked below your job dir as, e.g.:
./home/kcm92/vasp-work/fullpipeline_small_scale/encut_variations/300/INCAR
but it seems like vasp is expecting ./INCAR instead.
One solution is:
- run vasp from a wrapper script, like "runvasp.sh"
- place one of the files, say the INCAR file, on the command line in the wrapper's Swift app function.
- in the wrapper, do:
cd $(dirname $1)
- make sure the wrapper creates its output files where swift is expecting, ie either in $(dirname $1) or all the way back up in the jobdir, as you have it now. The easiest way to do this is to also pass the names of the stdout file as an arg to the wrapper (eg $2)
- you should always capture and return stderr as well, if thats an affordable overhead (ie if you dont have too many files).
Also, I see in your stdout file the following:
$ cat shared/stdouts/f.0000.out
Error reading item 'IMAGES' from file INCAR.
CMA: unable to get RDMA device list
That CMA message suggests that your version of VASP may be trying to execute under MPI. You should test VASP on a login host or manually on a cluster node to verify that it will run without MPI. Or, we can help you run it under MPI as well; the Swift MPI documentation needs to be revised for the latest trunk code / 0.94 release candidate.
Mike
> However, using swift, the files are staged with dirtree and the call
> is made via _swiftwrap from <workdir>/job/x/shared which is causing
> the application failure. I could manually cd into the staged dirtree
> where the inputs are present and make a call to vasp and it works.
>
>
> Same behavior is observed with swift trunk, and 0.93.
>
>
> Is there a workaround for the above pattern?
>
>
> Attached are the logs for one sample run.
>
>
>
> Thanks, --
> Ketan
>
>
>
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
--
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory
More information about the Swift-user
mailing list