Presentation is loading. Please wait.

Presentation is loading. Please wait.

Navigation and Ancillary Information Facility NIF Porting SPICE Kernels Between Computers June 2004.

Similar presentations


Presentation on theme: "Navigation and Ancillary Information Facility NIF Porting SPICE Kernels Between Computers June 2004."— Presentation transcript:

1 Navigation and Ancillary Information Facility NIF Porting SPICE Kernels Between Computers June 2004

2 Navigation and Ancillary Information Facility NIF Porting Kernels 2 Topics Porting summary Identification of SPICE text and binary kernel files Compatible and incompatible computing environments –for text files –for binary files Porting text and binary kernel files between compatible environments Porting kernels between text-incompatible environments Porting kernels between binary-incompatible environments –using any Toolkit version –using SPICE Toolkit Version N0052* or later Caveats Allowed operations when using non-native binary kernels with Toolkit version N0052* or later Future plans regarding porting SPICE kernels No difference between using the FORTRAN or C versions of the Toolkit *SPICE Toolkit Version N0052 was released February, 2002

3 Navigation and Ancillary Information Facility NIF Porting Kernels 3 Porting Summary *SPICE Toolkit Version N0052 was released February, 2002

4 Navigation and Ancillary Information Facility NIF Porting Kernels 4 Text and Binary Kernels SPICE text kernels are: –text PCK (the most standard type of PCK) –IK –FK –LSK –SCLK –“Furnsh” kernel –MK (“mission kernel) SPICE binary kernels are: –SPK –binary PCK (exists only for Earth and moon) –CK –ESQ (part of the E-kernel) –DBK (database kernel) –Sky catalog* –Control net kernel* –Terrain kernel* * New kinds of kernels, under development “kernel” means “SPICE data file”

5 Navigation and Ancillary Information Facility NIF Porting Kernels 5 Compatible Environments for Text Kernels Since text kernels are only text files…

6 Navigation and Ancillary Information Facility NIF Porting Kernels 6 Compatible Environments for Binary Kernels

7 Navigation and Ancillary Information Facility NIF Porting Kernels 7 Porting Text and Binary Kernels Between Compatible Computers You may safely use the binary mode of ftp when moving binary or text kernels between compatible computing environments. –Use an ftp client or use an Internet browser with ftp://….. –Can also use AFS, NFS or unix cp, scp, or sftp

8 Navigation and Ancillary Information Facility NIF Porting Kernels 8 Porting Kernels Between Text-Incompatible Computers (1) Text information is always provided using ASCII codes for all computing environments. –However, different environments use different methods for indicating the end of a line of text. Port text kernels using ftp ASCII mode. –ftp provides the needed conversion when moving text files between incompatible computers. –SPICE cannot process a text-incompatible kernel. Loading such a kernel does not change the state of the kernel pool (a no-op). FTP using ASCII mode text kernel text kernel

9 Navigation and Ancillary Information Facility NIF Porting Kernels 9 Porting Kernels Between Text-Incompatible Computers (2) Porting text kernels between incompatible environments requires care. Enhanced security requirements at some installations now mandates the use of sftp and scp. sftp and scp perform pure binary data transfers. –Simple commands to convert line terminator »Unix commands dos2unix, unix2dos. If unavailable, try Perl… »Dos->Unix perl -pi -e 's/\015\012/\012/' file_name »Unix->Dos perl -pi -e 's/\012/\015\012/' file_name

10 Navigation and Ancillary Information Facility NIF Porting Kernels 10 Different computers use different means for storing binary data –The compatible groupings were shown on an earlier page –Computers in different groups are “incompatible” Prior to SPICE Toolkit version N0052* you had to use the “SPICE transfer format” to port binary kernels between incompatible computers –This is explained in subsequent pages Starting with Toolkit version N0052*, binary kernels may be ported between incompatible computers by simply ftp’ing in binary mode –This is explained in subsequent pages –Does not include VAX computers –Does not yet work for EK/ESQ Porting Kernels Between Binary-Incompatible Computers (1) *SPICE Toolkit Version N0052 was released February, 2002

11 Navigation and Ancillary Information Facility NIF Porting Kernels 11 On the source machine, use “toxfr” to convert from binary to SPICE transfer format. * Use FTP in ASCII mode to move the SPICE transfer format file between the incompatible computers. On the destination machine, use “tobin” to convert from transfer to binary format. * The next page displays a graphic representation of this process. Using version N0051 Toolkit or earlier Porting Kernels Between Binary-Incompatible Computers (2) * “toxfr” and “tobin” are SPICE Toolkit programs

