Skip to content

Instantly share code, notes, and snippets.

@H0R5E
Last active February 20, 2025 19:49
Show Gist options
  • Save H0R5E/c4af6db788b227de702a12e01b64cf46 to your computer and use it in GitHub Desktop.
Save H0R5E/c4af6db788b227de702a12e01b64cf46 to your computer and use it in GitHub Desktop.
Instructions for compiling Deflt3D using Windows Subsystem for Linux

Compiling Deflt3D using Windows Subsystem for Linux

This is a guide for compiling Delft3D for Linux using Windows Subsystem for Linux (WSL). Because the Linux compilation instructions are quite specific using WSL gives the advantage of easily using any Linux distribution. The Deltares compilation notes are provided for CentOS version 7, so we will recreate a similar environment using WSL. An outline of the steps in this guide is as follows:

  1. Set up WSL
  2. Install CentOS 7 in WSL
  3. Install dependencies in CentOS
  4. Install Delft3D
  5. Test Delft3D

Set up WSL

Follow the official guide from Microsoft for installing WSL for Windows 10 or 11. An important prerequisite is that Windows 10 users must have build 19041 or higher. See the "About your PC" screen in the system settings to check.

Install CentOS 7 in WSL

Because CentOS 7 is old, we require a WSL distribution from the now discontinued CentWSL project. Download the version 7 release and remember to unzip the download to a permanent location, as the path can not be changed once the OS is installed. An example path is C:\Users\<USER>\WSL\CentOS7 where <USER> refers to your Windows user name.

Now follow this guide from how2shout.com to install the distribution. Next, we will set a password for the root user. Start CentOS as the root user (the angle bracket is used to indicate commands in the powershell prompt):

> wsl -d CentOS7 -u root

Now use the command below to reset the password (the hash sign is used to indicate commands in the CentOS terminal):

# passwd

Now set up a normal user with the commands below. For this guide I will call the user delft3D. You can use any name you choose.

# adduser delft3D
# passwd delft3D

Next, make the normal account the default when CentOS is started. First open a new file with the vi editor:

# vi /etc/wsl.conf

Now press the i key to start editing and type in the following (remembering to replace delft3D with the username you chose):

[user]
default=delft3D

Now press the escape key and then type :wq and press enter to save the file. After restarting WSL and logging back into CentOS, we should now be the normal user.

# exit
> wsl --shutdown
> wsl -d CentOS7
[delft3D@COMPUTER Path]#

Install dependencies in CentOS

As stated in the "Linux Required software" section of the Delft3D compilation guide, a number of dependencies must be built using the same compiler as Delft3D. For this guide we will use the Intel oneAPI compiler for Linux to build the necessary dependencies and Delft3D. Fortunately, not every dependency must be built and we can install a number of them using CentOS's "YUM" package manager.

Intel OneAPI

First, add the Intel YUM repositories by following the instructions in this guide from Intel. Now switch to the root user, using the password we set up earlier, and then use YUM to install the OneAPI package and gcc:

# su -
# yum install intel-hpckit gcc

Logout as root by using CTRL-D or using the exit command. Now we must make sure that the ifort compiler is accessible through the terminal. Again, using vi, edit the .bashrc file in your CentOS home directory as follows:

# vi ~/.bashrc

Use the arrow keys to move to the last line of the file and then type A (capital A) to start editing from the end of the line. Then add a new line with this text:

. /opt/intel/oneapi/setvars.sh

Press enter and add another line which will switch off shared memory control (which can cause segfaults if not switched off):

export I_MPI_SHM="off"

Press escape to stop editing and then type :wq to save the file and exit vi. To check that the setup has worked, log out and back into CentOS and then issue the command:

# ifort --version

YUM Installed Dependencies

Now we will install the dependencies which can be retrieved with YUM. We become the root user again and then install the required packages as follows:

# su -
# yum group install "Development Tools"
# yum install wget libfabric-devel infinipath-psm-devel libpsm2-devel rdma-core-devel libnl3-devel libcurl-devel expat-devel ruby
# exit

Compiled Dependencies

Now we need to build the dependencies that must be compiled using the same compiler as Delft3D. The packages will be installed into the path ${HOME}/d3d_local where ${HOME} in an environment variable representing the current user's home directory. We will download all of the packages into a folder with path ${HOME}/Downloads. To create it and move there, issue the commands:

# mkdir "${HOME}/Downloads"
# cd "${HOME}/Downloads"

