Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation #11

Open
cmcneile opened this issue Apr 28, 2020 · 1 comment
Open

compilation #11

cmcneile opened this issue Apr 28, 2020 · 1 comment

Comments

@cmcneile
Copy link

I was trying to help my student compile qmp, I found my old compilation scripts no longer worked.
The lines below seemed to compile the code in scalar mode. (This was done for testing.)

git clone https://github.com/usqcd-software/qmp.git
cd qmp
cmake .
./configure
make

Is that a reasonable way to compile? It would be useful if the INSTALL file was updated.

@cpviolator
Copy link

@cmcneile This script works for me very robustly for parallel builds:

#!/bin/bash                                                                                                                                                                       

# build_qmp.sh                                                                                                                                                                    
# This script builds the qmp library with options for parallel acrheticture.                                                                                                      

BUILD_DIR=$1
QMP_INSTALL_DIR=${BUILD_DIR}/qmp_install

# Clean out any previous builds and installs                                                                                                                                      
rm -rf qmp
rm -rf ${QMP_INSTALL_DIR}

# Make a new install dir                                                                                                                                                          
mkdir -p ${QMP_INSTALL_DIR}

# Clone the QMP repo                                                                                                                                                              
git clone https://github.com/usqcd-software/qmp.git

# configure, make, install                                                                                                                                                        
(cd qmp; aclocal; autoreconf -i -f -v; ./configure --with-qmp-comms-type=MPI CFLAGS="-O2 -std=c99 -funroll-all-loops -fopenmp -D_REENTRANT" CC=mpicc CXX=mpicxx --prefix=${QMP_IN\
STALL_DIR}; make -j 16; make -j 16 install)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants