intro story D-Flow FM

 

D-Flow Flexible Mesh

D-Flow Flexible Mesh (D-Flow FM) is the new software engine for hydrodynamical simulations on unstructured grids in 1D-2D-3D. Together with the familiar curvilinear meshes from Delft3D 4, the unstructured grid can consist of triangles, pentagons (etc.) and 1D channel networks, all in one single mesh. It combines proven technology from the hydrodynamic engines of Delft3D 4 and SOBEK 2 and adds flexible administration, resulting in:

  • Easier 1D-2D-3D model coupling, intuitive setup of boundary conditions and meteorological forcings (amongst others).
  • More flexible 2D gridding in delta regions, river junctions, harbours, intertidal flats and more.
  • High performance by smart use of multicore architectures, and grid computing clusters.
An overview of the current developments can be found here.
 
The D-Flow FM - team would be delighted if you would participate in discussions on the generation of meshes, the specification of boundary conditions, the running of computations, and all kinds of other relevant topics. Feel free to share your smart questions and/or brilliant solutions! 

 

=======================================================
We have launched a new website (still under construction so expect continuous improvements) and a new forum dedicated to Delft3D Flexible Mesh.

Please follow this link to the new forum: 
/web/delft3dfm/forum

Post your questions, issues, suggestions, difficulties related to our Delft3D Flexible Mesh Suite on the new forum.

=======================================================

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 


Message Boards

libmpich.so: undefined reference to .... (Linux)

TB
Thomas Boyington, modified 7 Years ago.

libmpich.so: undefined reference to .... (Linux)

Youngling Posts: 1 Join Date: 8/8/12 Recent Posts
I’m getting numerous libmpich.so: undefined reference to XXX errors when building Delft3D. I’ve read the log files, Googled, and rtm’ed to no avail. I hope that someone in the forums can help me out.

I'm running Red Hat Enterprise 6.3 64-bit and building mpich 1.4.1 and Delft3D 2367 with the Intel 2013 Fortran/C compiler. I have been able to build mpich successfully (I think…the examples described in the mpich README file work) using the commands shown below. I’m using the –enabled-shared, CFLAGS=”-fPIC” and CXXFLAGS=”-fPIC” switches because of a previous Delft3D build error saying to build mpich with the –fPIC switch.

configure --prefix=/home/labuser/mpich2-install --enable-shared CFLAGS="-fPIC" CXXFLAGS="-fPIC" F77=ifort FC=ifort |& tee c.txt
make 2>&1 | tee m.txt
make install 2>&1 | tee mi.txt

When building Delft3D I get the following errors in the make log. I've tried both ./build.sh -intel12 -64bit and ./build.sh -intel12 with the same result. I've edited the mpich paths in the build.sh to point to the install directory for mpich. Any suggestions on how to address this will be greatly appreciated.

libNefis.a ../../../../../engines_gpl/waq/packages/waq_utils_f/src/interact/.libs/libinteract.a ../../../../../engines_gpl/waq/packages/waq_utils_c/src/.libs/libwaq_utils_c.a ../../../../../engines_gpl/waq/packages/delwaq2_version_number/src/.libs/libdelwaq2_version_number.a -lfmpich -lmpich -lpthread -ldl -lrt -lexpat -lstdc++ -fopenmp -threads
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trid'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trvalid'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_env2int'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trrealloc'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trspace'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trDebugLevel'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_TrSetMaxMem'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trlevel'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trmalloc'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_env2bool'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_env2range'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trcalloc'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trfree'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_env2str'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trstrdup'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trdump'
/home/labuser/mpich2-install/lib/libmpich.so: undefined reference to `MPL_trinit'
make[5]: *** [delwaq2] Error 1
make[5]: Leaving directory `/home/labuser/Delft3D/2367/src/engines_gpl/waq/packages/delwaq2/src'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/home/labuser/Delft3D/2367/src/engines_gpl/waq/packages/delwaq2'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/labuser/Delft3D/2367/src/engines_gpl/waq/packages'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/labuser/Delft3D/2367/src/engines_gpl/waq'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/labuser/Delft3D/2367/src/engines_gpl'
make: *** [install-recursive] Error 1


Thanks,

Matt

--
T. Matthew Boyington
Civil Engineer, Water Resources
Hydrothermal Team
River Operations & Renewables
Tennessee Valley Authority
400 West Summit Hill Drive, Knoxville, TN 37902
e-mail: tmboyington@tva.gov
Adri Mourits, modified 7 Years ago.

RE: libmpich.so: undefined reference to .... (Linux) (Answer)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Thomas,

Please use the -64bit flag.

Your link line contains the flag "-fopenmp". This is a flag for the Gnu compiler. When using the Intel compiler the related flag should be "-openmp", without the "f".
Automake decides what flags should be used. When using the Intel compiler, your "configure.log" should contain a line like:
checking for ifort option to support OpenMP... -openmp

Does this help you to trace what goes wrong? If not, can you post all 3 log files?

