Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

01 July 2013

469. Intel compiler (icc, icpc, ifort) on Debian

I've heard it said that MKL is faster than ACML even on AMD cpus. I've also heard it said that Intel compile + mkl beats everything else, even on AMD cpus.

So let's test the veracity of that statement. I'm in particular looking forward to seeing how this affects my amd fx 8150.

Note that the ACML libs are available as separate packages for different compilers -- download the right libs when linking (i.e. the gnu ones for gcc, and the intel ones for intel composer)

But first we need to install and set-up the intel compiler suite, and that's what we'll do in this post.

In the example below I've installed in on an AMD Athlon II X3, hence the message about non-Intel architecture.

Installation:

Register for the Intel Parallel Studio XE as touched upon in this post: http://verahill.blogspot.com.au/2013/06/465-intel-mkl-math-kernel-library-on.html

Download. It's about 2 Gb. Then extract, and run install.sh

sudo apt-get install build-essential
sudo sh install.sh
Step no: 1 of 7 | Welcome -------------------------------------------------------------------------------- Welcome to the Intel(R) Parallel Studio XE 2013 Update 3 for Linux* installation program. -------------------------------------------------------------------------------- You will complete the steps below during this installation: Step 1 : Welcome Step 2 : License Step 3 : Activation Step 4 : Intel(R) Software Improvement Program Step 5 : Options Step 6 : Installation Step 7 : Complete -------------------------------------------------------------------------------- Press "Enter" key to continue or "q" to quit: -------------------------------------------------------------------------------- Checking the prerequisites. It can take several minutes. Please wait... -------------------------------------------------------------------------------- Step no: 1 of 7 | Options > Missing Optional Pre-requisite(s) -------------------------------------------------------------------------------- There are one or more optional unresolved issues. It is highly recommended to resolve them all before you continue the installation. You can fix them without exiting from the installation and re-check. Or you can quit from the installation, fix them and run the installation again. -------------------------------------------------------------------------------- Missing optional pre-requisites -- Intel(R) VTune(TM) Amplifier XE 2013 Update 5: unsupported OS -- Intel(R) Inspector XE 2013 Update 5: unsupported OS -- Intel(R) Advisor XE 2013 Update 2: unsupported OS -- Intel(R) Composer XE 2013 Update 3 for Linux*: unsupported OS -------------------------------------------------------------------------------- 1. Skip missing optional pre-requisites [default] 2. Show the detailed info about issue(s) 3. Re-check the pre-requisites h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: Step no: 2 of 7 | License -------------------------------------------------------------------------------- As noted in the Intel(R) Software Development Product End User License Agreement, the Intel(R) Software Development Product you install will send Intel [..] -------------------------------------------------------------------------------- Do you agree to be bound by the terms and conditions of this license agreement? Type "accept" to continue or "decline" to back to the previous menu: accept Step no: 3 of 7 | Activation -------------------------------------------------------------------------------- If you have purchased this product and have the serial number and a connection to the internet you can choose to activate the product at this time. Activation is a secure and anonymous one-time process that verifies your software licensing rights to use the product. Alternatively, you can choose to evaluate the product or defer activation by choosing the evaluate option. Evaluation software will time out in about one month. Also you can use license file, license manager, or remote activation if the system you are installing on does not have internet access activation options. -------------------------------------------------------------------------------- 1. I want to activate my product using a serial number [default] 2. I want to evaluate my product or activate later 3. I want to activate either remotely, or by using a license file, or by using a license manager h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: Note: Press "Enter" key to back to the previous menu. Please type your serial number (the format is XXXX-XXXXXXXX): -------------------------------------------------------------------------------- Activation completed successfully. -------------------------------------------------------------------------------- Press "Enter" key to continue: Step no: 4 of 7 | Intel(R) Software Improvement Program -------------------------------------------------------------------------------- Help improve your experience with Intel(R) software Participate in the design of future Intel software. Select 'Yes' to give us permission to learn about how you use your Intel software and we will do the rest. - No Personal contact information is collected - There are no surveys or additional follow-up emails by opting in - You can stop participating at any time Learn more about Intel(R) Software Improvement Program http://software.intel.com/en-us/articles/software-improvement-program With your permission, Intel may automatically receive anonymous information about how you use your current and future Intel software. -------------------------------------------------------------------------------- 1. Yes, I am willing to participate and improve Intel software. (Recommended) 2. No, I don't want to participate in the Intel(R) Software Improvement Program at this time. b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection: Step no: 5 of 7 | Options -------------------------------------------------------------------------------- You are now ready to begin installation. You can use all default installation settings by simply choosing the "Start installation Now" option or you can customize these settings by selecting any of the change options given below first. You can view a summary of the settings by selecting "Show pre-install summary". -------------------------------------------------------------------------------- 1. Start installation Now 2. Change install directory [ /opt/intel ] 3. Change components to install [ All ] 4. Change advanced options 5. Show pre-install summary h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: -------------------------------------------------------------------------------- Checking the prerequisites. It can take several minutes. Please wait... -------------------------------------------------------------------------------- Step no: 5 of 7 | Options > Missing Optional Pre-requisite(s) -------------------------------------------------------------------------------- There are one or more optional unresolved issues. It is highly recommended to resolve them all before you continue the installation. You can fix them without exiting from the installation and re-check. Or you can quit from the installation, fix them and run the installation again. -------------------------------------------------------------------------------- Missing optional pre-requisites -- Intel(R) VTune(TM) Amplifier XE 2013 Update 5: The system does not have an Intel Architecture processor -------------------------------------------------------------------------------- 1. Skip missing optional pre-requisites [default] 2. Show the detailed info about issue(s) 3. Re-check the pre-requisites h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: Step no: 7 of 7 | Complete -------------------------------------------------------------------------------- Thank you for installing and using the Intel(R) Parallel Studio XE 2013 Update 3 for Linux* Reminder: Intel(R) VTune(TM) Amplifier XE users must be members of the "vtune" permissions group in order to use Event-based Sampling. To register your product purchase, visit https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?clientsn=N43 3-4XGWTJLB To get started using Intel(R) VTune(TM) Amplifier XE 2013 Update 5: - To set your environment variables: source /opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh - To start the graphical user interface: amplxe-gui - To use the command-line interface: amplxe-cl - For more getting started resources: /opt/intel/vtune_amplifier_xe_2013/ documentation/en/welcomepage/get_started.html. To get started using Intel(R) Inspector XE 2013 Update 5: - To set your environment variables: source /opt/intel/inspector_xe_2013/inspxe-vars.sh - To start the graphical user interface: inspxe-gui - To use the command-line interface: inspxe-cl - For more getting started resources: /opt/intel/inspector_xe_2013/ documentation/en/welcomepage/get_started.html. To get started using Intel(R) Advisor XE 2013 Update 2: - To set your environment variables: source /opt/intel/advisor_xe_2013/advixe-vars.sh - To start the graphical user interface: advixe-gui - To use the command-line interface: advixe-cl - For more getting started resources: /opt/intel/advisor_xe_2013/ documentation/en/welcomepage/get_started.html. To get started using Intel(R) Composer XE 2013 Update 3 for Linux*: - Set the environment variables for a terminal window using one of the following (replace "intel64" with "ia32" if you are using a 32-bit platform). For csh/tcsh: $ source /opt/intel/bin/compilervars.csh intel64 For bash: $ source /opt/intel/bin/compilervars.sh intel64 To invoke the installed compilers: For C++: icpc For C: icc For Fortran: ifort To get help, append the -help option or precede with the man command. - For more getting started resources: /opt/intel/composer_xe_2013/Documentation/en_US/get_started_lc.htm. /opt/intel/composer_xe_2013/Documentation/en_US/get_started_lf.htm. To view movies and additional training, visit http://www.intel.com/software/products. -------------------------------------------------------------------------------- q. Quit [default] -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [q]:


The Files and Setup:
The compiler binaries are now found in /opt/intel/composer_xe_2013.3.163/bin/intel64/ . Of particular interest are ifort, icc and icpc (fortran, c and c++).

In addition, you'll need the lib and include files, which are found in /opt/intel/composer_xe_2013.3.163/compiler/lib/intel64/ and /opt/intel/composer_xe_2013.3.163/compiler/include/intel64.

You can either simply add the libs using LD_LIBRARY_PATH, but a perhaps easier and better method is to create a file: /etc/ld.so.conf.d/intel.conf
/opt/intel/composer_xe_2013.3.163/compiler/lib/intel64 /opt/intel/composer_xe_2013.4.183/mkl/lib/intel64
Once that's done, run
sudo ldconfig

Then do
echo 'PATH=$PATH:/opt/intel/composer_xe_2013.3.163/bin/intel64' >> ~/.bashrc
source ~/.bashrc

Testing:
See this post for an example of how to compile nwchem using ifort: http://verahill.blogspot.com.au/2013/07/470-very-briefly-compiling-nwchem-63.html

24 June 2013

462. Olex2 (1.1) on Debian

Olex2 is an open-source program for solving and refining crystal structures. I am not a crystallographer -- I have never (successfully= publication quality output) solved a crystal structure in my life -- and I have no idea whether Olex2 is an alternative or a complement to SHELX.

