From elke@bnl.gov Sun Apr 11 21:14:52 2010 Date: Sun, 11 Apr 2010 21:14:52 -0400 (EDT) From: elke-caroline aschenauer To: eic-tf Subject: compiling in 64 and 32 bit on racf Dear all, so I spend quite some time th last week to compile rapgap on racf. There is a new rapgap version, which maybe has the problem we saw before with the energy conservation violation solved. The new code is for 32-bit in /afs/rhic.bnl.gov/eic/PACKAGES/RAPGAP-3.2-32BIT and for 64-bit in /afs/rhic.bnl.gov/eic/PACKAGES/RAPGAP-3.2-64BIT I write to the list becuase I learned a lot in the last week on compilers and compiler options and .... okay first of all you might think differently but libraries compiled with g77 and gfortran can not be mixed at all, so all need to be compiled with one compiler and for racf it is gfortran this goes in hand with C++ compilerg++ 4.1, and as C Compiler gcc 4.3 now lets see for rapgap first the configure file has a major but it does not link the cernlibs in the last stage but even with it thinks it needs cernlib only if you use the hztools. I fixed this and the configure file now is fine. If you want to compile you need to set the following variables setenv PYTHIA "/afs/rhic.bnl.gov/eic/PACKAGES/RAPGAP-3.2-32BIT/PYTHIA_6410/" setenv LHAPDF "/afs/rhic.bnl.gov/eic/PACKAGES/LHAPDF-5.8.2-32BIT/" setenv ARIADNE "/afs/rhic.bnl.gov/eic/PACKAGES/RAPGAP-3.2-32BIT/ariadne412/" setenv CERN_LIBS "-lmathlib -lkernlib -lpacklib_noshift -ljetset74" setenv CERN_SOURCE "/afs/rhic.bnl.gov/rcassoft/x8664_sl5/cernlib/i686-slc5-gcc43-opt/pro/lib/" setenv CXXFLAGS "-m32 -fno-inline" setenv CFLAGS "-m32 -fno-inline" setenv FFLAGS "-m32 -fno-inline" setenv FCFLAGS "-m32 -fno-inline" Also src/rapgap/frag.F as 2 routines, which are in no library and have not been in the source tree called LUJOIN and DUPREP. I included them in frag.f for the configure you need env F77=gfortran ./configure --disable-shared --enable-static --prefix=/afs/rhic.bnl.gov/eic/PACKAGES/RAPGAP-3.2-32BIT than you can do make one the phenix machines the make will lcrasj because there is no latex to make the manual, so you need to make the manual by hand on rcaf2 or so afterwards you need make install and all is happy. Some more words on 32 bit I can compile Ariadne and the lib is in /afs/rhic.bnl.gov/eic/PACKAGES/RAPGAP-3.2-32BIT/ariadne412/lib but I needed to fix some incompatibilities I could not get hztools compiled because it has data statements like data elke / 5**2+7**3, 9*7-6**3/ which completely get the compiled throwing up. I have no idea how to fix this. If there is a gfortran guru on this list ideas are welcome, of course I know I calculate this numbers and do data elke / 5, 6, 8, 9/ but there are so many I have don't want ot waste my time with it. now to the 64-bit version: I cannot not manage to get Ariadne compiled under 64 bit I will consult with a guru on monday why you cannot cast variables. What ever I do i get the following error, for this line arpyth.f:346.21: P(N,5)=ARX2DB(SQRT(MAX(0.0,PN4**2-PN3**2-PN2**2-PN1**2))) 1 Error: Type mismatch in argument 'xxxarg' at (1); passed REAL(8) to REAL(4) make: *** [arpyth.o] Error 1 hztools cannot be compiled again, becuase of the same reason as with 32bit, also here will consult on monday with an expert. the environment variables are very similar, we need just to replace 32 by 64 in the name and leave ARIADNE out for the moment what is important is to use the 64 bit cernlib which is here /afs/rhic.bnl.gov/rcassoft/x8664_sl5/cernlib/x86_64-slc5-gcc43-opt/pro/lib setenv CERN_LIBS "-lmathlib -lkernlib -ljetset74 -lpacklib_noshift" of course i included the changes I did some time ago to the output format. So now we need to test this. I think I will also send Hannes an email, that he should fix his distribution. Sorry for the long email But I thought it is good to document this, because some of this stuff can be used for some of our other codes as well. I will try the 64bit compilation also for pythia and so on, because I think we should avoid this -m32 for our software if possible. cheers elke ( `,_' )+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+= ) `\ - / '. | + | `, Elke-Caroline Aschenauer = \,_ `-/ - ,&&&&&V Brookhaven National Lab + ,&&&&&&&&: Physics Dept., 8 Shore Road = ,&&&&&&&&&&; Bldg. 510D / 2-195 East Patchogue, NY, - | |&&&&&&&;\ 20 Pennsylvania Avenue 11772-5963 + | | :_) _ Upton, NY 11973 = | | ;--' | Tel.: 001-631-344-4769 Tel.: 001-631-569-4290 - '--' `-.--. | Fax.: 001-631-344-1334 Cell: 001-757-256-5224 + \_ | |---' = `-._\__/ Mail: elke@bnl.gov - =-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=-+=