GT.M Auto-relink doesn't work on V6.2 x8664

161 views
Skip to first unread message

Sam Habiel

unread,
Jan 2, 2015, 5:40:10 PM1/2/15
to hardhats
From the documentation, I would have thought that this gtmroutines
would have worked:

o*(r) /usr/lib/fis-gtm/V6.2-000-x8664/libgtmutil.so.

I just tried it on a routine I just edited and running it again didn't
automatically zlink it.

I tried a much simpler example:

GTM>zed "KBANTEST2" (one test)

GTM>D ^KBANTEST2
TEST

GTM>zed "KBANTEST2" (two tests)

GTM>D ^KBANTEST2
TEST (still one!)

--Sam

K.S. Bhaskar

unread,
Jan 2, 2015, 11:20:18 PM1/2/15
to hard...@googlegroups.com, Hard...@googlegroups.com
The actual mechanism is akin to publish-subscribe.  The "o*" in $ZROUTINES="o*(r) /usr/lib/fis-gtm/V6.2-000-x8664/libgtmutil.so" indicates that the process is subscribing to updates in o.  A ZRUPDATE command is the publish side of the feature

Regards
-- Bhaskar

Bhaskar, K.S

unread,
Jan 5, 2015, 12:06:28 PM1/5/15
to hard...@googlegroups.com
Below is an example from the latest Acculturation Workshop.

Regards
-- Bhaskar


GT.M also provides a mechanism for processes to indicate that instead of explicitly relinking newer versions of routines, they would like to “subscribe” to and automatically execute the latest updated (“published”) object code of routines. Processes indicate this interest by appending an asterisk (“*”) to each directory name from which they wish to execute the latest object code.