Next, simply issue the commands for each package in the sections below to download, compile and install.

mpich2 (Intel):

# wget --no-check-certificate http://www.mpich.org/static/downloads/3.4.2/mpich-3.4.2.tar.gz
# tar -xf mpich-3.4.2.tar.gz
# cd mpich-3.4.2
# ./configure CC=icc CXX=icpc F77=ifort FC=ifort --prefix="${HOME}/d3d_local" 2>&1 | tee c.txt
# make 2>&1 | tee m.txt
# make check 2>&1 | tee mc.txt
# make install 2>&1 | tee mi.txt
# cd ..

hdf5

# wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.bz2
# tar -xf hdf5-1.10.6.tar.bz2
# cd hdf5-1.10.6
# ./configure CC="${HOME}/d3d_local/bin/mpicc" --enable-parallel --enable-shared --prefix="${HOME}/d3d_local"  2>&1 | tee c.txt
# make 2>&1 | tee m.txt
# make check 2>&1 | tee mc.txt
# make install 2>&1 | tee mi.txt
# cd ..

netcdf-c

# wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.6.1.tar.gz -O netcdf-c-4.6.1.tar.gz
# tar -xf netcdf-c-4.6.1.tar.gz
# cd netcdf-c-4.6.1
# ./configure CC="${HOME}/d3d_local/bin/mpicc" CPPFLAGS="-I${HOME}/d3d_local/include" LDFLAGS="-L${HOME}/d3d_local/lib" --disable-dap-remote-tests --prefix="${HOME}/d3d_local" 2>&1 | tee c.txt
# make 2>&1 | tee m.txt
# make check 2>&1 | tee mc.txt
# make install 2>&1 | tee mi.txt
# cd ..

netcdf-fortran

# wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.5.0.tar.gz -O netcdf-fortran-4.5.0.tar.gz
# tar -xf netcdf-fortran-4.5.0.tar.gz
# cd netcdf-fortran-4.5.0
# NCDIR="${HOME}/d3d_local"
# export LD_LIBRARY_PATH=${NCDIR}/lib:${LD_LIBRARY_PATH}
# ./configure CC="${HOME}/d3d_local/bin/mpicc" F77="${HOME}/d3d_local/bin/mpif77" FC="${HOME}/d3d_local/bin/mpif90" CPPFLAGS="-I${NCDIR}/include" LDFLAGS="-L${NCDIR}/lib" --prefix="${HOME}/d3d_local" 2>&1 | tee c.txt
# make 2>&1 | tee m.txt
# make check 2>&1 | tee mc.txt
# make install 2>&1 | tee mi.txt
# cd ..

Install Delft3D

With all the necessary dependencies installed, we can now download, compile and install Delft3D. Note that you must have a Deltares SVN server account to download the source code. If you need to register, see the "Steps needed to use the Delft3D source code" section of the Delft3D compilation guide. In the compilation instructions below, replace <username> and <password> with the SVN login details that Deltares sent you. The commands below will install tag 68819, the recommended tag for Delft3D-FM. This time the binaries are placed ${HOME}/Downloads/delft3dfm-68819/src directory, the standard location.

# svn checkout --username <username> --password <password> https://svn.oss.deltares.nl/repos/delft3d/tags/delft3dfm/68819/ delft3dfm-68819
# cp delft3dfm-68819/src/third_party_open/swan/src/*.[fF]* delft3dfm-68819/src/third_party_open/swan/swan_mpi
# cp delft3dfm-68819/src/third_party_open/swan/src/*.[fF]* delft3dfm-68819/src/third_party_open/swan/swan_omp
# cd delft3dfm-68819/src
# export FC="${HOME}/d3d_local/bin/mpifort"
# ./autogen.sh --verbose 2>&1 | tee a.txt
# ./configure CC="${HOME}/d3d_local/bin/mpicc" CXX="${HOME}/d3d_local/bin/mpicxx" MPICXX="${HOME}/d3d_local/bin/mpicxx" F77="${HOME}/d3d_local/bin/mpif77" MPIF77="${HOME}/d3d_local/bin/mpif77" FC="${HOME}/d3d_local/bin/mpifort" MPIFC="${HOME}/d3d_local/bin/mpifort" CPPFLAGS="-I${HOME}/d3d_local/include" NETCDF_CFLAGS="-I${HOME}/d3d_local/include -I${HOME}/d3d_local/include" NETCDF_LIBS="-L${HOME}/d3d_local/lib -lnetcdf" CFLAGS='-O2 ' CXXFLAGS='-O2 ' AM_FFLAGS='-lifcoremt ' FFLAGS='-O1 -qopenmp' AM_FCFLAGS='-lifcoremt ' FCFLAGS='-O1 -qopenmp' AM_LDFLAGS='-lifcoremt ' --prefix="${HOME}/Downloads/delft3dfm-68819/src" 2>&1 | tee c.txt
# make ds-install 2>&1 | tee md.txt
# make ds-install -C engines_gpl/dflowfm | tee mdfm.txt
# cd ..

