Menu

Setting up on Windows

Elk Users
Harry K
2016-08-15
2016-08-19
  • Harry K

    Harry K - 2016-08-15

    Hi all, I'm new to the field and trying to install my first package to have a go at some DFT calculations, so apologies for the novice question.
    I'm having trouble getting the code to compile. I'm using Windows 10 and Powershell, and typing "./setup" whilst in the elk directory is just opening the file for editing rather than running it. Not really sure what I'm doing wrong :/

    Thanks in advance :)

     
  • martin_frbg

    martin_frbg - 2016-08-15

    I doubt Win10 provides enough of a compatibility layer to build what is essentially a Unix/Linux program suite. (For one, powershell is apparently no substitute for the /bin/sh that setup expects). Look into installing mingw/msys first, or use a virtualization software like vmware player or virtualbox to run a complete Linux system as a windows task.

     
  • Markus

    Markus - 2016-08-16

    Dear Harry,

    "setup" is a bash script, which you need to run in some kind of sh-interpreteter, which you normally have on unixoid systems like Linux, BSD, Solaris, MacOS, (Android?) etc. This is not going to work on Windows. Since elk comes as Fortran source code, it should in principle be possible to compile it on any system that has a Fortran compiler, but code modifications might be necessary.

    Maybe the new Windows Subsystem for Linux (https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) will provide you sufficient compatibility to install the toolchain for compiling a fortran application, in particular the GNU Fortran Compiler; the WSL has some Ubuntu derived features, so apt-get install gfortran could work.

    As Martin suggested, you can use a virtual machine and install a Linux OS of your choice in the VM. However, the performance may suffer in that case. Probably the best idea is to get a recent PC, put a Linux on it and work on this with elk or any other DFT codes you might choose to use. If you are going to deal with just a few atoms, say up to 10, a recent intel i7 6700K CPU (Skylake generation) and 16GB RAM may suffice for elk.Otherwise you need a larger computer or a pseudopotential code such as Quantum Espresso, Abinit, GPAW, VASP, ... In any case: You have to learn Linux first.

    Good luck,
    Markus

     
  • Anton F.

    Anton F. - 2016-08-18

    Hi, Markus and Harry,
    Markus, I would like to thank you for letting us to know about the new Windows Subsystem for Linux. I can confirm that I've tried it on my Windows 10 and sucessfully installed gfortran and Elk. The performance of calculations seems very good and what's more important it is more convinient than other ways of running bash on Windows since, as you said, one can install something necessary just by typing sudo apt-get install ...

    Best wishes,
    Anton F.

     
  • Markus

    Markus - 2016-08-19

    Hi Anton,

    congratulations! So you were a bit quicker than I was. :) Anyway, I think running elk natively under Windows is an interesting option. Maybe we should tell the WSL developers about this, so they can tune the WSL towards this kind of application, in case any problems occur.

    Did you try to link against GotoBLAS or OpenBLAS? Or maybe even MKL? From my experience I can say, that using MKL instead of elk's onboard BLAS makes a large difference, sometimes up to 50%. Does OpenMP work natively?

    Regards,
    Markus

     
  • Anton F.

    Anton F. - 2016-08-19

    Hi, Markus,
    No, I haven't tried to link against GotoBLAS/OpenBLAS/MKL, but it is a good idea! OpenMP seems to work natively, at least load of my 6 core CPU is close to 100% and the calculations are pretty fast. However, these are just first attempts, we have to test also the stability :)

    Best wishes,
    Anton F.

     

Log in to post a comment.