StreamHPC / gromacs

OpenCL porting of the GROMACS molecular simulation toolkit
http://www.gromacs.org
Other
25 stars 4 forks source link

Set GMX_OCL_FILE_PATH during cmake project configuration #75

Closed ancahamuraru closed 9 years ago

ancahamuraru commented 9 years ago

Set GMX_OCL_FILE_PATH automatically during project configuration.

GMX_OCL_FILE_PATH points to Gromacs src folder. This information should be known during cmake project configuration.

ancahamuraru commented 9 years ago

Setting GMX_OCL_FILE_PATH during project configuration is not a good solution because:

Another approach:

if defined (GMX_OCL_FILE_PATH)
    load_ocl_source_files_from(GMX_OCL_FILE_PATH)
else
{   
    detect at runtime if the current app was build from sources relying on a known folder structure
    if (app built from sources)
       load_ocl_source_files_from(known folder structure)
    else
       load_ocl_source_files_from(OCL_INSTALL_FULL_PATH)      
 }

Consider also the option of having the OpenCL device code embedded as strings in the application.

ancahamuraru commented 9 years ago

The way OpenCL source files are loaded has been reimplemented. All changes are included starting with this commit: 93c8d54b6455253d657472d4a05d89e5ae1dc510