Thanks.

Adri
CB
Cezar BALANESCU, modified 7 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Youngling Posts: 10 Join Date: 5/18/12 Recent Posts
Hi, Adri!

I have exactly the same issue.
Please find attached the log files. Please note also that I had succesfully compiled the sources for version 5.00.11.2045, back in December 2012. Since then I've ran many models. Today I've checked out the latest release version (I've followed a suggestion from one of your colleague) and start to compile it again. As you can see I have these errors...

The command-line is: ./build.sh -gnu -64bit

Please advice! Meanwhile I will keep trying to solve it.

Cezar
Adri Mourits, modified 7 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Cezar,

The good news is: you did manage to compile Delft3D-FLOW, although it may not run in parallel. The problem is inside DELWAQ.

What revision do you use? It seems as if you use a revision lower than 2272. Can you try again, starting with an empty directory and downloading source code from "https://svn.oss.deltares.nl/repos/delft3d/tags/2514/"?

If you have all tools installed in the default location, the easiest way to compile is executing "autogen", "configure" and "make". See file "src/README", section "Compiling on Linux", item "1)", "option A)".

If you use script "build.sh" (option emoticon you have to open this script in a text editor and adapt all explicit paths to fit to your local system. See the lines 150 to 257 in there.

Regards,

Adri
CB
Cezar BALANESCU, modified 7 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Youngling Posts: 10 Join Date: 5/18/12 Recent Posts
Hi, Adri

I started over with an empty folder and I've downloaded the source code from trunk (the latest, am I right?). The checkout revision is 2561. I will try with revision 2514.
The good thing is that I managed to compile an earlier version which is no including DELWAQ, running build.sh without any customization. I think also that there is a problem with libmpich.so which is coming from debian repository (I've checked this library with nm and I cannot see entry points for symbols which are listed in the make logfile). Is this normal?

Cezar
Adri Mourits, modified 7 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Cezar,

You need an MPICH2 version, compiled by yourself with exactly the same compiler as you use for the Delft3D source code.

Delwaq will only build when this library is available. Delft3D-FLOW will build without this library, but then it won't run in parallel.

Regards,

Adri
CB
Cezar BALANESCU, modified 6 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Youngling Posts: 10 Join Date: 5/18/12 Recent Posts
Hi, Adri

I've got MPICH2, compiled from source with gcc, f77 and f90. Now I get:

/usr/bin/ld: /home/cbalanescu/mpich-install/lib/libmpich.a(allreduce.o): relocation R_X86_64_32 against `MPIR_ThreadInfo' can not be used when making a shared object; recompile with -fPIC
/home/cbalanescu/mpich-install/lib/libmpich.a: could not read symbols: Bad value

Could you tell me where this is comming from? Did I wrongly compiled mpich or should I customize some other script in delft3d sources? (This error I get when I build from https://svn.oss.deltares.nl/repos/delft3d/tags/2514). Everything is in the path and I've taylored the build.sh script.

Regards,
Cezar
Adri Mourits, modified 6 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Cezar,

MPICH2 has to be compiled with the flag -fPIC.

I'm surprised you run into this problem. I expected it to be solved since revision 2167. But it still seems to be needed.

Regards,

Adri
CB
Cezar BALANESCU, modified 6 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Youngling Posts: 10 Join Date: 5/18/12 Recent Posts
Hi, Adri!

Thank you for the suggestion. I've configured MPICH2 with --enable-shared and now I have the latest version running (I am kind of beginner with shared libraries...)

Thumbs up!

Regards,
Cezar
OL
Oliver Lojek, modified 6 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Jedi Knight Posts: 111 Join Date: 4/30/13 Recent Posts
Hi there,


I seemingly end up getting a similar problem - I recompiled Mpich2 with -fPIC flag and afterwards d3d. Single core tests perform. But parallel versions again give me
the same lib-error.

I checked the make logs as suggested but could not find any of the indicated errors.

The use of "mpiexec" is intended.



Any suggestions what else I could check to get to the root of this problem?




Kind regards,


Oliver
CB
Cezar BALANESCU, modified 6 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Youngling Posts: 10 Join Date: 5/18/12 Recent Posts
Hello Oliver,

are you able to issue "mpiexec -info" command? As far as I understand you've managed to compile Delft3D from source without any error. I think the issue is related with the path. Somehow I had to tailor the parallel running script for my configuration. I've searched to see where are the binaries for launching the parallel running from the script, then I found some python scripts in the source directory of mpich and then I've linked these files into my path. I don't know if this manner is efficient, but worked for me.

Cezar
Adri Mourits, modified 6 Years ago.

RE: libmpich.so: undefined reference to .... (Linux)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Oliver,

"The use of "mpiexec" is intended." may indicate that you use another version of MPICH2.
Script "...\examples\01_standard\run_flow2d3d_parallel.sh" contains (commented out) example lines using "mpiexec" instead of "mpirun".

Regards,

Adri