[mvapich-discuss] Segmentation faults with long current working directory names

Sayantan Sur surs at cse.ohio-state.edu
Tue Jun 27 09:52:07 EDT 2006


Hello Huub van Dam,

Van Dam, HJJ (Huub) wrote:

>Hi,
>
>I have build a program linking against MVAPICH Version 0.9.7 on an HP
>Cluster Platform 4000 based on Redhat Enterprise Linux 4 which is build
>from 2.4GHz Opteron cores linked together by infiniband with VAPI
>drivers.
>  
>
Thanks for your interest in MVAPICH!

>The resulting code works or segmentation faults (after a while but
>always in the same place) depending on the length of the current working
>directory name. The program runs fine when I run it in
>
>   /home/hjmvd93/flop
>
>But it segmentation faults when I run it in 
>
> 
>/home/hjmvd93/gamessuk_hapo/GAMESS-UK-v2/examples/parallel_gas/input_fil
>es_benchmarks
>
>Now I am at a complete loss why this happens. My application code does
>not care for or use the current working directory name at any point. So
>I am wondering whether MVAPICH is using the current working directory
>name and whether this has a fixed length, perhaps? Can anyone answer
>this question or give me some advice, please? 
>  
>
I too am surprised by this behavior, but unable to reproduce it. For 
e.g. I created a directory tree whose length is greater than yours and 
executed a sample MPI program using MVAPICH-0.9.7 over VAPI drivers. 
Here is my resulting run:

<----
[surs at d6-as4:temp] mkdir -p 
./home/hjmvd93/gamessuk_hapo/GAMESS-UK-v2/examples/parallel_gas/input_files_benchmarks
[surs at d6-as4:temp] cd !$
cd 
./home/hjmvd93/gamessuk_hapo/GAMESS-UK-v2/examples/parallel_gas/input_files_benchmarks
[surs at d6-as4:input_files_benchmarks] ls
[surs at d6-as4:input_files_benchmarks] cp 
~/projects/mvapich/mvapich-0.9.7/examples/basic/cpi .
[surs at d6-as4:input_files_benchmarks] pwd
/home/7/surs/temp/home/hjmvd93/gamessuk_hapo/GAMESS-UK-v2/examples/parallel_gas/input_files_benchmarks
[surs at d6-as4:input_files_benchmarks] ls
cpi*
[surs at d6-as4:input_files_benchmarks] 
~/projects/mvapich/mvapich-0.9.7/bin/mpirun_rsh -np 2 d6 d7 ./cpi
Process 0 of 2 on d6-as4
Process 1 of 2 on d7-as4
pi is approximately 3.1415926544231318, Error is 0.0000000008333387
wall clock time = 0.000591
---->

The maximum working directory length usable with mpirun_rsh is 256, 
which is quite long. The directory you mentioned is less than 100 
characters long. Maybe some intermediate library your application uses 
has limitation on directory depth? Could you try out any other MPI 
application, like the cpi program (located in examples/basic) or OSU 
benchmarks to make sure they run correctly (without segmentation fault) 
on your platform?

Thanks,
Sayantan.

-- 
http://www.cse.ohio-state.edu/~surs



More information about the mvapich-discuss mailing list