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

[REVIEW]: cppduals: a nestable vectorized templated dual number library for C++11 #1487

Open
whedon opened this issue Jun 5, 2019 · 45 comments

Comments

@whedon
Copy link
Collaborator

commented Jun 5, 2019

Submitting author: @tesch1 (Michael Tesch)
Repository: https://gitlab.com/tesch1/cppduals
Version: v0.1.0
Editor: @danielskatz
Reviewer: @StewMH, @mdavezac
Archive: Pending

Status

status

Status badge code:

HTML: <a href="http://joss.theoj.org/papers/a6291c0d8c548ceed6728072eb5a3438"><img src="http://joss.theoj.org/papers/a6291c0d8c548ceed6728072eb5a3438/status.svg"></a>
Markdown: [![status](http://joss.theoj.org/papers/a6291c0d8c548ceed6728072eb5a3438/status.svg)](http://joss.theoj.org/papers/a6291c0d8c548ceed6728072eb5a3438)

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@StewMH & @mdavezac, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:

  1. Make sure you're logged in to your GitHub account
  2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @danielskatz know.

Please try and complete your review in the next two weeks

Review checklist for @StewMH

Conflict of interest

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the repository url?
  • License: Does the repository contain a plain-text LICENSE file with the contents of an OSI approved software license?
  • Version: Does the release version given match the GitHub release (v0.1.0)?
  • Authorship: Has the submitting author (@tesch1) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the function of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Authors: Does the paper.md file include a list of authors with their affiliations?
  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • References: Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?

Review checklist for @mdavezac

Conflict of interest

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the repository url?
  • License: Does the repository contain a plain-text LICENSE file with the contents of an OSI approved software license?
  • Version: Does the release version given match the GitHub release (v0.1.0)?
  • Authorship: Has the submitting author (@tesch1) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the function of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Authors: Does the paper.md file include a list of authors with their affiliations?
  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • References: Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?
@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 5, 2019

Hello human, I'm @whedon, a robot that can help you with some common editorial tasks. @StewMH and @mdavezac, it looks like you're currently assigned as the reviewers for this paper 🎉.

⭐️ Important ⭐️

If you haven't already, you should seriously consider unsubscribing from GitHub notifications for this (https://github.com/openjournals/joss-reviews) repository. As a reviewer, you're probably currently watching this repository which means for GitHub's default behaviour you will receive notifications (emails) for all reviews 😿

To fix this do the following two things:

  1. Set yourself as 'Not watching' https://github.com/openjournals/joss-reviews:

watching

  1. You may also like to change your default settings for this watching repositories in your GitHub profile here: https://github.com/settings/notifications

notifications

For a list of things I can do to help you, just type:

@whedon commands
@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 5, 2019

Attempting PDF compilation. Reticulating splines etc...
@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 5, 2019

@danielskatz

This comment has been minimized.

Copy link

commented Jun 5, 2019

👋 @StewMH, @mdavezac - thanks for agreeing to review this submission. Your job, as stated in the first comment in this issue, is to go through the paper and the software repository, and check off the boxes in your list as you've done so. When you find something that is a problem, if it's brief, you can mention it here, and if it's less brief or an action for the submitter, open an issue in the software repository and mention this issue in it.

If you have any questions or problems, please tell me.

@StewMH

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

Hi @tesch1,

I tried compiling this with GCC 7.3 and got this error:

In file included from /home/smh/joss/cppduals/duals/dual_eigen:389:0,
                 from /home/smh/joss/cppduals/tests/sandbox.cpp:20:
/home/smh/joss/cppduals/duals/arch/AVX/ComplexDual.h: In function ‘Packet Eigen::internal::pset1(const typename Eigen::internal::unpacket_traits<Packet>::type&) [with Packet = Eigen::internal::Packet2cdf; typename Eigen::internal::unpacket_traits<Packet>::type = std::complex<duals::dual<float> >]’:
/home/smh/joss/cppduals/duals/arch/AVX/ComplexDual.h:157:21: error: ‘_mm256_set_m128’ was not declared in this scope
   return Packet2cdf(_mm256_set_m128(v,v));
                     ^~~~~~~~~~~~~~~
/home/smh/joss/cppduals/duals/arch/AVX/ComplexDual.h:157:21: note: suggested alternative: ‘_mm256_set_epi8’
   return Packet2cdf(_mm256_set_m128(v,v));
                     ^~~~~~~~~~~~~~~
                     _mm256_set_epi8

I think you need a workaround here. See e.g. opencv/opencv#8080 for a similar issue.

I didn't have any luck compiling it with Clang on Ubuntu either, so far.

Also, it's Apache-licensed but you have MPL-licensed files:
https://gitlab.com/tesch1/cppduals/blob/master/duals/arch/AVX/Dual.h

@tesch1

This comment has been minimized.

Copy link

commented Jun 6, 2019

Hi,

Thanks for reviewing!

Ah yeah, the "older gcc missing avx primitive". Just checked in an update/workaround. Does it compile for you now?

Also, did you run into the same error(s) under clang, or was there something else?

Regarding the licenses, yes, there are some files that were modified from Eigen, so retain the Eigen license. These are only included with #include <duals/dual_eigen>. An upcoming update will clarify this in the README.

@mdavezac

This comment has been minimized.

Copy link
Collaborator

commented Jun 6, 2019

@tesch1, have you considered dual licensing the non-eigen parts with MPL as well as Apache? That way, users can pick a format where the whole product is covered under a single license.

@tesch1

This comment has been minimized.

Copy link

commented Jun 6, 2019

Oh yes, that's a great idea. I'll do that. I picked Apache+LLVM because libc++ uses it, and wanted to be broadly compatible with that, but dual-licensing is even better.

@danielskatz

This comment has been minimized.

Copy link

commented Jun 10, 2019

👋 Any news on this from the authors or reviewers?

@StewMH

This comment has been minimized.

Copy link
Collaborator

commented Jun 10, 2019

Hi,

I have got past the missing avx primitive with GCC. Now the compilation runs for a while but fails with an ICE probably related to out-of-memory, at least on my VM. I can try a more powerful bare-metal machine, the VM only has 2G of RAM.

Cheers,
Stewart

@mdavezac

This comment has been minimized.

Copy link
Collaborator

commented Jun 10, 2019

An issue has been filed in the original repo.

@StewMH, I think I clicked on your checkboxes rather than mine at some point... I tried to undo the damage, but I do apologized if I made a mess of things 😊

@danielskatz

This comment has been minimized.

Copy link

commented Jun 13, 2019

@tesch1 - please let us know when you have worked on the issues in https://gitlab.com/tesch1/cppduals/issues/4

@tesch1

This comment has been minimized.

Copy link

commented Jun 15, 2019

@danielskatz

This comment has been minimized.

Copy link

commented Jun 17, 2019

@whedon remind @tesch1 in 2 weeks

@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 17, 2019

Reminder set for @tesch1 in 2 weeks

@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 1, 2019

👋 @tesch1, please update us on how things are progressing here.

@danielskatz

This comment has been minimized.

Copy link

commented Jul 7, 2019

👋 @tesch1, please update us on how things are progressing here.

2 similar comments
@danielskatz

This comment has been minimized.

Copy link

commented Jul 12, 2019

👋 @tesch1, please update us on how things are progressing here.

@danielskatz

This comment has been minimized.

Copy link

commented Jul 19, 2019

👋 @tesch1, please update us on how things are progressing here.

@tesch1

This comment has been minimized.

Copy link

commented Jul 19, 2019

@whedon generate pdf from branch paper-3

@StewMH - did you ever get it to compile? Some Eigen constructs can be quite demanding on compiler memory, especially in newer (> 3.3.7) versions.

I've updated https://gitlab.com/tesch1/cppduals/issues/4 and merged changes into the master branch (which is currently building).

Regarding licensing, have changed everything to MPL-2 for simplicity's sake.

@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 19, 2019

Attempting PDF compilation from custom branch paper-3
. Reticulating splines etc...
@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 19, 2019

@tesch1

This comment has been minimized.

Copy link

commented Jul 19, 2019

@danielskatz It would appear that whedon does not correctly use custom branches from gitlab when generating pdfs (or I did the syntax wrong above?)

@danielskatz

This comment has been minimized.

Copy link

commented Jul 19, 2019

What didn't work? It looks like whedon generated a PDF. Is it not from the right branch?

@tesch1

This comment has been minimized.

Copy link

commented Jul 19, 2019

It is not from the right branch.

@danielskatz

This comment has been minimized.

Copy link

commented Jul 19, 2019

👋 @arfon - can you help on this

@arfon

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

What branch were you expecting changes from?

@arfon

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

@whedon generate pdf from branch paper-3

@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 19, 2019

Attempting PDF compilation from custom branch paper-3. Reticulating splines etc...
@whedon

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 19, 2019

@tesch1

This comment has been minimized.

Copy link

commented Jul 19, 2019

so... it works when you do it, or it was queued up somewhere and didn't complete / wasn't available until sometime after whedon posted 'Check article proof' I'm quite certain that the link above (after I sent the whedon command) had the wrong version.

@danielskatz

This comment has been minimized.

Copy link

commented Jul 19, 2019

every once in a while, my safari seems to get confused and delivers a cached version...

@danielskatz

This comment has been minimized.

Copy link

commented Jul 19, 2019

but glad it's ok now.

Can you let us know where you think things are in terms of addressing comments from the reviewers?

@tesch1

This comment has been minimized.

Copy link

commented Jul 19, 2019

I've updated https://gitlab.com/tesch1/cppduals/issues/4 and merged changes into the master branch (which is currently building).

@danielskatz

This comment has been minimized.

Copy link

commented Jul 26, 2019

👋 @tesch1 - are you ready for reviewers to look at this again?

@tesch1

This comment has been minimized.

Copy link

commented Jul 26, 2019

@danielskatz

This comment has been minimized.

Copy link

commented Jul 26, 2019

👋 @StewMH, @mdavezac - please take a look at this and see if your concerns have been sufficiently addressed

@danielskatz

This comment has been minimized.

Copy link

commented Aug 2, 2019

👋 @StewMH, @mdavezac - pinging again...

1 similar comment
@danielskatz

This comment has been minimized.

Copy link

commented Aug 9, 2019

👋 @StewMH, @mdavezac - pinging again...

@StewMH

This comment has been minimized.

Copy link
Collaborator

commented Aug 9, 2019

Sorry, let me address this today

@StewMH

This comment has been minimized.

Copy link
Collaborator

commented Aug 9, 2019

Hi @tesch1

How do I build and test the package? It's a while since I looked at this, and I'm now getting some weird errors if I try to build the tests:

cd cppduals/build
cmake ../tests/
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc
-- Check for working C compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++
-- Check for working CXX compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Warning (dev) at External_GTest.cmake:17 (set):
  Cannot set "GTEST_INCLUDE_DIRS": current scope has no parent.
Call Stack (most recent call first):
  CMakeLists.txt:16 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at External_GTest.cmake:18 (set):
  Cannot set "GMOCK_INCLUDE_DIRS": current scope has no parent.
Call Stack (most recent call first):
  CMakeLists.txt:16 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at External_GTest.cmake:31 (set):
  Cannot set "GTEST_LIBRARY": current scope has no parent.
Call Stack (most recent call first):
  CMakeLists.txt:16 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:21 (include_directories):
  include_directories given empty-string as include directory.


CMake Error at CMakeLists.txt:24 (include_directories):
  include_directories given empty-string as include directory.
@tesch1

This comment has been minimized.

Copy link

commented Aug 9, 2019

Hi @StewMH - the tests directory is a dependent subdirectory of the base - so you need cmake .. instead of cmake ../tests. But also cmake flags to enable testing/benchmarking, from the base cppduals dir: (I'll update this in the docs too)

cd cppduals/
cmake -Bbuildx -H. -DCPPDUALS_EIGEN_LATEST=OFF -DCPPDUALS_TESTING=ON -DCPPDUALS_BENCHMARK=ON
cmake --build buildx --target all
cmake --build buildx --target test

Disclosure: I cant test this at the moment, because I just got a new machine and the latest Apple clang is crashing on building the tests, but it should work. Gah.

Edit: ON not OFF

@StewMH

This comment has been minimized.

Copy link
Collaborator

commented Aug 9, 2019

OK, on Red Hat I have this issue:

-- Looking for sgemm_
-- Looking for sgemm_ - not found
CMake Error at /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Cmake/3.14.3/Linux-x86_64/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find BLAS (missing: BLAS_LIBRARIES)
Call Stack (most recent call first):
  /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Cmake/3.14.3/Linux-x86_64/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Cmake/3.14.3/Linux-x86_64/share/cmake-3.14/Modules/FindBLAS.cmake:766 (find_package_handle_standard_args)
  tests/CMakeLists.txt:98 (find_package)

But I do have a BLAS:

/usr/lib/libblas.so
@tesch1

This comment has been minimized.

Copy link

commented Aug 9, 2019

@danielskatz

This comment has been minimized.

Copy link

commented Aug 15, 2019

👋 @StewMH - note that @tesch1 is trying to help with your issue, but needs your feedback to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.