Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 25 14:55:49 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m9PLtm98022684 for ; Sat, 25 Oct 2008 14:55:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m9PM6Hc9004303 for ; Sat, 25 Oct 2008 15:06:17 -0700 Message-Id: <200810252206.m9PM6Hc9004303@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551- final1 Date: Sat, 25 Oct 2008 15:06:17 -0700 From: Bill Cheng SOmeone wrote: > The init_neighbor_list file for each node needs to be created inside its > home directory. So we will actually have to create all the directories on > the fly in our code so that the node searches for the file at the right > place (inside the right directory), right ? No. The spec for HomeDir says: If this directory does not exist, your program should exit. > Also for the status request, the 3rd argument which is the external file > readable by NAM (relative to the current working directory if it does not > begin with a / character). Does it mean that if we give the file as > /a/b/c/status.out , we will have to create directories a,b,c first and if > only status.out is given, it will create a status.out inside the directory > where all our code files are (not inside the home directory of each node) If the user specifies /a/b/c/status.out and /a/b/c does not exist, you can either create the directory or report an error and ask the user to specify the command again. If the user specifies just status.out, you will need to create status.out in the "current working directory" and *not* where the code is. The "current working directory" is the current directory before you start running the sv_node command. If I do: mkdir /tmp/mydir cd /tmp/mydir /pathtoyourcode/sv_node then the current working directory is /tmp/mydir. If you really need to know what the current working directory is, you can call getcwd(). -- Bill Cheng // bill.cheng@usc.edu