diff --git a/configure.ac b/configure.ac index ca1aeb626b30d3170f71420e9700673f9597e07e..9cadad241f37e86e2020a4e460761ea7c6253414 100644 --- a/configure.ac +++ b/configure.ac @@ -941,7 +941,7 @@ if test "x$with_velociraptor" != "xno"; then AC_PROG_FC AC_FC_LIBRARY_LDFLAGS if test "x$with_velociraptor" != "xyes" -a "x$with_velociraptor" != "x"; then - VELOCIRAPTOR_LIBS="-L$with_velociraptor -lstf -lstdc++ -lhdf5_cpp" + VELOCIRAPTOR_LIBS="-L$with_velociraptor -lvelociraptor -lstdc++ -lhdf5_cpp" CFLAGS="$CFLAGS -fopenmp" else VELOCIRAPTOR_LIBS="" @@ -950,7 +950,7 @@ if test "x$with_velociraptor" != "xno"; then have_velociraptor="yes" AC_CHECK_LIB( - [stf], + [velociraptor], [InitVelociraptor], [AC_DEFINE([HAVE_VELOCIRAPTOR],1,[The VELOCIraptor library appears to be present.])], [AC_MSG_ERROR(Cannot find VELOCIraptor library at $with_velociraptor)], diff --git a/doc/RTD/source/VELOCIraptorInterface/stfalone.rst b/doc/RTD/source/VELOCIraptorInterface/stfalone.rst index 191d990c3d485bbc548c435d9b548686b9446397..e6bd0a72b207d7ca54bae67283326e7dcff51c02 100644 --- a/doc/RTD/source/VELOCIraptorInterface/stfalone.rst +++ b/doc/RTD/source/VELOCIraptorInterface/stfalone.rst @@ -23,24 +23,18 @@ git repository as:: git clone https://github.com/pelahi/VELOCIraptor-STF Similar to the SWIFT with VELOCIraptor configuration, we can use the -swift-interface branch to analyse individual snapshots. We can use this branch +master to analyse individual snapshots. We can use this branch by doing:: cd VELOCIraptor-STF git fetch - git checkout swift-interface -Again we need to copy the default SWIFT config file to a other config file by -doing:: +Again we need to configure VELOCIraptor:: - cd stf - cp Makefile.config.SWIFT-template Makefile.config + cmake . -DVR_USE_GAS=ON -Similar to configuring VELOCIraptor with swift we need to change the first 20 -lines of ``Makefile.config`` to work with our compiler, but we also need to -change the fact that we do not use the swift-interface but the standalone -version of the code, so change ``SWIFTINTERFACE="on"`` to -``SWIFTINTERFACE="off"``. +In this case, we do not need the SWIFT interface, therefore we can drop +this option (disabled by default). Compiling VELOCIraptor ---------------------- @@ -50,9 +44,7 @@ configuration with SWIFT. In this case we can compile the code as:: make -After this an additional folder is created in ``VELOCIraptor-stf/stf`` called -``bin``, in which the binary files of ``stf-gas`` is present (assuming you -run a simulation with SPH [#nosph]_) +After this an executable is created (``VELOCIraptor-stf/stf``). Running VELOCIraptor on a Snapshot ---------------------------------- @@ -61,10 +53,12 @@ After the code is compile the next step is using VELOCIraptor on a single snapshot of a simulation. The code has several options which can be used, which can be displayed by running a terminal command of an invalid letter like:: - ./stf-gas -h + ./stf -h which gives the information about the usage of the command:: + VELOCIraptor/STF running with MPI. Number of mpi threads: 1 + VELOCIraptor/STF running with OpenMP. Number of openmp threads: 8 USAGE: -C <configuration file (overrides other options)> @@ -80,13 +74,6 @@ which gives the information about the usage of the command:: ===== EXTRA OPTIONS REQUIRED FOR RAMSES INPUT ====== -t <ramses snapnumber> -After this we can run a VELOCIraptor on a snapshot as:: +After this we can run VELOCIraptor on a snapshot as:: - ./stf-gas -i input -o output -C configfile.txt - - -.. [#nosph] In the case that in the ``Makefile.config`` it is indicate that the - simulation does only contain dark matter this will reflect back on the - generated binary file. So ``stf-gas`` will change to ``stf`` in the case of - a dark matter only simulation. - + ./stf -i input -o output -C configfile.txt diff --git a/doc/RTD/source/VELOCIraptorInterface/stfwithswift.rst b/doc/RTD/source/VELOCIraptorInterface/stfwithswift.rst index 245b455d583d3ccdca02463e2afc6100e14dfb31..a663c37f93a6cede8c4528583c44183059414432 100644 --- a/doc/RTD/source/VELOCIraptorInterface/stfwithswift.rst +++ b/doc/RTD/source/VELOCIraptorInterface/stfwithswift.rst @@ -22,23 +22,17 @@ VELOCIraptor. This can be done by cloning the repository on GitHub_:: git clone https://github.com/pelahi/VELOCIraptor-STF -Currently the best version that works with SWIFT is the swift-interface branch +Currently the best version that works with SWIFT is the master of VELOCIraptor, to get this branch use:: cd VELOCIraptor-STF git fetch - git checkout swift-interface -To get the default that works with SWIFT simply copy the SWIFT template file in -the ``Makefile.config``:: +To get VELOCIraptor working with SWIFT simply use:: - cd stf - cp Makefile.config.SWIFT-template Makefile.config - -Depending on your compiler you want to change the first 20 lines of your -``Makefile.config`` to work with your compiler and whether you want to use MPI -or not. + cmake . -DVR_USE_SWIFT_INTERFACE=ON -DCMAKE_CXX_FLAGS="-fPIC" -DVR_USE_GAS=ON +If you wish to run swift without MPI, you will need to add ``-DVR_MPI=OFF``. Compiling VELOCIraptor ---------------------- @@ -46,13 +40,11 @@ Compiling VELOCIraptor After we downloaded the files and made a configuration file we can compile VELOCIraptor as follows:: - make lib - make libstf + make -j 4 -After the compilation of your code, there is an additional folder created in -the ``VELOCIraptor-stf/stf`` directory called ``lib`` this directory has the -library of VELOCIraptor and is required to run SWIFT with -VELOCIraptor. Note that VELOCIraptor needs a serial version of the +After the compilation of your code, you will find a static library ``libvelociraptor.a``, +that is required to run SWIFT with VELOCIraptor. +Note that VELOCIraptor needs a serial version of the HDF5 library, not a parallel build. Compiling SWIFT @@ -61,7 +53,7 @@ The next part is compiling SWIFT with VELOCIraptor and assumes you already downloaded SWIFT from the GitLab_, this can be done by running:: ./autogen.sh - ./configure --with-velociraptor=/path/to/VELOCIraptor-STF/stf/lib + ./configure --with-velociraptor=/path/to/VELOCIraptor-STF/src make In which ``./autogen.sh`` only needs to be run once after the code is cloned