mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
Fortran interface for qmckl_last_error
This commit is contained in:
parent
92e67bec20
commit
725e488199
@ -668,7 +668,7 @@ qmckl_set_electron_coord(qmckl_context context,
|
|||||||
|
|
||||||
qmckl_exit_code rc;
|
qmckl_exit_code rc;
|
||||||
rc = qmckl_set_point(context, transp, walk_num*elec_num, coord, size_max);
|
rc = qmckl_set_point(context, transp, walk_num*elec_num, coord, size_max);
|
||||||
assert (rc == QMCKL_SUCCESS);
|
if (rc != QMCKL_SUCCESS) return rc;
|
||||||
|
|
||||||
ctx->electron.walker.num = walk_num;
|
ctx->electron.walker.num = walk_num;
|
||||||
memcpy(&(ctx->electron.walker.point), &(ctx->point), sizeof(qmckl_point_struct));
|
memcpy(&(ctx->electron.walker.point), &(ctx->point), sizeof(qmckl_point_struct));
|
||||||
|
@ -360,6 +360,7 @@ void qmckl_string_of_error_f(const qmckl_exit_code error, char result[<<MAX_STRI
|
|||||||
subroutine qmckl_string_of_error (error, string) bind(C, name='qmckl_string_of_error_f')
|
subroutine qmckl_string_of_error (error, string) bind(C, name='qmckl_string_of_error_f')
|
||||||
use, intrinsic :: iso_c_binding
|
use, intrinsic :: iso_c_binding
|
||||||
import
|
import
|
||||||
|
implicit none
|
||||||
integer (qmckl_exit_code), intent(in), value :: error
|
integer (qmckl_exit_code), intent(in), value :: error
|
||||||
character, intent(out) :: string(<<MAX_STRING_LENGTH()>>)
|
character, intent(out) :: string(<<MAX_STRING_LENGTH()>>)
|
||||||
end subroutine qmckl_string_of_error
|
end subroutine qmckl_string_of_error
|
||||||
@ -592,6 +593,21 @@ qmckl_last_error(qmckl_context context, char* buffer) {
|
|||||||
return QMCKL_SUCCESS;
|
return QMCKL_SUCCESS;
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Fortran inteface
|
||||||
|
|
||||||
|
#+begin_src f90 :tangle (eval fh_func) :exports none :noweb yes
|
||||||
|
interface
|
||||||
|
subroutine qmckl_last_error (context, string) bind(C, name='qmckl_last_error')
|
||||||
|
use, intrinsic :: iso_c_binding
|
||||||
|
import
|
||||||
|
implicit none
|
||||||
|
integer (c_int64_t) , intent(in), value :: context
|
||||||
|
character, intent(out) :: string(*)
|
||||||
|
end subroutine qmckl_last_error
|
||||||
|
end interface
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* End of files :noexport:
|
* End of files :noexport:
|
||||||
|
|
||||||
#+begin_src c :comments link :tangle (eval h_private_type)
|
#+begin_src c :comments link :tangle (eval h_private_type)
|
||||||
@ -621,7 +637,7 @@ qmckl_last_error(qmckl_context context, char* buffer) {
|
|||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
# -*- mode: org -*-
|
# -*- mode: org -*-
|
||||||
# vim: syntax=c
|
# vim: syntax=c
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user