Editing
Software Development Platforms
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Development on OpenVMS= =="Hello, world!"== ===A simple "Hello, world!" application=== In C: Write the following program in your favorite text editor (e.g. eve) and save it as hello.c: <pre> #include <stdio.h> int main(void) { printf("Hello, world!\n"); return(0); } </pre> Compile and link using the following lines: <pre> CC /OBJECT=hello.obj hello.c LINK hello.obj /EXECUTABLE=hello.exe </pre> Run it: <pre> $ run hello Hello, world! $ </pre> In C++: Write the following program in your favorite text editor (e.g. eve) and save it as hello.cxx: <pre> #include <iostream> int main() { cout << "Hello, world!" << endl; return 0; } </pre> Compile and link using the following lines: <pre> CXX /OBJECT=hello.obj hello.cxx CXXLINK hello.obj /EXECUTABLE=hello.exe </pre> Run it: <pre> $ run hello Hello, world! $ </pre> ===A "Hello, world!" application with parameters=== Write the following program in your favorite text editor (e.g. eve) and save it as say_hello.c: <pre> #include <stdlib.h> #include <stdio.h> int main(int argc, char *argv[]) { if (argc < 2) { printf("Usage: hello <name>\n"); exit(0); } printf("Hello, %s!\n", argv[1]); return(0); } </pre> Compile and link using the following lines: <pre> CC /OBJECT=say_hello.obj say_hello.c LINK say_hello.obj /EXECUTABLE=say_hello.exe </pre> Now you need to define a symbol for your executable: <pre> hello :== $DISK1:[DEVEL.FABIO.EXAMPLES.HELLO]SAY_HELLO.EXE </pre> This allows you to run your program by simply calling "hello". You can give it parameters too, Unix style. The mechanism is known in VMS as "defining a foreign command". Run it: <pre> $ hello Usage: hello <name> $ hello Steve Hello, steve! $ hello "Steve" Hello, Steve! $ </pre> ===Writing a (Unix) Makefile for the say_hello application=== Once the application described above is written, type the following into a file named "Makefile" <pre> all: say_hello.exe clean: delete say_hello.exe;* delete say_hello.obj;* say_hello.exe: say_hello.obj LINK say_hello.obj /EXECUTABLE=say_hello.exe say_hello.obj: say_hello.c CC /OBJECT=say_hello.obj say_hello.c </pre> ''IMPORTANT'': the space before the commands in the Makefile (i.e. the space before "delete ...", "LINK ...", etc) is a single TAB character. You can now compile your program by calling "gmake" <pre> $ gmake </pre> I am assuming, of course, that gmake is installed in your system. In the bone lab, gmake is installed in duck.kin.ucalgary.ca. ==Developing new IPL commands in C== A short manual on how to develop new IPL commands in C: [[Media:IPL_programming.doc| Download .doc file]] ===Advanced topics=== A list of nice things to add to this short tutorial: * Status of cmake in VMS ==Getting started== Editor: <pre> $! Define the editor $ eve == "spawn/nowait edit/display=decwindows/tpu" $ eve filename.txt </pre> Compiler: <pre> $! Define the compiler $ C64 :== CC/POINTER_SIZE=64/check=pointer=all/optimize=(tune=ev6,level=5) $! Compile the program 'ipl_scanco_c' and link it to existing libraries $ c64 ipl:ipl_scanco_c $! $ link /exe=ipl:ipl_SCANCO_c - ipl:ipl_scanco_c, - ipl:ipl_scanco_c_ident/opt, - ipl:ipl_proc/lib, - ipl:ipl/lib, - mu:scanco_ext/lib, - dsrc:d3p_scanco/lib, - scanco_lib/lib </pre> ==SCEVA3 (Itanium)== <pre> sceva3.ucalgary.ca </pre> Login <code>devel</code> with <code>bone5Rus</code>. Note that scp is configured to use ssh2 and scp2. Linux (openssh) uses scp1: http://www.snailbook.com/faq/scp-ossh-to-ssh2.auto.html Whereas ssh and sftp work out of the box, successfully using scp requires a scp2 client. ==SCTHIN (DS10L)== <pre> duck.kin.ucalgary.ca has been assigned IP address 136.159.130.33 netmask 255.255.255.0 default router 136.159.130.34 DNS servers 136.159.130.130, 136.159.130.3 </pre> Login <code>microct</code> or <code>devel</code> with <code>bone5rus</code>. To boot into the cluster <pre> >>>boot ewa0 </pre> To boot out of the cluster, unplug the ethernet cable and <pre> >>>boot </pre> To get to boot prompt, type <code>shutdown</code> on the login screen. Or, after powerdown, hit <code>ctrl-P</code> repeatedly. There are two accounts: :*microct :*devel ==Installing packages on VMS== Contacts: Piet Schuermans Mark Blanchard ===Freeware source=== http://h71000.www7.hp.com/freeware/freeware80/ Instructions for unpacking .tar.gz files on VMS :1. Rename the file to file.tgz :2. gunzip file.tgz (creates a file.tar) :3. vmstar file.tar ===VMSTAR=== A tar program for VMS. Either install from the source (build it), or apparently the binary can be downloaded from http://h71000.www7.hp.com/freeware/freeware50/vmstar/alpha/ where you will find VMSTAR.EXE When extracting files that contain "unix" filenames (e.g., config.h.in), make sure to extract the files with <pre> $ cvstar xof file.tar ! Option 'o' extracts ODS5 files with ODS2 format </pre> ===CVS=== The sources can be retrieved from http://ftp.gnu.org/non-gnu/cvs/source/stable/ You will need a C compiler on OpenVMS. There are several versions of CVS available, but all of them need some tweaking before they can be successfully built. :cvs-1.11.18 (see build instructions at http://lists.gnu.org/archive/html/bug-cvs/2005-01/msg00280.html) :cvs-1.11.21 (do not use) :cvs-1.11.22 (latest version as of May 26, 2007 -- may be built, but follow instructions as per v.18 above) Download the .tar.gz file, rename it to .tgz once on vms system, use gunzip then vmstar: <pre> $ rename cvs-1.11.22.tar.gz cvs-1.11.22.tgz $ gunzip cvs-1.11.22.tgz $ vmstar xof cvs-1.11.22.tar ! option 'o' allows ODS2 naming. </pre> For all versions, make the following changes before starting: :1. Before you attempt to compile 1.11.22 or later you will need make a copy of [.LIB]FNMATCH_H.IN as [.LIB]FNMATCH.H :2. Correct typo in [.SRC]BUILD_SRC.COM change "libz" to "zlib" <b>Note:</b> The directory names would have been cvs-1.11.21.dir on Linux. However VMS doesn't allow more than 1 . in the name. If you enter <pre>$ set process/parse=extended</pre> in a terminal you'll be able to access these files. You rename them (i.e. cvs-1_11_21.dir). <b>NOTE</b> Piet Schuermans (mailps@mac.com) sent me a binary version of CVS on May 25, 2007 that I am currently using. <b>USAGE</b> Note that I have a "getting started on cvs for vms" document that can help. OpenVMS is case sensitive for passing parameters. So put the parameters between " " <pre> $ cvs -d ":pserver:anonymous@public.kitware.com:/cvsroot/VTK" login $ cvs -d ":pserver:anonymous@public.kitware.com:/cvsroot/VTK" co "vtknew/CMake" </pre> If your using this repository location frequently then <pre> $ define cvsroot ":pserver:anonymous@public.kitware.com:/cvsroot/VTK" </pre> after this you can skip the -d ...... parameter <pre> $ cvs login vtk </pre> This will create .cvspass file in your home directory so your only need to use the cvs login once <pre> $ cvs co "vtknew" </pre> public.kitware.com has ip address 66.194.253.19 ==Update VMS licenses== As user system: <pre>$ lic list/full</pre> and check which licenses are currently from 'MONTAGAR' and expire on Aug 31. I recommend to only then replace those licenses with the new ones, and not load the whole license text file that you get from HP. Make a 'shortlist' of the licenses you need, then FTP them to the VMS system and copy and paste. Layered Products (any licence, but NOT the openvms-Alpha itself!) <pre> $ lic del OPENVMS-ALPHA-USER $ LICENSE REGISTER OPENVMS-ALPHA-USER - /ACTIVITY=CONSTANT=100 - /AUTHORIZATION=EDU-711643-12345 - /DATE=31-AUG-2007 - /ISSUER=MONTAGAR - /PRODUCER=DEC - /TERMINATION=31-AUG-2007 - /UNITS=0 - /CHECKSUM=1-BBME-NKAP-EAFK-CNCA $ lic load OPENVMS-ALPHA-USER $ lic del vmscluster $ LICENSE REGISTER VMSCLUSTER - /ACTIVITY=CONSTANT=100 - /AUTHORIZATION=EDU-711643-12345 - /DATE=31-AUG-2007 - /ISSUER=MONTAGAR - /PRODUCER=DEC - /TERMINATION=31-AUG-2007 - /UNITS=0 - /CHECKSUM=1-GOOP-ALPF-PGKG-OBND $ lic load vmscluster </pre> Then, on SCTHIN, for the basic 'openvms-alpha' license itself. In a cluster, this license must be limited to one computer only, so first, to delete the correct of the multiple openvms-alpha licenses only. If I ever wanted SCTHIN to be the server in a cluster, I should do the following (very unlikely!): <pre> $ lic list openvms-alpha/ful $ lic delete openvms-alpha/auth=xxxxxx ! after first looking up the authori. of that montagar license. $ LICENSE REGISTER OPENVMS-ALPHA - /ISSUER=MONTAGAR - /AUTHORIZATION=EDU-742405-743161 - /PRODUCER=DEC - /UNITS=0 - /TERMINATION_DATE=31-AUG-2008 - /ACTIVITY=A - /OPTIONS=(NO_SHARE) - /CHECKSUM=2-JMOA-GOFL-AKID-DHCJ $ lic modify openvms-alpha/auth=EDU-742405-743161/include=scthin ! to make it available to scthin only. </pre> ==MMS: VMS 'make' tool== To start: <pre> $ mms </pre> An example from Bruno Koller of <code>descrip.mms</code>: <pre> .IGNORE FFLAGS = /FAST/OPT=(LEVEL=5,TUNE=EV68,INL=ALL)/OBJECT=$(MMS$TARGET_NAME).OBJ FGENER = /ALIGN=(NATURAL,SEQUENCE)/ASSUME=NOACCURACY/OPT=(LEVEL=5,TUNE=GENERIC,INL=ALL)/OBJECT=$(MMS$TARGET_NAME).OBJ_G .FOR.OBJ $(FORT)$(FFLAGS) UD:$(MMS$TARGET_NAME).FOR $(FORT)$(FGENER) UD:$(MMS$TARGET_NAME).FOR .FOR.INC $(FORT)$(FFLAGS) UD:$(MMS$TARGET_NAME).FOR $(FORT)$(FGENER) UD:$(MMS$TARGET_NAME).FOR all :: uct_reconstruction.exe, uct_reconstruction.exe_generic write sys$output "UCT_RECONSTRUCTION.EXE generated" uct_reconstruction.exe :: - recoident.opt, - uct_reconstruction.obj, - scli:uct_reco_constants.inc, - calc_fan_beam_angles.obj, - rebinning.obj, - raw_to_rpro.obj, - conereco.obj link/exe=uct_reconstruction.exe - recoident/opt, - uct_reconstruction.obj, - calc_fan_beam_angles, - rebinning, - raw_to_rpro, - conereco, - scanco_lib/lib uct_reconstruction.exe_generic :: - recoident.opt_g, - uct_reconstruction.obj_g, - scli:uct_reco_constants.inc, - calc_fan_beam_angles.obj_g, - raw_to_rpro.obj_g, - rebinning.obj_g, - conereco.obj_g link/exe=uct_reconstruction.exe_generic - recoident/opt, - uct_reconstruction.obj_g, - calc_fan_beam_angles.obj_g, - raw_to_rpro.obj_g, - rebinning.obj_g, - conereco.obj_g, - scanco_lib/lib uct_reconstruction.obj :: ud:uct_reconstruction.for, - scli:uct_reco_constants.inc calc_fan_beam_angles.obj :: ud:calc_fan_beam_angles.for, - scli:uct_reco_constants.inc raw_to_rpro.obj :: ud:raw_to_rpro.for, - scli:uct_reco_constants.inc rebinning.obj :: ud:rebinning.for, - scli:uct_reco_constants.inc, - scli:ctdata_header_structure.inc conereco.obj :: ud:conereco.for, - scli:uct_reco_constants.inc </pre> Some notes: :*UD is a logical for user disk search list over different disks, so I can compile on both alpha and vax with just having one source. :*No need to put "ud:" at your site. Also, a few lines may have been wrapped which should be on one line (/fflag...) by the mail program. :*Let me know if you want the mms installation file, you will need the hp campus mms license herefore (which you may already have) ==Alternative to MMS: MMK== A free MMS replacement is called Madgoat MMK (http://www.madgoat.com/mmk.html). ==Alternative to EVE: NEDIT== NEDIT is also available for VMS and offers a nicer editor, in my opinion (Mark Blanchard). ==Online VMS discussion lists== info-vax (comp.os.vms) ==SCP hangs and is not working== The problem occured when setting up sceva3 for development. SCP (secure copy) can be used as follows (Linux terminal, untested): <pre> scp Readme.txt devel@sceva3.ucalgary.ca:[.Scratch] </pre> Troubleshooting: :1. Check that all the scripts called from <code>[DEVEL]login.com</code> are present on the machine (alternatively, remove these calls from login.com, but logicals and symbols will not be setup properly, e.g. eve). Errors in the login script will cause scp to hang. :2. If you get: <code>scp1 compatibility mode is not supported.</code> this means that scp on VMS is using ssh2 and scp2 and the client uses scp1 ( http://www.snailbook.com/faq/scp-ossh-to-ssh2.auto.html ). VMS could be configured for scp1, but the better option (Mark Blanchard, Scanco) is to use an scp2 client (is there one for MacosX/Linux? and Windows?). ==Developing on Duck== ===Installing GNV (GNU is not VMS)=== ====Downloading GNV==== First, download GNV version 1.9 for VMS 7.3-2<br> http://h71000.www7.hp.com/opensource/gnv.html <p> Unzip the file on <b>your workstation</b>. FTP the two <code>.pcsi</code> to duck using the "binary" mode (i.e. type <code>bin</code> before you use <code>get</code>. Make sure that all letters in the file name are uppercase, so, for example, if you got the following after unzipping: <pre> dec-axpvms-gnv-v0109-000-1.pcsi$compressed;1 dec-axpvms-gnv-v0109-000-1.pcsi$compressed_esw;1 </pre> rename them to <pre> DEC-AXPVMS-GNV-V0109-000-1.PCSI$COMPRESSED;1 DEC-AXPVMS-GNV-V0109-000-1.PCSI$COMPRESSED_ESW;1 </pre> ====Installing GNV==== Login as user <code>system</code> to do the installation. Follow the installation instructions on http://openvms.compaq.com/OpenSource/gnvreadme_first.html, section 6. <pre> $PRODUCT INSTALL GNV /SOURCE=device:[dir.where.pcsi.are] </pre> ====Setting up GNV==== Follow the installation instructions on http://openvms.compaq.com/OpenSource/gnvreadme_first.html, section 7. <br> The following modifications were made to configuration files on duck: 1. File SYS$MANAGER:SYSTARTUP_VMS.COM: the following line was added <pre> $ @SYS$STARTUP:GNV$STARTUP.COM </pre> 2. File LOGIN.COM at the devel account: added the line below <pre> $ @GNU:[LIB]GNV_SETUP.COM </pre> 3. As mentioned in http://openvms.compaq.com/OpenSource/gnvreadme_first.html, section 9.3, long file names are enabled on an ODS-5 disk by adding the follwowing line devel's LOGIN.COM file: <pre> $ SET PROCESS/PARSE_STYLE=EXTENDED </pre> Note that you could also make the terminal case sensitive, but this did not work well, so I did not include this command. ====Running GNV==== Just start bash: <pre> $ ssh -l devel duck.kin.ucalgary.ca devel@duck.kin.ucalgary.ca's password: Welcome to OpenVMS (TM) Alpha Operating System, Version V7.3-2 DISK1:[DEVEL] $ bash bash$ </pre> See the list of commands available at http://h71000.www7.hp.com/opensource/gnvreadme_first.html, section 5. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information