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

problem with memset_s #4

Open
emivilla opened this issue Nov 19, 2018 · 2 comments
Open

problem with memset_s #4

emivilla opened this issue Nov 19, 2018 · 2 comments

Comments

@emivilla
Copy link

I am working with Ubuntu 18.04 and g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 version.
When I run make check, I get the following error:

In file included from tests/example_conv.cc:15:0:
./src/APFELgrid/fastkernel.h: In instantiation of ‘void NNPDF::FKTable::Convolute(NNPDF::FKTable::extern_pdf, const size_t&, T*) [with T = float; NNPDF::FKTable::extern_pdf = void ()(const double&, const double&, const long unsigned int&, float); size_t = long unsigned int]’:
tests/example_conv.cc:57:32: required from here
./src/APFELgrid/fastkernel.h:956:13: error: ‘memset_s’ was not declared in this scope
memset_s(pdf,0,Psz);

@vbertone
Copy link
Collaborator

Dear @emivilla,

could you please try to replace the two occurrences of:

memset_s(pdf,0,Psz);

in src/APFELgrid/fastkernel.h.in with:

std::memset(pdf,0,Psz);

and rerun the installation script?

Valerio

@scarrazza
Copy link
Collaborator

Changing memset_s to memset will fix this issue. memset_s is a feature of the C11 iso which, as far as I can tell, is not enabled by default in gcc (and btw requires the definition of the __STDC_WANT_LIB_EXT1__ macro).

However I am not sure why memset_s was introduced in 4e7238a, maybe @nhartland can comment on that?

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

3 participants