Commit 3f278384 authored by jclamber's avatar jclamber

better fortran detection

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@191 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent 7876490e
......@@ -25,9 +25,8 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
# load setup flags
include(SetupFlags)
if ( ${CMAKE_ENABLE_FORTRAN} )
enable_language(Fortran OPTIONAL)
endif()
# Check fortran compiler
include(CheckFortranCompiler)
# contains the full path to the top level directory of your build tree
MESSAGE( STATUS "PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR} )
......@@ -90,15 +89,15 @@ endif(OSX)
# ------------------
# TEST PROGRAM
# ------------------
if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)
endif(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
#if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
# set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)
#endif(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
#enable_language(Fortran OPTIONAL)
if (CMAKE_Fortran_COMPILER)
message(STATUS "CMAKE_Fortran_COMPILER_WORKS = ${CMAKE_Fortran_COMPILER_WORKS}")
MESSAGE(STATUS "Fortran compiler : " ${CMAKE_Fortran_COMPILER})
endif()
#if (CMAKE_Fortran_COMPILER)
# message(STATUS "CMAKE_Fortran_COMPILER_WORKS = ${CMAKE_Fortran_COMPILER_WORKS}")
# MESSAGE(STATUS "Fortran compiler : " ${CMAKE_Fortran_COMPILER})
#endif()
#if (CMAKE_Fortran_COMPILER)
# SET(CMAKE_Fortran_COMPILER gfortran)
......
# -*-cmake-*-
# ============================================================================
# Copyright Jean-Charles LAMBERT - 2008-2014
# e-mail: Jean-Charles.Lambert@oamp.fr
# address: Dynamique des galaxies
# Centre de donneeS Astrophysique de Marseille (CeSAM)
# Laboratoire d'Astrophysique de Marseille
# Pole de l'Etoile, site de Chateau-Gombert
# 38, rue Frederic Joliot-Curie
# 13388 Marseille cedex 13 France
# CNRS U.M.R 6110
# ============================================================================
# check if fortran compiler is installed
# ============================================================================
if ( NOT CMAKE_DISABLE_FORTRAN )
MESSAGE("\n\nTrying do detect fortran support.....")
MESSAGE("\nYou can change FORTRAN compiler name by setting FC variable before running cmake, like\nexport FC=ifort\n")
MESSAGE("or run directly the command:\nFC=ifort cmake ..\n\n")
MESSAGE("If you want to disable FORTRAN support, add following command to cmake:\n-DCMAKE_DISABLE_FORTRAN=1\n\n")
enable_language(Fortran OPTIONAL)
else()
MESSAGE("\n\nFortran support DISABLE\n\n")
endif()
if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)
endif(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
if (CMAKE_Fortran_COMPILER)
message(STATUS "CMAKE_Fortran_COMPILER_WORKS = ${CMAKE_Fortran_COMPILER_WORKS}")
message(STATUS "Fortran compiler : " ${CMAKE_Fortran_COMPILER})
# FFLAGS depend on the compiler
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
if (Fortran_COMPILER_NAME STREQUAL "gfortran")
# gfortran
set (EXTRA_Fortran_FLAGS " ${WARNF} -ffixed-line-length-none ")
endif()
endif()
\ No newline at end of file
......@@ -25,11 +25,6 @@ if ( NOT SETUP_FLAGS_INCLUDED )
typed_cache_set ( STRING "Build type: Release or Debug" CMAKE_BUILD_TYPE Debug )
endif()
# Enable fortran language detection by default
if ( NOT CMAKE_ENABLE_FORTRAN )
MESSAGE ("NOOOOOOOOOOOOOT")
typed_cache_set ( STRING "Try to enable FORTRAN" CMAKE_ENABLE_FORTRAN 1 )
endif()
# set optimizer flag
if ( ${CMAKE_BUILD_TYPE} STREQUAL "Debug" )
typed_cache_set (STRING "Optimizer" OPT "-g -ggdb")
......
#!/usr/bin/python
import matplotlib
import numpy as np
import matplotlib.colors
......@@ -249,6 +251,7 @@ def compute(file,out,component,times,xrange,sigma):
else:
outfile=out+"."+"%05d"%cpt+".png"
print ">> ",outfile
#fig = plt.figure(figsize=(10,10),dpi=300)
plt.savefig(outfile, bbox_inches=0)
plt.close(fig)
......
# -*-cmake-*-
# ============================================================================
# Copyright Jean-Charles LAMBERT - 2008-2014
# e-mail: Jean-Charles.Lambert@oamp.fr
# address: Dynamique des galaxies
# Centre de donneeS Astrophysique de Marseille (CeSAM)
# Laboratoire d'Astrophysique de Marseille
# Pole de l'Etoile, site de Chateau-Gombert
# 38, rue Frederic Joliot-Curie
# 13388 Marseille cedex 13 France
# CNRS U.M.R 6110
# ============================================================================
# check if fortran compiler is installed
# ============================================================================
if ( NOT CMAKE_DISABLE_FORTRAN )
MESSAGE("\n\nTrying do detect fortran support.....")
MESSAGE("\nYou can change FORTRAN compiler name by setting FC variable before running cmake, like\nexport FC=ifort\n")
MESSAGE("or run directly the command:\nFC=ifort cmake ..\n\n")
MESSAGE("If you want to disable FORTRAN support, add following command to cmake:\n-DCMAKE_DISABLE_FORTRAN=1\n\n")
enable_language(Fortran OPTIONAL)
else()
MESSAGE("\n\nFortran support DISABLE\n\n")
endif()
if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)
endif(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
enable_language(Fortran OPTIONAL)
message(STATUS "CMAKE_Fortran_COMPILER_WORKS = ${CMAKE_Fortran_COMPILER_WORKS}")
# FFLAGS depend on the compiler
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
if (CMAKE_Fortran_COMPILER)
message(STATUS "CMAKE_Fortran_COMPILER_WORKS = ${CMAKE_Fortran_COMPILER_WORKS}")
message(STATUS "Fortran compiler : " ${CMAKE_Fortran_COMPILER})
# FFLAGS depend on the compiler
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
if (Fortran_COMPILER_NAME STREQUAL "gfortran")
if (Fortran_COMPILER_NAME STREQUAL "gfortran")
# gfortran
set (EXTRA_Fortran_FLAGS " ${WARNF} -ffixed-line-length-none ")
endif()
endif()
\ No newline at end of file
......@@ -106,7 +106,7 @@
! input parameters
integer ident,nbody
! UNS variable
integer status
integer status,lnblnk
integer uns_get_range, uns_save_init
integer uns_get_value_f, uns_get_array_f, nsel
integer uns_set_array_f, uns_set_value_f, ok
......
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