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

Problems compiling application on smic #1800

Closed
quantomb opened this issue Oct 19, 2015 · 5 comments
Closed

Problems compiling application on smic #1800

quantomb opened this issue Oct 19, 2015 · 5 comments

Comments

@quantomb
Copy link

Parquet application will compile when in debug mode. That is if HPX is compiled in Debug and the application is compiled in Debug mode the application compiles and runs successfully.
If switched to release however I get the following error upon compilation:

matrix.cpp:(.text.startup+0x321): undefined reference to `hpx_exported_plugins_list_hpx_factory'
matrix.cpp:(.text.startup+0x389): undefined reference to `hpx_exported_plugins_list_hpx_factory'
matrix.cpp:(.text.startup+0x3ef): undefined reference to `hpx_exported_plugins_list_hpx_registry'

The file it is pointing to can be found here: http://jpst.it/Cxzb

Note that I can compile this in release mode on hermione without issue

Included is the script used to compile my program on smic:

#!/bin/bash

SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
INSTALL_PATH=$SCRIPTPATH/install
BUILD_PATH=$SCRIPTPATH/build

if [ "$1" = "clean" ]; then
    rm -rf $INSTALL_PATH $BUILD_PATH
    exit 0
fi

#export CC=$TACC_LLVM_BIN/clang
#export CXX=$TACC_LLVM_BIN/clang++

if [ ! -d "$BUILD_PATH" ]; then
  mkdir -p "$BUILD_PATH"

  cd "$BUILD_PATH"

  cmake -DCMAKE_BUILD_TYPE=Release                              \
        -DHPX_WITH_MALLOC="custom"                                 \
        -DHPX_DIR=/work/skella1/curver/installdbg/lib/cmake/HPX \
        -Wdev                                                     \
         $SCRIPTPATH/workbench
fi

cd "$BUILD_PATH"

make $1

Also how I compile HPX on smic:

#!/bin/bash
SCRIPTPATH=/work/skella1/curver
INSTALL_PATH=$SCRIPTPATH/installdbg
BUILD_PATH=$SCRIPTPATH/builddbg

if [ "$1" = "clean" ]; then
      rm -rf $INSTALL_PATH $BUILD_PATH
      exit 0
fi

if [ ! -d "$BUILD_PATH" ]; then
   mkdir -p "$BUILD_PATH"

cd "$BUILD_PATH"
cmake -DCMAKE_BUILD_TYPE=Debug \
 -DHPX_WITH_THREAD_IDLE_RATES=ON \
 -DHPX_WITH_MALLOC="custom"\
 -DHWLOC_ROOT=/work/skella1 \
 -DHPX_WITH_HWLOC=ON \
 -DBOOST_ROOT=/work/skella1/boost_1_58_0 \
 -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \
 -DHPX_WITH_PAPI=OFF \
 -DHPX_WITH_PARCELPORT_MPI=ON \
 -DHPX_WITH_EXAMPLES=False \
 -Wdev \
 $SCRIPTPATH/hpx

fi

cd "$BUILD_PATH"
make $1 -k -j20
make install -k -j20

Finally just in case it is useful how I compile HPX on hermione:

#!/bin/bash                                                                      


SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )                                        
INSTALL_PATH=$SCRIPTPATH/install                                                 
BUILD_PATH=$SCRIPTPATH/build                                                     

if [ "$1" = "clean" ]; then                                                      
     rm -rf $INSTALL_PATH $BUILD_PATH                                            
    exit 0                                                                       
fi                                                                               

if [ ! -d "$BUILD_PATH" ]; then                                                  
   mkdir -p "$BUILD_PATH"                                                        

cd "$BUILD_PATH"                                                                 
cmake -DCMAKE_BUILD_TYPE=Release \                                               
 -DHPX_WITH_THREAD_IDLE_RATES=ON \                                               
 -DHPX_WITH_MALLOC="jemalloc" \                                                  
 -DBOOST_ROOT=/opt/boost/1.58.0-b1-rc2-release \                                 
 -DHWLOC_ROOT=/opt/hwloc/1.10.1-source \                                         
 -DPAPI_ROOT=/opt/papi/5.3.0-release \                                           
 -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \                                          
 -DHPX_WITH_PAPI=ON \                                                            
 -DHPX_WITH_PARCELPORT_MPI=ON \                                                  
 -Wdev \                                                                         
 $SCRIPTPATH/hpx                                                                 

fi                                                                                                                                       
cd "$BUILD_PATH"                                                                 

make $1 -k -j16                                                                      
make install -k -j16      
@hkaiser
Copy link
Member

hkaiser commented Oct 19, 2015

Have you switched both, HPX and the application to Release? Are you sure your application build is actually using the release version of HPX?

@quantomb
Copy link
Author

I can only get the program to compile when both are in debug. Any combination of Release, Release or release, debug results in a failure.

I believe the application is using the correct version of hpx due to the output of ldd pointing to the correct directory when building in dbg but not being present when switching to release

@sithhell
Copy link
Member

Could it be that you have a stale object file lying around?
Am 19.10.2015 7:29 nachm. schrieb "quantomb" notifications@github.com:

I can only get the program to compile when both are in debug. Any
combination of Release, Release or release, debug results in a failure.

I believe the application is using the correct version of hpx due to the
output of ldd pointing to the correct directory when building in dbg but
not being present when switching to release


Reply to this email directly or view it on GitHub
#1800 (comment).

@sithhell
Copy link
Member

Also, your script compiles HPX in debug mode. Mixed build types are
currently not supported.
Am 19.10.2015 8:22 nachm. schrieb thom.heller@gmail.com:

Could it be that you have a stale object file lying around?
Am 19.10.2015 7:29 nachm. schrieb "quantomb" notifications@github.com:

I can only get the program to compile when both are in debug. Any
combination of Release, Release or release, debug results in a failure.

I believe the application is using the correct version of hpx due to the
output of ldd pointing to the correct directory when building in dbg but
not being present when switching to release


Reply to this email directly or view it on GitHub
#1800 (comment)
.

@quantomb
Copy link
Author

The problem was cmake linking to the wrong version of hpx. It was fixed when I removed all dbg versions of code and recompiled with no problems. Also thankyou @sithhell as I did not realize mixed build types were not supported.

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

No branches or pull requests

3 participants