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

error: 'CV_FUNCTIONAL' was not declared in this scope #23

Open
sagitter opened this issue May 27, 2021 · 17 comments
Open

error: 'CV_FUNCTIONAL' was not declared in this scope #23

sagitter opened this issue May 27, 2021 · 17 comments
Labels

Comments

@sagitter
Copy link

sagitter commented May 27, 2021

Hi all.

Please, could you make STEPS-3.6.0 compatible with recent Sundials-5.7.0 (if possible)?:

[ 20%] Building CXX object src/CMakeFiles/libsteps-obj.dir/steps/solver/api_main.cpp.o
cd /builddir/build/BUILD/STEPS-3.6.0/build-mpich/src && /usr/lib64/mpich/bin/mpicxx -DELPP_DISABLE_DEFAULT_CRASH_HANDLING=1 -DELPP_NO_DEFAULT_LOG_FILE=1 -DELPP_STL_LOGGING=1 -DENABLE_ASSERTLOG=1 -DGNU_FORCE_INLINE=[[gnu::always_inline]] -DUSE_MPI -I/builddir/build/BUILD/STEPS-3.6.0/src/. -isystem /builddir/build/BUILD/STEPS-3.6.0/src/third_party/easyloggingpp/src -isystem /builddir/build/BUILD/STEPS-3.6.0/src/third_party/cvode-2.6.0/src -isystem /builddir/build/BUILD/STEPS-3.6.0/src/third_party/cvode-2.6.0/include -std=c++11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -lpthread -lgtest -lgtest_main -march=native -fopenmp  -DNDEBUG -fPIC -MD -MT src/CMakeFiles/libsteps-obj.dir/steps/solver/api_main.cpp.o -MF CMakeFiles/libsteps-obj.dir/steps/solver/api_main.cpp.o.d -o CMakeFiles/libsteps-obj.dir/steps/solver/api_main.cpp.o -c /builddir/build/BUILD/STEPS-3.6.0/src/steps/solver/api_main.cpp
/builddir/build/BUILD/STEPS-3.6.0/src/steps/tetode/tetode.cpp: In constructor 'steps::tetode::CVodeState::CVodeState(uint, uint, realtype, realtype)':
/builddir/build/BUILD/STEPS-3.6.0/src/steps/tetode/tetode.cpp:205:45: error: 'CV_FUNCTIONAL' was not declared in this scope
  205 |     cvode_mem_cvode = CVodeCreate(CV_ADAMS, CV_FUNCTIONAL) ;
      |                                             ^~~~~~~~~~~~~

Regards.

@WeiliangChenOIST
Copy link
Contributor

WeiliangChenOIST commented May 27, 2021

Hi @sagitter ,

We will take a look at the issue. for the meantime could you try to compile it with the bundled sundials please?

