CARA Forum
CARA Forum
 | Forums | Register | Reply | Search | Statistics |
Support Questions CARA Forum / Support Questions /  

64 bit machines

Author chrmid
Registered 

#1 | Posted: 12 Apr 2016 18:08 
My PI just recently updated our server to a 64 bit machine and CARA does not seem to be working. Does anyone have experience in installing of building CARA on a 64 bit Linux (Ubuntu) machine?

Thanks

Author rkeller
Registered 

#2 | Posted: 12 Apr 2016 19:19 
Hi Chrmid
Welcome to the forum. What is a "PI"? We didn't compile CARA on 64 bit yet. The source code is available and actually I see no reason why it shouldn't compile. But of course compiling and testing needs quite some effort. But actually you can run 32 bit software on every 64 bit operating system too. On linux you have to make sure the 32 bit standard libraries are installed. This should be no issue for an administrator.
Best regards
Rochus

Author chrmid
Registered 

#3 | Posted: 13 Apr 2016 03:20 
Thanks we will try that first. PI stands for principal inves tigator

Author jcbollinger
Registered 

#4 | Posted: 12 May 2016 15:45 
We have run 32-bit CARA 1.8.4 successfully for a long time on 64-bit Linux (CentOS 6) machines. You do need to have the appropriate 32-bit libraries installed (I don't have a complete list); these should be available, but they may not be installed by default.

On the other hand, I recently encountered a bona fide need for a 64-bit CARA, as the 32-bit version had problems accessing certain files on a massive enterprise storage system. For what it's worth, this was not so much a problem of CARA itself, but of the 32-bit system libraries on which 32-bit CARA relies. There being no 64-bit version available, I decided to build my own.

I downloaded the CARA 1.9.1.5 sources and the provided ancillary sources, and followed the standard build instructions. I ran into compilation errors immediately. It turns out that CARA makes some assumptions about the sizes of various data types -- especially pointers -- that are not correct for typical 64-bit C++ implementations, and that most particularly are not correct for g++.

I was able to work through the compilation issues to get a successful build. The resulting binary seems to work correctly, including with respect to the file system issue that inspired the effort in the first place, but it has been only lightly tested so far. I attempted to restrict myself to changes that would be reasonable for all systems, not just 64-bit systems, and that could be accepted into the code base, though the maintainers will need to judge how well I succeeded in that. In any event, while this project is still at the top of my mind, I want to report on this effort and to provide a patch describing the changes I applied (attached).

Author jcbollinger
Registered 

#5 | Posted: 12 May 2016 15:51 | Edited by: jcbollinger 
Or not attached, as it turns out. The forum software rejected the patch as a disallowed file type. The forum also won't let me post it in the body of a message, because it thinks there are outgoing hyperlinks in it. It is not suitable for a pull request against GitHub because it applies changes not only to CARA but also to the separately-packaged NAF, Expat, and Lua components. So, I guess if anyone wants it then they'll need to ask for it.

Author rkeller
Registered 

#6 | Posted: 12 May 2016 16:39 | Edited by: rkeller 
Hi John
Welcome to the forum. Great to hear that you took the effort to build CARA on 64 Bit. I considered it too much of effort for the moment since some other features are pending and memory consuption of CARA is quite moderate. Are you aware that 1.9.1.5 is already capable of accessing large files (i.e. > 2 GB)? I did this modification a year ago because of the 4D features of CARA where spectrum files are becoming really big. The 1.9.1.5 does quite well with 64 Bit file pointers, even if the application itself is 32 Bits. That was not the case in the 1.8.4 version which can only handle 32 Bit file pointers.
Concerning the forum: what file type did you intend to upload? I can add the type to the white list of the forum software, then it should no longer complain.
Regards
Rochus

Author jcbollinger
Registered 

#7 | Posted: 16 May 2016 16:21 
rkeller:
Are you aware that 1.9.1.5 is already capable of accessing large files (i.e. > 2 GB)? I did this modification a year ago because of the 4D features of CARA where spectrum files are becoming really big. The 1.9.1.5 does quite well with 64 Bit file pointers, even if the application itself is 32 Bits. That was not the case in the 1.8.4 version which can only handle 32 Bit file pointers.

I had not tested or looked into large file support, as my problem had nothing to do with file sizes. We observed that CARA's file chooser windows consistently failed to display certain files and directories, often including files and directories that had just been created by CARA itself. This turned out to be related to the fact that the network file system on which the files reside has far more than 5 billion i-nodes, so many of the i-node numbers are too large for a 32-bit integer. I'll leave out the details of the analysis, but it turns out that whenever 32-bit CARA attempted to get a directory listing, the listing was truncated at the first file whose i-node number was at least 2^32. 64-bit CARA does not exhibit this problem.

rkeller:
Concerning the forum: what file type did you intend to upload? I can add the type to the white list of the forum software, then it should no longer complain.

I didn't see an option to specify a file type myself, but if I recall correctly, the forum software auto-identified it as text/x-patch.

Author Admin
Admin 

#8 | Posted: 25 May 2016 00:02 | Edited by: Admin 
jcbollinger:
'll leave out the details of the analysis, but it turns out that whenever 32-bit CARA attempted to get a directory listing, the listing was truncated at the first file whose i-node number was at least 2^32.

We recently had a similar issue where CARA on Windows 10 could not access folders. Maybe this was due to the same problem. I finally found a work around by using native operating system file selectors instead of ones implemented in Qt. Here is a post with details and a test application: http://forum.cara.nmr.ch/index.php?action=vthread&forum=2&topic=10#msg24

jcbollinger:
I didn't see an option to specify a file type myself, but if I recall correctly, the forum software auto-identified it as text/x-patch.

Ok, I added text/x-patch and text/x-diff to the white list.

Author jcbollinger
Registered 

#9 | Posted: 25 May 2016 21:20 | Edited by: jcbollinger 
Here is a patch against CARA 1.9.1.5, encompassing all the modifications I applied to obtain a clean build with 64-bit g++ on CentOS Linux 6.7. It was computed against a top-level directory prepared for building CARA, with the individual component sources in subdirectories CARA/, Expat/, Lua/, NAF/, and Newmat/. The resulting build resolves the file-choosing problem that inspired the effort, and it seems to be working well in all other respects.

There is at least one point of potential concern, however: we have discovered that although integrated peak intensities computed via this CARA seem internally consistent, they also seem to be scaled differently from those computed for the same (Bruker) spectra by 32-bit CARA 1.8.4. We are uncertain whether this difference is associated with the change from v1.8.4 to v1.9.1.5, whether it is an unintended but essentially harmless consequence of the 64-bit build, or whether it indicates a lingering flaw in the 64-bit build.

In any event, I offer the patch for your consideration, in trust that you will review all changes it applies to ensure your own satisfaction with any of them that you choose to accept into CARA.

Author jcbollinger
Registered 

#10 | Posted: 25 May 2016 21:28 | Edited by: jcbollinger 
The attachment still didn't work for some reason. When I gave the file name as cara-64bit.patch or cara_64bit.patch the forum software gave me an error complaining that a filename extension is required. I don't know what it thought ".patch" was, and it did not have a problem with the file name last time I tried to attach the patch. When I tried changing the extension from ".patch" to ".txt", the software accepted the post but rejected the attachment, this time because text/plain is not an accepted type (and that is not the type it associated with the file the last time I tried this).

Author Admin
Admin 

#11 | Posted: 25 May 2016 22:37 | Edited by: Admin 
jcbollinger:
this time because text/plain is not an accepted type

Ok; that's the downside of security features ;-) I added text/plain to the white list. Actually you could also create a fork on GitHub and post your changed to the fork.

Author Admin
Admin 

#12 | Posted: 25 May 2016 22:45 
jcbollinger:
We are uncertain whether this difference is associated with the change from v1.8.4 to v1.9.1.5, whether it is an unintended but essentially harmless consequence of the 64-bit build, or whether it indicates a lingering flaw in the 64-bit build.

The CARA integrator tool makes use of the Newmat library; I didn't check yet which libraries used by CARA are available for 64 bits or are at least migratable; the migration can be quite some effort, especially the testing.

Author jcbollinger
Registered 

#13 | Posted: 25 May 2016 22:52 | Edited by: jcbollinger 
And here, finally, is the patch.
cara64_patch.txtAttached file: Patch for 64-bit build of CARA 1.9.1.5
 

Author Admin
Admin 

#14 | Posted: 26 May 2016 01:23 
jcbollinger:
we have discovered that although integrated peak intensities computed via this CARA seem internally consistent, they also seem to be scaled differently from those computed for the same (Bruker) spectra by 32-bit CARA 1.8.4.

Since 1.9.1 CARA makes use of the YMAX_p, YMIN_p and NC_proc parameters of Bruker spectra. CARA scales all intensities by val / s_scf * d_factor. In 1.8.4 the 32 bit numbers were used verbatim. That might cause the difference. I don't think it has something to do with the 64 bit migration.

Support Questions CARA Forum / Support Questions / 64 bit machines Top
Your Reply Click this icon to move up to the quoted message
 

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.
 
  CARA Forum Powered by Bulletin Board Script miniBB ®