What I do now is that Olex2 is more of a point-and-click type program with a snazzy GUI, and so it would seem that the learning curve may be shallower than that of SHELX. However, as always you must always be cautious when doing science -- just because it's easy to do, doesn't mean that you're doing it right (I'm looking at you, biologists/physicians/social scientists using statistical software).

But maybe Olex2 makes getting started just easy enough that you can slowly work your way towards actually slowly get to the point where you know and understand what you are doing?

That's my hope anyway.

Quick note: there's no source code on the http://www.olex2.org/ website. However, there's a sourceforge SVN repository: http://sourceforge.net/projects/olex2/

Ideally I should show you how to download and compile and make a .deb package from the source, but sadly I haven't managed to figure it out (I'll add troubleshooting data to this post later). I even tried using the deb rules by http://jupiter.plymouth.edu/~jsduncan/software/olex2.php (again, I might add troubleshooting data later)

Anyway, using the pre-built binaries is easy enough. Only the older version 1.1 seems to be working ok on Debian Wheezy.

Installation:
Note that I've generated a list of dependencies the lazy way -- by looking at the ldd output.

Anyway.

You'll need a raft of libraries, including libGL. You can get this from different sources depending on your graphics card (or lack thereof). Install libgl1-mesa-glx or libgl1-fglrx-glx (ati) or libgl1-nvidia-glx (nvidia). Then continue.

Again, note that you may want to change the versions of the packages below that you install. Anyway, here's a list that may work:

sudo apt-get install libpng3 libglu1-mesa libgtk2.0-0 libatk1.0-0 libgdk-pixbuf2.0-0 libpango1.0-0 libglib2.0-0 libfreetype6 libxrender1 libfontconfig1 libx11-6 libxext6 libpng12-0 libxinerama1 libxxf86vm1 libsm6 lib32z1 zlib1g libc6 libpython2.6 libstdc++6 libgcc1 libxcomposite1 libxdamage1 libxfixes3 libcairo2 libxi6 libxrandr2 libxcursor1 libffi5 libexpat1 libpcre3 libxcb1 libice6 libuuid1 libssl1.0.0 libpixman-1-0 libxcb-shm0 libxcb-render0 libselinux1 libxau6 libxdmcp6

Get the compiled binary:
cd ~
wget http://www.olex2.org/olex2-distro/1.1/olex2-linux64.zip
unzip olex2-linux64.zip
cd ~/olex2
sed -i 's./work/distro/olex2-new.$HOME/olex2.g' start

Create the file ~/.local/share/applications/olex2.desktop
[Desktop Entry] Name=Olex2 GenericName=Olex2 Comment=Software for refinement of crystal structures Exec=sh /home/verahill/olex2/start Terminal=false Type=Application Categories=Science Version=1.1
You're now ready to use Olex2. If you launch it by hand, use the start script. Otherwise just launch is from your desktop.



