Showing posts with label Meep. Show all posts
Showing posts with label Meep. Show all posts

Monday, October 3, 2016

Compiling MEEP with Intel-15.0.6, Intel-MPI 5.0.3 and HDFT-1.8.17

Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems, along with our MPB eigenmode package. The latest official version is 1.3 and can be found at Download Page for Meep Before you compile Meep 1.2.1, you need to first compile the libctl library. Compiling the libctl library is quite straightforward. After downloading, Step 1: Compiling libctl-3.2.1
# tar -zxvf libctl-3.2.1.tar.gz
# cd libctl-3.2.1
# ./configure --prefix=/usr/local/libctl-3.2.1
# make -j8
# make install

Step 2: Other Prerequisites include guile and guile-devel. Do make sure you install these 2 packages which can be done
# yum install guile guile-devel

Step 3: Prepare Intel Compilers and Intel MPI environment
$ vim .bashrc

source /usr/local/intel_2015/bin/compilervars.sh intel64
source /usr/local/intel_2015/impi/5.0.3.049/bin64/mpivars.sh intel64
source /usr/local/intel_2015/mkl/bin/mklvars.sh intel64
export CC=icc
export CXX=icpc
export F77=ifort
export MPICC=mpicc
export MPICXX=mpiicpc
export CFLAGS="-O3 -xHost -fno-alias -align"
export FFLAGS="-O3 -xHost -fno-alias -align"
export CXXFLAGS="-O3 -xHost -fno-alias -align"
export FFlags="-I/usr/local/intel_2015/impi/5.0.3.049/include64 -L/usr/local/intel_2015/impi/5.0.3.049/lib64"

Step 4: Compiling hdf5-1.8.17 See Compiling HDF5-1.8.17 with Intel-15.0.6 and Intel-MPI-5.0.6

Step 5: Compiling MEEP-1.3
$ ./configure --prefix=/usr/local/meep-1.3.1_impi-5.0.3 --with-mpi \
--with-libctl="/usr/local/libctl-3.2.1/share/libctl" \
LDFLAGS="-L/usr/local/libctl-3.2.1/lib -L/usr/local/hdf5-1.8.17/lib" \
CPPFLAGS="-I/usr/local/libctl-3.2.1/include -I/usr/local/hdf5-1.8.17/include"
$ make -j 12
$ make install

Friday, November 1, 2013

Compiling and Installing Meep-1.2.1 on CentOS 6 and OpenMPI

Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems, along with our MPB eigenmode package. The latest official version is 1.2 and can be found at Download Page for Meep

But there is a Lapack linking problem for 1.2 which is explained in Error when compiling Meep-1.2 on CentOS. It is strongly recommended to use the pre-release Meep 1.2.1 found at http://jdj.mit.edu/~stevenj/meep-1.2.1.tar.gz

Before you compile Meep 1.2.1, you need to first compile the libctl library. Compiling the libctl library is quite straightforward.

Step 1-3: For more information do see Compiling and Installing Meep-1.2.1 on CentOS 6 and OpenMPI (linuxcluster.wordpress.com)

Step 4: Compiling meep-1.2.1
# tar -zxvf meep-1.2.1.tar.gz
# cd meep-1.2.1
#  ./configure --prefix=/usr/local/meep-1.2.1 \
--with-libctl=/usr/local/libctl-3.2.1/share/libctl/ \
LDFLAGS=-I/usr/local/libctl-3.2.1/lib \
CPPFLAGS=-I/usr/local/libctl-3.2.1/include \
--with-mpi=/usr/local/openmpi-1.6.5/

References:
  1. Undefined reference to `dgetrf_’ error when compiling Meep-1.2 on CentOS
  2. crtbegin.o: No such file: No such file or directory Error when compiling Meep-1.2 on CentOS
  3. My opinion: Compiling Meep

Thursday, October 31, 2013

crtbegin.o: No such file: No such file or directory Error when compiling Meep-1.2 on CentOS

When compiling Meep on CentOS, you may encounter the error
/usr/bin/ld: crtbegin.o: No such file: No such file or directory.
This error is quite misleading as it is likely could be due to the missing guile and guile-devel packages.

Do a yum install
# yum install guile guile-devel  
and recompile again

undefined reference to `dgetrf_' error when compiling Meep-1.2 on CentOS

When you are compiling meep-1.2 on CentOS, you may encounter this error

multilevel-atom.cpp:(.text+0x9a9): undefined reference to `dgetrf_'
multilevel-atom.cpp:(.text+0x9fb): undefined reference to `dgetri_'
multilevel-atom.cpp:(.text+0xa44): undefined reference to `dgetri_'
collect2: ld returned 1 exit status
make[3]: *** [meep_mpi] Error 1
make[3]: Leaving directory `/home/user1/meep-1.2/libctl'

The error is due to LAPACK linking problem

The solution is to use the pre-release Meep-1.2.1 found at http://jdj.mit.edu/~stevenj/meep-1.2.1.tar.gz

References:
  1. http://listarc.com/showthread.php?3713314-Meep+1.2+installation