ternaus / quest-qmc

Automatically exported from code.google.com/p/quest-qmc
2 stars 11 forks source link

Code review request #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I merged the 4 makefiles.inc in /makefiles into a single top-level Makefile for 
QUEST. 
Please find it in the attachment.

The user has the freedom to choose compiler, LAPACK/BLAS, CUDA, and MAGMA 
libraries
freely and can conveniently incorporate these settings in the Makefile. 

Quick instructions:

1) Compiler setting currently supports GNU and Intel compilers. Choose the one 
you like by
setting COMPILER = gnu or intel.

2) LAPACK/BLAS libraries supports internal (shipped with QUEST) and Intel MKL 
at this moment. 
IF you set LAPACK = default, the code would check if libblas.a and liblapac.a 
exist or not. If not,
the Makefile would popup a error message and give instructions to compile those 
libraries.
Intel MKL supports serial and parallel modes. You can use mkl_seq or mkl_par. 
In this case, you
need to set up path to MKL in the variable MKLPATH.

To use the Makefile, please disable the following lines in the sub-Makefiles:

QUEST_DIR = ./..                                                                

include $(QUEST_DIR)/make.inc

And replace the default Makefile with the one attached.

I've tried the new Makefile on my Mac, and it works. But it would be great if 
you can test it on 
your machine. Please leave a message here if you have any concerns or questions.

Thanks for your time and help.

Original issue reported on code.google.com by cxc639 on 11 May 2014 at 7:59

Attachments:

GoogleCodeExporter commented 9 years ago
[1]
What I do not like at the moment. If 

LAPACK = default,

but lapack is not compiled,

"make clean" will give you an error:
----
Makefile:86: *** Default BLAS library libblas.a is missing. It can be built by 
invoking "make lapack"..  Stop.
----

I think 

"make clean" should work at all circumstances.

[2] Is it true that 

# GPU version equal-time Green's function kernel
FLAG_ASQRD = #-DDQMC_ASQRD
?

I've thought that 
FLAG_ASQRD = #-DDQMC_ASQRD
is method of the stratification (computation of G), which does most of the 
computations with regular QR, instead of QR with pivoting.

Original comment by iglovi...@gmail.com on 18 Jun 2014 at 11:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[1] Makefule bug fixed.

[2] Without -DDQMC_ASQRD, QUEST uses the stratification method proposed by Loh 
et. al. in 1992. 
Turning on -DDQMC_ASQRD, QUEST would use a pre-pivoting stratification scheme. 
See 

http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6267845&tag=1

for details.

Original comment by cxc639 on 31 Jul 2014 at 10:45

Attachments:

GoogleCodeExporter commented 9 years ago
[1] Makefile does not support OpenBLAS, which I believe should be default 
library in the next release.
[2] Parallel compilation is broken.

My opinion is that this unified MakeFile is bad idea. 

If we want something unified, we should do the same as "adult" do. I mean we 
can start using cmake or something similar.

Original comment by iglovi...@gmail.com on 1 Aug 2014 at 12:45

GoogleCodeExporter commented 9 years ago
[1] OpenBLAS compilation can be added.
[2] MPI issue has nothing to do with the bug addressed. You should complain in 
somewhere else.

My opinion is that this unified Makefile is a good idea at the moment. It is 
better than 4 essentially
identical makefiles, which I think are quite redundant. 

You made your point regarding CMake already. 
As I said, you should follow up in the CMake thread, not this one. I am fixing 
a bug in the Makefile.

Original comment by cxc639 on 1 Aug 2014 at 4:40

GoogleCodeExporter commented 9 years ago

Original comment by cxc639 on 1 Aug 2014 at 4:41

GoogleCodeExporter commented 9 years ago
When I said parallel compilation, I meant:

that right now you can say:

make -j 4 

and it will try to use 4 threads to compile the code. It is not related to the 
MPI.

This works when dependencies are set up properly:

For example this line in the current makefile means that example_ will be tried 
to compile only when liblapack libblas and libdwmc are compiled.

----
example_: liblapack libblas libdqmc
        (cd EXAMPLE; $(MAKE))
----

It is not the case in the unified Makefile. Some dependencies are not set up 
properly. You can not see this if you compile the code using one core: make or 
make -j 1

But it is the case when you try to use more cores for the compilation.

I do not like 4 different makefiles either.

Let's switch to the unified makefile after parallel compilation will work and 
openBLAS support will be added.

Original comment by iglovi...@gmail.com on 1 Aug 2014 at 6:50

GoogleCodeExporter commented 9 years ago
The Makefile has been added to the repository. 
Added OpenBLAS compilation instruction.
Previous Makefile and make.inc are moved to the folder /makefiles. 
Makefiles in /SRC, /EXAMPLE/geom, /EXAMPLE/verify, and /EXAMPLE/test have been 
updated accordingly.

Original comment by cxc639 on 5 Aug 2014 at 12:00

GoogleCodeExporter commented 9 years ago
Thank you.

I updated compiler flags and modified makefile so that parallel compilation 
works.

I am closing this code request.

Original comment by iglovi...@gmail.com on 5 Aug 2014 at 1:47