Software Developement Tools Introduction to Software Building

Software Developement Tools Introduction to Software Building

Software Developement Tools Introduction to software building SED & friends Outline 1. an example 2. what is software building? 3. tools 4. about CMake SED & friends – Introduction to software building 2 1 an example SED & friends – Introduction to software building 3 - non-portability: works only on a Unix systems, with mpicc shortcut and MPI libraries and headers installed in standard directories - every build, we compile all files - 0 level: hit the following line: mpicc -Wall -o heat par heat par.c heat.c mat utils.c -lm - 0.1 level: write a script (bash, csh, Zsh, ...) • drawbacks: Example • we want to build the parallel program solving heat equation: SED & friends – Introduction to software building 4 - non-portability: works only on a Unix systems, with mpicc shortcut and MPI libraries and headers installed in standard directories - every build, we compile all files - 0.1 level: write a script (bash, csh, Zsh, ...) • drawbacks: Example • we want to build the parallel program solving heat equation: - 0 level: hit the following line: mpicc -Wall -o heat par heat par.c heat.c mat utils.c -lm SED & friends – Introduction to software building 4 - non-portability: works only on a Unix systems, with mpicc shortcut and MPI libraries and headers installed in standard directories - every build, we compile all files • drawbacks: Example • we want to build the parallel program solving heat equation: - 0 level: hit the following line: mpicc -Wall -o heat par heat par.c heat.c mat utils.c -lm - 0.1 level: write a script (bash, csh, Zsh, ...) SED & friends – Introduction to software building 4 - non-portability: works only on a Unix systems, with mpicc shortcut and MPI libraries and headers installed in standard directories - every build, we compile all files Example • we want to build the parallel program solving heat equation: - 0 level: hit the following line: mpicc -Wall -o heat par heat par.c heat.c mat utils.c -lm - 0.1 level: write a script (bash, csh, Zsh, ...) • drawbacks: SED & friends – Introduction to software building 4 - every build, we compile all files Example • we want to build the parallel program solving heat equation: - 0 level: hit the following line: mpicc -Wall -o heat par heat par.c heat.c mat utils.c -lm - 0.1 level: write a script (bash, csh, Zsh, ...) • drawbacks: - non-portability: works only on a Unix systems, with mpicc shortcut and MPI libraries and headers installed in standard directories SED & friends – Introduction to software building 4 Example • we want to build the parallel program solving heat equation: - 0 level: hit the following line: mpicc -Wall -o heat par heat par.c heat.c mat utils.c -lm - 0.1 level: write a script (bash, csh, Zsh, ...) • drawbacks: - non-portability: works only on a Unix systems, with mpicc shortcut and MPI libraries and headers installed in standard directories - every build, we compile all files SED & friends – Introduction to software building 4 - /usr/include/mpi is hardcoded _¨ - use auto configuration tricks: pkg-config - How to build for non unix OSes ? • drawbacks: Example • 0.5 level: write a Makefile MPICC = mpicc CFLAGS = -Wall -O3 INCLUDE = -I. -I/usr/include/mpi HFILES = heat.h CFILES_PAR = heat.c heat_par.c mat_utils.c LIB_PAR =-lm EXEC_PAR= heat_par .SUFFIXES: .c .o ${EXEC_PAR}: ${CFILES_PAR:.c=.o} ${MPICC} -o ${EXEC_PAR} ${CFILES_PAR:.c=.o} .c.o: ${CC} ${CFLAGS} ${INCLUDE} -c $*.c -o $*.o SED & friends – Introduction to software building 5 - /usr/include/mpi is hardcoded _¨ - use auto configuration tricks: pkg-config - How to build for non unix OSes ? Example • 0.5 level: write a Makefile MPICC = mpicc CFLAGS = -Wall -O3 INCLUDE = -I. -I/usr/include/mpi HFILES = heat.h CFILES_PAR = heat.c heat_par.c mat_utils.c LIB_PAR =-lm EXEC_PAR= heat_par .SUFFIXES: .c .o ${EXEC_PAR}: ${CFILES_PAR:.c=.o} ${MPICC} -o ${EXEC_PAR} ${CFILES_PAR:.c=.o} .c.o: ${CC} ${CFLAGS} ${INCLUDE} -c $*.c -o $*.o • drawbacks: SED & friends – Introduction to software building 5 - use auto configuration tricks: pkg-config - How to build for non unix OSes ? Example • 0.5 level: write a Makefile MPICC = mpicc CFLAGS = -Wall -O3 INCLUDE = -I. -I/usr/include/mpi HFILES = heat.h CFILES_PAR = heat.c heat_par.c mat_utils.c LIB_PAR =-lm EXEC_PAR= heat_par .SUFFIXES: .c .o ${EXEC_PAR}: ${CFILES_PAR:.c=.o} ${MPICC} -o ${EXEC_PAR} ${CFILES_PAR:.c=.o} .c.o: ${CC} ${CFLAGS} ${INCLUDE} -c $*.c -o $*.o • drawbacks: - /usr/include/mpi is hardcoded _¨ SED & friends – Introduction to software building 5 - How to build for non unix OSes ? Example • 0.5 level: write a Makefile MPICC = mpicc CFLAGS = -Wall -O3 INCLUDE = -I. -I/usr/include/mpi HFILES = heat.h CFILES_PAR = heat.c heat_par.c mat_utils.c LIB_PAR =-lm EXEC_PAR= heat_par .SUFFIXES: .c .o ${EXEC_PAR}: ${CFILES_PAR:.c=.o} ${MPICC} -o ${EXEC_PAR} ${CFILES_PAR:.c=.o} .c.o: ${CC} ${CFLAGS} ${INCLUDE} -c $*.c -o $*.o • drawbacks: - /usr/include/mpi is hardcoded _¨ - use auto configuration tricks: pkg-config SED & friends – Introduction to software building 5 Example • 0.5 level: write a Makefile MPICC = mpicc CFLAGS = -Wall -O3 INCLUDE = -I. -I/usr/include/mpi HFILES = heat.h CFILES_PAR = heat.c heat_par.c mat_utils.c LIB_PAR =-lm EXEC_PAR= heat_par .SUFFIXES: .c .o ${EXEC_PAR}: ${CFILES_PAR:.c=.o} ${MPICC} -o ${EXEC_PAR} ${CFILES_PAR:.c=.o} .c.o: ${CC} ${CFLAGS} ${INCLUDE} -c $*.c -o $*.o • drawbacks: - /usr/include/mpi is hardcoded _¨ - use auto configuration tricks: pkg-config - How to build for non unix OSes ? SED & friends – Introduction to software building 5 Example of CMakeLists.txt cmake_minimum_required (VERSION 2.8) project (Heat) find_package(MPI) if(MPI_FOUND) include_directories(${MPI_INCLUDE_PATH}) endif(MPI_FOUND) set(HEAT_PAR_SOURCES heat_par.c heat.c mat_utils.c) add_executable(patcHeatPar ${HEAT_PAR_SOURCES} mat_utils.h heat.h) target_link_libraries(patcHeatPar ${MPI_LIBRARIES} m) # enable testing enable_testing() add_test(patcHeatPar4 ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./patcHeatPar 10 10 200 2 2 0) SED & friends – Introduction to software building 6 2 what is software building? SED & friends – Introduction to software building 7 - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation - enforce software portability - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) - add tests to check the build • user’s POV: Why use a building tool ? • developer’s POV: SED & friends – Introduction to software building 8 - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) - add tests to check the build • user’s POV: Why use a building tool ? • developer’s POV: - enforce software portability SED & friends – Introduction to software building 8 - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation - use native tools to build the software (best integration to the OS) - add tests to check the build • user’s POV: Why use a building tool ? • developer’s POV: - enforce software portability - detect the building environment by auto configuration SED & friends – Introduction to software building 8 - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation - add tests to check the build • user’s POV: Why use a building tool ? • developer’s POV: - enforce software portability - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) SED & friends – Introduction to software building 8 - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation • user’s POV: Why use a building tool ? • developer’s POV: - enforce software portability - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) - add tests to check the build SED & friends – Introduction to software building 8 - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation Why use a building tool ? • developer’s POV: - enforce software portability - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) - add tests to check the build • user’s POV: SED & friends – Introduction to software building 8 - possible use of binaries packages could accelerate and simplify installation Why use a building tool ? • developer’s POV: - enforce software portability - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) - add tests to check the build • user’s POV: - install program must be an easy process SED & friends – Introduction to software building 8 Why use a building tool ? • developer’s POV: - enforce software portability - detect the building environment by auto configuration - use native tools to build the software (best integration to the OS) - add tests to check the build • user’s POV: - install program must be an easy process - possible use of binaries packages could accelerate and simplify installation SED & friends – Introduction to software building 8 - languages - compilers - libraries implementations - operating systems or distributions of an OS - programming tools •

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    70 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us