RESCOMP Archives

February 2006

RESCOMP@LISTSERV.MIAMIOH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Xudong Yu <[log in to unmask]>
Reply To:
Research Computing Support <[log in to unmask]>, Xudong Yu <[log in to unmask]>
Date:
Tue, 7 Feb 2006 18:39:35 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (140 lines)
Hi Robin:
	I have exam the code for 411, it's python. :) here is what I found:

Inside the 411get, this is the function call to do the real writing:


self.write(contents, meta, files[file])

and this function is inside /opt/rocks/lib/python/rocks/service411.py, here is the code:


        def write(self, contents, meta, httpmeta=None):
                """Writes a 411 file with the given plaintext contents, and
                meta information to the local filesystem. Respects the master
                file's owner, group, and permission bits. Contents and meta
                arguments are in the format from get()."""

                try:
                        # Get standard 411 headers - safe because they were
                        # encrypted.
                        filename = meta["Name"]
                        owner = meta["Owner"]
                        uid, gid = map(int, owner.split("."))
                        mode_oct = meta["Mode"]
                except ValueError:
                        raise Error411, "File has malformed 411 headers."

                try:
                        # This possibly could be done with an OO file class,
                        # but not worth it if we only have two choices.
                        mode = int(mode_oct, 8)
                        if stat.S_ISDIR(mode):
                                mkdir(filename)
                        elif stat.S_ISREG(mode):
                                path, name = os.path.split(filename)
                                mkdir(path)
                                f = open(filename, "w")
                                f.write(self.present(contents, meta, httpmeta))
                                f.close()
                        else:
                                raise Error411, \
                                        "File %s is an unknown type" % filename
                        # Set file meta data
                        os.chown(filename, uid, gid)
                        os.chmod(filename, stat.S_IMODE(mode))

                except (IOError, OSError), msg:
                        raise Error411, \
                                "Could not write %s: %s" % (filename, msg)

	You will see that it just simply use "f = open(filename, "w")" to do the thing, so as long as 
the file is not locked, file will be open and overwritten.

thanks

xudong


-----Original Message-----
From: Robin [mailto:[log in to unmask]]
Sent: Tuesday, February 07, 2006 5:30 PM
To: Research Computing Support; Xudong Yu; 'Carolyn H. Ledford'
Subject: Re: running MPI-IB with external input file


Xudong,

Would you please give me a call at: 513-529-1483 or 513-330-3686 ?
I would give you the password and account right then.

Thanks,
Robin

Xudong Yu wrote:

>Hi Jaime:
>	Did you get my email asking for the login information.
>I didn't get your reply yet. If you have already sent me the 
>login information, I will apologize that I need you send me
>it again. we have a ISP problem this moring, and we can't get 
>any email at that time
>
>thanks
>
>xudong
>
>
>-----Original Message-----
>From: jaime combariza [mailto:[log in to unmask]]
>Sent: Tuesday, February 07, 2006 4:23 PM
>To: Platform Computing Support
>Cc: [log in to unmask]; Xudong Yu
>Subject: running MPI-IB with external input file
>
>
>here is a LOG file for the following cases:
>
>1 - FFT code compile using intel compilers 8.1 and openmp. It runs fine.
>
>
>2 - similar code but MPI version. Compiled using intel 8.1 and MPI-IB
>(/usr/local/topspin/mpi/mpich/bin/mpif90.i
>
>the hostfile should run two processes on the head node.
>
>This run fails:
>
>[combarje@mulnx31 OMP1]$ /usr/local/topspin/mpi/mpich/bin/mpirun_ssh 
>-np 2 -hostfile ./mpi-hosts mpi.x < st.in
>/usr/bin/X11/xauth:  error in locking authority file /home/combarje/.Xauthority
>forrtl: severe (24): end-of-file during read, unit -4, file stdin
>Image              PC                Routine            Line 
>Source
>mpi.x              00000000004547B6  Unknown               Unknown  Unknown
>Timeout alarm signaled
>Cleaning up all processes ...done.
>
>
>3 - same program compiled using intel 8.1 and MPICH over GIG etheernet
>(/opt/mpich/intel/bin)
>
>The code runs fine.
>
>Is there any reason why IB does not like to read the inout file? If I 
>include all the inout parameters in the code,
>it runs fine (over IB)???
>
>Thanks
>
>
>
>
>Jaime E. Combariza, Ph.D.
>Assistant Director Research Computing
>http://www.muohio.edu/researchcomputing
>Miami University
>(513) 529-5080  
>  
>

ATOM RSS1 RSS2