Installing GULP on windows 10

Hi,

There doesn’t seem to be any documentation on installing/compiling GULP on windows 10.

I’ve tried following the given commands in cmd.exe, however they don’t run correctly.

Do I have to install something like cygwin.exe to run the commands, or would I have to dual boot Linux?

Cheers,

Connor

Hi Connor,
Here’s my preferred way of installing on Windows:

  1. Back up your data
  2. Wipe the hard disk
  3. Install Linux
    Problem solved. :slight_smile:
    Dual boot is another option.
    Strictly speaking GULP is not supported on Windows since I don’t have access to this O/S. However, according to one of my colleagues, Peter Spackman, it is possible to run on Windows by cross compiling using Mingw.
    You can add the patch below to the mkgulp file:

Blockquote
#mingw
mingw)
if [ “$debug” = “” ]
then
echo ‘OPT=-O3 -ffpe-summary=invalid,zero,overflow -static’ >> makefile
echo ‘OPT2=-O2 -ffpe-summary=invalid,zero,overflow -static’ >> makefile
echo ‘OPT1=-O1 -ffpe-summary=invalid,zero,overflow -static’ >> makefile
else
echo ‘OPT=’ >> makefile
echo ‘OPT1=’ >> makefile
echo ‘OPT2=-ffloat-store’ >> makefile
echo 'BAGGER=-g -Wall -Wunused-parameter -fbounds-check ’ >> makefile
fi
if [ “$parallel” = “” ]
then
echo ‘RUNF90=x86_64-w64-mingw32-gfortran’ >> makefile
echo ‘RUNCC=x86_64-w64-mingw32-gfortran’ >> makefile
echo 'SLIBS= ’ >> makefile
#–USER–Start
echo ‘MLIBS=lapack.o blas.o’ >> makefile
#–USER–End
else
echo 'RUNF90=mpif90 ’ >> makefile
echo 'RUNCC=mpif90 ’ >> makefile
fi
;;

NB: Apparently the link fails because of the difference between executable names (gulp vs gulp.exe) but this can be overcome (probably by editing the Makefile)

Note there are some Windows exes available from the GULP website if you look at old versions, but I can’t vouch they work with Windows 10. I’ll see if we can put an exe up there in future.

Cheers

Julian

1 Like

Hi Julian,

Hahaha, yes that’s always a reasonable option! To save my reputation I will say: it wasn’t my machine…

We did manage to get it running with Cygwin. For those who are interested I’ll post how we did it.

Download Cygwin from here: https://www.cygwin.com/

Then install the package, there will come a point where it asks you to select extra packages to install. In the top of this section there is a search bar. Go into the search bar and search for the following terms:

  1. vim: Install the main one titled ‘vim’, we also installed a bunch of others to be sure, not knowing what might work. If you don’t know what it is it’s just a text editing tool which comes in handy when using the terminal.
  2. gcc: I guess it depends on your chipset, but we installed all the x86 packages that were labelled as developer (or ‘devel’), along with others which weren’t labelled with any particular chipset to be on the safe side, so that’s ‘gcc-fortran’, and some others, also all labelled ‘devel’.
  3. make: Install make and cmake, just searching make will bring up both of these, go for the packages which are labelled simply ‘make’, and ‘cmake’, we didn’t install any others.
  4. others?: There may have been some others but I don’t have the list to hand right now, if you know of any other requirements post them below.

Once you’ve downloaded all the packages above you can run the compilation command within Cygwin just as you would within a Unix terminal: cd Src followed by ./mkgulp . If you run into any problems during compilation it will generally give you a prompt which will let you know what extra packages you need to include in you Cygwin installation. Rerun the Cygwin setup, and select the new packages and try again!

One final note, there is an Include header in the standard gulp make file which points to a folder which doesn’t exist on the windows operating system, it’s something like usr/local/include. That means on compilation you’ll get a warning on every compile that usr/local/include is a bad include and doesn’t exist. Don’t worry about it, it makes no difference to the compilation, and we compiled and ran gulp just fine!

You should now have a working gulp binary! Try running some of the examples in the examples folder within Cygwin!

Thanks again Julian for the great information! Fortunately I didn’t have to mess around with makefiles this time!! Out of interest I see GULP is now 6.0 and it seemed to compile fine with gcc-10.2.*, was that the purpose of the update? Or are there more new features?

Cheers,

Connor

Hi Conor,

I agree that it would be inappropriate to wipe someone else’s computer of course.

Thanks for providing further information on an alternative way to install under Windows and I’m glad it wasn’t too painful.

In regard to version 6.0, I haven’t been able to post anything in the news on the GULP website about the new features due to issues accessing the web development site while working from home. However, there are some more significant changes than working with gfortran version 10 (though there is a compiler option to work around the problems with this version anyway). The main things are:

  • rigid molecules are now allowed for optimisation and properties (not MD)
  • Tersoff potential implementation has had some major changes to support more general models and improve things for mixed systems.

Thanks,

Julian

1 Like

Hi Julian,

Thanks for the information! Glad to see you improving the software even during Covid.

Cheers,

Connor

Hello everyone.
just to let you know, I have been able to compile gulp on Windows 10, using mingwin through the MSYS2 environment. All recent versions including version 6.0. Slight modification of the mkgulp script may be needed to point to the correct path of the libraries, but nothing other than that. The source compiles without errors and works flawlessly.
Best Regards,
Kyriakos.