Use the comsol command to start COMSOL products with detailed start-up options.where square brackets indicate optional arguments. The comsol command can be combined with optional targets to achieve various results. The following table lists the command and targets:
Table 21-26: COMSOL Commands Targets There is a number of .ini files in the maci64 subdirectory in the bin directory. It is sometimes recommended that you edit these files. For example, you can add options to any of the above commands by modifying the corresponding INI file. To change the option opt to value val, add the lineto the file comsol.ini. Change the file comsolbatch.ini for comsol batch, and similarly for the other COMSOL targets.You can enter various options after the COMSOL command and target. Table 21-14 lists the options (see [<options>] in the command syntax) available for all comsol commands. Always issue these options between the command and the target (if any).
<target> -h -3drend ogl | sw -docroot <path> -applicationsroot <path> -np <no. of cores> -blaspath <path> -c <path> -prefsdir <path> -tmpdir <path> -version <target> -recoverydir <path> -data <path> -configuration <path> For the -tmpdir option, the COMSOL Multiphysics software uses the specified directory to store temporary files. Use the -prefsdir option to specify the directory where the COMSOL Multiphysics software stores the preference file.In a default COMSOL Multiphysics installation, the documentation files are located in the directory doc under the installation root directory. You can use the -docroot option if you want to move the documentation directory to a different location. Similarly, use the -applicationsroot option if you want to move the Application Libraries root directory applications from its default location under the COMSOL Multiphysics installation root. Relocating the documentation and Application Libraries root directories can be useful for administering Application Library Update; see The Application Library Update Window.
Use the option -np to control the number of core and processors used. The default is to use all available cores and processors. You can also specify the number of cores as a preference on the Multicore and Cluster Computing page in the Preferences dialog box. To specify the number of cores manually, select the Number of cores check box to enter a number in the associated text field.
Table 21-28: COMSOL Multiprocessor Mode Options
Table 21-29: COMSOL BLAS Options Use a BLAS library specified using the option -blaspath or the environment variable COMSOL_BLAS_PATH.If you want to use a different BLAS library than the default, make sure that COMSOL Multiphysics can find the library. The simplest way for COMSOL Multiphysics to find a library is to put it in /lib/maci64 or somewhere in the standard search path. You must also provide the path to any sublibraries needed by the library. You can also set the search path to point to the directory where the library is installed. To do so, use the environment variable DYLD_LIBRARY_PATH. Your library must support both the standard FORTRAN LAPACK interface and the standard FORTRAN BLAS interface. If your LAPACK and BLAS interface consists of several libraries, use the path to the LAPACK library.In additions to the options in Table 21-14, the standalone COMSOL command supports the following option:
Table 21-30: COMSOL command-line arguments -open <file> Use a COMSOL Multiphysics server command to start a COMSOL process ready to process computational requests. A COMSOL Multiphysics server listens for TCP/IP connections from COMSOL Multiphysics clients. A COMSOL Desktop can become a COMSOL Multiphysics client by connecting to a COMSOL Multiphysics server. The LiveLink™ for MATLAB® also needs to connect to a COMSOL Multiphysics server.
Table 21-31: COMSOL Multiphysics server command-line arguments -user <user> -port <port> Ask for login information. info means that only missing information is asked for. force resets the password. never requires that the login information is available. auto automatically creates a new username and password. To access the computer running the COMSOL Multiphysics server, simply log in on the server computer by using ssh or a similar command, then enter the comsol server command.When you start a COMSOL Multiphysics server for the first time, you are asked for a username and password. Select a username and a password, which the COMSOL software then uses in communications between the COMSOL Multiphysics client and the server. You must also specify a matching username and password on the settings page in the Model Navigator, which opens when you start the COMSOL Multiphysics client. The software writes this login information in the file login.properties. The login information is located in Library/Preferences/COMSOL/v52a/login.properties in your home directory.
Always make sure that untrusted users cannot access the COMSOL login information. Protect the file Library/Preferences/COMSOL/v52a/login.properties. This is important when using the COMSOL Multiphysics client-server configuration. Alternatively, start the COMSOL Multiphysics server with the -passwd nostore option, and clear Remember Password when connecting to the server. This ensures that your login information is not stored on file.To enhance security, you can limit the address range that can access the COMSOL Multiphysics server, both in your firewall and by changing the COMSOL Multiphysics server configuration. To limit the allowed address range in the server, edit the file <COMSOL Installation Directory>/bin/conf/server.xml and find the lines:and follow the instructions. The default port for the COMSOL Multiphysics server is 2036. You can change this by using the option -port <port> when launching COMSOL and COMSOL Multiphysics server.To enhance security, you can limit the address range that can access the documentation server, both in your firewall and by changing the documentation server configuration. To limit the allowed address range in the server, edit the file <COMSOL Installation Directory>/doc/help/conf/server.xml and find the lines:and follow the instructions. The default port for the documentation server is 8090. You can change this by using the option -docport <docport> when launching COMSOL Multiphysics.
Table 21-32: COMSOL Target command-line arguments -port <port> -server <server name>
Table 21-33: COMSOL BATCH-specific arguments -inputfile <file name> -outputfile <file name> -job <job tag> -study <study tag> -pname <parameter name> -plist <parameter value> -batchlog <file name> -checklicense <filename> The -study option directs COMSOL Multiphysics to run a certain study. The study is identified by its tag. In the COMSOL Desktop, select Show Name and Tag under Model Builder Node Label to see the tags of the jobs under Study within curly braces in the Model Builder. In the model object, determine the tags of the jobs by the command model.study().tags(). You can determine the name of each study by model.study(<tag>).name() using one of the job tags.The -job option works similar to the -study option. It directs COMSOL Multiphysics to start a certain job. The job is identified by its tag. In the model object, determine the tags of the jobs by the command model.batch().tags(). You can determine the name of each job by model.batch(<tag>).name() using one of the job tags.
Table 21-34: COMSOL Compile Options -jdkroot <path> -classpathadd <classpath> comsol mphserver matlab [<options>]The following options are available for the comsol mphserver matlab command:
Table 21-35: COMSOL MATLAB options -mlroot <path> -host <hostname> -port <hostname>