[ET Trac] #2619: include Ellipitca (reader) in Einstein Toolkit

Roland Haas trac-noreply at einsteintoolkit.org
Wed Mar 1 14:21:26 CST 2023


#2619: include Ellipitca (reader) in Einstein Toolkit

 Reporter: Roland Haas
   Status: open
Milestone: 
  Version: 
     Type: enhancement
 Priority: major
Component: 

Comment (by Roland Haas):

Ideally the library would become an ExternalLibrary \(same as say LORENE [https://github.com/einsteinToolkit/externalLibraries-lorene](https://github.com/einsteinToolkit/externalLibraries-lorene)\) and the reader thorn would REQUIRE it \(like Meudon\_Bin\_NS [https://bitbucket.org/einsteintoolkit/einsteininitialdata/src/master/Meudon\_Bin\_NS/](https://bitbucket.org/einsteintoolkit/einsteininitialdata/src/master/Meudon_Bin_NS/) in file configuration.ccl\).

This has the advantage that multiple different ID readers can use the same ExternalLibrarry eg for BBH or BNS or BHNS initial data. Those should not be all handled by a single thorn since eg the BNS or BHNS reader will need to provide data in thorn HydroBase which would not be active for a pure vacuum run.

If the library cannot be incorporated as an ExternalLibrary \(eg b/c it requires use of C\+\+ features not allowed in C\+\+11 or Fortran newer than Fortran 2008\) then you could have the ID thorns take `FOO_DIR` etc option list variables the way an ExternalLibrary thorn would do. However this would mean that a user who would like to compile in multiple different ID thorns all using Elliptica’s library would have to, potentially, set multiple option list variables with identical values.

On the technical level, you can tell the build system which library to link against and the path to find is using configuration.ccl by adding a \([http://einsteintoolkit.org/usersguide/UsersGuide.html#x1-53000C1.2.3](http://einsteintoolkit.org/usersguide/UsersGuide.html#x1-53000C1.2.3)\) block

```
PROVIDES <My_Capability>
{
  SCRIPT <My_ConfigScript>
  LANG <My_Language>
}
```

where `My_ConfigScript` has to produce output that adheres to the syntax described here: [http://einsteintoolkit.org/usersguide/UsersGuide.html#x1-194000D2.5.1](http://einsteintoolkit.org/usersguide/UsersGuide.html#x1-194000D2.5.1)

For a library that cannot be compiled from source you can pattern this after what is done in ExternalLbraries/pthreads \(this is fine even if you have actual Cactus code in `src`/\) which looks like what you can find here \([https://github.com/EinsteinToolkit/ExternalLibraries-pthreads](https://github.com/EinsteinToolkit/ExternalLibraries-pthreads)\): [https://github.com/EinsteinToolkit/ExternalLibraries-pthreads/blob/master/src/detect.sh](https://github.com/EinsteinToolkit/ExternalLibraries-pthreads/blob/master/src/detect.sh) The important bit are the `MAKE_DEFINITION` \(to set Makefile variables that other thorns can use\) and `INCLUDE_DIRECTORY`, `LIBRARY_DIRECTORY`, `LIBRARY` \(to tell Cactus what `-L`, `-I` and `-l` options to produce\)  blocks:

```
echo "BEGIN MAKE_DEFINITION"
echo "PTHREADS_DIR            = ${PTHREADS_DIR}"
echo "PTHREADS_INC_DIRS       = ${PTHREADS_INC_DIRS}"
echo "PTHREADS_LIB_DIRS       = ${PTHREADS_LIB_DIRS}"
echo "PTHREADS_LIBS           = ${PTHREADS_LIBS}"
echo "END MAKE_DEFINITION"

echo 'INCLUDE_DIRECTORY $(PTHREADS_INC_DIRS)'
echo 'LIBRARY_DIRECTORY $(PTHREADS_LIB_DIRS)'
echo 'LIBRARY           $(PTHREADS_LIBS)'
```

Hope this helps.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2619/include-ellipitca-reader-in-einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20230301/c57edce9/attachment.html 


More information about the Trac mailing list