mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-08 22:43:38 +01:00
Compare commits
No commits in common. "4e58fe7576b320c6c282762f3df538397f413aeb" and "3763767f778aa7abef876e34959a234adf178532" have entirely different histories.
4e58fe7576
...
3763767f77
11
INSTALL.rst
11
INSTALL.rst
@ -328,7 +328,7 @@ OCaml
|
||||
echo ${QP_ROOT}/bin
|
||||
${QP_ROOT}/external/opam_installer.sh --no-backup --fresh
|
||||
|
||||
The :command:`opam` command can be installed in the :file:`${QP_ROOT}/bin`
|
||||
You 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,14 +337,7 @@ OCaml
|
||||
|
||||
.. code:: bash
|
||||
|
||||
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
|
||||
opam init --disable-sandboxing --comp=4.07.0
|
||||
eval `${QP_ROOT}/bin/opam env`
|
||||
|
||||
* Install the required external OCaml libraries
|
||||
|
6
configure
vendored
6
configure
vendored
@ -297,13 +297,12 @@ 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 --comp=4.07.1 --disable-sandboxing
|
||||
${QP_ROOT}/bin/opam init --verbose --yes
|
||||
|
||||
eval $(${QP_ROOT}/bin/opam env)
|
||||
opam install -y ${OCAML_PACKAGES} || exit 1
|
||||
@ -311,14 +310,13 @@ 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 --comp=4.07.1 --disable-sandboxing
|
||||
\${QP_ROOT}/bin/opam init --verbose --yes
|
||||
eval \$(\${QP_ROOT}/bin/opam env)
|
||||
opam install -y \${OCAML_PACKAGES} || exit 1
|
||||
EOF
|
||||
|
@ -1,6 +0,0 @@
|
||||
#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_c")
|
||||
subroutine usleep_c(us) bind (C,name="usleep")
|
||||
use iso_c_binding
|
||||
integer(c_int), value :: us
|
||||
end subroutine usleep_c
|
||||
@ -15,7 +15,5 @@ subroutine usleep(us)
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
integer, intent(in) :: us
|
||||
integer(c_int) :: u
|
||||
u = us
|
||||
call usleep_c(u)
|
||||
call usleep_c(int(us,c_int))
|
||||
end
|
||||
|
@ -300,6 +300,7 @@ 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)
|
||||
@ -423,6 +424,7 @@ 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)
|
||||
@ -442,6 +444,7 @@ 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
|
||||
@ -468,6 +471,7 @@ 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
|
||||
@ -747,12 +751,10 @@ integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
character*(*), intent(in) :: task
|
||||
|
||||
integer :: rc, sze
|
||||
character(len=:), allocatable :: message
|
||||
character(len=:), allocatable :: message
|
||||
|
||||
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)
|
||||
@ -768,7 +770,6 @@ integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
add_task_to_taskserver = -1
|
||||
return
|
||||
endif
|
||||
deallocate(message)
|
||||
|
||||
end
|
||||
|
||||
@ -1030,6 +1031,7 @@ 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