...
cmake -DUSE_BUNDLE_SUNDIALS=ON ..
'''

Could you also provide your system info (platform, compiler etc) and copy the cmake log here please?

@sagitter
Copy link
Author

sagitter commented May 28, 2021

Hi @WeiliangChenOIST ,

could you try to compile it with the bundled sundials please?

With bundled sundials (cvode-2.6.0), STEPS is correctly compiled.

In Fedora 34+, we're using new Sundials-5.*, GCC-11.1.1

sundials-5 files:

/usr/include/arkode
/usr/include/arkode/arkode.h
/usr/include/arkode/arkode_arkstep.h
/usr/include/arkode/arkode_bandpre.h
/usr/include/arkode/arkode_bbdpre.h
/usr/include/arkode/arkode_butcher.h
/usr/include/arkode/arkode_butcher_dirk.h
/usr/include/arkode/arkode_butcher_erk.h
/usr/include/arkode/arkode_erkstep.h
/usr/include/arkode/arkode_ls.h
/usr/include/arkode/arkode_mristep.h
/usr/include/cvode
/usr/include/cvode/cvode.h
/usr/include/cvode/cvode_bandpre.h
/usr/include/cvode/cvode_bbdpre.h
/usr/include/cvode/cvode_diag.h
/usr/include/cvode/cvode_direct.h
/usr/include/cvode/cvode_ls.h
/usr/include/cvode/cvode_proj.h
/usr/include/cvode/cvode_spils.h
/usr/include/cvodes
/usr/include/cvodes/cvodes.h
/usr/include/cvodes/cvodes_bandpre.h
/usr/include/cvodes/cvodes_bbdpre.h
/usr/include/cvodes/cvodes_diag.h
/usr/include/cvodes/cvodes_direct.h
/usr/include/cvodes/cvodes_ls.h
/usr/include/cvodes/cvodes_spils.h
/usr/include/ida
/usr/include/ida/ida.h
/usr/include/ida/ida_bbdpre.h
/usr/include/ida/ida_direct.h
/usr/include/ida/ida_ls.h
/usr/include/ida/ida_spils.h
/usr/include/idas
/usr/include/idas/idas.h
/usr/include/idas/idas_bbdpre.h
/usr/include/idas/idas_direct.h
/usr/include/idas/idas_ls.h
/usr/include/idas/idas_spils.h
/usr/include/kinsol
/usr/include/kinsol/kinsol.h
/usr/include/kinsol/kinsol_bbdpre.h
/usr/include/kinsol/kinsol_direct.h
/usr/include/kinsol/kinsol_ls.h
/usr/include/kinsol/kinsol_spils.h
/usr/include/nvector
/usr/include/nvector/nvector_manyvector.h
/usr/include/nvector/nvector_mpimanyvector.h
/usr/include/nvector/nvector_mpiplusx.h
/usr/include/nvector/nvector_openmp.h
/usr/include/nvector/nvector_serial.h
/usr/include/sundials
/usr/include/sundials/sundials_band.h
/usr/include/sundials/sundials_config.h
/usr/include/sundials/sundials_dense.h
/usr/include/sundials/sundials_direct.h
/usr/include/sundials/sundials_export.h
/usr/include/sundials/sundials_fconfig.h
/usr/include/sundials/sundials_fnvector.h
/usr/include/sundials/sundials_futils.h
/usr/include/sundials/sundials_iterative.h
/usr/include/sundials/sundials_linearsolver.h
/usr/include/sundials/sundials_math.h
/usr/include/sundials/sundials_matrix.h
/usr/include/sundials/sundials_memory.h
/usr/include/sundials/sundials_mpi_types.h
/usr/include/sundials/sundials_nonlinearsolver.h
/usr/include/sundials/sundials_nvector.h
/usr/include/sundials/sundials_types.h
/usr/include/sundials/sundials_version.h
/usr/include/sunlinsol
/usr/include/sunlinsol/sunlinsol_band.h
/usr/include/sunlinsol/sunlinsol_dense.h
/usr/include/sunlinsol/sunlinsol_klu.h
/usr/include/sunlinsol/sunlinsol_pcg.h
/usr/include/sunlinsol/sunlinsol_spbcgs.h
/usr/include/sunlinsol/sunlinsol_spfgmr.h
/usr/include/sunlinsol/sunlinsol_spgmr.h
/usr/include/sunlinsol/sunlinsol_sptfqmr.h
/usr/include/sunmatrix
/usr/include/sunmatrix/sunmatrix_band.h
/usr/include/sunmatrix/sunmatrix_dense.h
/usr/include/sunmatrix/sunmatrix_sparse.h
/usr/include/sunnonlinsol
/usr/include/sunnonlinsol/sunnonlinsol_fixedpoint.h
/usr/include/sunnonlinsol/sunnonlinsol_newton.h
/usr/lib/.build-id
/usr/lib/.build-id/13
/usr/lib/.build-id/13/2d031ddfc8240036b1e6426980b21458478773
/usr/lib/.build-id/e6
/usr/lib/.build-id/e6/f9477d1913a7a5dccdb92a63899c90590853e0
/usr/lib64/cmake/sundials
/usr/lib64/cmake/sundials/SUNDIALSConfig.cmake
/usr/lib64/cmake/sundials/SUNDIALSConfigVersion.cmake
/usr/lib64/cmake/sundials/SUNDIALSTargets-release.cmake
/usr/lib64/cmake/sundials/SUNDIALSTargets.cmake
/usr/lib64/gfortran/modules/sundials
/usr/lib64/gfortran/modules/sundials/farkode_arkstep_mod.mod
/usr/lib64/gfortran/modules/sundials/farkode_erkstep_mod.mod
/usr/lib64/gfortran/modules/sundials/farkode_mod.mod
/usr/lib64/gfortran/modules/sundials/farkode_mristep_mod.mod
/usr/lib64/gfortran/modules/sundials/fcvode_mod.mod
/usr/lib64/gfortran/modules/sundials/fcvodes_mod.mod
/usr/lib64/gfortran/modules/sundials/fida_mod.mod
/usr/lib64/gfortran/modules/sundials/fidas_mod.mod
/usr/lib64/gfortran/modules/sundials/fkinsol_mod.mod
/usr/lib64/gfortran/modules/sundials/fnvector_manyvector_mod.mod
/usr/lib64/gfortran/modules/sundials/fnvector_openmp_mod.mod
/usr/lib64/gfortran/modules/sundials/fnvector_serial_mod.mod
/usr/lib64/gfortran/modules/sundials/fsundials_futils_mod.mod
/usr/lib64/gfortran/modules/sundials/fsundials_linearsolver_mod.mod
/usr/lib64/gfortran/modules/sundials/fsundials_matrix_mod.mod
/usr/lib64/gfortran/modules/sundials/fsundials_nonlinearsolver_mod.mod
/usr/lib64/gfortran/modules/sundials/fsundials_nvector_mod.mod
/usr/lib64/gfortran/modules/sundials/fsundials_types_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_band_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_dense_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_klu_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_pcg_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_spbcgs_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_spfgmr_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_spgmr_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunlinsol_sptfqmr_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunmatrix_band_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunmatrix_dense_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunmatrix_sparse_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunnonlinsol_fixedpoint_mod.mod
/usr/lib64/gfortran/modules/sundials/fsunnonlinsol_newton_mod.mod
/usr/lib64/libsundials_arkode.a
/usr/lib64/libsundials_arkode.so
/usr/lib64/libsundials_cvode.a
/usr/lib64/libsundials_cvode.so
/usr/lib64/libsundials_cvodes.a
/usr/lib64/libsundials_cvodes.so
/usr/lib64/libsundials_farkode.a
/usr/lib64/libsundials_farkode_mod.a
/usr/lib64/libsundials_farkode_mod.so
/usr/lib64/libsundials_fcvode.a
/usr/lib64/libsundials_fcvode_mod.a
/usr/lib64/libsundials_fcvode_mod.so
/usr/lib64/libsundials_fcvodes_mod.a
/usr/lib64/libsundials_fcvodes_mod.so
/usr/lib64/libsundials_fida.a
/usr/lib64/libsundials_fida_mod.a
/usr/lib64/libsundials_fida_mod.so
/usr/lib64/libsundials_fidas_mod.a
/usr/lib64/libsundials_fidas_mod.so
/usr/lib64/libsundials_fkinsol.a
/usr/lib64/libsundials_fkinsol_mod.a
/usr/lib64/libsundials_fkinsol_mod.so
/usr/lib64/libsundials_fnvecmanyvector_mod.a
/usr/lib64/libsundials_fnvecmanyvector_mod.so
/usr/lib64/libsundials_fnvecopenmp.a
/usr/lib64/libsundials_fnvecopenmp.so
/usr/lib64/libsundials_fnvecopenmp_mod.a
/usr/lib64/libsundials_fnvecopenmp_mod.so
/usr/lib64/libsundials_fnvecserial.a
/usr/lib64/libsundials_fnvecserial.so
/usr/lib64/libsundials_fnvecserial_mod.a
/usr/lib64/libsundials_fnvecserial_mod.so
/usr/lib64/libsundials_fsunlinsolband.a
/usr/lib64/libsundials_fsunlinsolband.so
/usr/lib64/libsundials_fsunlinsolband_mod.a
/usr/lib64/libsundials_fsunlinsolband_mod.so
/usr/lib64/libsundials_fsunlinsoldense.a
/usr/lib64/libsundials_fsunlinsoldense.so
/usr/lib64/libsundials_fsunlinsoldense_mod.a
/usr/lib64/libsundials_fsunlinsoldense_mod.so
/usr/lib64/libsundials_fsunlinsolklu.a
/usr/lib64/libsundials_fsunlinsolklu.so
/usr/lib64/libsundials_fsunlinsolklu_mod.a
/usr/lib64/libsundials_fsunlinsolklu_mod.so
/usr/lib64/libsundials_fsunlinsolpcg.a
/usr/lib64/libsundials_fsunlinsolpcg.so
/usr/lib64/libsundials_fsunlinsolpcg_mod.a
/usr/lib64/libsundials_fsunlinsolpcg_mod.so
/usr/lib64/libsundials_fsunlinsolspbcgs.a
/usr/lib64/libsundials_fsunlinsolspbcgs.so
/usr/lib64/libsundials_fsunlinsolspbcgs_mod.a
/usr/lib64/libsundials_fsunlinsolspbcgs_mod.so
/usr/lib64/libsundials_fsunlinsolspfgmr.a
/usr/lib64/libsundials_fsunlinsolspfgmr.so
/usr/lib64/libsundials_fsunlinsolspfgmr_mod.a
/usr/lib64/libsundials_fsunlinsolspfgmr_mod.so
/usr/lib64/libsundials_fsunlinsolspgmr.a
/usr/lib64/libsundials_fsunlinsolspgmr.so
/usr/lib64/libsundials_fsunlinsolspgmr_mod.a
/usr/lib64/libsundials_fsunlinsolspgmr_mod.so
/usr/lib64/libsundials_fsunlinsolsptfqmr.a
/usr/lib64/libsundials_fsunlinsolsptfqmr.so
/usr/lib64/libsundials_fsunlinsolsptfqmr_mod.a
/usr/lib64/libsundials_fsunlinsolsptfqmr_mod.so
/usr/lib64/libsundials_fsunmatrixband.a
/usr/lib64/libsundials_fsunmatrixband.so
/usr/lib64/libsundials_fsunmatrixband_mod.a
/usr/lib64/libsundials_fsunmatrixband_mod.so
/usr/lib64/libsundials_fsunmatrixdense.a
/usr/lib64/libsundials_fsunmatrixdense.so
/usr/lib64/libsundials_fsunmatrixdense_mod.a
/usr/lib64/libsundials_fsunmatrixdense_mod.so
/usr/lib64/libsundials_fsunmatrixsparse.a
/usr/lib64/libsundials_fsunmatrixsparse.so
/usr/lib64/libsundials_fsunmatrixsparse_mod.a
/usr/lib64/libsundials_fsunmatrixsparse_mod.so
/usr/lib64/libsundials_fsunnonlinsolfixedpoint.a
/usr/lib64/libsundials_fsunnonlinsolfixedpoint.so
/usr/lib64/libsundials_fsunnonlinsolfixedpoint_mod.a
/usr/lib64/libsundials_fsunnonlinsolfixedpoint_mod.so
/usr/lib64/libsundials_fsunnonlinsolnewton.a
/usr/lib64/libsundials_fsunnonlinsolnewton.so
/usr/lib64/libsundials_fsunnonlinsolnewton_mod.a
/usr/lib64/libsundials_fsunnonlinsolnewton_mod.so
/usr/lib64/libsundials_generic.a
/usr/lib64/libsundials_generic.so
/usr/lib64/libsundials_ida.a
/usr/lib64/libsundials_ida.so
/usr/lib64/libsundials_idas.a
/usr/lib64/libsundials_idas.so
/usr/lib64/libsundials_kinsol.a
/usr/lib64/libsundials_kinsol.so
/usr/lib64/libsundials_nvecmanyvector.a
/usr/lib64/libsundials_nvecmanyvector.so
/usr/lib64/libsundials_nvecopenmp.a
/usr/lib64/libsundials_nvecopenmp.so
/usr/lib64/libsundials_nvecserial.a
/usr/lib64/libsundials_nvecserial.so
/usr/lib64/libsundials_sunlinsolband.a
/usr/lib64/libsundials_sunlinsolband.so
/usr/lib64/libsundials_sunlinsoldense.a
/usr/lib64/libsundials_sunlinsoldense.so
/usr/lib64/libsundials_sunlinsolklu.a
/usr/lib64/libsundials_sunlinsolklu.so
/usr/lib64/libsundials_sunlinsolpcg.a
/usr/lib64/libsundials_sunlinsolpcg.so
/usr/lib64/libsundials_sunlinsolspbcgs.a
/usr/lib64/libsundials_sunlinsolspbcgs.so
/usr/lib64/libsundials_sunlinsolspfgmr.a
/usr/lib64/libsundials_sunlinsolspfgmr.so
/usr/lib64/libsundials_sunlinsolspgmr.a
/usr/lib64/libsundials_sunlinsolspgmr.so
/usr/lib64/libsundials_sunlinsolsptfqmr.a
/usr/lib64/libsundials_sunlinsolsptfqmr.so
/usr/lib64/libsundials_sunmatrixband.a
/usr/lib64/libsundials_sunmatrixband.so
/usr/lib64/libsundials_sunmatrixdense.a
/usr/lib64/libsundials_sunmatrixdense.so
/usr/lib64/libsundials_sunmatrixsparse.a
/usr/lib64/libsundials_sunmatrixsparse.so
/usr/lib64/libsundials_sunnonlinsolfixedpoint.a
/usr/lib64/libsundials_sunnonlinsolfixedpoint.so
/usr/lib64/libsundials_sunnonlinsolnewton.a
/usr/lib64/libsundials_sunnonlinsolnewton.so

CMakeCache.txt
steps-sundials5-log.txt

@WeiliangChenOIST
Copy link
Contributor

Dear sagitter,

We've checked the code and looks like it requires more implementation changes and testing than simply changing the function call name and inputs. We've added it to our fixing list for the next release and will keep this issue open until then. In the meantime, please use the bundled package instead.

@sanjayankur31
Copy link

hi @WeiliangChenOIST , has their been any updates here please, anything we can help with?

@WeiliangChenOIST
Copy link
Contributor

Dear @sanjayankur31, this was left over due to priority issue, we've assigned member to revisit this issue and hopefully provide a fix in the next release.

@sanjayankur31
Copy link

Thanks very much. In the meantime, i see that sundials v7 was just released too, so maybe that's worth targeting:

https://github.com/LLNL/sundials/releases/tag/v7.0.0

@tristan0x
Copy link
Collaborator

We plan to support SUNDIALS library up to version 6 (included) to be compatible with all current Fedora releases
Screenshot 2024-03-01 at 16 36 59

@sanjayankur31
Copy link

That'll be great, thank you. (I've not seen a plan to update to 7.x in Fedora yet)

@iahepburn
Copy link

Dear @sanjayankur31, we have fixed this issue and now support up to Sundials 6.7 in our planned 5.0 release, which is already available on branch https://github.com/CNS-OIST/STEPS/tree/5.0.1
It would be very helpful to us if you are able to confirm whether this works for you now, thank you.

@sanjayankur31
Copy link

Thanks for the quick update @iahepburn . I'll build from that branch and report back ASAP.

@iahepburn
Copy link

Is there any update from your end, @sanjayankur31 ? Can we close the issue?

@sanjayankur31
Copy link

it's still a work in progress I'm afraid. We need to include the sandia-omega-h library in the repos before we can update to 5.x for steps:

https://src.fedoraproject.org/rpms/python-steps/pull-request/6

https://bugzilla.redhat.com/show_bug.cgi?id=2252229

@sanjayankur31
Copy link

I get:

CMake Error at src/steps/geom/dist/CMakeLists.txt:7 (target_link_libraries):
  Target "stepsgeomdist" links to:

    MPI::MPI_CXX

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

So, quick question:

Should this not be in a conditional that checks if MPI is available?

https://github.com/CNS-OIST/STEPS/blob/5.0.1/src/steps/geom/dist/CMakeLists.txt#L7

@jlallouette
Copy link
Contributor

Dear @sanjayankur31, thank you for reporting that issue. We have added a more specific error message when attempting to build with the distributed solver but without MPI, as seems to be the case here. If MPI is not available, you can disable the distributed solver with -DSTEPS_USE_DIST_MESH=OFF

@iahepburn
Copy link

dear @sanjayankur31. I was just wondering about this long-standing issue. We see you have omega_h now (https://src.fedoraproject.org/rpms/sandia-omega-h). Have you tried building our latest version, 5.0.3? Let us know if there's anything we can help with.

@sanjayankur31
Copy link

Hi @iahepburn , sorry we haven't gotten around to updating STEPS to 5.0.3 Fedora yet. We'll bump it up the backlog and try to get to it in the next couple of weeks.

@sanjayankur31
Copy link

I've got a test build going and I can confirm that this is now fixed. I'll clean up the package and push and update to Fedora in the next couple of weeks hopefully:

https://src.fedoraproject.org/rpms/python-steps/pull-request/7

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

No branches or pull requests

6 participants