Olex2 is very pretty, but  feels a bit incomplete and buggy though (again, I don't know if these are real issues or not -- and I'm no expert). The issue is that the program seems to throw errors every now and again. For example when clicking on electron density map in the Solve window:
Map sigma 0.000 : CalcFourier {diff=}{r=0.1}{m=} N4esdl25TInvalidArgumentExceptionE mask size at [xlib/fracmask.cpp(Init):22] calcFourier -diff -r=0.1 -m




Problem with version 1.2:
Start Olex2. 1.2 takes a lot longer than 1.1 to start, but that's fine. Click on Tutorials. Click on Maps and Masks. CLick Next five times (the step where you actually create the mask). It triggers the following error:
An error occured running the function/macro next_demo_item Traceback (most recent call last): File "olexFunctions.py", line 480, in func retVal = f(*args, **kwds) File "/home/verahill/olex2_1.2/etc/scripts/Tutorials.py", line 138, in next_demo_item self.run_demo_item() File "/home/verahill/olex2_1.2/etc/scripts/Tutorials.py", line 318, in run_demo_item flash_gui_control(control) File "gui/tools/__init__.py", line 123, in flash_gui_control OV.Refresh() File "guiFunctions.py", line 61, in Refresh olx.Refresh() File "/home/verahill/.olex2/data/4f11cd71424c9e8484c8c4f91644e3b6/olx/__init__.py", line 1319, in Refresh for arg in args: RuntimeError: [repository/pyext.cpp(runOlexFunctionEx):354]: Function 'html.SetImage' failed: wrong html object name: 'IMG_H3-H3-MASKS'Key variable values: args = () kwds = {} al = []

Problems with compiling:
sudo apt-get install libwxgtk2.8-dev
mkdir ~/tmp/svn_co
cd ~/tmp/svn_co
svn checkout svn://svn.code.sf.net/p/olex2/code/branches/1.2 olex2-1.2
cd olex2-1.2/
make 
/home/verahill/tmp/svn_co/olex2-1.2/gxlib/gxapp.cpp: In member function ‘esdl::TUndoData* gxlib::TGXApp::Name(gxlib::TXAtom&, const olxstr&, bool)’: /home/verahill/tmp/svn_co/olex2-1.2/gxlib/gxapp.cpp:2003:73: error: no matching function for call to ‘gxlib::TGXApp::SynchroniseBonds(gxlib::TXAtomPList)’ /home/verahill/tmp/svn_co/olex2-1.2/gxlib/gxapp.cpp:2003:73: note: candidate is: [..] /home/verahill/tmp/svn_co/olex2-1.2/gxlib/gxapp.cpp: In member function ‘esdl::TUndoData* gxlib::TGXApp::Name(const olxstr&, const olxstr&, bool, bool)’: /home/verahill/tmp/svn_co/olex2-1.2/gxlib/gxapp.cpp:2136:71: error: no matching function for call to ‘gxlib::TGXApp::SynchroniseBonds(gxlib::TXAtomPList)’ /home/verahill/tmp/svn_co/olex2-1.2/gxlib/gxapp.cpp:2136:71: note: candidate is: [..[ make[1]: *** [/home/verahill/tmp/svn_co/olex2-1.2/obj/gxapp.s] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [/home/verahill/tmp/svn_co/olex2-1.2/obj/gxmacro.s] Error 1 make[1]: Leaving directory `/home/verahill/tmp/svn_co/olex2-1.2' make: *** [all] Error 2


There's a CMakeLists.txt file, but when doing e.g.
mkdir build_olex
cd build_olex/
cmake ../olex2-1.2

I get
CMake Error: Error in cmake code at /home/verahill/tmp/svn_co/olex2-1.2/CMakeLists.txt:49: Parse error. Expected a command name, got unquoted argument with text "${olex2_html_SRCS}". -- Configuring incomplete, errors occurred!