بدون مشکل تونستم کامپایلش کنم :
make[1]: Leaving directory '/home/asus/Source/libraries/SuiteSparse/UMFPACK'
mpif90 -O2 -fpp -fc=ifort kdtree2.o fem2D_utilities.o binaryTree.o call_triangle.o sort.o c_fortran_zgssv.o superlu_zsolver.o umf4_f77zwrapper.o umfpack_zsolver.o string_helpers.o triangle.o mt1D.o EMconstants.o em2dkx.o Occam.o c_fortran_triangle.o FilterModules.o mare2dem_common.o spline_kx_module.o mare2dem_worker.o mare2dem_io.o mare2dem_mpi.o EM2D.o RunMARE2DEM.o ./libraries/SuperLU_4.0/libsuperlu_4.0.a ./libraries/SuiteSparse/UMFPACK/Lib/libumfpack.a ./libraries/SuiteSparse/AMD/Lib/libamd.a ./libraries/SuiteSparse/CHOLMOD/Lib/libcholmod.a ./libraries/SuiteSparse/COLAMD/Lib/libcolamd.a ./libraries/SuiteSparse/CAMD/Lib/libcamd.a ./libraries/SuiteSparse/CCOLAMD/Lib/libccolamd.a ./libraries/metis-4.0/libmetis.a ./libraries/scalapack-2.0.2/libscalapack.a \
-L/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64 -I/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/include -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -o MARE2DEM
اینم خروجی :
mpirun -np 2 ./MARE2DEM
که نیشون می ده به درستی کار می کنه (البته MARE2DEM باید با یک آرگومان ران بشه ولی من همین طوری فقط اجراش کردم تا ببینم اوضاع چطوره) :
============================= MARE2DEM ===================================
MARE2DEM: Modeling with Adaptively Refined Elements for 2.5D EM
Version: 10 March 2014
A parallel goal-oriented adaptive finite element forward and inverse
modeling code for electromagnetic fields from electric dipoles, magnetic
dipoles and magnetotelluric sources in triaxially anisotropic conducting
media. Iterative adaptive mesh refinement is accomplished using the
goal-oriented error estimation method described in Key and Ovall (2011).
Inversion is accomplished by the Occam method (Constable et al., 1987).
This work was supported by:
The Seafloor Electromagnetic Methods Consortium
at Scripps Institution of Oceanography
See this URL for a list of current SEMC funding sponsors:
http://marineemlab.ucsd.edu/semc.html
Copyright (C) 2008-2014
Kerry Key
Scripps Institution of Oceanography
University of California, San Diego
This file is part of MARE2DEM.
MARE2DEM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MARE2DEM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MARE2DEM. If not, see <http://www.gnu.org/licenses/>.
==========================================================================
MARE2DEM is using one manager node and 1 compute nodes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
MARE2DEM error, no command line arguments given!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Usage: MARE2DEM <-F, -FJ or -FF> <resistivity file> <output root name>
MARE2DEM has three optional flags (*normal inversion uses no flags):
-F Computes the forward response of the input model only.
The forward response is output to <resistivity file>.resp
-FJ Computes the forward response and the model Jacobian matrix.
The forward response is output to <resistivity file>.resp
The Jacaobian matrix is output to <resistivity file>.jacobian
-FF Computes the forward response of the input model and
outputs all 3 components of E and H for all combinations of
transmitters, receivers and frequencies in the data file.
Ignores the data array section of the data file. The fields
The fields are output to <resistivity file>.fieldsMT and
and <resistivity file>.fieldsCSEM
MARE2DEM has one required parameter:
<resistivity file root> - This is the name of the input resistivity
file. By convention, this file should have the extension .resistivity.
For example inputModel.0.resistivity. The model found by each
inversion iteration is then output to a new resistivity file with the
iteration number incremented. For example: inputModel.1.resistivity,
inputModel.2.resistivity, ... The corresponding model responses are
written to inputModel.1.resp, inputModel.2.resp,...
MARE2DEM has the optional parameter:
<output file root> - With this option, the output files are
named <outputfileroot>.1.resistivity, <outputfileroot>.1.resp,
named <outputfileroot>.2.resistivity, <outputfileroot>.2.resp,...
Shutting down the worker processors:
Worker: 1 is done with mare2dem...
و اما دلیل اون خطا Makefile بودش که پارامتر ها به درستی ست نشده بودن (مثلاً MKL_ROOT باید به MKLROOT تغییر پیدا می کرد و چند مورد دیگه)
در نتیجه من قسمت tscc از Makefile رو به صورت زیر تغییر دادم :
ifeq "$(CLUSTER_LC)" "tscc"
FC = mpif90
FFLAGS = -O2 -fpp -fc=ifort
CC = mpicc
CFLAGS = -O2
# You only need these commands if you are compiling the Metis and SuperLU libs in MARE2DEM/Source/SuperLU and /Metis:
ARCH = xiar
ARCHFLAGS = ruv
RANLIB = ranlib
BLASDEF = -DUSE_VENDOR_BLAS
MKLPATH=$(MKLROOT)/lib/intel64
MKLINCLUDE=$(MKLROOT)/include
BLASLIB = -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
# -DAdd_ or -DNoChange, this is for the stupid underscore difference between C and Fortran
SUPERLU_CDEFS = -DAdd_
endif
ولی باز یه خطای جدید دادش که با سرچ زدن فهمیدم مشکل از فایل rename.h هستش و خط آخر اونو از :
#define log2 __log2
به این تغییر دادم :
#define log2 METIS__log2
و در نهایت دستورات زیر رو زدم تا پارامترهای لازم ست بشن :
export I_MPI_F77=ifort
exoprt I_MPI_F90=ifort
export I_MPI_FC=ifort
export I_MPI_CC=icc
export I_MPI_SHM_LMT=shm
source /opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/bin/mklvars.sh intel64
PATH="$HOME/Source:$PATH"
PATH="/opt/intel/compilers_and_libraries_2018.0.128/linux/mpi/intel64/bin:$PATH"
و در نهایت با دستور زیر کامپایل رو انجام دادم :
make CLUSTER=tscc
البته من کامپایل رو با intel mpi انجام دادم که شما نداشتینش و اگه بعد انجام کارهایی که گفتم بازم به مشکل برخوردین من توضیه می کنم از آخرین نسخه از parallel studio استفاده کنین تا بتونین از کتابخونه ها و Mpi های اینتل استفاده کنین.