12 Navigation and Ancillary Information Facility NIF Porting Kernels 12 ephemeris.bsp ephemeris.xsp ephemeris.bsp Brand X Computer (e.g. PC/Win) Brand Y Computer (e.g. Sun/Solaris) FTP using ASCII mode Using version N0051 Toolkit or earlier “toxfr” and “tobin” are SPICE Toolkit utility programs Porting Binary Kernels Between Incompatible Computers (3) toxfr tobin

13 Navigation and Ancillary Information Facility NIF Porting Kernels 13 The N0052 Toolkit includes binary kernel reader modules that detect the environmental heritage of a binary kernel and perform the proper run-time interpretation of the byte stream. –You can simply move the file between the incompatible computers using binary mode of FTP. »Could also use AFS, NFS or cp –Since the SPICE reader modules perform additional processing when reading binary files from incompatible computers, the “read” speed may be slower then when reading compatible binary kernels. Using version N0052 Toolkit or later Porting Kernels Between Binary-Incompatible Computers (4) FTP using binary mode binary kernel binary kernel Brand X Computer (e.g. PC/WinNT) Brand Y Computer (e.g. Sun/Solaris)

14 Navigation and Ancillary Information Facility NIF Porting Kernels 14 Porting Binary Kernels - Caveats (1) This process is really not “porting” the file; rather it is run-time interpretation of non-native binary files. If the kernel you are using is a non-native binary kernel you can read this file but you may not write data to this file. –You can not use the SPICE Toolkit’s “commnt” or “spacit” programs, or any other means, to write information into the comment area, or to delete information from the comment area. –You cannot append additional data to the kernel. Run-time conversion does not work for E-kernel (ESQ) files. –More generally, it does not yet work for any file built upon the SPICE “DAS” architecture. This process will not work when a VAX is the source or destination machine –No plans to add this capability. Using version N0052 Toolkit or later

15 Navigation and Ancillary Information Facility NIF Porting Kernels 15 Porting Binary Kernels - Caveats (2) Never transfer any type of binary kernel using ftp’s ASCII mode. The line terminator conversion intended for pure text files will corrupt the binary data Using Any Toolkit Version

16 Navigation and Ancillary Information Facility NIF Porting Kernels 16 Porting Binary Kernels - Allowed Operations (1) You may “load” and read both non-native and native binary kernels in the same runtime instance You may merge any combination of native and non- native SPK files –The resultant, merged SPK file will be in native format Using version N0052 Toolkit or later

17 Navigation and Ancillary Information Facility NIF Porting Kernels 17 Porting Binary Kernels - Allowed Operations (2) You can convert a non-native binary file to native binary format by going through the binary–to transfer–to binary conversion process using NAIF Toolkit utilities “toxfr” and “tobin” –Converting to native binary format will speed up read access –This simple, two-step process takes place on one machine »See flow chart below: ephemeris.xsp (native binary format) (non-native binary format) (“transfer” format) ephemeris.bsp Using version N0052 Toolkit or later toxfr tobin

18 Navigation and Ancillary Information Facility NIF Porting Kernels 18 Don’t Use Email! NAIF recommends against the use of email to transfer kernels… …unless tests prove successful using the same conditions/computers intended for current use. Possible problem causes: –Incompatible binary or text representations (as already discussed). –An attachment size limit somewhere in the e-mail chain. –The sender’s or recipient’s mail client modifies the kernel based on file name or presumed content. –When you must email kernels, compress either with zip, or gzip (or stuffit) to the file then send the compressed file as an email attachment.

19 Navigation and Ancillary Information Facility NIF Porting Kernels 19 Future Plans for Porting Kernels NAIF does not anticipate revising text kernel readers to process non-native (incompatible) text kernels. As of Toolkit version N0057, the FURNSH/furnsh_c/cspice_furnsh loader checks the line terminator, signaling an error on non-native text kernels. NAIF does anticipate extending the ability to use non-native binary files to EK (ESQ) files. –More generally, NAIF will extend non-native read to any SPICE file based on the “DAS” architecture. NAIF does not plan to extend the ability to use non-native binary files to any situation involving any VAX computer or a DEC Alpha computer using VMS. –Users must continue to use the SPICE “transfer format” process when using these environments.

20 Navigation and Ancillary Information Facility NIF Porting Kernels 20 FORTRAN versus C The C, FORTRAN, and IDL SPICE Toolkits possess the same kernel read and write attributes. –This applies whether using a pre-Version N0052 or a post- Version N0052 Toolkit. –This applies whether using “transfer” format to port a binary kernel, or the new N0052 kernel reader modules to do on-the-fly translation of data in a binary kernel.


Download ppt "Navigation and Ancillary Information Facility NIF Porting SPICE Kernels Between Computers June 2004."

Similar presentations


Ads by Google