Created by Marleen Claeys - 25 april 2011 / (mclaeys@qatar.net.qa) --------------------------------------------------------------------- Update - 03 october 2011 - MC (add info on how to compile the libClust library in Matlab) Update - 11 june 2012 - MC (only retain executables in master software path) Update - 29 october 2013 - MC (simplified INCLUDE and compilation settings) ------------------------------------------------------------------------------------------ Background : ------------ LibClust.so is a library that was created in Matlab to execute singular value decomposition in FuzzyClustering. To run FuzzyClustering, both libClust and an MCR (Matlab Compiler Runtime) must be correctly linked into the c++ code of FuzzyClustering. For a 32-bit CPU, libClust was created with Matlab R2008a (on my PC) and needs MCR version 7.8. For a 64-bit CPU, libClust was created with Matlab R2008b (on esat server) and needs MCR version 7.9. When compiling INCLUSive-5.x.x (which codes only the FuzzyClustering application), the paths to the libClust and MCR depend on the platform where the executable will be run from. In current design, there are 4 platforms : 1) my local pc (32bit) where I make changes to the programs code 2) server master software path where MotifSuite performs the FuzzyClustering runs 3) a standalone executable for download on 64bit CPU linux platform => 2013/10/29 : not anymore, the download is on the same path as the server run executable, see 2) 4) a standalone executable for download on 32bit CPU linux platform => 2013/10/29 : not anymore, the download can be directly copied from my pltform to the server Whenever a change had been done to the c++ code of INCLUSive-5.x.x, updated executables need to be compiled for each of the above cases. This needs appropiate setting of the libClust and MCR linker path in the Makefile.am files, and appropiate environmental settings. Procedure : -------------- 1) start with case 1, everything is done on 32bit my pc. #Setting for applications/Makefile.am : INCLUDES =\ -I../include\ -I../Matlab_Compiler_Runtime/v78/extern/include\ -I../libClust/ # here are the sources of these programs FuzzyClustering_SOURCES = mainFuzzyClustering.cpp FuzzyClustering_LDFLAGS = -all FuzzyClustering_LDADD = ../src/libfuzzinclusive.la ../libClust/libClust.so #Setting for src/Makefile.am : INCLUDES =\ -I../include\ -I../Matlab_Compiler_Runtime/v78/extern/include\ -I../libClust/ #Check envrionmental setting in .bashrc (in home directory) export LD_LIBRARY_PATH=/usr/local/lib:/home/marleen/INCLUSive-5.2.0/Matlab_Compiler_Runtime/v78/runtime/glnx86:/home/marleen/INCLUSive-5.2.0/Matlab_Compiler_Runtime/v78/bin/glnx86 export XAPPLRESDIR=/home/marleen/INCLUSive-5.2.0/Matlab_Compiler_Runtime/v78/X11/app-defaults #Check if library and MCR are installed on the forementioned paths /home/marleen/INCLUSive-5.2.0/Matlab_Compiler_Runtime/v78 /home/marleen/INCLUSive-5.2.0/libClust/libClust.so and libClust.h and libClust.ctf #Run configure and make, this should succesfully create the FuzzyClustering executable #Test the executable (./FuzzyClustering -v and simulate a test-case FuzzyClustering process). 2) still on my pc, now make the standalone executable for case 4 (32bit standalone) #Copy the FuzzyClustering executable from my platform to /www/group/biocomp/extra/bioinformatics_prod/webtools/MotifSuite/INCLUSive_for_users/CPU_32/applications/ #Cannot test this executable (no 32-bit server on platform) 3) now build the software for case 2 (64bit esat) #####first on my pc, change the following paths : #Setting for applications/Makefile.am : INCLUDES =\ -I../include # here are the sources of these programs FuzzyClustering_SOURCES = mainFuzzyClustering.cpp FuzzyClustering_LDFLAGS = -all FuzzyClustering_LDADD = ../src/libfuzzinclusive.la\ ../../Matlab_Compiler_Runtime/v79/runtime/glnxa64/\ ../../libClust/ #Setting for src/Makefile.am : INCLUDES =\ -I../include ##Now compress the code (Build Tarball in Anjuta) -> INCLUSive-5.x.x.tar.gz #Transfer this file to my homedirectory on the server /home/marleen/INCLUSive-5.x.x/INCLUSive-5.x.x.tar.gz -> /www/group/biocomp/extra/bioinformatics_prod/webtools/MotifSuite/INCLUSive_for_users/CPU_64 ######Now continue on the server (first login at 64bit CPU server) If it doesn't work on midas, logon further to vampire (ssh vampire) #First archive the existing FuzzyClustering executable (e.g rename it to FuzzyClustering_old) #Untar the code tar -zxvf INCLUSive-5.x.x.tar.gz cd INCLUSive-5.x.x/src (!!) #link/compile the code g++ -I../../Matlab_Compiler_Runtime/v79/extern/include/ -I../include/ -L../../Matlab_Compiler_Runtime/v79/runtime/glnxa64/ -L../../libClust/ -lmwmclmcrrt -lClust -lstdc++ -lm -lc -lgcc_s -o FuzzyClustering ../applications/mainFuzzyClustering.cpp GFFWriter.cpp MotifClusterRun.cpp PWM.cpp PWMIO.cpp FastaIO.cpp BackgroundIO.cpp BackgroundModel.cpp Cluster.cpp Distribution.cpp fuzzutilities.cpp InstanceMap.cpp InstanceSet.cpp MaskVector.cpp RandomNumber.cpp SequenceObject.cpp utilities.cpp Instance.cpp #set the path setenv LD_LIBRARY_PATH /software/local/apps/x86_64/gridengine/2011.11/lib/linux-x64/:/software/shared/apps/x86_64/dependencies/:/software/shared/apps/x86_64/tcl/8.5.13/moduleslib/:/home/macla/m_MotifSuite/CPU_64/applications/Matlab_Compiler_Runtime/v79/runtime/glnxa64/:/home/macla/m_MotifSuite/CPU_64/applications/libClust/ #the executable is now available in the /src directory ! #check if libClust and MCR v79 are located as requested #Test the executable (./FuzzyClustering -v and simulate a test-case FuzzyClustering process) and store in the required location mv -f FuzzyClustering /www/group/biocomp/extra/bioinformatics_prod/webtools/MotifSuite/INCLUSive_for_users/CPU_64/applications/ ) 2011/10/03 : procedure to compile libClust library ================================================== When changes are made in the matlab functions, libClust must be recompiled to create a dynamic library that can be linked with c++. For compatibility reasons with gcc (which is different on my local pc and on the KUL esat server), there are 2 platforms : 1) create libClust on my local pc (32bit CPU and Matlab R2008a) 2) create libClust on ESAT-server (64bit CPU and Matlab R2008b) 3) ########## TO BE EVALUATED HOW THIS WILL BE ON UGENT SERVER ##################################### Procedure : ------------ 1) the matlab functions (xxx.m) are stored in /home/marleen/m_Matlab/software_backup/MatrixClust/libClust # open the license tunnel ssh -lmclaeys -L 1710:licserv.esat.kuleuven.be:1710 -L 1711:licserv.esat.kuleuven.be:1711 ssh.esat.kuleuven.be # in another command-window, change to the libClust-dir and start matlab, the graphical interface will startup cd /home/marleen/m_Matlab/software_backup/MatrixClust/libClust matlab # compile the library e.g. mcc -W cpplib:libClust -T link:lib -C mEdgeClust.m edgeclust.m unifapprox.m perronvector.m pcutoff.m -v # include library into the FuzzyClustering application cp libClust.h /home/marleen/INCLUSive-5.2.0/include # and relocate the library to the c++ linker path mv libClust.so /home/marleen/m_Matlab/software_backup/libClust_32 mv libClust.ctf /home/marleen/m_Matlab/software_backup/libClust_32 mv libClust.h /home/marleen/m_Matlab/software_backup/libClust_32 Now you can continue to build/compile FuzzyClustering as described above. # store library on esat server to be used for FuzzyClustering 32-bit executable cd /home/marleen/m_Matlab/software_backup rename the folder libClust_32 => libClust tar -zcvf libClust.tar.gz libClust restore the folder name libClust => libClust_32 transfer to server with gFTP : /home/marleen/m_Matlab/software_backup/libClust.tar.gz => CPU_32 2) store the matlab functions (xxx.m) in /users/sista/mclaeys/marleen/m_Matlab/MatrixClust/libClust # go the ESAT-server and start matlabR2008b ssh mclaeys@ssh.esat.kuleuven.be & ssh mclaeys@sista-opt6.esat.kuleuven.be matlab2008b # compile the library cd /users/sista/mclaeys/marleen/m_Matlab/MatrixClust/libClust mcc -W cpplib:libClust -T link:lib -C mEdgeClust.m edgeclust.m unifapprox.m perronvector.m pcutoff.m -v # next relocate the library to the c++ linker path on the server cp libClust.so /users/sista/mclaeys/INCLUSive_for_users/CPU_64/libClust cp libClust.ctf /users/sista/mclaeys/INCLUSive_for_users/CPU_64/libClust cp libClust.h /users/sista/mclaeys/INCLUSive_for_users/CPU_64/libClust # store library on esat server to be used for FuzzyClustering 64-bit executable cd /users/sista/mclaeys/INCLUSive_for_users/CPU_64 tar -zcvf libClust.tar.gz libClust => creates libClust.tar.gz # include library into the FuzzyClustering application cp libClust.h /home/marleen/INCLUSive-5.2.0/include now change Makefile.am and create a INCLUSive-5.2.0.tar.gz to be transferred to /users/sista/mclaeys/INCLUSive_for_users/ now you can continue to build/compile FuzzyClustering as described above. -------------------------------------------------- end of procedure --------------------------------------------------