Test Delft3D

To test the installation, we use the example files provided in the Delft3D source code. It is assumed that the current directory is the root of the Delft3D source code, i.e. ${HOME}/Downloads/delft3dfm-68819. To test a structured mesh example, issue the following commands:

# pushd examples/01_standard
# ./run.sh
# popd

Then, to test a flexible mesh example, issue the following:

# pushd examples/12_dflowfm/test_data/e02_f14_c040_westerscheldt
# ./run.sh
# popd
@JoshuaB-L
Copy link

Hi Mathew, I just want to say thank you for your great and well planned though tutorial you posted here: https://youtu.be/o1iQvO3x8A0. I followed it through up to the point where you run the 'make ds-install 2>&1 | tee md.txt' command. Unfortunately I had an error @ 37:26 https://youtu.be/o1iQvO3x8A0?t=2246.

SwanCompUnstruc.f90:(.text+0x69): undefined reference to `__kmpc_global_thread_num'

make[3]: *** [swan_mpi] Error 1
make[3]: Leaving directory /home/delft3D/Downloads/delft3dfm-68819/src/third_party_open/swan/swan_mpi' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory /home/delft3D/Downloads/delft3dfm-68819/src/third_party_open/swan'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/delft3D/Downloads/delft3dfm-68819/src/third_party_open'
make: *** [install-recursive] Error 1

I think the issue might be related to the swan_mpi and the swan_omp libraries that are not explicitly linked in the configure flags via the long ./configure command here: https://gist.github.com/H0R5E/c4af6db788b227de702a12e01b64cf46#install-delft3d. I guess itโ€™s just a simple case of updating the flags. It is however a little strange that you did not receive any error granted that I followed the exact installation instructions you outlined via the video and document.

I'm not too experienced with compiling Intel or FORTRAN code. I would really appreciate your support in order to fix this presumably small bug. I think a few other users also reported the issue on your YouTube tutorial, so I'm sure this will help quite a few others in the community!

I would really appreciate a rather swift reply on this as Iโ€™m currently needed to use Delft3d in a project.

Thank you very much in advance for your support! ๐Ÿ˜Š

Best,
Josh

@veethahavya-CU-cz
Copy link

@JoshuaB-L adding the option --with-mpi and removing the -qopenmp flag while running ./configure solved the issue for me.

However, I seem to be facing a soft error that prevents the successful completion of the makefile run, preventing further action:

ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libcilkrts.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libDelftOnline.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdelwaq.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdimr.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libflow2d3d.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libifcoremt.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libifcore.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libifport.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libimf.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libintlc.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libiomp5.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libirc.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libirng.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnefis.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libODS.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libplugin_culvert.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libplugin_delftflow_traform.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libsigwatch.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libsvml.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libwaq_plugin_wasteload.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libwave.a'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libimf.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirng.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libcilkrts.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libintlc.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libsvml.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifport.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcoremt.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libiomp5.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirc.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcore.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libcilkrts.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libDelftOnline.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdelwaq.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdimr.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libflow2d3d.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libifcoremt.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libifcore.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libifport.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libimf.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libintlc.so.5'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libiomp5.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libirc.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libirng.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnefis.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libODS.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libplugin_culvert.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libplugin_delftflow_traform.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libsigwatch.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libsvml.so'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libwaq_plugin_wasteload.a'
ldd: warning: you do not have execution permission for `/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libwave.a'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libimf.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirng.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libcilkrts.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libintlc.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libsvml.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifport.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcoremt.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libiomp5.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirc.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcore.so.5'
Gathering libraries for bin/* ...
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifport.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcoremt.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libimf.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libsvml.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirc.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libintlc.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libiomp5.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirng.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libcilkrts.so.5'
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdelwaq.so.0โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdelwaq.so.0โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdimr.so.0โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libdimr.so.0โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libexpat.so.1โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libexpat.so.1โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libhdf5.so.103โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libhdf5.so.103โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libhdf5_hl.so.100โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libhdf5_hl.so.100โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnefis.so.0โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnefis.so.0โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnetcdf.so.13โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnetcdf.so.13โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnetcdff.so.7โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libnetcdff.so.7โ€™ are the same file
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libwaq_plugin_wasteload.so.0โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libwaq_plugin_wasteload.so.0โ€™ are the same file
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifport.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcoremt.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libimf.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libsvml.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirc.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libintlc.so.5'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libiomp5.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libirng.so'
ldd: warning: you do not have execution permission for `/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libcilkrts.so.5'
cp: โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libexpat.so.1โ€™ and โ€˜/home/dflowfm/Downloads/delft3dfm-68819/src/lib/libexpat.so.1โ€™ are the same file

Here is the full log file of the make ds-install command.

@H0R5E , thanks for getting me this far. Any tips on how to solve this (soft)error? Would be highly grateful!

Cheers.
Veethahavya

@wonhyun2
Copy link

Thanks for your guidance, compiling with Cmake is still very difficult for me. but this one is very straightforward...
But, if I want to use OpenMP, how do I compile source code? or how do I setup for OpenMP run?
Above process looks that turns off the switch for OpenMP...
and if you know how to setup the DWave or DFlow+DWave using MPI? how do I setup for MPI runs for Dwave or DFflow+DWave....?
if you look at this, please let me know anything...

@veethahavya-CU-cz
Copy link

@wonhyun2 I was able to compile with OMP by adding the intel OMP5 library (libiomp5.so) to the AM_*FLAGS by appending '-liomp5' and by making sure the location of the library is appended to LD_LIBRARY_PATH.

If you wish to checkout a dockerized implementation of the same, check out: https://github.com/veethahavya-CU-cz/delft3dfm_dockerized/tree/main/debian-latest_intel_OMP

@Xiaoyun128
Copy link

Hi,
I found the icc need to transition to icx:
Intelยฎ C++ Compiler Classic (icc) is deprecated and will be removed in a oneAPI release in the second half of 2023. Intel recommends that customers transition now to using the LLVM-based Intelยฎ oneAPI DPC++/C++ Compiler (icx) for continued Windows* and Linux* support, new language support, new language features, and optimizations.

I change:

./configure CC=icc CXX=icpc F77=ifort FC=ifort --prefix="${HOME}/d3d_local" 2>&1 | tee c.txt

to :

./configure cc=dpc++ cxx=icpc f77=ifort fc=ifort --prefix="${home}/d3d_local" 2>&1 | tee c.txt

is that right?
Many thanks.

@veethahavya-CU-cz
Copy link

The message is only a warning. Using LLVM-based compilers gave me a few errors I couldn't solve or recall now.
You may just choose to ignore the warning and stick to icc. For aesthetic reasons, if you want to disable the errors, add -diag-disable=10441 to your C*FLAGS.
For a tested copy, refer to the repository mentioned in my prev. comment.

@Xiaoyun128
Copy link

Thanks!
And Also I had a problem with configure delft3d:

./configure CC="${HOME}/d3d_local/bin/mpicc" CXX="${HOME}/d3d_local/bin/mpicxx" MPICXX="${HOME}/d3d_local/bin/mpicxx" F77="${HOME}/d3d_local/bin/mpif77" MPIF77="${HOME}/d3d_local/bin/mpif77" FC="${HOME}/d3d_local/bin/mpifort" MPIFC="${HOME}/d3d_local/bin/mpifort" CPPFLAGS="-I${HOME}/d3d_local/include" NETCDF_CFLAGS="-I${HOME}/d3d_local/include -I${HOME}/d3d_local/include" NETCDF_LIBS="-L${HOME}/d3d_local/lib -lnetcdf" CFLAGS='-O2 ' CXXFLAGS='-O2 ' AM_FFLAGS='-lifcoremt ' FFLAGS='-O1 -qopenmp' AM_FCFLAGS='-lifcoremt ' FCFLAGS='-O1 -qopenmp' AM_LDFLAGS='-lifcoremt ' --prefix="${HOME}/Downloads/delft3dfm-68819/src" 2>&1 | tee c.txt

shows :
checking for Fortran libraries of /home/delft3D/d3d_local/bin/mpifort...
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... configure: error: in `/home/delft3D/Downloads/delft3dfm-68819/src':
configure: error: cannot compile a simple Fortran program

Do you have any idea to solve this? Almost finish after this step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment