Commit a1a188ff authored by PRUVOST Florent's avatar PRUVOST Florent

add plasma to chameleon conversion scripts

parent a978e988
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###
#
# -- Inria
# -- (C) Copyright 2012
#
# This software is a computer program whose purpose is to process
# Matrices Over Runtime Systems @ Exascale (MORSE). More information
# can be found on the following website: http://www.inria.fr/en/teams/morse.
#
# This software is governed by the CeCILL-C license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL-C
# license as circulated by CEA, CNRS and INRIA at the following URL
# "http://www.cecill.info".
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
# liability.
#
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
# requirements in conditions enabling the security of their systems and/or
# data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-C license and that you accept its terms.
#
###
#
# @file fileCopy.py
#
# @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 Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @date 13-07-2012
#
###
import sys;
import os;
import shutil;
import string;
def copyDirectoryTree(directory, destination, mode):
pattern = shutil.ignore_patterns('.svn', '*~', 'plasma-conversion', 'insert-licence')
for entry in os.listdir(directory):
entryPath = os.path.join(directory, entry)
destPath = os.path.join(destination, entry)
if os.path.isdir(entryPath):
if entry == '.svn' or \
entry == 'insert-licence' or \
entry == 'plasma-conversion':
continue
else:
if os.path.exists(destPath):
copyDirectoryTree(entryPath, destPath, mode)
else:
print 'write:',destPath
shutil.copytree(entryPath, destPath, ignore=pattern)
else:
#if not os.path.exists(destPath):
if entry == 'plasma_2.6.0.tar.gz':
continue
else:
print 'write:',destPath
shutil.copy(entryPath, destination)
#else:
#print 'not write:',destPath
#print 'already exists:',destPath
#if mode is True:
# ask = "y"
#else:
# ask = ""
#while (ask != "y") and (ask != "n"):
# ask = raw_input('overwrite (y/n)? ')
#if ask == "y":
# print 'overwrite:',destPath
# shutil.copy(entryPath, destination)
#if ask == "n":
# print 'stop overwrite:',destPath
# sys.exit(0)
def copy_file(srcpath, dstpath, mode):
if os.path.exists(srcpath) is True:
dstpath2 = os.path.join(dstpath, '')
copyDirectoryTree(srcpath, dstpath2, mode)
else:
print 'error:',srcpath,'does not exist'
sys.exit(1)
return;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###
#
# -- Inria
# -- (C) Copyright 2012
#
# This software is a computer program whose purpose is to process
# Matrices Over Runtime Systems @ Exascale (MORSE). More information
# can be found on the following website: http://www.inria.fr/en/teams/morse.
#
# This software is governed by the CeCILL-C license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL-C
# license as circulated by CEA, CNRS and INRIA at the following URL
# "http://www.cecill.info".
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
# liability.
#
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
# requirements in conditions enabling the security of their systems and/or
# data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-C license and that you accept its terms.
#
###
#
# @file generate_morseSrc.py
#
# @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 Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @date 13-07-2012
#
###
import sys;
import shutil;
from optparse import OptionParser,OptionGroup;
from fileConversion import *;
from fileCopy import *;
def main(argv):
# Create the options parser for detecting options on the command line.
parser = OptionParser(usage="Usage: %prog [options]");
group = OptionGroup(parser,"Printing Options","These options control generate_morseSrc.py.");
group.add_option("-y","--force" , help=': Force overwrite all files' , action='store_true', dest='force' , default=False);
group.add_option("-o","--prefix" , help=': install files in PREFIX.' , action='store' , dest='prefix' , type='string', default=False);
group.add_option("-p","--plasma-dir", help=': Specify the top directory of PLASMA.' , action='store' , dest='pdir' , type='string', default=False);
group.add_option("-m","--morse-dir" , help=': Specify the top directory of MORSE.' , action='store' , dest='mdir' , type='string', default=False);
group.add_option("-f","--file" , help=': Specify a file(s) on which to operate.', action='store' , dest='flist' , type='string', default=False);
parser.add_option_group(group);
(options, args) = parser.parse_args();
# Create files from PLASMA
if options.prefix and options.pdir and options.flist:
print '\n#####################'
print '\nCONVERT PLASMA FILES '
print '\n#####################'
for file in options.flist.split():
convert_file(file, options.pdir, options.prefix, options.force)
# Copy file from MORSE
if options.prefix and options.mdir:
print '\n#####################'
print '\nCOPY NEEDED SVN MORSE'
print '\n#####################'
copy_file(options.mdir, options.prefix, options.force)
# Exit
return 0
if "__main__" == __name__:
sys.exit(main(sys.argv))
/**
*
* @copyright (c) 2009-2015 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2016 Inria. All rights reserved.
* @copyright (c) 2012-2015 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
!!!
!
! @copyright (c) 2009-2015 The University of Tennessee and The University
! of Tennessee Research Foundation.
! All rights reserved.
! @copyright (c) 2012-2016 Inria. All rights reserved.
! @copyright (c) 2012-2015 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
!
!!!
#!/bin/bash
###
#
# -- Inria
# -- (C) Copyright 2016
#
# This software is a computer program whose purpose is to process
# Matrices Over Runtime Systems @ Exascale (MORSE). More information
# can be found on the following website: http://www.inria.fr/en/teams/morse.
#
# This software is governed by the CeCILL-C license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL-C
# license as circulated by CEA, CNRS and INRIA at the following URL
# "http://www.cecill.info".
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
# liability.
#
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
# requirements in conditions enabling the security of their systems and/or
# data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-C license and that you accept its terms.
#
###
#
# @file insert-licence.sh
#
# @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 Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @author Florent Pruvost
# @date 13-07-2012
#
###
for i in $(find . -name "*.c" -or -name "*.h" -not -path "*svn*" -not -name "morse_fortran.h")
do
cat $(dirname $0)/chameleon_c.licence > $(dirname $0)/buffer.tmp
cat $i >> $(dirname $0)/buffer.tmp
cat $(dirname $0)/buffer.tmp > $i
rm $(dirname $0)/buffer.tmp
done
for i in $(find . -name "*.f" -or -name "*.F" -or -name "*.f77" -or -name "*.F77" -or -name "*.f90" -or -name "*.F90" -or -name "morse_fortran.h")
do
cat $(dirname $0)/chameleon_f.licence > $(dirname $0)/buffer.tmp
cat $i >> $(dirname $0)/buffer.tmp
cat $(dirname $0)/buffer.tmp > $i
rm $(dirname $0)/buffer.tmp
done
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment