muellsen / pCMALib

Parallel FORTRAN code for CMA-ES
5 stars 1 forks source link

Install Issue #1

Open ghost opened 4 years ago

ghost commented 4 years ago

When I installed this library, I got the following issue:

./objects/__cmaes_param_mod.f90(1): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
^
./objects/__cmaes_param_mod.f90(16): error #5145: Invalid blank/tab
   <http://www.gnu.org/licenses/>.  */
----------------------------------^
./objects/__cmaes_param_mod.f90(18): error #5145: Invalid blank/tab
   include it implicitly at the start of every compilation.  It must
-----------------------------------------------------------^
./objects/__cmaes_param_mod.f90(24): error #5120: Unterminated character constant
/* glibc's intent is to support the IEC 559 math functionality, real
--------^
./objects/__cmaes_param_mod.f90(24): error #5144: Invalid character_kind_parameter. No underscore
/* glibc's intent is to support the IEC 559 math functionality, real
--------------------------------------------------------------------^
./objects/__cmaes_param_mod.f90(25): error #5145: Invalid blank/tab
   and complex.  If the GCC (4.9 and later) predefined macros
---------------^
./objects/__cmaes_param_mod.f90(27): error #5277: Syntax error, found ',' following statement keyword
   whether the overall intent is to support these features; otherwise,
----------------------------------------------------------------------^
./objects/__cmaes_param_mod.f90(29): error #5145: Invalid blank/tab
   define these macros by default.  */
----------------------------------^
./objects/__cmaes_param_mod.f90(30): error #5145: Invalid blank/tab
/* wchar_t uses Unicode 8.0.0.  Version 8.0 of the Unicode Standard is
------------------------------^
./objects/__cmaes_param_mod.f90(32): error #5276: Unbalanced parentheses
   2015-05-15).  */
-------------^
./objects/__cmaes_param_mod.f90(32): error #5145: Invalid blank/tab
   2015-05-15).  */
---------------^
./objects/__cmaes_param_mod.f90(33): error #5145: Invalid blank/tab
/* We do not support C11 <threads.h>.  */
-------------------------------------^
./objects/__cmaes_param_mod.f90(1): catastrophic error: Could not recover from previous syntax error
compilation aborted for ./objects/__cmaes_param_mod.f90 (code 1)
makefile:192: recipe for target 'objects/cmaes_param_mod.o' failed
make: *** [objects/cmaes_param_mod.o] Error 1

How do I solve it? And I do not have the knowledge of Fortran. Thanks very much for your help.

muellsen commented 4 years ago

Hej, thanks for your interest in the library. I do not know how to resolve this issue. It looks to me like a problem with (invisible) blanks and tabs in the f90 files that may dependent on the operating system you're using. Everything was tested on Macs at the time, and we found no problems then.

ghost commented 4 years ago

I tried to solve this issue by resetting the value of CPP to fpp.

However, I got the following new error, as presented below:

creating pp file __
fpp -P -C -D__HAVE_MATLAB__ -D__HAVE_MPI__ -D__BBOB -D__DP  -I/usr/local/MATLAB/R2016b/extern/include -I/opt/intel/impi/2019.6.166/intel64/include/ -I./libcma -I./include -I./libtestfcns -I./librng -I./energy_landscapes/LJ -I./bfgs -I./energy_landscapes/TIPnP -I./user -I./libcma/matlab -I./libcma/mpi -I./BBOB ./libcma/matlab/cma2mat.f90 > ./objects/__cma2mat.f90
compiling ifort -I/usr/local/MATLAB/R2016b/extern/include -I/opt/intel/impi/2019.6.166/intel64/include/ -I./libcma -I./include -I./libtestfcns -I./librng -I./energy_landscapes/LJ -I./bfgs -I./energy_landscapes/TIPnP -I./user -I./libcma/matlab -I./libcma/mpi -I./BBOB  -c -o objects/cma2mat.o ./objects/__cma2mat.f90
ifort -I/usr/local/MATLAB/R2016b/extern/include -I/opt/intel/impi/2019.6.166/intel64/include/ -I./libcma -I./include -I./libtestfcns -I./librng -I./energy_landscapes/LJ -I./bfgs -I./energy_landscapes/TIPnP -I./user -I./libcma/matlab -I./libcma/mpi -I./BBOB  -c -g -o objects/cma2mat.o ./objects/__cma2mat.f90
./objects/__cma2mat.f90(211): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
/* Current MATRIX published API version */
^
./objects/__cma2mat.f90(211): error #5082: Syntax error, found IDENTIFIER 'PUBLISHED' when expecting one of: ( , * <END-OF-STATEMENT> ; [ = / =>
/* Current MATRIX published API version */
------------------^
./objects/__cma2mat.f90(214): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
/* Backward compatible current MATRIX published API version */
^
./objects/__cma2mat.f90(214): error #5082: Syntax error, found IDENTIFIER 'CURRENT' when expecting one of: ( , * <END-OF-STATEMENT> ; [ = / =>
/* Backward compatible current MATRIX published API version */
-----------------------^
./objects/__cma2mat.f90(217): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
/* Backward compatible MATRIX published API versions */
^
./objects/__cma2mat.f90(217): error #5082: Syntax error, found IDENTIFIER 'MATRIX' when expecting one of: ( , * <END-OF-STATEMENT> ; [ = / =>
/* Backward compatible MATRIX published API versions */
-----------------------^
./objects/__cma2mat.f90(220): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
/* Compile-time MATRIX published API version */
^
./objects/__cma2mat.f90(225): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
/*
^
./objects/__cma2mat.f90(226): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
 * The following macro enables conditional compilation based on the
-^
./objects/__cma2mat.f90(227): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
 * target published API. The macro can be used in a single source file
-^
./objects/__cma2mat.f90(228): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
 * that is intended to be built against multiple matrix API versions.
-^
./objects/__cma2mat.f90(229): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
 *
-^
./objects/__cma2mat.f90(230): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
 * MX_HAS_64BIT_ARRAY_DIMS evaluates to a non-zero value if array
-^
./objects/__cma2mat.f90(230): catastrophic error: Could not recover from previous syntax error
compilation aborted for ./objects/__cma2mat.f90 (code 1)
makefile:192: recipe for target 'objects/cma2mat.o' failed
make: *** [objects/cma2mat.o] Error 1
chenchaojian93 commented 4 years ago

Hi, I have the same problem when installing it in linux. May I ask have you ever solved the problem or not?

chenchaojian93 commented 4 years ago

Hi, I have the same problem when installing it in linux. May I ask have you ever solved the problem or not?