User Guide for the Discrete Dipole Approximation Code DDSCAT 7.3

Page 20

8

A SAMPLE CALCULATION: RCTGLPRSM

20

You will have to add PATH to bin directories as described in the MINGW. Once you have MINGW and MSYS installed, in “all programs” there is now the MinGW program “MinGW shell”. Once you open this shell one can now compile Fortran code using “gfortran”. The “make” and “tar” utilities are available. The command “pwd” shows which directory corresponds to the initial “MinGW” shell. For example it can be “/home/Piotr” which corresponds to windows directory “c:\mingw\msys\1.0\home\piotr”. You now need to copy ddscat.tar files and untar them. To make a native executable, edit “Makefile” so that the “LFLAGS” string is defined to be LFLAGS=-static-libgcc -static-libgfortran and then execute “make all”. The resulting ddscat.exe doesn’t require any non-windows libraries. This can be checked with the objdump -x ddscat.exe | grep “DLL” command.

7.3

Compilation using CYGWIN

Another option is provided by “CYGWIN”, an easily installable UNIX-like emulation package. It is available from http://www.cygwin.com/ . It installs authomatically. However, during installation one has to specify installation of several packages incuding the f95 compiler gfortran, the make utility, the tar utility, and nano. Once installed, you will be able to open the CYGWIN shell and make DDSCAT using the standard Linux commands as discussed in this manual (see §6).

7.4

UBUNTU and Virtualbox

By far the most comprehensive solution to running DDSCAT on windows is to install UBUNTU Linux under Oracle Virtualbox. First install Oracle Virtualbox (from https://www.virtualbox.org/) and then install UBUNTU Linux (from http://www.ubuntu.com/). You will be able to run a full LINUX environment on your Windows computer You can add (using “synaptic file manager”) gfortran and many other packages including graphics. Once a f90 or f95 compiler has been installed, you can compile DDSCAT as described in §6.

7.5

Compilation in Windows

In addition to public domain options (gfortran) for compilation of DDSCAT 7.3 of under Linux environments running under Windows, we have also tested direct Windows compilation of DDSCAT with R Fortran Composer XE2013 (in the USA Educational price was $399). We used the “command Intel prompt” option (IFORT) to compile the code. We were able to compile the code with the standard Makefile provided in the DDSCAT distribution. We were able to compile the code with OpenMP and MKL options as well. For the MKL option using IFORT one has to specify links to libraries using interface defined at http://software.intel.com/sites/products/mkl/ For example, the appropriate line in the Makefile may need to look like LFLAGS = mkl_intel_c_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib Subroutine mkl_dfti.f90 is available with INTEL fortran in the subdirectory program files (x86)/intel/composer xe/mkl/include/mkl_dfti.f90

8

A Sample Calculation: RCTGLPRSM

When the tarfile is unpacked, it will create four directories: src, doc, diel, and examples_exp. The examples_exp directory has a number of subdirectories, each with files for a sample calculation. Here we focus on the files in the subdirectory RCTGLPRSM. To follow this, go to the DDA directory (the directory in which you unpacked the tarfile) and cd examples_exp


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
User Guide for the Discrete Dipole Approximation Code DDSCAT 7.3 by pcirrus - Issuu