Start a new session of GT.M (so that you don't have any routines linked the old way), and modify $zroutines to append an asterisk (in bolded light magenta below) to the object directory from which your routines are executed. If you are using a version of GT.M newer than V6.2-000, the gtmprofile script may already have appended the requisite asterisk. Then execute the “hello” program to make the process link the object code:

gtmuser@gtmworkshop:~$ gtm

GTM>write $zroutines
/home/gtmuser/.fis-gtm/V6.2-000_x86_64/o(/home/gtmuser/.fis-gtm/V6.2-000_x86_64/r /home/gtmuser/.fis-gtm/r) /usr/
lib/fis-gtm/V6.2-000_x86_64/plugin/o(/usr/lib/fis-gtm/V6.2-000_x86_64/plugin/r) /usr/lib/fis-gtm/V6.2-000_x86_64/
libgtmutil.so /usr/lib/fis-gtm/V6.2-000_x86_64
GTM>set $zroutines=$piece($zroutines,"4/o",1)_"4/o*"_$piece($zroutines,"4/o",2)

GTM>write $zroutines
/home/gtmuser/.fis-gtm/V6.2-000_x86_64/o*(/home/gtmuser/.fis-gtm/V6.2-000_x86_64/r /home/gtmuser/.fis-gtm/r) /usr
/lib/fis-gtm/V6.2-000_x86_64/plugin/o(/usr/lib/fis-gtm/V6.2-000_x86_64/plugin/r) /usr/lib/fis-gtm/V6.2-000_x86_64
/libgtmutil.so /usr/lib/fis-gtm/V6.2-000_x86_64
GTM>do ^hello
Aloha, world

GTM>

In different GT.M process in a different shell session, after appending the asterisk to the object directory, modify the “hello” program to say “Aloha, Universe”. Note the use of the environment variable gtm_prompt to differentiate it from the original session. After editing it, run the routine, which will compile the new version. They use the ZRUPDATE command to publish the new object file:

GTM2>set $zroutines=$piece($zroutines,"4/o",1)_"4/o*"_$piece($zroutines,"4/o",2)

GTM2>zedit "hello" ; modify it to print Aloha, universe

GTM2>do ^hello ; this ensures that the new version is compiled
Aloha, universe

GTM2>zrupdate $piece($zroutines,"*",1)_"/hello.o" ; publish the object code

GTM2>

In the original session, again run the hello program, and notice that even without an explicit zlink, it has the latest version of the program:

GTM>do ^hello
Aloha, universe

GTM>

--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
GT.M - Rock solid. Lightning fast. Secure. No compromises.
_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.

Akashdeep Kasaodhan

unread,
Jan 6, 2015, 1:59:43 AM1/6/15
to hard...@googlegroups.com, ks.bh...@fisglobal.com
Hi Bhaskar,

When I tried modifying the $zroutines variable as specified, it throws below error (in red) and $zroutines variable remains unchanged:

GTM>w $zroutines
/home/gc4/EHR/o(/home/gc4/EHR/r) /usr/local/gtm
GTM>s $zroutines=$P($zroutines,"R/o",1)_"R/o*"_$P($zroutines,"R/o",2)
%GTM-E-ZROSYNTAX, $ZROUTINES syntax error: /home/gc4/EHR/o*(/home/gc4/EHR/r) /usr/local/gtm
%GTM-E-FILEPARSE, Error parsing file specification: /home/gc4/EHR/o*
%SYSTEM-E-ENO2, No such file or directory

GTM>w $zroutines
/home/gc4/EHR/o(/home/gc4/EHR/r) /usr/local/gtm

Please help.

Bhaskar, K.S

unread,
Jan 6, 2015, 9:44:00 AM1/6/15
to hard...@googlegroups.com
What version of GT.M are you using and on what platform?  The $ZVERSION intrinsic special variable will tell you.

Regards
-- Bhaskar

Sam Habiel

unread,
Jan 6, 2015, 12:14:41 PM1/6/15
to hardhats
Bhaskar,

I understand the reason it was done this way; but it's not the way I
envisioned it working (sorry I didn't test earlier!!!):

GTM2>set $zroutines=$piece($zroutines,"4/o",1)_"4/o*"_$piece($zroutines,"4/o",2)

GTM2>zedit "hello" ; modify it to print Aloha, universe

GTM2>do ^hello ; this ensures that the new version is compiled
Aloha, universe

GTM2>zrupdate $piece($zroutines,"*",1)_"/hello.o" ; publish the object code

My most common use case for this is saving a routine from eclipse and
running it from programmer mode on another terminal. The eclipse
process runs zlink when it saves; but the other session still has the
old copy. I can change the code for save to publish the specific
object code; but I sure hoped that a process while I am developing
will automatically just pickup the object code once I exit the
routine.

In any case, thank you for the new functionality. The onus is on me to
write the c code to do it exactly as I want to do it; maybe using an
environment variable called gtm_auto_relink.

--Sam

--Sam
Sam Habiel, Pharm.D.
VISTA Expertise Network

PS: If you find anything open source that I do useful to you, consider
buying me a present from my wish list as a token of thanks:
http://www.amazon.com/gp/registry/wishlist/?ie=UTF8&cid=A198EOA15E5N5B

Bhaskar, K.S

unread,
Jan 6, 2015, 1:05:59 PM1/6/15
to hard...@googlegroups.com
Sam --

The following behavior of auto-relink may help.  From the release notes:
An explicit ZLINK from an auto-relink directory acts as an implicit ZRUPDATE.

Consider two processes, P and Q, where P is the application process that wishes to automatically get the latest version of a routine XYZ and Q is the development process.  Both P and Q have $ZROUTINES constructs of the form "o*(r) …".  P has executed DO ^XYZ and therefore has an existing XYZ loaded.  Q edits r/XYZ.m and saves it.  After editing and saving the routine, if Q does a ZLINK "XYZ" that acts as an implicit ZRUPDATE of o/XYZ.o.

Hope this helps.

Regards
-- Bhaskar

---
You received this message because you are subscribed to the Google Groups
"Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hardhats+u...@googlegroups.com
.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=AAIFaQ&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=fPojGngvZ3LwSfrzvtaePFZUre8l_YiAGto-O_dj8Rs&m=EmAeHhlev0PqEAMEpGMAWWWe6vNBZ9-WfgNOUhorrfc&s=kXVgQwhmKGsoxw_R6RbEBGlWhduJQ-Brb4a0Q5M437k&e= .


--
GT.M - Rock solid. Lightning fast. Secure. No compromises.

_____________
The information contained in this message is proprietary and/or
confidential. If you are not the intended recipient, please: (i) delete the
message and all copies; (ii) do not disclose, distribute or use the message
in any manner; and (iii) notify the sender immediately. In addition, please
be aware that any message addressed to our domain is subject to archiving
and review by persons other than the intended recipient. Thank you.
--
--
https://urldefense.proofpoint.com/v2/url?u=http-3A__groups.google.com_group_Hardhats&d=AAIFaQ&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=fPojGngvZ3LwSfrzvtaePFZUre8l_YiAGto-O_dj8Rs&m=EmAeHhlev0PqEAMEpGMAWWWe6vNBZ9-WfgNOUhorrfc&s=heIRQKdX8g-lIDNmUj1JS4fNFJ2ZntUEmPdIqnxaRhI&e= 
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups
"Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hardhats+u...@googlegroups.com
.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=AAIFaQ&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=fPojGngvZ3LwSfrzvtaePFZUre8l_YiAGto-O_dj8Rs&m=EmAeHhlev0PqEAMEpGMAWWWe6vNBZ9-WfgNOUhorrfc&s=kXVgQwhmKGsoxw_R6RbEBGlWhduJQ-Brb4a0Q5M437k&e= .


--
GT.M - Rock solid. Lightning fast. Secure. No compromises.

_____________
The information contained in this message is proprietary and/or
confidential. If you are not the intended recipient, please: (i) delete the
message and all copies; (ii) do not disclose, distribute or use the message
in any manner; and (iii) notify the sender immediately. In addition, please
be aware that any message addressed to our domain is subject to archiving
and review by persons other than the intended recipient. Thank you.

--
--
https://urldefense.proofpoint.com/v2/url?u=http-3A__groups.google.com_group_Hardhats&d=AAIFaQ&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=fPojGngvZ3LwSfrzvtaePFZUre8l_YiAGto-O_dj8Rs&m=EmAeHhlev0PqEAMEpGMAWWWe6vNBZ9-WfgNOUhorrfc&s=heIRQKdX8g-lIDNmUj1JS4fNFJ2ZntUEmPdIqnxaRhI&e= 
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups
"Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hardhats+u...@googlegroups.com

Sam Habiel

unread,
Jan 6, 2015, 1:47:34 PM1/6/15
to hardhats
Okay then. I can rest easy then! That's exactly the behavior I wanted.
I will go ahead and test it right now.

Akashdeep Kasaodhan

unread,
Jan 7, 2015, 1:29:13 AM1/7/15
to hard...@googlegroups.com, ks.bh...@fisglobal.com
Its 'GT.M V5.4-002B Linux x86' 

Thanks

Sam Habiel

unread,
Jan 7, 2015, 1:37:14 AM1/7/15
to hardhats, K.S. Bhaskar
Way way way way too old. Unless there is a compelling reason, I would
suggest that you upgrade. Upgrading production obviously needs to be
tested carefully and done with a support contract with FIS, just in
case things break. But if it is just your dev environment, it's nice
to update.

GT.M changes very quickly (thank you FIS!); there are tons of new
features which I keep adding to my code when I get a chance. I am
playing right now with native TLS sockets.

--Sam

Akashdeep Kasaodhan

unread,
Jan 7, 2015, 1:45:37 AM1/7/15
to hard...@googlegroups.com, ks.bh...@fisglobal.com
Thanks Sam!
So i assume it will not work on my current system, its time to upgrade :)

Sam Habiel

unread,
Jan 7, 2015, 1:50:15 AM1/7/15
to hard...@googlegroups.com
Yes. This feature comes with 6.2, as far as I remember. 
--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

David Whitten

unread,
Jan 7, 2015, 8:53:33 AM1/7/15
to Hard Hats Mailing List
I would suggest you do the upgrade using mupip export and mupip load.
Just copying the "mumps.dat" file and doing an upgrade in place has
caused me problems over the years.

David

Bhaskar, K.S

unread,
Jan 7, 2015, 9:59:14 AM1/7/15
to hard...@googlegroups.com
Auto-relink was released as field-test grade functionality in V6.2-000,
and as production grade functionality in V6.2-001. Also, it is available
only on the 64-bit flavor of GT.M, not the 32-bit flavor.

As for upgrading databases (and global directories), the release notes
for each release give fairly detailed instructions on upgrading databases.

Regards
-- Bhaskar
[KSB] <…snip…>
Reply all
Reply to author
Forward
0 new messages