Comments (16)
Hello Amanda,
thanks for providing all that information, it is useful.
We recently changed the way OCaml is installed to make it simpler, so if you just made a "git pull" on an old installation it might be the reason.
I would recommend you to reinstall QP from the very beginning:
git clone https://github.com/quantumPackage/qp2.git
cd qp2
./configure -i all
./configure -c ./config/gfortran_avx.cfg
ninja
Please let me know if it solved your problem.
best,
Anthony
from qp2.
Hello,
Thank you for the quick feedback and recommendation. Unfortunately, this issue occurred from a completely new repository clone. To ensure I wasn't running into any environment issues with an old install, I also compiled within a singularity container using the attached build script (qp2_singularity.txt). The same error is observed here (singularity_build_out.txt). Is there anything else that might be going on?
Thank you,
Amanda
from qp2.
from qp2.
Ah yes, sorry about that. So this diverged a bit:
-
I attempted to compile the main branch using the configure script, and opam failed to install. I haven't had a chance to troubleshoot this yet, so I did not include this output. I can if you think it might help.
-
I was able build opam manually according to the instructions on the qp2 installation page. This approach failed as before during the build with ninja in the same way. This is the attached output.
singularity_build_manualopam_out.txt
qp2_singularity_manualopam.txt
from qp2.
Hello @amandadumi ,
I have done something (with singularity) which works for me on the master branch.
The definition file is the following:
qp2_light.txt
You can build the container as:
sudo singularity build qp2_light.cif qp2_light.txt
After that, you can enter in the container WITHOUT being root to install qp2 in your actual directory and the missing dependencies
(ocaml, f77zmq, zeromq, I try to install ocaml in the container but I have some issues):
singularity shell qp2_light.cif
git clone https://github.com/QuantumPackage/qp2.git
cd qp2
./configure -i f77zmq
./configure -i zeromq
./configure -i ocaml
source quantum_package.rc
./configure -c ./config/gfortran_avx.cfg
./bin/qpsh
ninja
Please tell me if it works
Yann
from qp2.
Thank you! I will give this a try this afternoon and report back shortly.
from qp2.
Taking from your singularity recipe, I was able to get around this ocaml issue. Entering into qpsh before ninja allowed for a compilation of the master branch without any issues, even outside of singularity.
Thank you for the help!
from qp2.
Very good! Thanks for your feedback!
from qp2.
@amandadumi my bro,I would like to ask if you have solved the OCAML error problem in the compilation process and how to solve it specifically. I also encountered this headache problem in the compilation process, so I really hope to get your answer!
from qp2.
Hello,
I had a similar problem while compiling qp2 (master branch) on ubuntu 22.04. The origin of the problem seems to be the gcc version. A too recent gcc version and the ocaml tar ball supplied by qp2 don't seem to be compatible. I was able to build qp2 (master branch) on ubuntu 20.04 with the default gcc version without any problem.
Perhaps, someone should check which gcc versions are problematic with OPAM (supplied by qp2) and report here !?
Hope this helps.
from qp2.
@v1j4y hello,my bro,you can make it on ubuntu 20.04?I make it on ubuntu 18.04 always had a similar problem:
ocamlbuild -j 0 -cflags "-g" -lflags "-g" -ocamlopt "opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100" qptypes_generator.byte -use-ocamlfind
- ocamlfind opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100 unix.cmxa -I /usr/local/lib/ocaml/ocamlbuild /usr/local/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -g -linkpkg myocamlbuild.ml /usr/local/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
File "myocamlbuild.ml", line 1:
Error: /usr/local/lib/ocaml/ocamlbuild/ocamlbuild_plugin.cmi
is not a compiled interface for this version of OCaml.
It seems to be for an older version of OCaml.
Do you install it on ubuntu 20.04 according to the following statement:
git clone https://github.com/quantumPackage/qp2.git
cd qp2
./configure -i all
./configure -c ./config/gfortran_avx.cfg
ninja
I really hope to get your answer!my bro!
from qp2.
Yes, I recommend using make
instead of ninja
for the last step.
This seems to be a versioning issue (gcc, ocaml etc...) what gcc version are you using ?
Did you try with intel compilers ?
from qp2.
@v1j4y
this is my problem:
rm -f -- qp_tunnel
ocamlbuild -j 0 -cflags "-g" -lflags "-g" -ocamlopt "opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100" qp_tunnel.native -use-ocamlfind
Finished, 0 targets (0 cached) in 00:00:00.
- ocamlfind ocamlc -c -g -thread -package cryptokit,zarith,zmq,str,sexplib,ppx_sexp_conv,ppx_deriving,getopt -o qp_tunnel.cmo qp_tunnel.ml
File "qp_tunnel.ml", line 141, characters 10-68:
Error: This expression has type [Sub ] Zmq.Socket.t but an expression was expected of type [
Router ] Zmq.Socket.t
These two variant types have no intersection
Command exited with code 2.
Compilation unsuccessful after building 29 targets (27 cached) in 00:00:00.
make[1]: *** [Makefile:67: qp_tunnel.native] Error 10
make[1]: Leaving direct`
gcc version:9.4.0
from qp2.
@zyzyzy0408 Can you please tell us
- which commit you are trying to compile (
git log
) - what is your version of the OCaml compiler (
ocaml --version
), and how you installed it?
from qp2.
@scemama thank my bro, I have successfully installed it on x86, but now I'm having a problem with ARM, I think It could be a compiler version problem
from qp2.
ARM is not supported yet. We are working on it.
from qp2.
Related Issues (20)
- qp2-dependencies not at latest commit HOT 1
- Makefile contents HOT 5
- How to execute multiple test cases at the same time HOT 5
- Test case script HOT 1
- /bin/qp_mpirun
- ./configure -c config/gfortran_mpi.cfg HOT 4
- Software packaging problems HOT 13
- ocaml 4.11 in qp2-dependencies incompatible with glibc>=2.34 HOT 1
- SCF energy HOT 1
- Issue with print_wf after running CIPSI calculation HOT 3
- OpenSUSE problem HOT 1
- Type mismatch HOT 1
- Ninja: build stopped: subcommand failed HOT 2
- QP2 singularity running in parallel (OpenMPI) on multiple nodes HOT 4
- Problems with qp run diagonalize_h HOT 3
- Issues Installing Quantum Package Using zsh Shell HOT 2
- orbital optimization crash with memory issue. HOT 2
- qp edit feature request HOT 1
- Put the .cfg file in the buil.ninja locally in all plugins :)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qp2.