Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Chameleon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
AGULLO Emmanuel
Chameleon
Commits
4b83ad0d
Commit
4b83ad0d
authored
Apr 27, 2017
by
PRUVOST Florent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect mangling using FortranCInterface and remove the ADD_ arbitrary prepocessor variable
parent
efffaa5a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
63 deletions
+56
-63
CMakeLists.txt
CMakeLists.txt
+1
-6
cmake_modules/SetFortranMangling.cmake
cmake_modules/SetFortranMangling.cmake
+42
-0
control/common.h
control/common.h
+6
-25
control/config.h.in
control/config.h.in
+0
-3
control/morse_f77.c
control/morse_f77.c
+1
-28
include/CMakeLists.txt
include/CMakeLists.txt
+6
-1
No files found.
CMakeLists.txt
View file @
4b83ad0d
...
...
@@ -59,6 +59,7 @@ else()
endif
()
include
(
MorseInit
)
include
(
GenPkgConfig
)
include
(
SetFortranMangling
)
#############################################
# #
...
...
@@ -959,12 +960,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set
(
CMAKE_SHARED_LINKER_FLAGS
"-undefined dynamic_lookup"
)
endif
()
# Add define for Fortran Mangling (should be defined somewhere else)
# ------------------------------------------------------------------
message
(
"--
${
Blue
}
Add definition ADD_"
" - For Fortran mangling
${
ColourReset
}
"
)
set
(
ADD_ 1
)
#------------------------------------------------------------------------------
if
(
CHAMELEON_SCHED_STARPU
)
link_directories
(
${
STARPU_LIBRARY_DIRS_DEP
}
)
...
...
cmake_modules/SetFortranMangling.cmake
0 → 100644
View file @
4b83ad0d
###
#
# @copyright (c) 2017 Inria. All rights reserved.
#
###
#
# @file SetFortranMangling.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.0.0
# @author Florent Pruvost
# @date 25-04-2017
#
# Detect Fortran mangling and define the proper API symbols
###
include
(
FortranCInterface
)
## Ensure that the fortran compiler and c compiler specified are compatible
FortranCInterface_VERIFY
()
FortranCInterface_HEADER
(
${
CMAKE_CURRENT_BINARY_DIR
}
/include/morse_mangling.h
MACRO_NAMESPACE
"MORSE_"
SYMBOLS
MORSE_INIT
MORSE_FINALIZE
MORSE_ENABLE
MORSE_DISABLE
MORSE_SET
MORSE_GET
MORSE_DEALLOC_HANDLE
MORSE_VERSION
MORSE_DESC_CREATE
MORSE_DESC_DESTROY
MORSE_LAPACK_TO_TILE
MORSE_TILE_TO_LAPACK
)
control/common.h
View file @
4b83ad0d
...
...
@@ -31,11 +31,6 @@
#ifndef _MORSE_COMMON_H_
#define _MORSE_COMMON_H_
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#if defined( _WIN32 ) || defined( _WIN64 )
#include <io.h>
...
...
@@ -81,6 +76,7 @@
* Chameleon header files
**/
#include "morse.h"
#include "morse_mangling.h"
#include "coreblas/include/coreblas.h"
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
...
...
@@ -97,26 +93,11 @@
/** ****************************************************************************
* Determine FORTRAN names
**/
#if defined(ADD_)
#define MORSE_FNAME(lcname, UCNAME) morse_##lcname##_
#define MORSE_TILE_FNAME(lcname, UCNAME) morse_##lcname##_tile_
#define MORSE_ASYNC_FNAME(lcname, UCNAME) morse_##lcname##_tile_async_
#define MORSE_WS_FNAME(lcname, UCNAME) morse_alloc_workspace_##lcname##_
#define MORSE_WST_FNAME(lcname, UCNAME) morse_alloc_workspace_##lcname##_tile_
#elif defined(NOCHANGE)
#define MORSE_FNAME(lcname, UCNAME) morse_##lcname
#define MORSE_TILE_FNAME(lcname, UCNAME) morse_##lcname##_tile
#define MORSE_ASYNC_FNAME(lcname, UCNAME) morse_##lcname##_tile_async
#define MORSE_WS_FNAME(lcname, UCNAME) morse_alloc_workspace_##lcname
#define MORSE_WST_FNAME(lcname, UCNAME) morse_alloc_workspace_##lcname##_tile
#elif defined(UPCASE)
#define MORSE_FNAME(lcname, UCNAME) MORSE_##UCNAME
#define MORSE_TILE_FNAME(lcname, UCNAME) MORSE_##UCNAME##_TILE
#define MORSE_ASYNC_FNAME(lcname, UCNAME) MORSE_##UCNAME##_TILE_ASYNC
#define MORSE_WS_FNAME(lcname, UCNAME) MORSE_ALLOC_WORKSPACE_##UCNAME
#define MORSE_WST_FNAME(lcname, UCNAME) MORSE_ALLOC_WORKSPACE_##UCNAME##_TILE
#endif
#define MORSE_FNAME(lcname, UCNAME) MORSE_GLOBAL(morse_##lcname, MORSE_##UCNAME)
#define MORSE_TILE_FNAME(lcname, UCNAME) MORSE_GLOBAL(morse_##lcname##_tile, MORSE_##UCNAME##_TILE)
#define MORSE_ASYNC_FNAME(lcname, UCNAME) MORSE_GLOBAL(morse_##lcname##_tile_async, MORSE_##UCNAME##_TILE_ASYNC)
#define MORSE_WS_FNAME(lcname, UCNAME) MORSE_GLOBAL(morse_alloc_workspace_##lcname, MORSE_ALLOC_WORKSPACE_##UCNAME)
#define MORSE_WST_FNAME(lcname, UCNAME) MORSE_GLOBAL(morse_alloc_workspace_##lcname##_tile, MORSE_ALLOC_WORKSPACE_##UCNAME##_TILE)
/*******************************************************************************
* Global shortcuts
...
...
control/config.h.in
View file @
4b83ad0d
...
...
@@ -28,9 +28,6 @@
/* inherit from public chameleon's definitions */
#include "include/chameleon_config.h"
/* For BLAS Fortran mangling */
#cmakedefine ADD_
/* StarPU functions */
#cmakedefine HAVE_STARPU_FXT_PROFILING
#cmakedefine HAVE_STARPU_IDLE_PREFETCH
...
...
control/morse_f77.c
View file @
4b83ad0d
...
...
@@ -25,34 +25,7 @@
#include <stdlib.h>
#include "control/common.h"
#include "morse.h"
#ifdef ADD_
#define MORSE_INIT morse_init_
#define MORSE_FINALIZE morse_finalize_
#define MORSE_ENABLE morse_enable_
#define MORSE_DISABLE morse_disable_
#define MORSE_SET morse_set_
#define MORSE_GET morse_get_
#define MORSE_DEALLOC_HANDLE morse_dealloc_handle_
#define MORSE_VERSION morse_version_
#define MORSE_DESC_CREATE morse_desc_create_
#define MORSE_DESC_DESTROY morse_desc_destroy_
#define MORSE_LAPACK_TO_TILE morse_lapack_to_tile_
#define MORSE_TILE_TO_LAPACK morse_tile_to_lapack_
#elif defined (NOCHANGE)
#define MORSE_INIT morse_init
#define MORSE_FINALIZE morse_finalize
#define MORSE_ENABLE morse_enable
#define MORSE_DISABLE morse_disable
#define MORSE_SET morse_set
#define MORSE_GET morse_get
#define MORSE_DEALLOC_HANDLE morse_dealloc_handle
#define MORSE_VERSION morse_version
#define MORSE_DESC_CREATE morse_desc_create
#define MORSE_DESC_DESTROY morse_desc_destroy
#define MORSE_LAPACK_TO_TILE morse_lapack_to_tile
#define MORSE_TILE_TO_LAPACK morse_tile_to_lapack
#endif
#include "morse_mangling.h"
#ifdef __cplusplus
extern
"C"
{
...
...
include/CMakeLists.txt
View file @
4b83ad0d
...
...
@@ -58,6 +58,7 @@ set(CHAMELEON_HDRS
morse_struct.h
morse_types.h
morse.h
morse_mangling.h
runtime.h
${
CHAMELEON_HDRS_GENERATED
}
)
...
...
@@ -84,7 +85,11 @@ set(HDR_INSTALL
foreach
(
hdr_file
${
CHAMELEON_HDRS_GENERATED
}
)
list
(
APPEND HDR_INSTALL
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
hdr_file
}
)
endforeach
()
list
(
APPEND HDR_INSTALL
${
CMAKE_CURRENT_BINARY_DIR
}
/morse.h
${
CMAKE_CURRENT_BINARY_DIR
}
/chameleon_config.h
)
list
(
APPEND
HDR_INSTALL
${
CMAKE_CURRENT_BINARY_DIR
}
/morse.h
${
CMAKE_CURRENT_BINARY_DIR
}
/morse_mangling.h
${
CMAKE_CURRENT_BINARY_DIR
}
/chameleon_config.h
)
# installation
# ------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment