mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-08 22:43:38 +01:00
Compare commits
5 Commits
3763767f77
...
4e58fe7576
Author | SHA1 | Date | |
---|---|---|---|
4e58fe7576 | |||
a8dbea61d3 | |||
edd2276b75 | |||
1120d572fa | |||
a6c95879de |
11
INSTALL.rst
11
INSTALL.rst
@ -328,7 +328,7 @@ OCaml
|
||||
echo ${QP_ROOT}/bin
|
||||
${QP_ROOT}/external/opam_installer.sh --no-backup --fresh
|
||||
|
||||
You the :command:`opam` command can be installed in the :file:`${QP_ROOT}/bin`
|
||||
The :command:`opam` command can be installed in the :file:`${QP_ROOT}/bin`
|
||||
directory. To do this, take the output of ``echo ${QP_ROOT}/bin`` and
|
||||
use it as an answer to where :command:`opam` should be installed.
|
||||
|
||||
@ -337,7 +337,14 @@ OCaml
|
||||
|
||||
.. code:: bash
|
||||
|
||||
opam init --disable-sandboxing --comp=4.07.0
|
||||
opam init --comp=4.07.1
|
||||
eval `${QP_ROOT}/bin/opam env`
|
||||
|
||||
If the installation fails because of bwrap, you can initialize opam using:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
opam init --disable-sandboxing --comp=4.07.1
|
||||
eval `${QP_ROOT}/bin/opam env`
|
||||
|
||||
* Install the required external OCaml libraries
|
||||
|
6
configure
vendored
6
configure
vendored
@ -297,12 +297,13 @@ EOF
|
||||
${QP_ROOT}/bin
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
rm ${QP_ROOT}/external/opam_installer.sh
|
||||
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||
|
||||
${QP_ROOT}/bin/opam init --verbose --yes
|
||||
${QP_ROOT}/bin/opam init --verbose --yes --comp=4.07.1 --disable-sandboxing
|
||||
|
||||
eval $(${QP_ROOT}/bin/opam env)
|
||||
opam install -y ${OCAML_PACKAGES} || exit 1
|
||||
@ -310,13 +311,14 @@ EOF
|
||||
# Conventional commands
|
||||
execute << EOF
|
||||
chmod +x "\${QP_ROOT}"/external/opam_installer.sh
|
||||
"\${QP_ROOT}"/external/opam_installer.sh --no-backup
|
||||
rm --force \${QP_ROOT}/bin/opam
|
||||
export OPAMROOT=\${OPAMROOT:-\${QP_ROOT}/external/opam}
|
||||
echo \${QP_ROOT}/bin \
|
||||
| sh \${QP_ROOT}/external/opam_installer.sh
|
||||
rm \${QP_ROOT}/external/opam_installer.sh
|
||||
source \${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||
\${QP_ROOT}/bin/opam init --verbose --yes
|
||||
\${QP_ROOT}/bin/opam init --verbose --yes --comp=4.07.1 --disable-sandboxing
|
||||
eval \$(\${QP_ROOT}/bin/opam env)
|
||||
opam install -y \${OCAML_PACKAGES} || exit 1
|
||||
EOF
|
||||
|
6
src/utils/c_funcs.c
Normal file
6
src/utils/c_funcs.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
void usleep_c(int s)
|
||||
{
|
||||
usleep((useconds_t) s);
|
||||
}
|
@ -2,7 +2,7 @@ module c_functions
|
||||
use iso_c_binding
|
||||
|
||||
interface
|
||||
subroutine usleep_c(us) bind (C,name="usleep")
|
||||
subroutine usleep_c(us) bind (C,name="usleep_c")
|
||||
use iso_c_binding
|
||||
integer(c_int), value :: us
|
||||
end subroutine usleep_c
|
||||
@ -15,5 +15,7 @@ subroutine usleep(us)
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
integer, intent(in) :: us
|
||||
call usleep_c(int(us,c_int))
|
||||
integer(c_int) :: u
|
||||
u = us
|
||||
call usleep_c(u)
|
||||
end
|
||||
|
@ -300,7 +300,6 @@ function new_zmq_push_socket(thread)
|
||||
END_DOC
|
||||
integer, intent(in) :: thread
|
||||
integer :: rc
|
||||
character*(8), external :: zmq_port
|
||||
integer(ZMQ_PTR) :: new_zmq_push_socket
|
||||
|
||||
call omp_set_lock(zmq_lock)
|
||||
@ -424,7 +423,6 @@ subroutine end_zmq_pair_socket(zmq_socket_pair)
|
||||
END_DOC
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_pair
|
||||
integer :: rc
|
||||
character*(8), external :: zmq_port
|
||||
|
||||
call omp_set_lock(zmq_lock)
|
||||
rc = f77_zmq_close(zmq_socket_pair)
|
||||
@ -444,7 +442,6 @@ subroutine end_zmq_pull_socket(zmq_socket_pull)
|
||||
END_DOC
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
|
||||
integer :: rc
|
||||
character*(8), external :: zmq_port
|
||||
|
||||
! rc = f77_zmq_setsockopt(zmq_socket_pull,ZMQ_LINGER,0,4)
|
||||
! if (rc /= 0) then
|
||||
@ -471,7 +468,6 @@ subroutine end_zmq_push_socket(zmq_socket_push,thread)
|
||||
integer, intent(in) :: thread
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_push
|
||||
integer :: rc
|
||||
character*(8), external :: zmq_port
|
||||
|
||||
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,300000,4)
|
||||
if (rc /= 0) then
|
||||
@ -755,6 +751,8 @@ integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
|
||||
add_task_to_taskserver = 0
|
||||
|
||||
sze = len(trim(task)) + len(trim(zmq_state))+11
|
||||
allocate(character(len=sze) :: message)
|
||||
message='add_task '//trim(zmq_state)//' '//trim(task)
|
||||
sze = len(message)
|
||||
rc = f77_zmq_send(zmq_to_qp_run_socket, message, sze, 0)
|
||||
@ -770,6 +768,7 @@ integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
add_task_to_taskserver = -1
|
||||
return
|
||||
endif
|
||||
deallocate(message)
|
||||
|
||||
end
|
||||
|
||||
@ -1031,7 +1030,6 @@ subroutine end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||
! Terminate the socket from the application to qp_run
|
||||
END_DOC
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_to_qp_run_socket
|
||||
character*(8), external :: zmq_port
|
||||
integer :: rc
|
||||
|
||||
rc = f77_zmq_setsockopt(zmq_to_qp_run_socket,ZMQ_LINGER,300000,4)
|
||||
|
Loading…
Reference in New Issue
Block a user