Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build in separate directory fails #30

Open
bradbell opened this issue Sep 4, 2023 · 5 comments
Open

build in separate directory fails #30

bradbell opened this issue Sep 4, 2023 · 5 comments

Comments

@bradbell
Copy link

bradbell commented Sep 4, 2023

Steps to reproduce:

  1. git clone https://github.com/rjhogan/Adept-2 adept.git
  2. cd adpet.git
  3. autoreconf
  4. mkdir build
  5. cd build
  6. ../configure
  7. make

Result:

...
Making all in test
/bin/sh: line 21: cd: test: No such file or directory
make[1]: *** [Makefile:503: all-recursive] Error 1
make[1]: Leaving directory '/home/bradbell/repo/cmpad.git/external/adept.git/build'
make: *** [Makefile:383: all] Error 2

Configure Warning:
configure: WARNING: cannot determine how to obtain linking information from f77

System:

build>uname -a
Linux brad-mobile 6.4.12-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 23 17:46:49 UTC 2023 x86_64 GNU/Linux
@rjhogan
Copy link
Owner

rjhogan commented Sep 4, 2023

Hi, I've not tested it in a separate build directory - the instructions say to type ./configure and make in the top-level directory.

@bradbell bradbell changed the title make fails build in separate directory fails Sep 4, 2023
@bradbell
Copy link
Author

bradbell commented Sep 4, 2023

Hi, I've not tested it in a separate build directory - the instructions say to type ./configure and make in the top-level directory.

OK that works.

@bradbell
Copy link
Author

bradbell commented Sep 4, 2023

Is there a proper way to create a debug / release version of the libraries ?

@rjhogan
Copy link
Owner

rjhogan commented Sep 4, 2023

Most of the Adept library is in headers, so if you want to debug your own code that use the library, you don't need to recompile the Adept library - you just should compile your code with the -DADEPT_BOUNDS_CHECKING -DADEPT_INIT_SNAN -DADEPT_TRACK_NON_FINITE_GRADIENTS flags (although I normally don't bother with the last one).

See the other options at section 5.6.1 at http://www.met.reading.ac.uk/clouds/adept/adept_documentation_2.1.pdf

@bradbell
Copy link
Author

bradbell commented Sep 4, 2023

I was able to implement a general adapet gradient and thereby include adept in my new AD comparison package; see
https://cmpad.readthedocs.io/en/latest/adept_gradient.hpp.html

The idea behind this comparison package is that it should be easy to add packages and easy to build and test for just one package; i.e., it is only necessary to get the packages one is interested in.

The result for some small example cases can be seen in src/main.csv:
https://cmpad.readthedocs.io/en/latest/xam_main.py.html#src-xam-main-csv

The cases above are small. You can run larger cases (on your system) using the program
https://cmpad.readthedocs.io/en/latest/main.html

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants