<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello Jixie,<div class=""><br class=""></div><div class="">The information that you provide here isn’t quite sufficient to get a reasonable diagnostic on what is happening, and for some reason the <a href="https://userweb.jlab.org/~jixie/gsim_bat_problem.txt" class="">https://userweb.jlab.org/~jixie/gsim_bat_problem.txt</a> page doesn’t load for me.</div><div class=""><br class=""></div><div class="">I assume that when you run the code in a directory where it fails, the code is able to create files in the local directory (for the login that is running the code)? If not that would be a reason it fails. </div><div class=""><br class=""></div><div class="">The CTIMEF function call takes an encoded time and returns it as an ASCII string. In the gsimpar_2_bos_ bit of code, it is used to get the creation date of the executable and store this in the “PARAMS” output of the BOS file, so that there is a record of which version of the executable that was used. That is around line 266 in gsimpar_2_bos.F. If it is really just this access that is preventing the code from running properly, you could simply remove those 2 calls and fill in the string by hand on your own copy of the executable and run that way. It is however likely that there is some deeper reason this code is crashing. The big problem with CERNLIB has been that it was created as 32-bit code, and did tricks to make FORTRAN work that were not so compatible with 64-bit code. All those issues should have been resolved, but there is always the possibility that there is some other issue that comes up when it is compiled with a newer compiler. I just don’t know in this case.</div><div class=""> </div><div class="">If you want to/need to dig deeper, perhaps you could create a version of gsim_bat that is compiled with the “-g” compiler switch, but not with any -DDEBUG flags, so that the code retains the names of the functions, but does not add in any additional FORTRAN debug lines. Compilation will be slightly different, but much of the code will be identical. You can go one step further and also compile with -o0, turning off any optimization. Since the crash happens somewhere in CERNLIB, it would be useful to link against a version of CERNLIB that also has some level of debug information turned on. This will then hopefully point to where there may be an issue with the code. </div><div class="">Another thing you could try is to compile the gsimpar_2_bos.F code with -DEBUG turned on, but not the rest of the code, and see it that works.</div><div class=""><br class=""></div><div class="">Sorry that I cannot be more helpful here. </div><div class=""><br class=""></div><div class="">Best,</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Maurik</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 30, 2018, at 5:24 AM, Jixie Zhang <<a href="mailto:jixie@jlab.org" class="">jixie@jlab.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Hi CLAS members,</div><div class=""> gsim_bat give me some trouble that I could not understand. I am wondering</div><div class="">if any of you have similar experience. The clas_package version I am using is <br class=""></div><div class="">a pretty old version: release-4-14, but I made necessary modification to have it</div><div class="">compiled and run in RHEL7.<br class=""></div><div class=""><br class=""></div><div class=""> gsim_bat does not run in batch farm since August 2018, before that the same executable</div><div class=""> ran smoothly. <br class=""></div><div class="">gsim_bat encountered with "segmentation fault" when run in batch farm. <br class=""></div><div class="">It runs normally in interactive farm (ifarm1401 and ifarm1402) but only<div class="">in some specified work disk. I recompiled the whole CLAS PACKAGE but this <br class=""></div><div class="">problem stays.<br class=""></div><div class=""><br class=""></div><div class="">After careful investigation, I found that gsim_bat can not be run in the following path:</div><div class=""><br class=""></div><div class="">/work/halla/solid/*</div><div class="">/work/hallc/sane/*</div><div class="">/scratch/jixie/*</div><div class="">/cache/halla/solid/*</div><div class="">/home/jixie/*<br class=""></div><div class="">(I only tested the above disk|drive. the list could be even longer...)<br class=""></div><div class="">The error message is:</div><div class="">
<pre class="">--------------error message start---------------------
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7FB9ADAC3467
#1 0x7FB9ADAC3AAE
#2 0x7FB9ACFCA66F
#3 0x7FB9AD02A13F
#4 0x625AD5 in ctimef_
#5 0x41AA65 in gsimpar_2_bos_
#6 0x4076CF in uginit_
#7 0x4058D3 in MAIN__ at gsim_bat.F:?
Segmentation fault
<a href="http://ifarm1401.jlab.org/" target="_blank" class="">ifarm1401.jlab.org</a>>
</pre><div class="">
<pre class="">--------------error message end---------------------</pre></div>
</div><div class="">The error message told that the problem happen at calling ctimef() subroutine, which comes from cernlib. I do not trust this error message too much.</div><div class=""><br class=""></div><div class="">However, the same executable can run in <br class=""></div><div class="">/work/clas/claseg4/jixie/*</div><div class="">/work/halla/g2p/disk1/jixie/*</div><div class=""><br class=""></div><div class="">Surprisingly, gsim_bat_debug works well in everywhere.
gsim_bat_debug was compiled with -DEBUG defined, which means the source code is totally different.<br class=""></div><div class=""><br class=""></div><div class="">See more details of my test here: <a href="https://userweb.jlab.org/~jixie/gsim_bat_problem.txt" target="_blank" class="">https://userweb.jlab.org/~jixie/gsim_bat_problem.txt</a></div>
</div></div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class=""><br class="">-- <br class=""><div dir="ltr" class="gmail_signature">With Best Regards,<br class="">Jixie Zhang<br class="">757-269-7735 <br class="">_______________________________________________</div></div></div>
_______________________________________________<br class="">Clas_offline mailing list<br class=""><a href="mailto:Clas_offline@jlab.org" class="">Clas_offline@jlab.org</a><br class="">https://mailman.jlab.org/mailman/listinfo/clas_offline</div></blockquote></div><br class=""></div></body></html>