Hi Geoff,
Thanks. I'm aiming to use OpenBabel as a platform to learn about
parallelization using GPU and multicore CPU. I want also to contribute
the code I develop to the OpenBabel project. Following Noel suggestion I
am first looking at the forcefields used in energy calculation and in
particular MMFF94.
I followed your advise. After editing the CMakeCache.txt and adding the
compiler flags OpenMP is working for me. However, I would like to avoid
this additional step by adding some conditional compilation lines to the
CMakeLists.txt
#Find if OpenMP support is enable
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
${OpenMP_EXE_LINKER_FLAGS}")
endif()
I tried this lines with a fresh development version of OpenBabel and it
seems to be working. I tried both having a setup with GOMP libraries
installed and one without. I also run the ctest for MMFF94 just to be
sure everything was working.
***@gpu0:/hpcws/obeclipse$ export OMP_NUM_THREADS = 1
bash: export: `=': not a valid identifier
bash: export: `1': not a valid identifier
***@gpu0:/hpcws/obeclipse$ export OMP_NUM_THREADS=1
***@gpu0:/hpcws/obeclipse$ ctest -I 36,36
Test project /hpcws/obeclipse
Start 36: ffmmff94_Test
1/1 Test #36: ffmmff94_Test .................... Passed 2.37 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 2.39 sec
***@gpu0:/hpcws/obeclipse$ export OMP_NUM_THREADS=4
***@gpu0:/hpcws/obeclipse$ ctest -I 36,36
Test project /hpcws/obeclipse
Start 36: ffmmff94_Test
1/1 Test #36: ffmmff94_Test .................... Passed 1.41 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 1.43 sec
There is something else I want to ask/understand. While running the
obminimize command for the forcefield.sdf validation set (the same one
used by Open Babel automated test) I realized each time the command is
run two instances of OBForceFieldMMFF94 are being created. I would like
to understand why is that, because I thought only one was necessary and
therefore I am confused about this.
That's it for today. Thanks again for the help last time.
Cheers,
--
Omar Valerio M.
Post by Geoff HutchisonPost by ovalerioThis is from the time before OpenBabel moved to CMake. I look at the
CMakeLists.txt and there is no OpenMP flags there (-fopenmp,
-lgomp).
Which is the preferred way to do it.
Either edit you CMakeCache.txt (e.g., "ccmake .") after setting up
the cmake build directory, or declare these as CXX_FLAGS, e.g.,
CXXFLAGS="-fopenmp -lgomp" cmake /path/to/source/dir
Hope that helps,
-Geoff
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss