Use this "src\README" for compiling Delft3D4-FLOW only. For compiling all other kernels: Do not use this "src\README", but "README.md", one directory level up. Please check the following sites for additional information: Delft3D 4 suite: https://oss.deltares.nl/web/delft3d/get-started Delft3D FM suite: https://oss.deltares.nl/web/delft3dfm/get-started FAQ : http://oss.deltares.nl/web/delft3d/faq Compile forum : http://oss.deltares.nl/web/delft3d/general/-/message_boards?_19_mbCategoryId=200432 Compiling on Windows ==================== 0) Be sure that you have installed all prerequisites listed at https://oss.deltares.nl/web/delft3d/source-code#prerequisites Check that the path to "python.exe" is added to your environment parameter "PATH" (should work automatically) 1) Execute "...\src\prepare_sln.py" (double-clicking it in your file browser will do) to create a "delft3d4-flow.sln" that fits to your tools See the comments in "...\src\prepare_sln.py" for more information 2) Open "delft3d4-flow.sln" (Delft3D4-FLOW, structured) in Visual Studio 2) Select the "solution configuration": "Release" 3) Select the "solution platform" : "x64" 4) B will compile the full solution 5) The binaries are installed in directory "src\bin\x64" Compiling on Linux ================== 0) Be sure that you have installed all prerequisites listed at https://oss.deltares.nl/web/delft3d/source-code#prerequisites 1) In directory "src", do one of the following two options: Option A): ./autogen.sh cd third_party_open/kdtree2 ./autogen.sh cd - CFLAGS='-O2' CXXFLAGS='-O2' FFLAGS='-O2' FCFLAGS='-O2' ./configure --prefix=`pwd` --with-netcdf --with-mpi --with-metis --with-petsc FC=mpif90 make ds-install Option B): Use script build.sh. Executing "./build.sh" will show the usage. The following example line is used to create the latest fully tested version: ./build.sh -intel14 WARNING: build.sh is system dependent. You have to modify it to fit to your site! 2) The binaries are installed in directory "src/bin", "src/lib" and "src/share" (due to "--prefix=`pwd`" and default "install") 3) To clean (removing all files generated by autoreconf/configure/make): ./clean.sh 4) Remarks: - Be careful with tools/compilers located in different directories due to different revision/build numbers (e.q. /opt/mpich2-1.4.1-gcc-4.6.2) You have to take care of that yourself - Check both "common.am" and "build.sh" - When using a --prefix unequal to `pwd`, the specified directory will contain: - "bin", "lib" and "share" subdirectories (due to the default Linux "install") The examples will not run "out of the box". The runscripts must be adapted to point to the --prefix location Compiling on OSX ================ The OSX version is only tested with Macports gcc45 + openmpi compilers. Make sure you also get libtool, autoconf, automake, gnu make from macports. The OSX version is very alpha (not tested) so please don't use it for anything serious and report any problems to the general forum. The steps to get it working are first install DelftOnline: 1) cd delft3dsrcdirectory 2) autoreconf -i 3) ./configure (*,**) 4) make 5) make install * If you don't want to install into /usr/local, use --prefix=abspath ** Set DYLD_LIBRARY_PATH to the directory containing DelftOnline if it's not in your default path Running examples without GUI ============================ In directory "examples\01_standard": Windows: - Execute script "run.bat" Parallel: Execute "run_parallel.bat" This model is very small and can only be run using 5 partitions or less Have a look at parameter %NPROC% in the script "run_flow2d3d_parallel.bat" Linux: - Execute script "run.sh" Parallel: - Depending on your system settings, you might need to change the script "run_parallel.sh" - Execute script "run_parallel.sh" Running your model ================== Start with using the GUI, see http://oss.deltares.nl/web/delft3d/source-code#Run a calculation Debugging in Microsoft Visual Studio ==================================== Debugging is not needed for daily computations, only for tracing the source code and solving problems. You must have some experience with Microsoft Visual Studio and Running Deft3D calculations using scripts. - Be sure to have compiled the "Debug configuration" (Build -> Configuration Manager...). All resulting binaries are copied automatically to directory "...\src\engines_gpl\d_hydro\bin\Debug". - In your model input directory: put a copy of file "...\oss\src\engines_gpl\d_hydro\scripts\config_d_hydro.xml", open it in a text editor and fill in the correct name of the mdf-file. - In VisualStudio: 1) right-click on the project "d_hydro", Properties -> Configuration properties -> Debugging: Command Arguments: config_d_hydro.xml Working directory: d:/full/path/to/your/model/input/directory OK 2) In the source code: add a breakpoint. Click some line, then click in the gray bar in front of this line (or press F9). A red dot will appear. 3) right-click on the project "d_hydro", Debug -> Start new instance. A window will allways appear saying source code has been changed. You can rebuild the source code or skip this if you are sure all source code is build correctly. Then the calculation starts. Directory structure =================== engines_gpl : Open source engines, under GPL conditions, see ../gpl-3.0.txt tools_gpl : Open source small programs which support the engines, under GPL conditions, see ../gpl-3.0.txt tools_lgpl : Open source tools, under LGPL conditions, see ../lgpl-2.1.txt utils_gpl : Open source libraries which are used by the engines and/or tools, under GPL conditions, see ../gpl-3.0.txt utils_lgpl : Open source utils, under LGPL conditions, see ../lgpl-2.1.txt Location where compiler flags are defined/added (Linux only) ============================================================ configure.ac common.am build.sh